r97350 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97349‎ | r97350 | r97351 >
Date:00:20, 17 September 2011
Author:asher
Status:ok (Comments)
Tags:
Comment:
adding index to ArticleFeedback for reporting
Modified paths:
  • /branches/REL1_18/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /branches/REL1_18/extensions/ArticleFeedback/sql/AddArticleFeedbackPageIndex.sql (added) (history)
  • /branches/REL1_18/extensions/ArticleFeedback/sql/ArticleFeedback.sql (modified) (history)

Diff [purge]

Index: branches/REL1_18/extensions/ArticleFeedback/sql/AddArticleFeedbackPageIndex.sql
@@ -0,0 +1 @@
 2+CREATE INDEX /*i*/aa_page_id ON /*_*/article_feedback (aa_page_id, aa_timestamp);
Index: branches/REL1_18/extensions/ArticleFeedback/sql/ArticleFeedback.sql
@@ -35,6 +35,7 @@
3636 PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token)
3737 ) /*$wgDBTableOptions*/;
3838 CREATE INDEX /*i*/aa_user_page_revision ON /*_*/article_feedback (aa_user_id, aa_page_id, aa_revision);
 39+CREATE INDEX /*i*/aa_page_id ON /*_*/article_feedback (aa_page_id, aa_timestamp);
3940
4041 -- Aggregate rating table for a page
4142 CREATE TABLE IF NOT EXISTS /*_*/article_feedback_pages (
Index: branches/REL1_18/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -174,6 +174,15 @@
175175 true
176176 ) );
177177 }
 178+ if ( !db->indexExists( 'article_feedback', 'aa_page_id', __METHOD__ ) ) {
 179+ $updater->addExtensionUpdate( array(
 180+ 'addIndex',
 181+ 'article_feedback',
 182+ 'aa_page_id',
 183+ $dir . '/sql/AddArticleFeedbackPageIndex.sql',
 184+ true
 185+ ) );
 186+ }
178187 $updater->addExtensionUpdate( array(
179188 'addTable',
180189 'article_feedback_properties',

Follow-up revisions

RevisionCommit summaryAuthorDate
r97351i need a lint check pre-commit hookasher00:35, 17 September 2011

Comments

#Comment by Krinkle (talk | contribs)   02:34, 17 September 2011

Only in 1.18 ?

#Comment by Afeldman (talk | contribs)   06:23, 21 September 2011

merged into trunk in r97352 - I probably went about that the wrong way

Status & tagging log