| 1394 | | $connect->export->createDatabase($info['dbname']); |
| 1395 | | |
| 1396 | | // Close the temporary connection used to issue the drop database command |
| 1397 | | $this->getManager()->closeConnection($connect); |
| 1398 | | |
| 1399 | | // Close original |
| 1400 | | $this->getManager()->closeConnection($this); |
| 1401 | | |
| 1402 | | // Re-open connection with the newly created database |
| 1403 | | $this->getManager()->openConnection(new PDO($dsn, $this->getOption('username'), $this->getOption('password')), $this->getName(), true); |
| 1404 | | |
| | 1394 | $tmpConnection->export->createDatabase($info['dbname']); |
| | 1395 | } catch (Exception $e) {} |
| | 1396 | |
| | 1397 | // Close the temporary connection used to issue the drop database command |
| | 1398 | $this->getManager()->closeConnection($tmpConnection); |
| | 1399 | |
| | 1400 | // Re-create Doctrine style dsn |
| | 1401 | $dsn = $info['scheme'] . '://' . $this->getOption('username') . ':' . $this->getOption('password') . '@' . $info['host'] . '/' . $info['dbname']; |
| | 1402 | |
| | 1403 | // Re-open connection with the newly created database |
| | 1404 | $this->getManager()->openConnection($dsn, $this->getName(), true); |
| | 1405 | |
| | 1406 | // Close original |
| | 1407 | $this->getManager()->closeConnection($this); |
| | 1408 | |
| | 1409 | if (isset($e)) { |
| | 1410 | return $e; |
| | 1411 | } else { |
| 1432 | | $connect->export->dropDatabase($info['dbname']); |
| 1433 | | |
| 1434 | | // Close the temporary connection used to issue the drop database command |
| 1435 | | $this->getManager()->closeConnection($connect); |
| 1436 | | |
| | 1437 | $tmpConnection->export->dropDatabase($info['dbname']); |
| | 1438 | } catch (Exception $e) {} |
| | 1439 | |
| | 1440 | // Close the temporary connection used to issue the drop database command |
| | 1441 | $this->getManager()->closeConnection($tmpConnection); |
| | 1442 | |
| | 1443 | // Re-create Doctrine style dsn |
| | 1444 | $dsn = $info['scheme'] . '://' . $this->getOption('username') . ':' . $this->getOption('password') . '@' . $info['host'] . '/' . $info['dbname']; |
| | 1445 | |
| | 1446 | // Re-open connection with the newly created database |
| | 1447 | $this->getManager()->openConnection($dsn, $this->getName(), true); |
| | 1448 | |
| | 1449 | if (isset($e)) { |
| | 1450 | return $e; |
| | 1451 | } else { |