Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function execute(CapsuleInterface $capsule) |
||
21 | { |
||
22 | $schema = $capsule->getSchema($this->getTable(), $this->getDatabase()); |
||
23 | $database = $this->database ?? '[default]'; |
||
24 | |||
25 | if (!$schema->exists()) { |
||
26 | throw new TableException( |
||
27 | "Unable to drop table '{$database}'.'{$this->getTable()}', table does not exists" |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | $schema->declareDropped(); |
||
32 | $schema->save(AbstractHandler::DO_ALL); |
||
33 | } |
||
34 | } |