Commit 3c9d223e authored by Paul dG's avatar Paul dG Committed by Steve Müller

template1 as default database for Postgres

Fixes #402 (https://github.com/doctrine/DoctrineBundle/issues/402) by connecting by default to 'template1' instead of the database with the same name as the user (Postgre default in case of no dbname).
parent fce1a673
......@@ -89,6 +89,9 @@ class Driver extends AbstractPostgreSQLDriver
if (isset($params['dbname'])) {
$dsn .= 'dbname=' . $params['dbname'] . ' ';
}
else {
$dsn .= 'dbname=template1' . ' ';
}
if (isset($params['sslmode'])) {
$dsn .= 'sslmode=' . $params['sslmode'] . ' ';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment