Index: trunk/extensions/ArticleFeedback/sql/ArticleFeedback.sql |
— | — | @@ -29,6 +29,8 @@ |
30 | 30 | aa_rating_id int unsigned NOT NULL, |
31 | 31 | -- Value of the rating (0 is "unrated", else 1-5) |
32 | 32 | 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, |
33 | 35 | -- 1 vote per user per revision |
34 | 36 | PRIMARY KEY (aa_revision, aa_user_text, aa_rating_id, aa_user_anon_token) |
35 | 37 | ) /*$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 |
1 | 4 | + native |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -98,6 +98,11 @@ |
99 | 99 | $dir . '/sql/ArticleFeedback.sql', true ) ); // Initial install tables |
100 | 100 | } |
101 | 101 | } |
| 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 | + } |
102 | 107 | } |
103 | 108 | return true; |
104 | 109 | } |