| @@ 821-832 (lines=12) @@ | ||
| 818 | } |
|
| 819 | ||
| 820 | // Second requirement: the new index must be missing |
|
| 821 | if ( $this->db->indexExists( $table, $newIndex, __METHOD__ ) ) { |
|
| 822 | $this->output( "...index $newIndex already set on $table table.\n" ); |
|
| 823 | if ( !$skipBothIndexExistWarning && |
|
| 824 | $this->db->indexExists( $table, $oldIndex, __METHOD__ ) |
|
| 825 | ) { |
|
| 826 | $this->output( "...WARNING: $oldIndex still exists, despite it has " . |
|
| 827 | "been renamed into $newIndex (which also exists).\n" . |
|
| 828 | " $oldIndex should be manually removed if not needed anymore.\n" ); |
|
| 829 | } |
|
| 830 | ||
| 831 | return true; |
|
| 832 | } |
|
| 833 | ||
| 834 | // Third requirement: the old index must exist |
|
| 835 | if ( !$this->db->indexExists( $table, $oldIndex, __METHOD__ ) ) { |
|
| @@ 645-656 (lines=12) @@ | ||
| 642 | } |
|
| 643 | ||
| 644 | // Second requirement: the new index must be missing |
|
| 645 | if ( $this->db->indexExists( $table, $new, __METHOD__ ) ) { |
|
| 646 | $this->output( "...index $new already set on $table table.\n" ); |
|
| 647 | if ( !$skipBothIndexExistWarning |
|
| 648 | && $this->db->indexExists( $table, $old, __METHOD__ ) |
|
| 649 | ) { |
|
| 650 | $this->output( "...WARNING: $old still exists, despite it has been " . |
|
| 651 | "renamed into $new (which also exists).\n" . |
|
| 652 | " $old should be manually removed if not needed anymore.\n" ); |
|
| 653 | } |
|
| 654 | ||
| 655 | return; |
|
| 656 | } |
|
| 657 | ||
| 658 | // Third requirement: the old index must exist |
|
| 659 | if ( !$this->db->indexExists( $table, $old, __METHOD__ ) ) { |
|