client: Defer foreign keys in database

This commit is contained in:
Elias Projahn 2020-07-20 17:23:45 +02:00
parent 16b1d967ba
commit 86d4980459

View file

@ -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;');
},
);