© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•3y ago•
2 replies
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
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Unable to run immich after latest upgrade (1.58.0)
ImmichIImmich / help-desk-support
3y ago
CNPG DB Migration for 1.133.0
ImmichIImmich / help-desk-support
9mo ago
Huge DB after migration to 2.0.0
ImmichIImmich / help-desk-support
4mo ago
v.1.133.0 DB Migration
ImmichIImmich / help-desk-support
9mo ago