| @@ 655-666 (lines=12) @@ | ||
| 652 | } |
|
| 653 | ||
| 654 | // Second requirement: the new index must be missing |
|
| 655 | if ( $this->db->indexExists( $table, $new, __METHOD__ ) ) { |
|
| 656 | $this->output( "...index $new already set on $table table.\n" ); |
|
| 657 | if ( !$skipBothIndexExistWarning |
|
| 658 | && $this->db->indexExists( $table, $old, __METHOD__ ) |
|
| 659 | ) { |
|
| 660 | $this->output( "...WARNING: $old still exists, despite it has been " . |
|
| 661 | "renamed into $new (which also exists).\n" . |
|
| 662 | " $old should be manually removed if not needed anymore.\n" ); |
|
| 663 | } |
|
| 664 | ||
| 665 | return; |
|
| 666 | } |
|
| 667 | ||
| 668 | // Third requirement: the old index must exist |
|
| 669 | if ( !$this->db->indexExists( $table, $old, __METHOD__ ) ) { |
|
| @@ 862-873 (lines=12) @@ | ||
| 859 | } |
|
| 860 | ||
| 861 | // Second requirement: the new index must be missing |
|
| 862 | if ( $this->db->indexExists( $table, $newIndex, __METHOD__ ) ) { |
|
| 863 | $this->output( "...index $newIndex already set on $table table.\n" ); |
|
| 864 | if ( !$skipBothIndexExistWarning && |
|
| 865 | $this->db->indexExists( $table, $oldIndex, __METHOD__ ) |
|
| 866 | ) { |
|
| 867 | $this->output( "...WARNING: $oldIndex still exists, despite it has " . |
|
| 868 | "been renamed into $newIndex (which also exists).\n" . |
|
| 869 | " $oldIndex should be manually removed if not needed anymore.\n" ); |
|
| 870 | } |
|
| 871 | ||
| 872 | return true; |
|
| 873 | } |
|
| 874 | ||
| 875 | // Third requirement: the old index must exist |
|
| 876 | if ( !$this->db->indexExists( $table, $oldIndex, __METHOD__ ) ) { |
|