mirror of
https://github.com/immich-app/immich.git
synced 2026-03-01 18:19:10 +03:00
feat: allow unordered migrations in dev (#19881)
This commit is contained in:
@@ -334,6 +334,10 @@ export class ConfigRepository {
|
||||
return cached;
|
||||
}
|
||||
|
||||
isDev() {
|
||||
return this.getEnv().environment === ImmichEnvironment.DEVELOPMENT;
|
||||
}
|
||||
|
||||
getWorker() {
|
||||
return this.worker;
|
||||
}
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user