Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/sql/ArticleFeedbackv5.sql |
— | — | @@ -89,26 +89,24 @@ |
90 | 90 | PRIMARY KEY (aa_feedback_id, aa_field_id) |
91 | 91 | ) /*$wgDBTableOptions*/; |
92 | 92 | |
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. |
107 | 105 | CREATE TABLE IF NOT EXISTS /*_*/aft_article_feedback_ratings_rollup ( |
108 | 106 | arr_page_id integer unsigned NOT NULL, |
109 | 107 | arr_field_id integer unsigned NOT NULL, |
110 | 108 | arr_total integer unsigned NOT NULL, |
111 | 109 | arr_count integer unsigned NOT NULL, |
112 | | - PRIMARY KEY (arr_page_id, arr_rating_id) |
| 110 | + PRIMARY KEY (arr_page_id, arr_field_id) |
113 | 111 | ) /*$wgDBTableOptions*/; |
114 | 112 | |
115 | 113 | CREATE TABLE IF NOT EXISTS /*_*/aft_article_revision_feedback_ratings_rollup ( |
— | — | @@ -117,7 +115,7 @@ |
118 | 116 | afrr_field_id integer unsigned NOT NULL, |
119 | 117 | afrr_total integer unsigned NOT NULL, |
120 | 118 | 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) |
122 | 120 | ) /*$wgDBTableOptions*/; |
123 | 121 | |
124 | 122 | CREATE TABLE IF NOT EXISTS /*_*/aft_article_feedback_select_rollup ( |