Index: branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/sql/fix_logs.sql |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +-- move oversight items into suppress log |
| 3 | +UPDATE logging SET log_type = 'suppress' WHERE log_type = 'articlefeedbackv5' AND log_action IN ('oversight', 'unoversight', 'decline', 'request', 'unrequest'); |
| 4 | + |
| 5 | +-- update counts for feedback - note this might run awhile |
| 6 | +UPDATE aft_article_feedback |
| 7 | + INNER JOIN page ON af_page_id=page_id |
| 8 | + SET af_activity_count = COALESCE((SELECT COUNT(*) FROM logging |
| 9 | + WHERE log_type = 'articlefeedbackv5' |
| 10 | + AND log_namespace = -1 |
| 11 | + AND log_title = CONCAT('ArticleFeedbackv5/', page_title, '/', af_id) |
| 12 | + GROUP BY log_title), 0) |
| 13 | + WHERE page_namespace = 0; |
| 14 | + |
| 15 | +UPDATE aft_article_feedback |
| 16 | + INNER JOIN page ON af_page_id=page_id |
| 17 | + SET af_suppress_count = COALESCE((SELECT COUNT(*) FROM logging |
| 18 | + WHERE log_type = 'suppress' |
| 19 | + AND log_action IN ('oversight', 'unoversight', 'decline', 'request', 'unrequest') |
| 20 | + AND log_namespace = -1 |
| 21 | + AND log_title = CONCAT('ArticleFeedbackv5/', page_title, '/', af_id) |
| 22 | + GROUP BY log_title), 0) |
| 23 | + WHERE page_namespace = 0; |
Property changes on: branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/sql/fix_logs.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 24 | + native |