Vlad
03/18/2024, 4:33 PMjw
03/18/2024, 4:47 PMjw
03/18/2024, 4:49 PMPRAGMA foreign_keys = OFF;
Do migration
PRAGMA foreign_keys = ON;
Vlad
03/18/2024, 5:51 PMThis pragma is a no-op within a transaction; foreign key constraint enforcement may only be enabled or disabled when there is no pending BEGIN or SAVEPOINT.
it is not working.
If I put it into the migration file - it just ignored and migration happens.
If I put it into the Drivers "onUpgrade" it crashes:
java.lang.IllegalStateException: Foreign Key Constraints cannot be enabled or disabled while there are transactions in progress. Finish all transactions and release all active database connections first.
jw
03/18/2024, 6:09 PM