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
- Read each listed item to identify the exact diverging table/constraint.
- Revert the specific manual change indicated, or restore a pre-change database backup.
- Run `immich-admin schema-check` for machine-readable detail on each item.
- 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
- Read each listed drift item before touching anything — it names the exact object.
- Keep a pristine reference schema (fresh install of same version) for comparison.
- After reverting changes, restart and confirm 'No schema drift detected'.
- Document any emergency schema interventions so they are reverted deliberately.
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
- or run `immich-admin schema-check
- Admin account does not exist
- Album must have an owner
- Column 'embedding' does not exist in table
- Could not find asset
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)