r97352 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97351‎ | r97352 | r97353 >
Date:00:39, 17 September 2011
Author:asher
Status:ok
Tags:
Comment:
adding index to ArticleFeedback for reporting (merge 97349:97351)
Modified paths:
  • /trunk/extensions/ArticleFeedback (modified) (history)
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/api/ApiArticleFeedback.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/sql/AddArticleFeedbackPageIndex.sql (added) (history)
  • /trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/sql/AddArticleFeedbackPageIndex.sql
@@ -0,0 +1 @@
 2+CREATE INDEX /*i*/aa_page_id ON /*_*/article_feedback (aa_page_id, aa_timestamp);
Index: trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql
@@ -39,6 +39,7 @@
4040 CREATE INDEX /*i*/aa_revision ON /*_*/article_feedback (aa_revision);
4141 -- Create an index on the article_feedback.aa_timestamp field
4242 CREATE INDEX /*i*/article_feedback_timestamp ON /*_*/article_feedback (aa_timestamp);
 43+CREATE INDEX /*i*/aa_page_id ON /*_*/article_feedback (aa_page_id, aa_timestamp);
4344
4445 -- Aggregate rating table for a page
4546 CREATE TABLE IF NOT EXISTS /*_*/article_feedback_pages (
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -160,6 +160,16 @@
161161 ) );
162162 }
163163
 164+ if ( !$db->indexExists( 'article_feedback', 'aa_page_id', __METHOD__ ) ) {
 165+ $updater->addExtensionUpdate( array(
 166+ 'addIndex',
 167+ 'article_feedback',
 168+ 'aa_page_id',
 169+ $dir . '/sql/AddArticleFeedbackPageIndex.sql',
 170+ true
 171+ ) );
 172+ }
 173+
164174 $updater->addExtensionUpdate( array(
165175 'addField',
166176 'article_feedback',
Property changes on: trunk/extensions/ArticleFeedback/api/ApiArticleFeedback.php
___________________________________________________________________
Modified: svn:mergeinfo
167177 Merged /branches/REL1_18/extensions/ArticleFeedback/api/ApiArticleFeedback.php:r97350
Property changes on: trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php
___________________________________________________________________
Modified: svn:mergeinfo
168178 Merged /branches/REL1_18/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php:r97350
Property changes on: trunk/extensions/ArticleFeedback
___________________________________________________________________
Added: svn:mergeinfo
169179 Merged /branches/REL1_18/extensions/ArticleFeedback:r97350

Status & tagging log