Skip to content

Conversation

@schunski
Copy link

@schunski schunski commented Dec 7, 2025

Fixes two issues preventing the schema.sql file from importing correctly into MySQL.

  1. Fix Foreign Key Constraint Error (Error Code: 6125):
    The table account_vipgrouplist attempts to create a Foreign Key referencing the id column of account_vipgroups. However, the account_vipgroups table was originally defined with a composite Primary Key (id, account_id). MySQL requires the referenced column in a foreign key constraint to be a unique key or the sole primary key. This caused the import to fail with Error 6125: Failed to add the foreign key constraint.
    Updated the account_vipgroups table definition to set the Primary Key strictly on the id column.

  2. Fix Syntax Error in player_charms:
    Renamed the column to tracker_list (standard snake_case) to resolve the syntax error and maintain naming consistency.

-- account_vipgroups (Before)
PRIMARY KEY (`id`, `account_id`)

-- account_vipgroups (After)
PRIMARY KEY (`id`)

-- player_charms (Before)
`tracker list` BLOB NULL

-- player_charms (After)
`tracker_list` BLOB NULL

@jprzimba
Copy link
Collaborator

jprzimba commented Dec 7, 2025

Please create a migration to alter tables

@schunski
Copy link
Author

schunski commented Dec 9, 2025

Sure. Would you prefer the migration queries to be included in schema.sql or in a separate file?

@jprzimba
Copy link
Collaborator

jprzimba commented Dec 9, 2025

Sure. Would you prefer the migration queries to be included in schema.sql or in a separate file?

reate a new migration file in migrations
uptdate db, update db_version and create new migration

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