EBernhardson (WMF) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/81277


Change subject: Add rc_external_type column to recentchanges table
......................................................................

Add rc_external_type column to recentchanges table

This allows for efficient filtering of recent changes by external type such
as Wikibase, Flow, etc.

Bug: 53230
Change-Id: I931f72acfd03e5252aa9eb44174a8633566cab5a
---
M includes/installer/MysqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/installer/SqliteUpdater.php
A maintenance/archives/patch-rc_external_type.sql
M maintenance/tables.sql
5 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/81277/1

diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index 02faf7c..d63c724 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -231,6 +231,9 @@
                        // 1.22
                        array( 'doIwlinksIndexNonUnique' ),
                        array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title',  
'patch-iwlinks-from-title-index.sql' ),
+
+                       // 1.23
+                       array( 'addField', 'recentchanges', 'rc_external_type', 
'patch-rc_external_type.sql' ),
                );
        }
 
diff --git a/includes/installer/OracleUpdater.php 
b/includes/installer/OracleUpdater.php
index be10e04..2dd884b 100644
--- a/includes/installer/OracleUpdater.php
+++ b/includes/installer/OracleUpdater.php
@@ -85,6 +85,9 @@
                        array( 'modifyField', 'user_groups', 'ug_group', 
'patch-ug_group-length-increase-255.sql' ),
                        array( 'modifyField', 'user_former_groups', 
'ufg_group', 'patch-ufg_group-length-increase-255.sql' ),
 
+                       // 1.23
+                       array( 'addField', 'recentchanges', 'rc_external_type', 
'patch-rc_external_type.sql' ),
+
                        // KEEP THIS AT THE BOTTOM!!
                        array( 'doRebuildDuplicateFunction' ),
 
diff --git a/includes/installer/SqliteUpdater.php 
b/includes/installer/SqliteUpdater.php
index 28d8d66..7c5f054 100644
--- a/includes/installer/SqliteUpdater.php
+++ b/includes/installer/SqliteUpdater.php
@@ -109,6 +109,9 @@
                        array( 'addIndex', 'page_props', 'pp_propname_page',  
'patch-page_props-propname-page-index.sql' ),
                        array( 'addIndex', 'image', 'img_media_mime', 
'patch-img_media_mime-index.sql' ),
                        array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title',  
'patch-iwlinks-from-title-index.sql' ),
+
+                       // 1.23
+                       array( 'addField', 'recentchanges', 'rc_external_type', 
'patch-rc_external_type.sql' ),
                );
        }
 
diff --git a/maintenance/archives/patch-rc_external_type.sql 
b/maintenance/archives/patch-rc_external_type.sql
new file mode 100644
index 0000000..f82ade6
--- /dev/null
+++ b/maintenance/archives/patch-rc_external_type.sql
@@ -0,0 +1,4 @@
+--- August 2013
+--- New field differentiates between types of RC_EXTERNAL changes
+
+ALTER TABLE /*$wgDBprefix*/recentchanges ADD `rc_external_type` VARBINARY(255) 
NULL default NULL;
diff --git a/maintenance/tables.sql b/maintenance/tables.sql
index df1bc06..b8c2f5a 100644
--- a/maintenance/tables.sql
+++ b/maintenance/tables.sql
@@ -1076,6 +1076,9 @@
   -- Visibility of recent changes items, bitfield
   rc_deleted tinyint unsigned NOT NULL default 0,
 
+  -- Store type of change when rc_type === RC_EXTERNAL, or null
+  rc_external_type varbinary(255) NULL default NULL,
+
   -- Value corresonding to log_id, specific log entries
   rc_logid int unsigned NOT NULL default 0,
   -- Store log type info here, or null

-- 
To view, visit https://gerrit.wikimedia.org/r/81277
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I931f72acfd03e5252aa9eb44174a8633566cab5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson (WMF) <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to