| @@ 594-609 (lines=16) @@ | ||
| 591 | /** |
|
| 592 | * {@inheritdoc} |
|
| 593 | */ |
|
| 594 | public function dropIndexByName($tableName, $indexName) |
|
| 595 | { |
|
| 596 | $indexes = $this->getIndexes($tableName); |
|
| 597 | ||
| 598 | foreach ($indexes as $index) { |
|
| 599 | if ($indexName === $index['index']) { |
|
| 600 | $this->execute( |
|
| 601 | sprintf( |
|
| 602 | 'DROP INDEX %s', |
|
| 603 | $this->quoteColumnName($indexName) |
|
| 604 | ) |
|
| 605 | ); |
|
| 606 | ||
| 607 | return; |
|
| 608 | } |
|
| 609 | } |
|
| 610 | } |
|
| 611 | ||
| 612 | /** |
|
| @@ 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 | /** |
|
| @@ 580-597 (lines=18) @@ | ||
| 577 | /** |
|
| 578 | * {@inheritdoc} |
|
| 579 | */ |
|
| 580 | public function dropIndexByName($tableName, $indexName) |
|
| 581 | { |
|
| 582 | $indexes = $this->getIndexes($tableName); |
|
| 583 | ||
| 584 | foreach ($indexes as $name => $index) { |
|
| 585 | //$a = array_diff($columns, $index['columns']); |
|
| 586 | if ($name === $indexName) { |
|
| 587 | $this->execute( |
|
| 588 | sprintf( |
|
| 589 | 'ALTER TABLE %s DROP INDEX %s', |
|
| 590 | $this->quoteTableName($tableName), |
|
| 591 | $this->quoteColumnName($indexName) |
|
| 592 | ) |
|
| 593 | ); |
|
| 594 | ||
| 595 | return; |
|
| 596 | } |
|
| 597 | } |
|
| 598 | } |
|
| 599 | ||
| 600 | /** |
|
| @@ 580-597 (lines=18) @@ | ||
| 577 | /** |
|
| 578 | * {@inheritdoc} |
|
| 579 | */ |
|
| 580 | public function dropIndexByName($tableName, $indexName) |
|
| 581 | { |
|
| 582 | $indexes = $this->getIndexes($tableName); |
|
| 583 | ||
| 584 | foreach ($indexes as $name => $index) { |
|
| 585 | if ($name === $indexName) { |
|
| 586 | $this->execute( |
|
| 587 | sprintf( |
|
| 588 | 'DROP INDEX %s', |
|
| 589 | $this->quoteColumnName($indexName), |
|
| 590 | $this->quoteTableName($tableName) |
|
| 591 | ) |
|
| 592 | ); |
|
| 593 | ||
| 594 | return; |
|
| 595 | } |
|
| 596 | } |
|
| 597 | } |
|
| 598 | ||
| 599 | /** |
|
| 600 | * {@inheritdoc} |
|