Skip to content

Migrations containing defer_foreign_keys fail to apply but the remaining migrations are still applied #531

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

Open
mathix420 opened this issue Apr 1, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@mathix420
Copy link

Describe the bug
nuxt-hub fails to apply migrations containing PRAGMA defer_foreign_keys=on|off, and wrongly reports that everything went well.

Image

Only 14 out of 17 migrations are actually applied, all the failures contain defer_foreign_keys.
Image

Steps to reproduce
Steps to reproduce the behavior:

  • Try to deploy any project containing at least 3 migrations files, on the second one add PRAGMA defer_foreign_keys = on;.
@mathix420 mathix420 added the bug Something isn't working label Apr 1, 2025
@mathix420
Copy link
Author

I just noticed that the error might be linked to adding exactly this line at the end of a migration PRAGMA defer_foreign_keys = off;--> statement-breakpoint especially this part --> statement-breakpoint

Copy link
Contributor

atinux commented Apr 11, 2025

Thank you for the explanation, does removing the `--> statement-breakpoint fixed your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@atinux @mathix420 and others