src/Command/CreateDatabaseCommand.php 1 location
|
@@ 41-45 (lines=5) @@
|
| 38 |
|
return 1; |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
if ($this->connection->exists()) { |
| 42 |
|
$this->io->comment('Database <comment>'.$this->connection->getName().'</comment> already exists. Skipped.'); |
| 43 |
|
|
| 44 |
|
return 0; |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
$this->connection->create(null, false); |
| 48 |
|
$this->io->success('Created database "'.$this->connection->getName().'".'); |
src/Command/DropDatabaseCommand.php 1 location
|
@@ 54-58 (lines=5) @@
|
| 51 |
|
return 1; |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
if (!$this->connection->exists()) { |
| 55 |
|
$this->io->comment('Database <comment>'.$this->connection->getName().'</comment> does not exist. Skipped.'); |
| 56 |
|
|
| 57 |
|
return 0; |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
$this->connection->drop(); |
| 61 |
|
$this->io->success('Dropped database "'.$this->connection->getName().'".'); |