[BUG] Immich not starting up on server #1635

Closed
opened 2026-02-05 02:45:19 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @rtokala14 on GitHub (Nov 17, 2023).

The bug

When starting the server after upgrading to the latest version, it is not starting. Keep getting the error message "there is no unique constraint matching given keys for referenced table "assets"".

The OS that Immich Server is running on

Docker on Windows 11

Version of Immich Server

v1.86.0

Version of Immich Mobile App

Latest

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - E:\RPhotos:/mnt/media/RPhotos
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #    file: hwaccel.yml
    #    service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - E:\RPhotos:/mnt/media/RPhotos
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=E:\Immich\

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=******
DB_PASSWORD=******

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=*******
DB_USERNAME=******
DB_DATABASE_NAME=*****

REDIS_HOSTNAME=******

Reproduction steps

1. docker compose down
2. docker compose pull
3. docker compose up -d
...

Additional information

No response

Originally created by @rtokala14 on GitHub (Nov 17, 2023). ### The bug When starting the server after upgrading to the latest version, it is not starting. Keep getting the error message "there is no unique constraint matching given keys for referenced table "assets"". ### The OS that Immich Server is running on Docker on Windows 11 ### Version of Immich Server v1.86.0 ### Version of Immich Mobile App Latest ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - E:\RPhotos:/mnt/media/RPhotos env_file: - .env depends_on: - redis - database - typesense restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - E:\RPhotos:/mnt/media/RPhotos env_file: - .env depends_on: - redis - database - typesense restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - .env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data # remove this to get debug messages - GLOG_minloglevel=1 volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always volumes: pgdata: model-cache: tsdata: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=E:\Immich\ # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=****** DB_PASSWORD=****** # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=******* DB_USERNAME=****** DB_DATABASE_NAME=***** REDIS_HOSTNAME=****** ``` ### Reproduction steps ```bash 1. docker compose down 2. docker compose pull 3. docker compose up -d ... ``` ### Additional information _No response_
Author
Owner

@rtokala14 commented on GitHub (Nov 17, 2023):

immich_server logs:

 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [NestFactory] Starting Nest application...
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +28ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +4ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM     LOG [InstanceLoader] BullModule dependencies initialized +1ms
2023-11-16 23:52:59     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:52:59     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:52:59     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:52:59     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:52:59     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:02 [Nest] 7  - 11/17/2023, 7:53:02 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)...
2023-11-16 23:53:02 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:02     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:02     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:02     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:02     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:02     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:02     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:02 [Nest] 7  - 11/17/2023, 7:53:02 AM   ERROR [ExceptionHandler] there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:02 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:02     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:02     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:02     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:02     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:02     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:02     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:05 [Nest] 7  - 11/17/2023, 7:53:05 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
2023-11-16 23:53:05 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:05     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:05     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:05     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:05     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:05     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:05     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:08 [Nest] 7  - 11/17/2023, 7:53:08 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
2023-11-16 23:53:08 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:08     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:08     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:08     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:08     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:08     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:08     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:11 [Nest] 7  - 11/17/2023, 7:53:11 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (3)...
2023-11-16 23:53:11 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:11     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:11     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:11     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:11     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:11     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:11     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:14 [Nest] 7  - 11/17/2023, 7:53:14 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (4)...
2023-11-16 23:53:14 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:14     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:14     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:14     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:14     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:14     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:14     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:17 [Nest] 7  - 11/17/2023, 7:53:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (5)...
2023-11-16 23:53:17 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:17     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:17     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:17     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:17     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:17     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:17     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:20 [Nest] 7  - 11/17/2023, 7:53:20 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)...
2023-11-16 23:53:20 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:20     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:20     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:20     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:20     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:20     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:20     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:23 [Nest] 7  - 11/17/2023, 7:53:23 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (7)...
2023-11-16 23:53:23 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:23     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:23     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:23     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:23     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:23     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:23     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:26 [Nest] 7  - 11/17/2023, 7:53:26 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (8)...
2023-11-16 23:53:26 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:26     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:26     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:26     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:26     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:26     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:26     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:29 [Nest] 7  - 11/17/2023, 7:53:29 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)...
2023-11-16 23:53:29 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:29     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:29     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:29     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:29     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:29     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:29     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:29 [Nest] 7  - 11/17/2023, 7:53:29 AM   ERROR [ExceptionHandler] there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:29 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:53:29     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
2023-11-16 23:53:29     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-16 23:53:29     at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9)
2023-11-16 23:53:29     at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
2023-11-16 23:53:29     at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
2023-11-16 23:53:29     at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [NestFactory] Starting Nest application...
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +29ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +5ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
2023-11-16 23:53:32 [Nest] 7  - 11/17/2023, 7:53:32 AM     LOG [InstanceLoader] BullModule dependencies initialized +0ms

immich_postgres logs:

