From 6b466ab654dbc450d60ad97fb61a18f0d7ca50c2 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 31 Jan 2023 23:27:19 +0100 Subject: Hotfix postgres connection string to not silently fail migrations --- src/util/util/Database.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/util/Database.ts b/src/util/util/Database.ts index 927d6428..31dfa710 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", "") + ? dbConnectionString.split(":")[0]?.replace("+srv", "")?.replace("postgres", "postgresql") : "sqlite"; const isSqlite = DatabaseType.includes("sqlite"); -- cgit 1.4.1