| @@ 710-726 (lines=17) @@ | ||
| 707 | /** |
|
| 708 | * {@inheritdoc} |
|
| 709 | */ |
|
| 710 | public function dropIndexByName($tableName, $indexName) |
|
| 711 | { |
|
| 712 | $indexes = $this->getIndexes($tableName); |
|
| 713 | ||
| 714 | foreach ($indexes as $name => $index) { |
|
| 715 | if ($name === $indexName) { |
|
| 716 | $this->execute( |
|
| 717 | sprintf( |
|
| 718 | 'DROP INDEX %s ON %s', |
|
| 719 | $this->quoteColumnName($indexName), |
|
| 720 | $this->quoteTableName($tableName) |
|
| 721 | ) |
|
| 722 | ); |
|
| 723 | ||
| 724 | return; |
|
| 725 | } |
|
| 726 | } |
|
| 727 | } |
|
| 728 | ||
| 729 | /** |
|
| @@ 576-593 (lines=18) @@ | ||
| 573 | /** |
|
| 574 | * {@inheritdoc} |
|
| 575 | */ |
|
| 576 | public function dropIndexByName($tableName, $indexName) |
|
| 577 | { |
|
| 578 | $indexes = $this->getIndexes($tableName); |
|
| 579 | ||
| 580 | foreach ($indexes as $name => $index) { |
|
| 581 | //$a = array_diff($columns, $index['columns']); |
|
| 582 | if ($name === $indexName) { |
|
| 583 | $this->execute( |
|
| 584 | sprintf( |
|
| 585 | 'ALTER TABLE %s DROP INDEX %s', |
|
| 586 | $this->quoteTableName($tableName), |
|
| 587 | $this->quoteColumnName($indexName) |
|
| 588 | ) |
|
| 589 | ); |
|
| 590 | ||
| 591 | return; |
|
| 592 | } |
|
| 593 | } |
|
| 594 | } |
|
| 595 | ||
| 596 | /** |
|
| @@ 624-639 (lines=16) @@ | ||
| 621 | /** |
|
| 622 | * {@inheritdoc} |
|
| 623 | */ |
|
| 624 | public function dropIndexByName($tableName, $indexName) |
|
| 625 | { |
|
| 626 | $indexes = $this->getIndexes($tableName); |
|
| 627 | ||
| 628 | foreach ($indexes as $index) { |
|
| 629 | if ($indexName === $index['index']) { |
|
| 630 | $this->execute( |
|
| 631 | sprintf( |
|
| 632 | 'DROP INDEX %s', |
|
| 633 | $this->quoteColumnName($indexName) |
|
| 634 | ) |
|
| 635 | ); |
|
| 636 | ||
| 637 | return; |
|
| 638 | } |
|
| 639 | } |
|
| 640 | } |
|
| 641 | ||
| 642 | /** |
|