Index: trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql |
— | — | @@ -21,10 +21,10 @@ |
22 | 22 | -- 1 vote per user per revision |
23 | 23 | PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token) |
24 | 24 | ) /*$wgDBTableOptions*/; |
25 | | -CREATE INDEX /*i*/aa_user_page_revision ON /*_*/article_feedback (aa_user_id, aa_page_id, aa_revision); |
26 | 25 | -- Create an index on the article_feedback.aa_timestamp field |
27 | 26 | CREATE INDEX /*i*/article_feedback_timestamp ON /*_*/article_feedback (aa_timestamp); |
28 | 27 | CREATE INDEX /*i*/aa_page_id ON /*_*/article_feedback (aa_page_id, aa_timestamp); |
| 28 | +CREATE INDEX /*i*/aa_page_user_token ON /*_*/article_feedback (aa_page_id, aa_user_text, aa_user_anon_token, aa_revision); |
29 | 29 | |
30 | 30 | -- Aggregate rating table for a page |
31 | 31 | CREATE TABLE IF NOT EXISTS /*_*/article_feedback_pages ( |
Index: trunk/extensions/ArticleFeedback/sql/delete-aa_user_page_revision.sql |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +DROP INDEX /*i*/aa_user_page_revision ON /*_*/article_feedback; |
| 3 | + |
Property changes on: trunk/extensions/ArticleFeedback/sql/delete-aa_user_page_revision.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |
Index: trunk/extensions/ArticleFeedback/sql/aa_page_user_token.sql |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +CREATE INDEX /*i*/aa_page_user_token ON /*_*/article_feedback (aa_page_id, aa_user_text, aa_user_anon_token, aa_revision); |
| 3 | + |
Property changes on: trunk/extensions/ArticleFeedback/sql/aa_page_user_token.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -207,6 +207,22 @@ |
208 | 208 | $dir . '/sql/AddArticleFeedbackTimestampIndex.sql', |
209 | 209 | true |
210 | 210 | ) ); |
| 211 | + |
| 212 | + $updater->addExtensionUpdate( array( |
| 213 | + 'addIndex', |
| 214 | + 'article_feedback', |
| 215 | + 'aa_page_user_token', |
| 216 | + $dir . '/sql/aa_page_user_token.sql', |
| 217 | + true |
| 218 | + ) ); |
| 219 | + |
| 220 | + $updater->addExtensionUpdate( array( |
| 221 | + 'dropIndex', |
| 222 | + 'article_feedback', |
| 223 | + 'aa_user_page_revision', |
| 224 | + $dir . '/sql/delete-aa_user_page_revision.sql', |
| 225 | + true |
| 226 | + ) ); |
211 | 227 | |
212 | 228 | return true; |
213 | 229 | } |