summaryrefslogtreecommitdiff
path: root/maintenance/archives/patch-rc_source.sql
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /maintenance/archives/patch-rc_source.sql
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'maintenance/archives/patch-rc_source.sql')
-rw-r--r--maintenance/archives/patch-rc_source.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/maintenance/archives/patch-rc_source.sql b/maintenance/archives/patch-rc_source.sql
new file mode 100644
index 00000000..7dedd745
--- /dev/null
+++ b/maintenance/archives/patch-rc_source.sql
@@ -0,0 +1,16 @@
+-- first step of migrating recentchanges rc_type to rc_source
+ALTER TABLE /*$wgDBprefix*/recentchanges
+ ADD rc_source varbinary(16) NOT NULL default '';
+
+-- Populate rc_source field with the data from rc_type
+-- Large wiki's might prefer the PopulateRecentChangeSource maintenance
+-- script to batch updates into groups rather than all at once.
+UPDATE /*$wgDBprefix*/recentchanges
+ SET rc_source = CASE
+ WHEN rc_type = 0 THEN 'mw.edit'
+ WHEN rc_type = 1 THEN 'mw.new'
+ WHEN rc_type = 3 THEN 'mw.log'
+ WHEN rc_type = 5 THEN 'mw.external'
+ ELSE ''
+ END
+WHERE rc_source = '';