A local-first personal finance app
Log more details when migrations are out of sync (#1161)
Jed Foxd6ed860bc39c
diff --git a/packages/loot-core/src/server/migrate/migrations.ts b/packages/loot-core/src/server/migrate/migrations.tsindex 46326e0626..e87794f079 100644--- a/packages/loot-core/src/server/migrate/migrations.ts+++ b/packages/loot-core/src/server/migrate/migrations.ts@@ -111,6 +111,10 @@ function checkDatabaseValidity(appliedIds, available) {i >= available.length ||appliedIds[i] !== getMigrationId(available[i])) {+ console.error('Database is out of sync with migrations:', {+ appliedIds,+ available,+ });throw new Error('out-of-sync-migrations');}}diff --git a/upcoming-release-notes/1161.md b/upcoming-release-notes/1161.mdnew file mode 100644index 0000000000..b6f02c7c79--- /dev/null+++ b/upcoming-release-notes/1161.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [j-f1]+---++Log more details when migrations are out of sync