2023-11-16 23:54:23 2023-11-17 07:54:23.785 UTC [599] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:23 2023-11-17 07:54:23.785 UTC [599] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:23 2023-11-17 07:54:23.952 UTC [600] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:23 2023-11-17 07:54:23.952 UTC [600] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:26 2023-11-17 07:54:26.027 UTC [601] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:26 2023-11-17 07:54:26.027 UTC [601] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:26 2023-11-17 07:54:26.137 UTC [602] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:26 2023-11-17 07:54:26.137 UTC [602] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:29 2023-11-17 07:54:29.074 UTC [603] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:29 2023-11-17 07:54:29.074 UTC [603] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:29 2023-11-17 07:54:29.192 UTC [604] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:29 2023-11-17 07:54:29.192 UTC [604] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:32 2023-11-17 07:54:32.117 UTC [605] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:32 2023-11-17 07:54:32.117 UTC [605] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:32 2023-11-17 07:54:32.239 UTC [606] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:32 2023-11-17 07:54:32.239 UTC [606] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:35 2023-11-17 07:54:35.159 UTC [607] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:35 2023-11-17 07:54:35.159 UTC [607] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:35 2023-11-17 07:54:35.290 UTC [608] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:35 2023-11-17 07:54:35.290 UTC [608] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:38 2023-11-17 07:54:38.205 UTC [609] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:38 2023-11-17 07:54:38.205 UTC [609] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:38 2023-11-17 07:54:38.359 UTC [610] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:38 2023-11-17 07:54:38.359 UTC [610] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:41 2023-11-17 07:54:41.261 UTC [611] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:41 2023-11-17 07:54:41.261 UTC [611] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:41 2023-11-17 07:54:41.415 UTC [612] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:41 2023-11-17 07:54:41.415 UTC [612] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:44 2023-11-17 07:54:44.316 UTC [613] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:44 2023-11-17 07:54:44.316 UTC [613] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:44 2023-11-17 07:54:44.476 UTC [614] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:44 2023-11-17 07:54:44.476 UTC [614] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:47 2023-11-17 07:54:47.376 UTC [615] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:47 2023-11-17 07:54:47.376 UTC [615] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:47 2023-11-17 07:54:47.531 UTC [616] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:47 2023-11-17 07:54:47.531 UTC [616] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:50 2023-11-17 07:54:50.440 UTC [617] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:50 2023-11-17 07:54:50.440 UTC [617] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
2023-11-16 23:54:50 2023-11-17 07:54:50.636 UTC [618] ERROR:  there is no unique constraint matching given keys for referenced table "assets"
2023-11-16 23:54:50 2023-11-17 07:54:50.636 UTC [618] STATEMENT:  ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE
@rtokala14 commented on GitHub (Nov 17, 2023): immich_server logs: ```Shell [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [NestFactory] Starting Nest application... 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +28ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] ConfigModule dependencies initialized +4ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM LOG [InstanceLoader] BullModule dependencies initialized +1ms 2023-11-16 23:52:59 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:52:59 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:52:59 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:52:59 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:52:59 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:02 [Nest] 7 - 11/17/2023, 7:53:02 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)... 2023-11-16 23:53:02 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:02 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:02 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:02 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:02 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:02 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:02 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:02 [Nest] 7 - 11/17/2023, 7:53:02 AM ERROR [ExceptionHandler] there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:02 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:02 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:02 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:02 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:02 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:02 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:02 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:05 [Nest] 7 - 11/17/2023, 7:53:05 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)... 2023-11-16 23:53:05 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:05 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:05 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:05 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:05 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:05 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:05 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:08 [Nest] 7 - 11/17/2023, 7:53:08 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)... 2023-11-16 23:53:08 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:08 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:08 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:08 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:08 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:08 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:08 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:11 [Nest] 7 - 11/17/2023, 7:53:11 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (3)... 2023-11-16 23:53:11 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:11 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:11 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:11 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:11 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:11 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:14 [Nest] 7 - 11/17/2023, 7:53:14 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (4)... 2023-11-16 23:53:14 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:14 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:14 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:14 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:14 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:14 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:14 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:17 [Nest] 7 - 11/17/2023, 7:53:17 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (5)... 2023-11-16 23:53:17 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:17 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:17 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:17 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:17 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:17 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:20 [Nest] 7 - 11/17/2023, 7:53:20 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)... 2023-11-16 23:53:20 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:20 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:20 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:20 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:20 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:20 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:20 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:23 [Nest] 7 - 11/17/2023, 7:53:23 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (7)... 2023-11-16 23:53:23 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:23 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:23 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:23 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:23 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:23 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:23 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:26 [Nest] 7 - 11/17/2023, 7:53:26 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (8)... 2023-11-16 23:53:26 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:26 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:26 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:26 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:26 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:26 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:26 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:29 [Nest] 7 - 11/17/2023, 7:53:29 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)... 2023-11-16 23:53:29 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:29 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:29 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:29 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:29 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:29 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:29 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:29 [Nest] 7 - 11/17/2023, 7:53:29 AM ERROR [ExceptionHandler] there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:29 QueryFailedError: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:53:29 at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) 2023-11-16 23:53:29 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-16 23:53:29 at async AddJobStatus1699345863886.up (/usr/src/app/dist/infra/migrations/1699345863886-AddJobStatus.js:10:9) 2023-11-16 23:53:29 at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) 2023-11-16 23:53:29 at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) 2023-11-16 23:53:29 at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [NestFactory] Starting Nest application... 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +29ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] ConfigModule dependencies initialized +5ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms 2023-11-16 23:53:32 [Nest] 7 - 11/17/2023, 7:53:32 AM LOG [InstanceLoader] BullModule dependencies initialized +0ms ``` immich_postgres logs: ```Shell 2023-11-16 23:54:23 2023-11-17 07:54:23.785 UTC [599] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:23 2023-11-17 07:54:23.785 UTC [599] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:23 2023-11-17 07:54:23.952 UTC [600] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:23 2023-11-17 07:54:23.952 UTC [600] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:26 2023-11-17 07:54:26.027 UTC [601] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:26 2023-11-17 07:54:26.027 UTC [601] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:26 2023-11-17 07:54:26.137 UTC [602] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:26 2023-11-17 07:54:26.137 UTC [602] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:29 2023-11-17 07:54:29.074 UTC [603] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:29 2023-11-17 07:54:29.074 UTC [603] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:29 2023-11-17 07:54:29.192 UTC [604] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:29 2023-11-17 07:54:29.192 UTC [604] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:32 2023-11-17 07:54:32.117 UTC [605] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:32 2023-11-17 07:54:32.117 UTC [605] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:32 2023-11-17 07:54:32.239 UTC [606] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:32 2023-11-17 07:54:32.239 UTC [606] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:35 2023-11-17 07:54:35.159 UTC [607] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:35 2023-11-17 07:54:35.159 UTC [607] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:35 2023-11-17 07:54:35.290 UTC [608] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:35 2023-11-17 07:54:35.290 UTC [608] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:38 2023-11-17 07:54:38.205 UTC [609] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:38 2023-11-17 07:54:38.205 UTC [609] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:38 2023-11-17 07:54:38.359 UTC [610] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:38 2023-11-17 07:54:38.359 UTC [610] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:41 2023-11-17 07:54:41.261 UTC [611] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:41 2023-11-17 07:54:41.261 UTC [611] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:41 2023-11-17 07:54:41.415 UTC [612] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:41 2023-11-17 07:54:41.415 UTC [612] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:44 2023-11-17 07:54:44.316 UTC [613] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:44 2023-11-17 07:54:44.316 UTC [613] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:44 2023-11-17 07:54:44.476 UTC [614] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:44 2023-11-17 07:54:44.476 UTC [614] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:47 2023-11-17 07:54:47.376 UTC [615] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:47 2023-11-17 07:54:47.376 UTC [615] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:47 2023-11-17 07:54:47.531 UTC [616] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:47 2023-11-17 07:54:47.531 UTC [616] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:50 2023-11-17 07:54:50.440 UTC [617] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:50 2023-11-17 07:54:50.440 UTC [617] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE 2023-11-16 23:54:50 2023-11-17 07:54:50.636 UTC [618] ERROR: there is no unique constraint matching given keys for referenced table "assets" 2023-11-16 23:54:50 2023-11-17 07:54:50.636 UTC [618] STATEMENT: ALTER TABLE "asset_job_status" ADD CONSTRAINT "FK_420bec36fc02813bddf5c8b73d4" FOREIGN KEY ("assetId") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE ```
Author
Owner

