Skip to content

Fix mysql initial setup in docker#47

Merged
kabili207 merged 1 commit into
REONTeam:mainfrom
fsegouin:fix/mysql-8.4-nullable-primary-key
Jul 16, 2026
Merged

Fix mysql initial setup in docker#47
kabili207 merged 1 commit into
REONTeam:mainfrom
fsegouin:fix/mysql-8.4-nullable-primary-key

Conversation

@fsegouin

Copy link
Copy Markdown
Contributor

Problem

docker-compose.example.yml pins mysql:8.4.0, which rejects nullable PRIMARY KEY columns (ERROR 1171: All parts of a PRIMARY KEY must be NOT NULL). Several non-identity primary key columns in the initial schema are declared without 'null' => false, so a fresh docker compose up fails during migration before any tables are usable.

Change

Adds 'null' => false to the affected primary key columns: user_id on sys_email_change and sys_password_reset, the composite keys on the per-region *_battle_tower_trainers and *_ranking tables, bxt_ranking_categories.id, and amkj_user_map.player_id. Identity (auto-increment) columns are already NOT NULL and are left unchanged.

Testing

Ran the migration against stock mysql:8.4.0 (no overrides). It previously failed on the first CREATE TABLE; with this change it completes all migrations and the containers come up.

MySQL 8.4 rejects nullable PRIMARY KEY columns. Several primary key columns in
the initial schema were missing 'null' => false: user_id on sys_email_change
and sys_password_reset, the composite keys on the battle tower and ranking
tables, bxt_ranking_categories.id, and amkj_user_map.player_id. Add it so the
schema migrates on a fresh database.
@kabili207
kabili207 merged commit 2315b20 into REONTeam:main Jul 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants