From 867f4fc53ada6ad981bfbc0cd4ac6f521cf7a325 Mon Sep 17 00:00:00 2001 From: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Date: Sun, 31 Aug 2025 23:42:19 +0530 Subject: [PATCH] retry cloud id mapping on migration --- mobile/lib/utils/migration.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mobile/lib/utils/migration.dart b/mobile/lib/utils/migration.dart index e630e641f5..837e721223 100644 --- a/mobile/lib/utils/migration.dart +++ b/mobile/lib/utils/migration.dart @@ -71,7 +71,13 @@ Future migrateDatabaseIfNeeded(Isar db, Drift drift) async { } if (version < 15) { - await _updateCloudId(drift); + try { + await _updateCloudId(drift); + } catch (error) { + Logger("Migration").warning("Error occurred while updating cloud ID: $error"); + // do not update version when error occurs so this is retried the next time + return; + } } if (targetVersion >= 12) {