@aviv926 commented on GitHub (Nov 17, 2023):

I saw this a few days ago on reddit
Try to check if this solves your problem
https://www.reddit.com/r/immich/comments/17vpbn4/dockercompose_error_the_compose_file/

@aviv926 commented on GitHub (Nov 17, 2023): I saw this a few days ago on reddit Try to check if this solves your problem https://www.reddit.com/r/immich/comments/17vpbn4/dockercompose_error_the_compose_file/
Author
Owner

@rtokala14 commented on GitHub (Nov 22, 2023):

The issues still persists even after upgrading to v1.88.2. I was able to get it to work when i rollbacked the version to v1.86.0 but I could not continue with that as it wouldn't let me login from the app, and would only have to use the webpage.

@rtokala14 commented on GitHub (Nov 22, 2023): The issues still persists even after upgrading to v1.88.2. I was able to get it to work when i rollbacked the version to v1.86.0 but I could not continue with that as it wouldn't let me login from the app, and would only have to use the webpage.
Author
Owner

@jrasm91 commented on GitHub (Nov 23, 2023):

This original error sounds like a problem with your database.

The issue for 88 sounds like you might have missed steps in the release notes

@jrasm91 commented on GitHub (Nov 23, 2023): This original error sounds like a problem with your database. The issue for 88 sounds like you might have missed steps in the release notes
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1635