Split down patch-comment-table.sql
[lhc/web/wiklou.git] / maintenance / archives / patch-rc_source.sql
1 -- first step of migrating recentchanges rc_type to rc_source
2 ALTER TABLE /*$wgDBprefix*/recentchanges
3 ADD rc_source varbinary(16) NOT NULL default '';
4
5 -- Populate rc_source field with the data from rc_type
6 -- Large wiki's might prefer the PopulateRecentChangeSource maintenance
7 -- script to batch updates into groups rather than all at once.
8 UPDATE /*$wgDBprefix*/recentchanges
9 SET rc_source = CASE
10 WHEN rc_type = 0 THEN 'mw.edit'
11 WHEN rc_type = 1 THEN 'mw.new'
12 WHEN rc_type = 3 THEN 'mw.log'
13 WHEN rc_type = 5 THEN 'mw.external'
14 ELSE ''
15 END
16 WHERE rc_source = '';