| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function execute(CapsuleInterface $capsule) |
||
| 20 | { |
||
| 21 | $schema = $capsule->getSchema($this->getTable(), $this->getDatabase()); |
||
| 22 | |||
| 23 | if ($schema->hasColumn($this->name)) { |
||
| 24 | throw new ColumnException( |
||
| 25 | "Unable to create column '{$schema->getName()}'.'{$this->name}', column already exists" |
||
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 29 | //Declaring column |
||
| 30 | $this->declareColumn($schema); |
||
| 31 | } |
||
| 32 | } |