[BUG] column "checksum" of relation "assets" contains null values #894

Closed
opened 2026-02-04 23:24:12 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @paulmorabito on GitHub (May 28, 2023).

The bug

Manually upgraded to 1.58 after making the required changes to the docker compose. immich-service is not starting and constantly giving the following error:

2023-05-28 18:52:10.796 CEST [351] STATEMENT:  ALTER TABLE "assets" ALTER COLUMN "checksum" SET NOT NULL
2023-05-28 18:52:13.836 CEST [352] ERROR:  column "checksum" of relation "assets" contains null values

The OS that Immich Server is running on

Debian 11 (via docker)

Version of Immich Server

1.58

Version of Immich Mobile App

1.58

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

immich-server:
    image: altran1502/immich-server:release
    container_name: immich-server
    command: ["start-server.sh"]
    volumes:
      - /media/downloads/immich/:/usr/src/app/upload
    env_file:
      - immich.env
    environment:
      - NODE_ENV=production
      - TYPESENSE_API_KEY=<key>
    depends_on:
      - redis
      - postgres
      - typesense
    restart: always
    labels:
      - com.centurylinklabs.watchtower.enable=true

Your .env content

N/A

Reproduction steps

1. docker compose -f <compose.file> pull <immich serer container>
2. docker compose -f <compose.file> up -d <immich serer container>

(in reality I did this with all containers part of immich)

Additional information

No response

Originally created by @paulmorabito on GitHub (May 28, 2023). ### The bug Manually upgraded to 1.58 after making the required changes to the docker compose. immich-service is not starting and constantly giving the following error: ``` 2023-05-28 18:52:10.796 CEST [351] STATEMENT: ALTER TABLE "assets" ALTER COLUMN "checksum" SET NOT NULL 2023-05-28 18:52:13.836 CEST [352] ERROR: column "checksum" of relation "assets" contains null values ``` ### The OS that Immich Server is running on Debian 11 (via docker) ### Version of Immich Server 1.58 ### Version of Immich Mobile App 1.58 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML immich-server: image: altran1502/immich-server:release container_name: immich-server command: ["start-server.sh"] volumes: - /media/downloads/immich/:/usr/src/app/upload env_file: - immich.env environment: - NODE_ENV=production - TYPESENSE_API_KEY=<key> depends_on: - redis - postgres - typesense restart: always labels: - com.centurylinklabs.watchtower.enable=true ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash 1. docker compose -f <compose.file> pull <immich serer container> 2. docker compose -f <compose.file> up -d <immich serer container> (in reality I did this with all containers part of immich) ``` ### Additional information _No response_
Author
Owner

@paulmorabito commented on GitHub (May 28, 2023):

Full logs:

[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [NestFactory] Starting Nest application...
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +28ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] DownloadModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +6ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
[Nest] 1  - 05/28/2023, 4:59:59 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
QueryFailedError: column "checksum" of relation "assets" contains null values
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RequireChecksumNotNull1684328185099.up (/usr/src/app/dist/apps/immich/libs/infra/src/migrations/1684328185099-RequireChecksumNotNull.js:10:9)
    at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migrat
@paulmorabito commented on GitHub (May 28, 2023): Full logs: ``` [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [NestFactory] Starting Nest application... [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +28ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] BullModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] DownloadModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] DiscoveryModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] ConfigModule dependencies initialized +6ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] BullModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM LOG [InstanceLoader] BullModule dependencies initialized +0ms [Nest] 1 - 05/28/2023, 4:59:59 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)... QueryFailedError: column "checksum" of relation "assets" contains null values at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RequireChecksumNotNull1684328185099.up (/usr/src/app/dist/apps/immich/libs/infra/src/migrations/1684328185099-RequireChecksumNotNull.js:10:9) at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migrat ```
Author
Owner

@bo0tzz commented on GitHub (May 28, 2023):

Duplicate of #2590, which has instructions for fixing this.

@bo0tzz commented on GitHub (May 28, 2023): Duplicate of #2590, which has instructions for fixing this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#894