| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| 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 update table '{$database}'.'{$this->getTable()}', no table exists" |
||
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | $schema->save(AbstractHandler::DO_ALL); |
||
| 32 | } |
||
| 33 | } |