Commit d99bc394 authored by Kim Hemsø Rasmussen's avatar Kim Hemsø Rasmussen

Stop using template1 as default database for postgres drivers

parent fbd6ab25
......@@ -90,9 +90,9 @@ class Driver extends AbstractPostgreSQLDriver
$dsn .= 'dbname=' . $params['dbname'] . ' ';
} else {
// Used for temporary connections to allow operations like dropping the database currently connected to.
// Connecting without an explicit database does not work, therefore "template1" database is used
// as it is certainly present in every server setup.
$dsn .= 'dbname=template1' . ' ';
// Connecting without an explicit database does not work, therefore "postgres" database is used
// as it is certainly present in every server setup.
$dsn .= 'dbname=postgres' . ' ';
}
if (isset($params['sslmode'])) {
......
......@@ -33,6 +33,6 @@ class DriverTest extends AbstractDriverTest
*/
protected function getDatabaseNameForConnectionWithoutDatabaseNameParameter()
{
return 'template1';
return 'postgres';
}
}
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