1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +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 9764881bf5
commit f7c0317c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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