how to set pragma foreign_keys = off, during migrations?

Sqlite does not have the best support when it comes to altering columns and I need to manually write them in the generated migration .SQL files. But I keep getting the foreign key constraint error when I try to run the migration even with pragma foreign keys set to off. Thanks in advance.
1 Reply
goofysystem
goofysystem4mo ago
I'm having the same issue. Were you able to get this fixed? Upon digging maybe it is not possible with drizzle? Hope it gets solved bc I am tired of having to copy over the data of children tables when I alter table on a parent table: Github Issue on this: https://github.com/drizzle-team/drizzle-orm/issues/1813
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...
Want results from more Discord servers?
Add your server