chore(persistence): update schema version

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-08-31 15:52:15 +05:30
committed by xsahil03x
parent b369f18922
commit f184da13db
@@ -53,10 +53,13 @@ class MoorChatDatabase extends _$MoorChatDatabase {
// you should bump this number whenever you change or add a table definition.
@override
int get schemaVersion => 5;
int get schemaVersion => 6;
@override
MigrationStrategy get migration => MigrationStrategy(
beforeOpen: (details) async {
await customStatement('PRAGMA foreign_keys = ON;');
},
onUpgrade: (openingDetails, before, after) async {
if (before != after) {
final m = createMigrator();
@@ -66,9 +69,6 @@ class MoorChatDatabase extends _$MoorChatDatabase {
}
}
},
beforeOpen: (details) async {
await customStatement('PRAGMA foreign_keys = ON;');
},
);
/// Deletes all the tables