Repair 2
All checks were successful
Deploy / deploy-staging (push) Successful in 10s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-07 02:52:14 +02:00
parent 72774c05aa
commit a408765e76
5 changed files with 396 additions and 88 deletions

View File

@@ -213,14 +213,21 @@ final class Database
$host = (string)($db['host'] ?? 'localhost');
$port = (int)($db['port'] ?? 5432);
$connectTimeout = isset($db['connect_timeout']) ? max(1, (int) $db['connect_timeout']) : null;
// Hinweis: charset gehört bei pgsql nicht in den DSN
return sprintf(
$dsn = sprintf(
'pgsql:host=%s;port=%d;dbname=%s',
$host,
$port,
(string)$db['dbname']
);
if ($connectTimeout !== null) {
$dsn .= ';connect_timeout=' . $connectTimeout;
}
return $dsn;
}
private static function buildSqliteDsn(array $db): string