Getting SQLITE Constraint error with `foreign_keys off`
All I'm doing is dropping default fields from the tables. I had recently learned about PRAGMA foreign_key=off thing and had previously been manually moving over children tables every migration 💀 . But this non-cursed way seems to not work as expected as I'm running into foreign key constraint check. Any help would be greatly appreciated. Below is the generated sql file and I'm using Turso.
2 Replies
It seems that is no way to manipulate PRAGMA during migration with drizzle:
https://github.com/drizzle-team/drizzle-orm/issues/1813
I even tried doing this to my migration setup to set foreign_keys as off but found no success:
GitHub
[BUG]: Cannot update SQLite database due to foreign key constraints...
What version of drizzle-orm are you using? 0.29.3 What version of drizzle-kit are you using? 0.20.13 Describe the Bug I don't have a reproducible demo created, but after making the following ch...
Running into the same issue again. Anyone able to get PRAGMA foreign_key working with drizzle migration?
nevermind works fine with latest drizzle and libsql/client