Index: branches/wmf/1.18wmf1/maintenance/upgrade-1.18wmf1-1.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | if ( isFlaggedRevsWiki( $wiki ) ) { |
76 | 76 | echo " FlaggedRevs"; |
77 | 77 | sourceUpgradeFile( $db, dirname(__FILE__).'/../extensions/FlaggedRevs/schema/mysql/' . |
78 | | - 'patch-fr_page_rev-index.sql' ); |
| 78 | + 'patch-fr_page_rev-index-wmf1.8.sql' ); |
79 | 79 | } |
80 | 80 | |
81 | 81 | if ( $db->fieldExists( 'article_feedback', 'aa_page_id' ) ) { |
Index: branches/wmf/1.18wmf1/extensions/FlaggedRevs/schema/mysql/patch-fr_page_rev-index-wmf1.8.sql |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +ALTER TABLE /*_*/flaggedrevs |
| 3 | + ADD COLUMN fr_rev_timestamp varbinary(14) NOT NULL default '', |
| 4 | +-- Old (fr_page_id,fr_rev_id) key |
| 5 | + DROP PRIMARY KEY; |
| 6 | + |
| 7 | +-- Take the first row of any duplicates on new key |
| 8 | +ALTER IGNORE TABLE /*_*/flaggedrevs ADD PRIMARY KEY (fr_rev_id); |
| 9 | + |
| 10 | +CREATE INDEX /*i*/page_rev ON /*_*/flaggedrevs (fr_page_id,fr_rev_id); |
| 11 | +CREATE INDEX /*i*/page_time ON /*_*/flaggedrevs (fr_page_id,fr_rev_timestamp); |
| 12 | +CREATE INDEX /*i*/page_qal_time ON /*_*/flaggedrevs (fr_page_id,fr_quality,fr_rev_timestamp); |