@@ 605-620 (lines=16) @@ | ||
602 | /** |
|
603 | * {@inheritdoc} |
|
604 | */ |
|
605 | public function dropIndexByName($tableName, $indexName) |
|
606 | { |
|
607 | $indexes = $this->getIndexes($tableName); |
|
608 | ||
609 | foreach ($indexes as $index) { |
|
610 | if ($indexName === $index['index']) { |
|
611 | $this->execute( |
|
612 | sprintf( |
|
613 | 'DROP INDEX %s', |
|
614 | $this->quoteColumnName($indexName) |
|
615 | ) |
|
616 | ); |
|
617 | return; |
|
618 | } |
|
619 | } |
|
620 | } |
|
621 | ||
622 | /** |
|
623 | * {@inheritdoc} |
@@ 715-731 (lines=17) @@ | ||
712 | /** |
|
713 | * {@inheritdoc} |
|
714 | */ |
|
715 | public function dropIndexByName($tableName, $indexName) |
|
716 | { |
|
717 | $indexes = $this->getIndexes($tableName); |
|
718 | ||
719 | foreach ($indexes as $name => $index) { |
|
720 | if ($name === $indexName) { |
|
721 | $this->execute( |
|
722 | sprintf( |
|
723 | 'DROP INDEX %s ON %s', |
|
724 | $this->quoteColumnName($indexName), |
|
725 | $this->quoteTableName($tableName) |
|
726 | ) |
|
727 | ); |
|
728 | return; |
|
729 | } |
|
730 | } |
|
731 | } |
|
732 | ||
733 | /** |
|
734 | * {@inheritdoc} |
@@ 561-578 (lines=18) @@ | ||
558 | /** |
|
559 | * {@inheritdoc} |
|
560 | */ |
|
561 | public function dropIndexByName($tableName, $indexName) |
|
562 | { |
|
563 | $indexes = $this->getIndexes($tableName); |
|
564 | ||
565 | foreach ($indexes as $name => $index) { |
|
566 | //$a = array_diff($columns, $index['columns']); |
|
567 | if ($name === $indexName) { |
|
568 | $this->execute( |
|
569 | sprintf( |
|
570 | 'ALTER TABLE %s DROP INDEX %s', |
|
571 | $this->quoteTableName($tableName), |
|
572 | $this->quoteColumnName($indexName) |
|
573 | ) |
|
574 | ); |
|
575 | return; |
|
576 | } |
|
577 | } |
|
578 | } |
|
579 | ||
580 | /** |
|
581 | * {@inheritdoc} |