Commit 3d1aab8a authored by Steve Müller's avatar Steve Müller Committed by Marco Pivetta

fix creating and dropping database on PostgreSQL

parent 18d5b5f9
...@@ -127,48 +127,6 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -127,48 +127,6 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
); );
} }
/**
* {@inheritdoc}
*/
public function dropDatabase($database)
{
$params = $this->_conn->getParams();
$params["dbname"] = "postgres";
$tmpPlatform = $this->_platform;
$tmpConn = $this->_conn;
$this->_conn = \Doctrine\DBAL\DriverManager::getConnection($params);
$this->_platform = $this->_conn->getDatabasePlatform();
parent::dropDatabase($database);
$this->_conn->close();
$this->_platform = $tmpPlatform;
$this->_conn = $tmpConn;
}
/**
* {@inheritdoc}
*/
public function createDatabase($database)
{
$params = $this->_conn->getParams();
$params["dbname"] = "postgres";
$tmpPlatform = $this->_platform;
$tmpConn = $this->_conn;
$this->_conn = \Doctrine\DBAL\DriverManager::getConnection($params);
$this->_platform = $this->_conn->getDatabasePlatform();
parent::createDatabase($database);
$this->_conn->close();
$this->_platform = $tmpPlatform;
$this->_conn = $tmpConn;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
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