r78412 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78411‎ | r78412 | r78413 >
Date:23:44, 14 December 2010
Author:reedy
Status:deferred
Tags:
Comment:
Add aa_rating_bucket column to ArticleFeedback, keeping aa prefix for normalisation
Modified paths:
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/sql/AddRatingBucket.sql (added) (history)
  • /trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql
@@ -29,6 +29,8 @@
3030 aa_rating_id int unsigned NOT NULL,
3131 -- Value of the rating (0 is "unrated", else 1-5)
3232 aa_rating_value int unsigned NOT NULL,
 33+ -- Which rating widget the user was given. Default of 0 is the "old" design
 34+ aa_design_bucket int unsigned NOT NULL DEFAULT 0,
3335 -- 1 vote per user per revision
3436 PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token)
3537 ) /*$wgDBTableOptions*/;
Index: trunk/extensions/ArticleFeedback/sql/AddRatingBucket.sql
@@ -0,0 +1,2 @@
 2+ALTER TABLE /*$wgDBprefix*/article_feedback
 3+ ADD aa_design_bucket int unsigned NOT NULL DEFAULT 0;
\ No newline at end of file
Property changes on: trunk/extensions/ArticleFeedback/sql/AddRatingBucket.sql
___________________________________________________________________
Added: svn:eol-style
14 + native
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -98,6 +98,11 @@
9999 $dir . '/sql/ArticleFeedback.sql', true ) ); // Initial install tables
100100 }
101101 }
 102+
 103+ if ( !$db->fieldExists( 'article_feedback', 'aa_design_bucket', __METHOD__ ) ) {
 104+ $updater->addExtensionUpdate( array( 'addField', 'article_feedback', 'aa_design_bucket',
 105+ $dir . '/sql/AddRatingBucket.sql', true ) );
 106+ }
102107 }
103108 return true;
104109 }

Status & tagging log