summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/migration/postgres/1673609867556-templateDeleteCascade.ts (renamed from src/util/migration/postgresql/1673609867556-templateDeleteCascade.ts)0
-rw-r--r--src/util/migration/postgres/1675044825710-webauthn.ts (renamed from src/util/migration/postgresql/1675044825710-webauthn.ts)0
-rw-r--r--src/util/util/Database.ts6
3 files changed, 4 insertions, 2 deletions
diff --git a/src/util/migration/postgresql/1673609867556-templateDeleteCascade.ts b/src/util/migration/postgres/1673609867556-templateDeleteCascade.ts
index 41979e59..41979e59 100644
--- a/src/util/migration/postgresql/1673609867556-templateDeleteCascade.ts
+++ b/src/util/migration/postgres/1673609867556-templateDeleteCascade.ts
diff --git a/src/util/migration/postgresql/1675044825710-webauthn.ts b/src/util/migration/postgres/1675044825710-webauthn.ts
index ac43c928..ac43c928 100644
--- a/src/util/migration/postgresql/1675044825710-webauthn.ts
+++ b/src/util/migration/postgres/1675044825710-webauthn.ts
diff --git a/src/util/util/Database.ts b/src/util/util/Database.ts
index 31dfa710..492fb4e4 100644
--- a/src/util/util/Database.ts
+++ b/src/util/util/Database.ts
@@ -36,7 +36,7 @@ const dbConnectionString =
 	process.env.DATABASE || path.join(process.cwd(), "database.db");
 
 const DatabaseType = dbConnectionString.includes("://")
-	? dbConnectionString.split(":")[0]?.replace("+srv", "")?.replace("postgres", "postgresql")
+	? dbConnectionString.split(":")[0]?.replace("+srv", "")
 	: "sqlite";
 const isSqlite = DatabaseType.includes("sqlite");
 
@@ -103,7 +103,9 @@ export async function initDatabase(): Promise<DataSource> {
 		}
 	};
 	if (!(await dbExists())) {
-		console.log("[Database] This appears to be a fresh database. Synchronising.");
+		console.log(
+			"[Database] This appears to be a fresh database. Synchronising.",
+		);
 		await dbConnection.synchronize();
 	} else {
 		console.log("[Database] Applying missing migrations, if any.");