From 5ac531fe150bc05d30612f12ac8fa702b5b5d6de Mon Sep 17 00:00:00 2001 From: "MR_TZ.dev" <77046903+MR-TZ-dev@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:15:55 +0330 Subject: [PATCH] fix: error migrating from v3 to v4 database. --- lib/core/database/app_database.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/database/app_database.dart b/lib/core/database/app_database.dart index 4cf0f5be..dc052037 100644 --- a/lib/core/database/app_database.dart +++ b/lib/core/database/app_database.dart @@ -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 {