immich-app/immich · info

- ${warning}

Error message

  - ${warning}

What it means

Companion to the schema-drift warning: after the summary line, each individual drift item is logged as ` - ${warning}` from drift.asHuman(). Each entry pinpoints one table/constraint/column that diverges from the expected migration state.

Solutions

  1. Read each listed item to identify the exact diverging table/constraint.
  2. Revert the specific manual change indicated, or restore a pre-change database backup.
  3. Run `immich-admin schema-check` for machine-readable detail on each item.
  4. After fixes, restart the server and confirm 'No schema drift detected' is logged.
Defensive patterns

Strategy: validation

Validate before calling

# resolve each drift item to SQL
immich-admin schema-check | while read -r item; do echo "revert: $item"; done

Prevention

When it happens

Trigger: Same bootstrap path (checkSchemaDrift) when drift exists; this line is emitted once per drift item in drift.asHuman().

Common situations: Reading the specific culprit: manually dropped/renamed columns, extra indexes or constraints, tables from removed features, schema restored from another version's dump.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of immich-app/immich@e55ac299a4 (2026-09-15). Data as JSON: /api/errors/8639465c18026720. Report an issue: GitHub.

Appendix: source

Thrown at server/src/services/database.service.ts:139

        }
      }
      preparation.push(
        this.databaseRepository.prewarm(VectorIndex.Clip),
        this.databaseRepository.prewarm(VectorIndex.Face),
      );
      await Promise.all(preparation);
    });
  }

  private async checkSchemaDrift() {
    this.logger.log('Checking for schema drift');
    const drift = await this.databaseRepository.getSchemaDrift();
    if (drift.items.length === 0) {
      this.logger.log('No schema drift detected');
    } else {
      this.logger.warn(`${ErrorMessages.SchemaDrift} or run \`immich-admin schema-check\``);
      for (const warning of drift.asHuman()) {
        this.logger.warn(`  - ${warning}`);
      }
    }
  }

  private async createExtension(extension: DatabaseExtension) {
    try {
      await this.databaseRepository.createExtension(extension);
    } catch (error) {
      const name = EXTENSION_NAMES[extension];
      this.logger.fatal(messages.createFailed({ name, extension }));
      throw error;
    }
  }

  private async updateExtension(extension: VectorExtension, availableVersion: string) {
    this.logger.log(`Updating ${EXTENSION_NAMES[extension]} extension to ${availableVersion}`);
    try {
      await this.databaseRepository.updateVectorExtension(extension, availableVersion);

View on GitHub (pinned to e55ac299a4)