/** * {@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} */ public function createDatabase($database = null) { if (null === $database) { $database = $this->_conn->getDatabase(); } $params = $this->_conn->getParams(); $params["dbname"] = "information_schema"; $tmpPlatform = $this->_platform; $tmpConn = $this->_conn; $this->_conn = DriverManager::getConnection($params); $this->_platform = $this->_conn->getDatabasePlatform(); parent::createDatabase($database); $this->_platform = $tmpPlatform; $this->_conn = $tmpConn; }
/** * {@inheritdoc} * * Starts a database after creation * as SQL Anywhere needs a database to be started * before it can be used. * * @see startDatabase */ public function createDatabase($database) { parent::createDatabase($database); $this->startDatabase($database); }