|
@@ 529-535 (lines=7) @@
|
| 526 |
|
/** |
| 527 |
|
* @param OutputInterface $output |
| 528 |
|
*/ |
| 529 |
|
public function dropDatabase($output) |
| 530 |
|
{ |
| 531 |
|
$this->detectDbSettings($output); |
| 532 |
|
$db = $this->getConnection(); |
| 533 |
|
$db->query('DROP DATABASE `' . $this->dbSettings['dbname'] . '`'); |
| 534 |
|
$output->writeln('<info>Dropped database</info> <comment>' . $this->dbSettings['dbname'] . '</comment>'); |
| 535 |
|
} |
| 536 |
|
|
| 537 |
|
/** |
| 538 |
|
* @param OutputInterface $output |
|
@@ 557-563 (lines=7) @@
|
| 554 |
|
/** |
| 555 |
|
* @param OutputInterface $output |
| 556 |
|
*/ |
| 557 |
|
public function createDatabase($output) |
| 558 |
|
{ |
| 559 |
|
$this->detectDbSettings($output); |
| 560 |
|
$db = $this->getConnection(); |
| 561 |
|
$db->query('CREATE DATABASE IF NOT EXISTS `' . $this->dbSettings['dbname'] . '`'); |
| 562 |
|
$output->writeln('<info>Created database</info> <comment>' . $this->dbSettings['dbname'] . '</comment>'); |
| 563 |
|
} |
| 564 |
|
|
| 565 |
|
/** |
| 566 |
|
* @param string $command example: 'VARIABLES', 'STATUS' |