Skip to content

fix: add constraints to foreign keys in database migration#19

Open
RampantDespair wants to merge 1 commit into
litecoin-foundation:v3.3.xfrom
RampantDespair:v3.3.x
Open

fix: add constraints to foreign keys in database migration#19
RampantDespair wants to merge 1 commit into
litecoin-foundation:v3.3.xfrom
RampantDespair:v3.3.x

Conversation

@RampantDespair

Copy link
Copy Markdown

On MariaDB 12.x, unnamed foreign keys are assigned numeric names (e.g. 1) instead of the legacy tablename_ibfk_N convention. Migration steps that drop constraints by their expected names were silently skipping the drop (or hard-failing), leaving the FK in place and blocking subsequent ALTER TABLE statements.

Named all foreign key constraints explicitly in their CREATE TABLE queries so the names match what the migration steps expect.

Closes #18

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.

Fresh install fails on MariaDB 12.x: unnamed FK renamed from blocks_ibfk_1 to 1, breaking migration step 3

1 participant