mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01: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
|
@override
|
||||||
MigrationStrategy get migration => MigrationStrategy(
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
beforeOpen: (details) async {
|
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