Index: trunk/extensions/ArticleFeedbackv5/sql/wmfupdate-mar8.sql |
— | — | @@ -0,0 +1,20 @@ |
| 2 | +CREATE UNIQUE INDEX /*i*/afi_name ON /*_*/aft_article_field (afi_name); |
| 3 | + |
| 4 | +ALTER TABLE aft_article_feedback |
| 5 | + DROP INDEX af_net_helpfulness, |
| 6 | + ADD INDEX af_page_net_helpfulness_af_id (af_page_id, af_id, af_net_helpfulness), |
| 7 | + CHANGE COLUMN af_needs_oversight af_oversight_count integer unsigned NOT NULL DEFAULT 0, |
| 8 | + ADD COLUMN af_has_comment BOOLEAN NOT NULL DEFAULT FALSE, |
| 9 | + ADD COLUMN af_is_unhidden BOOLEAN NOT NULL DEFAULT FALSE, |
| 10 | + ADD COLUMN af_is_undeleted BOOLEAN NOT NULL DEFAULT FALSE, |
| 11 | + ADD COLUMN af_is_declined BOOLEAN NOT NULL DEFAULT FALSE, |
| 12 | + ADD COLUMN af_activity_count integer unsigned NOT NULL DEFAULT 0, |
| 13 | + ADD COLUMN af_hide_user_id integer unsigned NOT NULL DEFAULT 0, |
| 14 | + ADD COLUMN af_oversight_user_id integer unsigned NOT NULL DEFAULT 0, |
| 15 | + ADD COLUMN af_hide_timestamp binary(14) NOT NULL DEFAULT '', |
| 16 | + ADD COLUMN af_oversight_timestamp binary(14) NOT NULL DEFAULT ''; |
| 17 | + |
| 18 | +-- Do this with a batched query: |
| 19 | +--UPDATE aft_article_feedback SET af_net_helpfulness = CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED); |
| 20 | +--UPDATE aft_article_feedback, aft_article_answer SET af_has_comment = TRUE WHERE af_bucket_id = 1 AND af_id = aa_feedback_id AND aa_response_text IS NOT NULL; |
| 21 | + |
Property changes on: trunk/extensions/ArticleFeedbackv5/sql/wmfupdate-mar8.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 22 | + native |