Commit 4ebd411c 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 49dfdabe
......@@ -60,6 +60,9 @@ class Driver implements \Doctrine\DBAL\Driver
if (isset($params['dbname'])) {
$dsn .= 'dbname=' . $params['dbname'] . ' ';
}
else {
$dsn .= 'dbname=template1' . ' ';
}
return $dsn;
}
......
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