Commit 4a603c7a authored by Steve Müller's avatar Steve Müller

fix creating and dropping database on PostgreSQL

parent e2060163
......@@ -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}
*/
......
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