Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migration of foreign keys #163

Closed

Conversation

kevinschaul
Copy link

The tests currently fail, due to migration m008_reply_to_id_foreign_key failing. I suspect this is related to a recent change in squlite-utils [0].

This PR avoids that by explictly dropping the foreign key before renaming the table, then adding the foreign key back.

Fixes #162

[0] simonw/sqlite-utils#577

The tests currently fail, due to migration m008_reply_to_id_foreign_key
failing. I suspect this is related to a recent change in squlite-utils
[0].

This PR avoids that by explictly dropping the foreign key before
renaming the table, then adding the foreign key back.

Fixes simonw#162

[0] simonw/sqlite-utils#577
@kevinschaul
Copy link
Author

I suppose a better course would be to fix it in the failed migration rather than a prior migration, in case anyone else is stuck at migration 8.

Moving this fix to m008 should fix the issue for anyone who has
successfully performed m007 but hit the error on m008
@simonw
Copy link
Owner

simonw commented Aug 19, 2023

Now fixed in a release.

@simonw simonw closed this Aug 19, 2023
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.

Error applying migration m008_reply_to_id_foreign_key
2 participants