High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: missing migration folder broke non-root setups (#17266)
Jason Rasmussen186c57356541
diff --git a/server/src/repositories/database.repository.ts b/server/src/repositories/database.repository.tsindex 917a89b47e..43d3d2c16c 100644--- a/server/src/repositories/database.repository.ts+++ b/server/src/repositories/database.repository.ts@@ -2,7 +2,8 @@ import { Injectable } from '@nestjs/common';import AsyncLock from 'async-lock';import { FileMigrationProvider, Kysely, Migrator, sql, Transaction } from 'kysely';import { InjectKysely } from 'nestjs-kysely';-import { mkdir, readdir } from 'node:fs/promises';+import { existsSync } from 'node:fs';+import { readdir } from 'node:fs/promises';import { join } from 'node:path';import semver from 'semver';import { EXTENSION_NAMES, POSTGRES_VERSION_RANGE, VECTOR_VERSION_RANGE, VECTORS_VERSION_RANGE } from 'src/constants';@@ -212,8 +213,11 @@ export class DatabaseRepository {// eslint-disable-next-line unicorn/prefer-moduleconst migrationFolder = join(__dirname, '..', 'schema/migrations');+// TODO remove after we have at least one kysely migration- await mkdir(migrationFolder, { recursive: true });+ if (!existsSync(migrationFolder)) {+ return;+ }this.logger.debug('Running kysely migrations');const migrator = new Migrator({