Created
December 13, 2015 18:39
-
-
Save doctrinebot/651378912d529b15aa43 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-175 - https://github.com/doctrine/doctrine2/issues/2399
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php | |
=================================================================== | |
--- Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php (revision 6806) | |
+++ Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php (working copy) | |
@@ -46,6 +46,38 @@ | |
} | |
} | |
+ 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->_platform = $tmpPlatform; | |
+ $this->_conn = $tmpConn; | |
+ } | |
+ | |
+ 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->_platform = $tmpPlatform; | |
+ $this->_conn = $tmpConn; | |
+ } | |
+ | |
protected function _getPortableTriggerDefinition($trigger) | |
{ | |
return $trigger['trigger_name']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment