Skip to content

Draft: Handle budgets by account/user (fix #1121)

There is an error on startup with new instances with migrations which run before the migrations that creates the accountId column:

[5] [2023-08-08T11:52:52.152] [INFO] models/data-migrations - Running data migration on banks (2020-04-14)
[5] [2023-08-08T11:52:52.159] [INFO] models/data-migrations - Finished running data migration on banks (2020-04-14)
[5] [2023-08-08T11:52:52.163] [INFO] models/data-migrations - Running data migration: remove unused migrated-from-cozydb
[5] [2023-08-08T11:52:52.167] [INFO] models/data-migrations - Finished data migration: remove unused migrated-from-cozydb
[5] [2023-08-08T11:52:52.184] [ERROR] init - Error at initialization:
[5] Message: SQLITE_ERROR: no such column: Budget.accountId
[5] QueryFailedError: SQLITE_ERROR: no such column: Budget.accountId
[5]     at handler (/workspace/kresus/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:81:26)
[5]     at replacement (/workspace/kresus/node_modules/sqlite3/lib/trace.js:25:27)
[5]     at Statement.errBack (/workspace/kresus/node_modules/sqlite3/lib/sqlite3.js:15:21)

@bnjbvr Do you remember how we usually deal with this? Also, maybe we could get rid of some migrations by now?

Merge request reports

Loading