feat: allow unordered migrations in dev (#19881)

This commit is contained in:
Jason Rasmussen
2025-07-11 10:58:34 -04:00
committed by GitHub
parent a625921e8f
commit 1cc5ca14ca
4 changed files with 8 additions and 4 deletions

View File

@@ -334,6 +334,10 @@ export class ConfigRepository {
return cached;
}
isDev() {
return this.getEnv().environment === ImmichEnvironment.DEVELOPMENT;
}
getWorker() {
return this.worker;
}

View File

@@ -406,6 +406,7 @@ export class DatabaseRepository {
const migrator = new Migrator({
db: this.db,
migrationLockTableName: 'kysely_migrations_lock',
allowUnorderedMigrations: this.configRepository.isDev(),
migrationTableName: 'kysely_migrations',
provider: new FileMigrationProvider({
fs: { readdir },