| @@ 776-784 (lines=9) @@ | ||
| 773 | ||
| 774 | foreach ($indexes as $indexName => $index) { |
|
| 775 | $a = array_diff($columns, $index['columns']); |
|
| 776 | if (empty($a)) { |
|
| 777 | $instructions->addPostStep(sprintf( |
|
| 778 | 'DROP INDEX %s ON %s', |
|
| 779 | $this->quoteColumnName($indexName), |
|
| 780 | $this->quoteTableName($tableName) |
|
| 781 | )); |
|
| 782 | ||
| 783 | return $instructions; |
|
| 784 | } |
|
| 785 | } |
|
| 786 | ||
| 787 | throw new \InvalidArgumentException(sprintf( |
|
| @@ 802-810 (lines=9) @@ | ||
| 799 | $instructions = new AlterInstructions(); |
|
| 800 | ||
| 801 | foreach ($indexes as $name => $index) { |
|
| 802 | if ($name === $indexName) { |
|
| 803 | $instructions->addPostStep(sprintf( |
|
| 804 | 'DROP INDEX %s ON %s', |
|
| 805 | $this->quoteColumnName($indexName), |
|
| 806 | $this->quoteTableName($tableName) |
|
| 807 | )); |
|
| 808 | ||
| 809 | return $instructions; |
|
| 810 | } |
|
| 811 | } |
|
| 812 | ||
| 813 | throw new \InvalidArgumentException(sprintf( |
|