Skip to content

Commit

Permalink
fix: error migrating from v3 to v4 database.
Browse files Browse the repository at this point in the history
  • Loading branch information
MR-TZ-dev committed Aug 1, 2024
1 parent 52fa311 commit 5ac531f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/core/database/app_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ class AppDatabase extends _$AppDatabase with InfraLogger {
await _prePopulateGeoAssets();
},
from3To4: (m, schema) async {
await m.addColumn(profileEntries, profileEntries.testUrl);
// TODO: check if column exists, if not then add column
try {
await m.addColumn(profileEntries, profileEntries.testUrl);
} on Exception catch (err) {
loggy.debug(err);
}
},
),
beforeOpen: (details) async {
Expand Down

0 comments on commit 5ac531f

Please sign in to comment.