Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function execute(CapsuleInterface $capsule): void |
||
23 | { |
||
24 | $schema = $capsule->getSchema($this->getTable()); |
||
25 | |||
26 | if (!$schema->hasForeignKey($this->columns)) { |
||
27 | throw new ForeignKeyException( |
||
28 | "Unable to drop foreign key '{$schema->getName()}'.'{$this->columnNames()}', " |
||
29 | . 'foreign key does not exists' |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | $schema->dropForeignKey($this->columns); |
||
34 | } |
||
36 |