|
@@ 659-666 (lines=8) @@
|
| 656 |
|
$indexes = $this->getIndexes($tableName); |
| 657 |
|
$columns = array_map('strtolower', $columns); |
| 658 |
|
|
| 659 |
|
foreach ($indexes as $indexName => $index) { |
| 660 |
|
if ($columns == $index['columns']) { |
| 661 |
|
return new AlterInstructions([sprintf( |
| 662 |
|
'DROP INDEX %s', |
| 663 |
|
$this->quoteColumnName($indexName) |
| 664 |
|
)]); |
| 665 |
|
} |
| 666 |
|
} |
| 667 |
|
|
| 668 |
|
throw new \InvalidArgumentException(sprintf( |
| 669 |
|
"The specified index on columns '%s' does not exist", |
|
@@ 682-689 (lines=8) @@
|
| 679 |
|
|
| 680 |
|
$indexes = $this->getIndexes($tableName); |
| 681 |
|
|
| 682 |
|
foreach ($indexes as $name => $index) { |
| 683 |
|
if ($name === $indexName) { |
| 684 |
|
return new AlterInstructions([sprintf( |
| 685 |
|
'DROP INDEX %s', |
| 686 |
|
$this->quoteColumnName($indexName) |
| 687 |
|
)]); |
| 688 |
|
} |
| 689 |
|
} |
| 690 |
|
|
| 691 |
|
throw new \InvalidArgumentException(sprintf( |
| 692 |
|
"The specified index name '%s' does not exist", |