| @@ 789-797 (lines=9) @@ | ||
| 786 | ||
| 787 | foreach ($indexes as $indexName => $index) { |
|
| 788 | $a = array_diff($columns, $index['columns']); |
|
| 789 | if (empty($a)) { |
|
| 790 | $instructions->addPostStep(sprintf( |
|
| 791 | 'DROP INDEX %s ON %s', |
|
| 792 | $this->quoteColumnName($indexName), |
|
| 793 | $this->quoteTableName($tableName) |
|
| 794 | )); |
|
| 795 | ||
| 796 | return $instructions; |
|
| 797 | } |
|
| 798 | } |
|
| 799 | ||
| 800 | throw new \InvalidArgumentException(sprintf( |
|
| @@ 815-823 (lines=9) @@ | ||
| 812 | $instructions = new AlterInstructions(); |
|
| 813 | ||
| 814 | foreach ($indexes as $name => $index) { |
|
| 815 | if ($name === $indexName) { |
|
| 816 | $instructions->addPostStep(sprintf( |
|
| 817 | 'DROP INDEX %s ON %s', |
|
| 818 | $this->quoteColumnName($indexName), |
|
| 819 | $this->quoteTableName($tableName) |
|
| 820 | )); |
|
| 821 | ||
| 822 | return $instructions; |
|
| 823 | } |
|
| 824 | } |
|
| 825 | ||
| 826 | throw new \InvalidArgumentException(sprintf( |
|