Commit 21a2bf6d authored by Steve Müller's avatar Steve Müller Committed by Marco Pivetta

fix creating and dropping database on PostgreSQL

parent 2e4ed5f8
...@@ -129,48 +129,6 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -129,48 +129,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