Skip to content

High performance self-hosted photo and video management solution.

fix(server): handle period in database name (#18590)

Merte2720e85bb3f
diff --git a/server/src/repositories/database.repository.ts b/server/src/repositories/database.repository.ts
index a87ded5776..48e530c807 100644
--- a/server/src/repositories/database.repository.ts
+++ b/server/src/repositories/database.repository.ts
@@ -118,7 +118,7 @@ export class DatabaseRepository {
this.logger.log(`Creating ${EXTENSION_NAMES[extension]} extension`);
await sql`CREATE EXTENSION IF NOT EXISTS ${sql.raw(extension)} CASCADE`.execute(this.db);
if (extension === DatabaseExtension.VECTORCHORD) {
- const dbName = sql.table(await this.getDatabaseName());
+ const dbName = sql.id(await this.getDatabaseName());
await sql`ALTER DATABASE ${dbName} SET vchordrq.prewarm_dim = '512,640,768,1024,1152,1536'`.execute(this.db);
await sql`SET vchordrq.prewarm_dim = '512,640,768,1024,1152,1536'`.execute(this.db);
await sql`ALTER DATABASE ${dbName} SET vchordrq.probes = 1`.execute(this.db);