| @@ 792-800 (lines=9) @@ | ||
| 789 | ||
| 790 | foreach ($indexes as $indexName => $index) { |
|
| 791 | $a = array_diff($columns, $index['columns']); |
|
| 792 | if (empty($a)) { |
|
| 793 | $instructions->addPostStep(sprintf( |
|
| 794 | 'DROP INDEX %s ON %s', |
|
| 795 | $this->quoteColumnName($indexName), |
|
| 796 | $this->quoteTableName($tableName) |
|
| 797 | )); |
|
| 798 | ||
| 799 | return $instructions; |
|
| 800 | } |
|
| 801 | } |
|
| 802 | ||
| 803 | throw new InvalidArgumentException(sprintf( |
|
| @@ 820-828 (lines=9) @@ | ||
| 817 | $instructions = new AlterInstructions(); |
|
| 818 | ||
| 819 | foreach ($indexes as $name => $index) { |
|
| 820 | if ($name === $indexName) { |
|
| 821 | $instructions->addPostStep(sprintf( |
|
| 822 | 'DROP INDEX %s ON %s', |
|
| 823 | $this->quoteColumnName($indexName), |
|
| 824 | $this->quoteTableName($tableName) |
|
| 825 | )); |
|
| 826 | ||
| 827 | return $instructions; |
|
| 828 | } |
|
| 829 | } |
|
| 830 | ||
| 831 | throw new InvalidArgumentException(sprintf( |
|