1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 02:42:28 +01:00

Hotfix postgres connection string to not silently fail migrations

This commit is contained in:
TheArcaneBrony 2023-01-31 23:27:19 +01:00 committed by GitHub
parent c99deeb69b
commit 6b466ab654

View File

@ -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");