| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| 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 update table '{$database}'.'{$this->getTable()}', no table exists" |
||
| 32 | ); |
||
| 33 | } |
||
| 34 | |||
| 35 | $schema->save(HandlerInterface::DO_ALL); |
||
| 36 | } |
||
| 38 |