High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(server): quote database name in migration (#7277)
Merte33fd40b4cd5
diff --git a/server/src/infra/migrations/1707000751533-AddVectorsToSearchPath.ts b/server/src/infra/migrations/1707000751533-AddVectorsToSearchPath.tsindex e83e4b4fb0..11c84cf970 100644--- a/server/src/infra/migrations/1707000751533-AddVectorsToSearchPath.ts+++ b/server/src/infra/migrations/1707000751533-AddVectorsToSearchPath.ts@@ -4,11 +4,11 @@ export class AddVectorsToSearchPath1707000751533 implements MigrationInterface {public async up(queryRunner: QueryRunner): Promise<void> {const res = await queryRunner.query(`SELECT current_database() as db`);const databaseName = res[0]['db'];- await queryRunner.query(`ALTER DATABASE ${databaseName} SET search_path TO "$user", public, vectors`);+ await queryRunner.query(`ALTER DATABASE "${databaseName}" SET search_path TO "$user", public, vectors`);}public async down(queryRunner: QueryRunner): Promise<void> {const databaseName = await queryRunner.query(`SELECT current_database()`);- await queryRunner.query(`ALTER DATABASE ${databaseName} SET search_path TO "$user", public`);+ await queryRunner.query(`ALTER DATABASE "${databaseName}" SET search_path TO "$user", public`);}}