r106279 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106278‎ | r106279 | r106280 >
Date:23:16, 14 December 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: Fix syntax errors in AFTv5 SQL file
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql
@@ -89,26 +89,24 @@
9090 PRIMARY KEY (aa_feedback_id, aa_field_id)
9191 ) /*$wgDBTableOptions*/;
9292
93 -/*
94 -These next four are rollup tables used by the articlefeedback special page.
95 -The revision tables store per-revision numers, as we (in meetings with WMF)
96 -agreed that per-revision numbers could be useful in reporting, though
97 -they aren't currently used on the feedback page. The page-level ones only
98 -count back to wgArticleFeedbackv5RatingLifetime, so they're a rolling window.
99 -
100 -There are tables for ratings and select (ratings includes booleans as well),
101 -because while the value of the rating/boolean is important (Rated 3/5), for
102 -selects we only want the count for each input, not the value of that input or
103 -the sum of the values (which will be numerical option_ids, not meaningful
104 -rating values). The queries were sufficiently different that we deemed multiple
105 -tables worthwhile.
106 -*/
 93+--These next four are rollup tables used by the articlefeedback special page.
 94+--The revision tables store per-revision numers, as we (in meetings with WMF)
 95+--agreed that per-revision numbers could be useful in reporting, though
 96+--they aren't currently used on the feedback page. The page-level ones only
 97+--count back to wgArticleFeedbackv5RatingLifetime, so they're a rolling window.
 98+--
 99+--There are tables for ratings and select (ratings includes booleans as well),
 100+--because while the value of the rating/boolean is important (Rated 3/5), for
 101+--selects we only want the count for each input, not the value of that input or
 102+--the sum of the values (which will be numerical option_ids, not meaningful
 103+--rating values). The queries were sufficiently different that we deemed multiple
 104+--tables worthwhile.
107105 CREATE TABLE IF NOT EXISTS /*_*/aft_article_feedback_ratings_rollup (
108106 arr_page_id integer unsigned NOT NULL,
109107 arr_field_id integer unsigned NOT NULL,
110108 arr_total integer unsigned NOT NULL,
111109 arr_count integer unsigned NOT NULL,
112 - PRIMARY KEY (arr_page_id, arr_rating_id)
 110+ PRIMARY KEY (arr_page_id, arr_field_id)
113111 ) /*$wgDBTableOptions*/;
114112
115113 CREATE TABLE IF NOT EXISTS /*_*/aft_article_revision_feedback_ratings_rollup (
@@ -117,7 +115,7 @@
118116 afrr_field_id integer unsigned NOT NULL,
119117 afrr_total integer unsigned NOT NULL,
120118 afrr_count integer unsigned NOT NULL,
121 - PRIMARY KEY (afrr_page_id, afrr_rating_id, afrr_revision_id)
 119+ PRIMARY KEY (afrr_page_id, afrr_field_id, afrr_revision_id)
122120 ) /*$wgDBTableOptions*/;
123121
124122 CREATE TABLE IF NOT EXISTS /*_*/aft_article_feedback_select_rollup (

Follow-up revisions

RevisionCommit summaryAuthorDate
r106322Merge r106279 from 1.18wmf1: fix syntax errors in the .sql filecatrope14:16, 15 December 2011

Status & tagging log