chore(persistence): update schema version
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -53,10 +53,13 @@ class MoorChatDatabase extends _$MoorChatDatabase {
|
|||||||
|
|
||||||
// you should bump this number whenever you change or add a table definition.
|
// you should bump this number whenever you change or add a table definition.
|
||||||
@override
|
@override
|
||||||
int get schemaVersion => 5;
|
int get schemaVersion => 6;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
MigrationStrategy get migration => MigrationStrategy(
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
|
beforeOpen: (details) async {
|
||||||
|
await customStatement('PRAGMA foreign_keys = ON;');
|
||||||
|
},
|
||||||
onUpgrade: (openingDetails, before, after) async {
|
onUpgrade: (openingDetails, before, after) async {
|
||||||
if (before != after) {
|
if (before != after) {
|
||||||
final m = createMigrator();
|
final m = createMigrator();
|
||||||
@@ -66,9 +69,6 @@ class MoorChatDatabase extends _$MoorChatDatabase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeOpen: (details) async {
|
|
||||||
await customStatement('PRAGMA foreign_keys = ON;');
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Deletes all the tables
|
/// Deletes all the tables
|
||||||
|
|||||||
Reference in New Issue
Block a user