Add new recentchanges field rc_source to replace rc_type
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 23 Sep 2013 22:38:01 +0000 (15:38 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Wed, 16 Oct 2013 18:35:20 +0000 (11:35 -0700)
commite478c230f6d3f1b7638d4443682eff0df7650def
tree8662789a920764fe5a566a1d00efb7c14b8ad9a1
parentd2929102bd2f47c30603ad54eef97ef2dcacc670
Add new recentchanges field rc_source to replace rc_type

The existing field to differentiate between kinds of recentchanges rows is
the rc_type field. We want to allow extensions to insert their own custom
data into recentchanges, but we have learned via the NS_* series of constants
that requiring extensions to "register" a specific number is very error prone.

The solution, which this commit implements the first phase of, is to utilize
a new 16 byte string field rc_source.  Within that field change types will be
prefixed strings such as 'mw.edit' and 'mw.new'.

This commit adds the new field and begins populating it with data.  At some
point in the future the rc_type field will be dropped.  While WMF wiki's will
simply wait out the 30 day recentchanges history, other wiki's have the option
of letting update.php populate rc_source, or manually applying the db change and
utilizing the PopulateRecentChangeSource maintenance script.

Change-Id: Iaddd6c446373a68d31586ed54346db7d04e13b2c
RELEASE-NOTES-1.22
includes/RecentChange.php
includes/installer/MysqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteUpdater.php
maintenance/archives/patch-rc_source.sql [new file with mode: 0644]
maintenance/populateRecentChangesSource.php [new file with mode: 0644]
maintenance/postgres/tables.sql
maintenance/rebuildrecentchanges.php
maintenance/tables.sql