Skip to content

Commit

Permalink
added migration
Browse files Browse the repository at this point in the history
  • Loading branch information
praslnx8 committed Jan 2, 2024
1 parent 35023aa commit bcc8393
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/api/db/app_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,15 @@ class AppDatabase extends _$AppDatabase {
AppDatabase._(super.e);

@override
int get schemaVersion => 1;
int get schemaVersion => 2;

@override
MigrationStrategy get migration =>
MigrationStrategy(onUpgrade: (m, from, to) async {});
MigrationStrategy(onUpgrade: (m, from, to) async {
if (from == 1 && to == 2) {
m.createView(goalInvestmentEnrichedMappingView);
}
});

Future<Map<String, List<Map<String, dynamic>>>> getBackup() async {
final basketBackup =
Expand Down

0 comments on commit bcc8393

Please sign in to comment.