Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
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->hasForeign($this->column)) { |
||
24 | throw new ReferenceException( |
||
25 | "Unable to drop foreign key '{$schema->getName()}'.'{$this->column}', " |
||
26 | . "foreign key does not exists" |
||
27 | ); |
||
28 | } |
||
29 | |||
30 | $schema->dropForeign($this->column); |
||
31 | } |
||
32 | } |