mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-25 19:27:24 +02:00
client: Defer foreign keys in database
This commit is contained in:
parent
16b1d967ba
commit
86d4980459
1 changed files with 2 additions and 1 deletions
|
|
@ -31,7 +31,8 @@ class MusicusClientDatabase extends _$MusicusClientDatabase {
|
|||
@override
|
||||
MigrationStrategy get migration => MigrationStrategy(
|
||||
beforeOpen: (details) async {
|
||||
await customStatement('PRAGMA foreign_keys = ON');
|
||||
await customStatement(
|
||||
'PRAGMA foreign_keys = ON; PRAGMA defer_foreign_keys = ON;');
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue