I
Immich2y ago
koyax

DB Migration issue for checksum after Upgrade to 1.58.0

After upgrading to 1.58.0 I get migration errors:
2023-05-28T16:08:22.039240445Z QueryFailedError: column "checksum" of relation "assets" contains null values

2023-05-28T16:08:22.039242160Z at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)

2023-05-28T16:08:22.039243684Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

2023-05-28T16:08:22.039244952Z at async RequireChecksumNotNull1684328185099.up (/usr/src/app/dist/apps/immich/libs/infra/src/migrations/1684328185099-RequireChecksumNotNull.js:10:9)

2023-05-28T16:08:22.039246301Z at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)

2023-05-28T16:08:22.039247623Z at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)

2023-05-28T16:08:22.039248889Z at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-05-28T16:08:22.039240445Z QueryFailedError: column "checksum" of relation "assets" contains null values

2023-05-28T16:08:22.039242160Z at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)

2023-05-28T16:08:22.039243684Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

2023-05-28T16:08:22.039244952Z at async RequireChecksumNotNull1684328185099.up (/usr/src/app/dist/apps/immich/libs/infra/src/migrations/1684328185099-RequireChecksumNotNull.js:10:9)

2023-05-28T16:08:22.039246301Z at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)

2023-05-28T16:08:22.039247623Z at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)

2023-05-28T16:08:22.039248889Z at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
I indeed have some assets, that do not have a checksum in the database. Example from the assets table:
00a0dbcf-510b-4faa-bee9-b1866536fbee,1139,6cc0efad-939f-46f6-8aa5-8d0aeafc906d,1eb1fad72832d9d41113245ee1b35bfcdec37abaf7232992501e295e2746467a,IMAGE,upload/library/username/2020/06-24/P1260976.jpg,upload/6cc0efad-939f-46f6-8aa5-8d0aeafc906d/thumb/1eb1fad72832d9d41113245ee1b35bfcdec37abaf7232992501e295e2746467a/19356d3e-0916-4b8e-b323-03b5d2f62b18.jpeg,2020-06-24 16:38:30.000000 +00:00,2020-06-24 16:38:30.000000 +00:00,false,image/jpeg,0:00:00.000000,upload/6cc0efad-939f-46f6-8aa5-8d0aeafc906d/thumb/1eb1fad72832d9d41113245ee1b35bfcdec37abaf7232992501e295e2746467a/19356d3e-0916-4b8e-b323-03b5d2f62b18.webp,"",,true,,2023-05-27 12:38:18.025606 +00:00,2023-02-21 19:54:59.463631 +00:00,false,P1260976
00a0dbcf-510b-4faa-bee9-b1866536fbee,1139,6cc0efad-939f-46f6-8aa5-8d0aeafc906d,1eb1fad72832d9d41113245ee1b35bfcdec37abaf7232992501e295e2746467a,IMAGE,upload/library/username/2020/06-24/P1260976.jpg,upload/6cc0efad-939f-46f6-8aa5-8d0aeafc906d/thumb/1eb1fad72832d9d41113245ee1b35bfcdec37abaf7232992501e295e2746467a/19356d3e-0916-4b8e-b323-03b5d2f62b18.jpeg,2020-06-24 16:38:30.000000 +00:00,2020-06-24 16:38:30.000000 +00:00,false,image/jpeg,0:00:00.000000,upload/6cc0efad-939f-46f6-8aa5-8d0aeafc906d/thumb/1eb1fad72832d9d41113245ee1b35bfcdec37abaf7232992501e295e2746467a/19356d3e-0916-4b8e-b323-03b5d2f62b18.webp,"",,true,,2023-05-27 12:38:18.025606 +00:00,2023-02-21 19:54:59.463631 +00:00,false,P1260976
2 Replies
bo0tzz
bo0tzz2y ago
GitHub
[BUG] "Unable to connect to the database" with the latest update 1....
The bug After the installation of the latest update (v1.58.0), my server is stuck in a bootloop. I had updated my compose with the new strings, but nothing works. The problem consists in two contai...
koyax
koyaxOP2y ago
Oh I see. Thanks for the hint!

Did you find this page helpful?