Skip to content
Browse files

Implement createDatabase function.

  • Loading branch information...
1 parent cc50f53 commit 4c8020b8607c420ee0ca41179e38351b62eff87f @posulliv committed
Showing with 17 additions and 2 deletions.
  1. +17 −2 lib/Doctrine/DBAL/Schema/AkibanServerSchemaManager.php
View
19 lib/Doctrine/DBAL/Schema/AkibanServerSchemaManager.php
@@ -61,9 +61,24 @@ public function dropDatabase($database)
$this->_conn = $tmpConn;
}
- public function createDatabase($database)
+ public function createDatabase($database = null)
{
- // TODO
+ if (is_null($database)) {
+ $database = $this->_conn->getDatabase();
+ }
+
+ $params = $this->_conn->getParams();
+ $params["dbname"] = "information_schema";
+ $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)

0 comments on commit 4c8020b

Please sign in to comment.
Something went wrong with that request. Please try again.