| @@ 717-725 (lines=9) @@ | ||
| 714 | ||
| 715 | foreach ($indexes as $indexName => $index) { |
|
| 716 | $a = array_diff($columns, $index['columns']); |
|
| 717 | if (empty($a)) { |
|
| 718 | $instructions->addPostStep(sprintf( |
|
| 719 | 'DROP INDEX %s ON %s', |
|
| 720 | $this->quoteColumnName($indexName), |
|
| 721 | $this->quoteTableName($tableName) |
|
| 722 | )); |
|
| 723 | ||
| 724 | return $instructions; |
|
| 725 | } |
|
| 726 | } |
|
| 727 | ||
| 728 | throw new \InvalidArgumentException(sprintf( |
|
| @@ 743-751 (lines=9) @@ | ||
| 740 | $instructions = new AlterInstructions(); |
|
| 741 | ||
| 742 | foreach ($indexes as $name => $index) { |
|
| 743 | if ($name === $indexName) { |
|
| 744 | $instructions->addPostStep(sprintf( |
|
| 745 | 'DROP INDEX %s ON %s', |
|
| 746 | $this->quoteColumnName($indexName), |
|
| 747 | $this->quoteTableName($tableName) |
|
| 748 | )); |
|
| 749 | ||
| 750 | return $instructions; |
|
| 751 | } |
|
| 752 | } |
|
| 753 | ||
| 754 | throw new \InvalidArgumentException(sprintf( |
|