r85965 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85964‎ | r85965 | r85966 >
Date:17:59, 13 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Added patch for article_feedback_revisions table.
Modified paths:
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/sql/AddRevisionsTable.sql (added) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/sql/AddRevisionsTable.sql
@@ -0,0 +1,15 @@
 2+-- Aggregate rating table for a revision
 3+CREATE TABLE IF NOT EXISTS /*_*/article_feedback_revisions (
 4+ -- Foreign key to page.page_id
 5+ afr_page_id integer unsigned NOT NULL,
 6+ -- Revision that totals are relevant to
 7+ afr_revision integer unsigned NOT NULL,
 8+ -- Foreign key to article_feedback_ratings.aar_rating
 9+ afr_rating_id integer unsigned NOT NULL,
 10+ -- Sum (total) of all the ratings for this article revision
 11+ afr_total integer unsigned NOT NULL,
 12+ -- Number of ratings
 13+ afr_count integer unsigned NOT NULL,
 14+ -- One rating row per page
 15+ PRIMARY KEY (afr_page_id, afr_rating_id, afr_revision)
 16+) /*$wgDBTableOptions*/;
Property changes on: trunk/extensions/ArticleFeedback/sql/AddRevisionsTable.sql
___________________________________________________________________
Added: svn:eol-style
117 + native
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -153,6 +153,12 @@
154154 $dir . '/sql/FixPropertiesAnonTokenSchema.sql',
155155 true
156156 ) );
 157+ $updater->addExtensionUpdate( array(
 158+ 'addTable',
 159+ 'article_feedback_revisions',
 160+ $dir . '/sql/AddRevisionsTable.sql',
 161+ true
 162+ ) );
157163 }
158164 return true;
159165 }

Status & tagging log