| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function execute(CapsuleInterface $capsule) |
||
| 39 | { |
||
| 40 | $schema = $capsule->getSchema($this->getTable(), $this->getDatabase()); |
||
| 41 | |||
| 42 | if (!$schema->hasColumn($this->name)) { |
||
| 43 | throw new ColumnException( |
||
| 44 | "Unable to drop column '{$schema->getName()}'.'{$this->name}', column does not exists" |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 48 | //Declaring column |
||
| 49 | $schema->dropColumn($this->name); |
||
| 50 | } |
||
| 51 | } |