Convert noSound -> no_sound

This commit is contained in:
Brandon Presley 2023-11-28 14:54:02 +13:00
parent 738a48438e
commit af3fd69688

View File

@ -17,7 +17,7 @@ class MyDatabase extends _$MyDatabase {
MyDatabase() : super(_openConnection());
@override
int get schemaVersion => 2;
int get schemaVersion => 3;
@override
MigrationStrategy get migration => MigrationStrategy(
@ -55,6 +55,12 @@ class MyDatabase extends _$MyDatabase {
UPDATE settings SET show_unit = showUnit
''');
}
if (from == 2) {
await m.addColumn(settings, settings.noSound);
await db.customStatement('''
UPDATE settings SET no_sound = noSound
''');
}
},
);
}