| @@ 564-581 (lines=18) @@ | ||
| 561 | /** |
|
| 562 | * {@inheritdoc} |
|
| 563 | */ |
|
| 564 | public function dropIndexByName($tableName, $indexName) |
|
| 565 | { |
|
| 566 | $indexes = $this->getIndexes($tableName); |
|
| 567 | ||
| 568 | foreach ($indexes as $name => $index) { |
|
| 569 | //$a = array_diff($columns, $index['columns']); |
|
| 570 | if ($name === $indexName) { |
|
| 571 | $this->execute( |
|
| 572 | sprintf( |
|
| 573 | 'ALTER TABLE %s DROP INDEX %s', |
|
| 574 | $this->quoteTableName($tableName), |
|
| 575 | $this->quoteColumnName($indexName) |
|
| 576 | ) |
|
| 577 | ); |
|
| 578 | ||
| 579 | return; |
|
| 580 | } |
|
| 581 | } |
|
| 582 | } |
|
| 583 | ||
| 584 | /** |
|
| @@ 595-610 (lines=16) @@ | ||
| 592 | /** |
|
| 593 | * {@inheritdoc} |
|
| 594 | */ |
|
| 595 | public function dropIndexByName($tableName, $indexName) |
|
| 596 | { |
|
| 597 | $indexes = $this->getIndexes($tableName); |
|
| 598 | ||
| 599 | foreach ($indexes as $index) { |
|
| 600 | if ($indexName === $index['index']) { |
|
| 601 | $this->execute( |
|
| 602 | sprintf( |
|
| 603 | 'DROP INDEX %s', |
|
| 604 | $this->quoteColumnName($indexName) |
|
| 605 | ) |
|
| 606 | ); |
|
| 607 | ||
| 608 | return; |
|
| 609 | } |
|
| 610 | } |
|
| 611 | } |
|
| 612 | ||
| 613 | /** |
|
| @@ 711-727 (lines=17) @@ | ||
| 708 | /** |
|
| 709 | * {@inheritdoc} |
|
| 710 | */ |
|
| 711 | public function dropIndexByName($tableName, $indexName) |
|
| 712 | { |
|
| 713 | $indexes = $this->getIndexes($tableName); |
|
| 714 | ||
| 715 | foreach ($indexes as $name => $index) { |
|
| 716 | if ($name === $indexName) { |
|
| 717 | $this->execute( |
|
| 718 | sprintf( |
|
| 719 | 'DROP INDEX %s ON %s', |
|
| 720 | $this->quoteColumnName($indexName), |
|
| 721 | $this->quoteTableName($tableName) |
|
| 722 | ) |
|
| 723 | ); |
|
| 724 | ||
| 725 | return; |
|
| 726 | } |
|
| 727 | } |
|
| 728 | } |
|
| 729 | ||
| 730 | /** |
|