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