Drop 1.17 upgrade patch files

14 files.

Bug: T272199
Change-Id: I0ff387e057c1fb35447595a596aa3fec455a795c
This commit is contained in:
Ammarpad 2021-02-07 09:36:06 +01:00 committed by Jforrester
parent e923c5f4c0
commit 09bf630920
17 changed files with 5 additions and 141 deletions

View file

@ -37,19 +37,6 @@ class MysqlUpdater extends DatabaseUpdater {
// 1.2
[ 'doInterwikiUpdate' ],
// 1.17
[ 'addTable', 'iwlinks', 'patch-iwlinks.sql' ],
[ 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ],
[ 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ],
[ 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ],
[ 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ],
[ 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ],
[ 'doClFieldsUpdate' ],
[ 'addTable', 'module_deps', 'patch-module_deps.sql' ],
[ 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ],
[ 'addIndexIfNoneExist',
'archive', [ 'ar_revid', 'ar_revid_uniq' ], 'patch-archive_ar_revid.sql' ],
// 1.18
[ 'doUserNewTalkTimestampNotNull' ],
[ 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ],

View file

@ -376,6 +376,8 @@ class PostgresUpdater extends DatabaseUpdater {
[ 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ],
[ 'dropFkey', 'recentchanges', 'rc_cur_id' ],
// **** T272199 MARKER ****
// 1.27
[ 'dropTable', 'msg_resource_links' ],
[ 'dropTable', 'msg_resource' ],
@ -1513,6 +1515,9 @@ END;
}
}
/**
* MW 1.17
*/
protected function checkIwlPrefix() {
if ( $this->db->indexExists( 'iwlinks', 'iwl_prefix', __METHOD__ ) ) {
$this->applyPatch(

View file

@ -34,18 +34,6 @@ class SqliteUpdater extends DatabaseUpdater {
protected function getCoreUpdateList() {
return [
// 1.17
[ 'addTable', 'iwlinks', 'patch-iwlinks.sql' ],
[ 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ],
[ 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ],
[ 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ],
[ 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ],
[ 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ],
[ 'addTable', 'module_deps', 'patch-module_deps.sql' ],
[ 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ],
[ 'addIndexIfNoneExist',
'archive', [ 'ar_revid', 'ar_revid_uniq' ], 'patch-archive_ar_revid.sql' ],
// 1.18
[ 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ],
[ 'addTable', 'uploadstash', 'patch-uploadstash.sql' ],

View file

@ -1,3 +0,0 @@
-- Hopefully temporary index.
-- For https://phabricator.wikimedia.org/T23279
CREATE INDEX /*i*/ar_revid ON /*$wgDBprefix*/archive ( ar_rev_id );

View file

@ -1,4 +0,0 @@
-- Used for killing the wrong index added during SVN for 1.17
-- Won't affect most people, but it doesn't need to exist
ALTER TABLE /*$wgDBprefix*/archive
DROP INDEX ar_page_revid;

View file

@ -1,19 +0,0 @@
--
-- patch-categorylinks-better-collation.sql
--
-- T2164, T3211, T25682. This is the second version of this patch; the
-- changes are also incorporated into patch-categorylinks-better-collation2.sql,
-- for the benefit of trunk users who applied the original.
--
-- Due to T27254, the length limit of 255 bytes for cl_sortkey_prefix
-- is also enforced in php. If you change the length of that field, make
-- sure to also change the check in LinksUpdate.php.
ALTER TABLE /*$wgDBprefix*/categorylinks
CHANGE COLUMN cl_sortkey cl_sortkey varbinary(230) NOT NULL default '',
ADD COLUMN cl_sortkey_prefix varchar(255) binary NOT NULL default '',
ADD COLUMN cl_collation varbinary(32) NOT NULL default '',
ADD COLUMN cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page',
-- rm'd in 1.27 ADD INDEX (cl_collation),
DROP INDEX cl_sortkey,
ADD INDEX cl_sortkey (cl_to, cl_type, cl_sortkey, cl_from);
INSERT IGNORE INTO /*$wgDBprefix*/updatelog (ul_key) VALUES ('cl_fields_update');

View file

@ -1,8 +0,0 @@
--
-- Add iw_api and iw_wikiid to interwiki table
--
ALTER TABLE /*_*/interwiki
ADD iw_api BLOB NOT NULL;
ALTER TABLE /*_*/interwiki
ADD iw_wikiid varchar(64) NOT NULL;

View file

@ -1,16 +0,0 @@
--
-- Track inline interwiki links
--
CREATE TABLE /*_*/iwlinks (
-- page_id of the referring page
iwl_from int unsigned NOT NULL default 0,
-- Interwiki prefix code of the target
iwl_prefix varbinary(20) NOT NULL default '',
-- Title of the target, including namespace
iwl_title varchar(255) binary NOT NULL default ''
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title);
CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);

View file

@ -1,6 +0,0 @@
--
-- Kill the old iwl_prefix index, which may be present on some
-- installs if they ran update.php between it being added and being renamed
--
DROP INDEX /*i*/iwl_prefix ON /*_*/iwlinks;

View file

@ -1,12 +0,0 @@
-- Table for tracking which local files a module depends on that aren't
-- registered directly.
-- Currently only used for tracking images that CSS depends on
CREATE TABLE /*_*/module_deps (
-- Module name
md_module varbinary(255) NOT NULL,
-- Skin name
md_skin varbinary(32) NOT NULL,
-- JSON blob with file dependencies
md_deps mediumblob NOT NULL
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/md_module_skin ON /*_*/module_deps (md_module, md_skin);

View file

@ -1,4 +0,0 @@
--
-- Recreates the iwl_prefix index for the iwlinks table
--
CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);

View file

@ -1,4 +0,0 @@
-- Add the ul_value column to updatelog
ALTER TABLE /*_*/updatelog
add ul_value blob;

View file

@ -1,3 +0,0 @@
-- Used for killing the wrong index added during SVN for 1.17
-- Won't affect most people, but it doesn't need to exist
DROP INDEX IF EXISTS ar_page_revid;

View file

@ -1,7 +0,0 @@
ALTER TABLE /*_*/categorylinks ADD COLUMN cl_sortkey_prefix TEXT NOT NULL default '';
ALTER TABLE /*_*/categorylinks ADD COLUMN cl_collation BLOB NOT NULL default '';
ALTER TABLE /*_*/categorylinks ADD COLUMN cl_type TEXT NOT NULL default 'page';
CREATE INDEX cl_collation ON /*_*/categorylinks (cl_collation);
DROP INDEX cl_sortkey;
CREATE INDEX cl_sortkey ON /*_*/categorylinks (cl_to, cl_type, cl_sortkey, cl_from);
INSERT OR IGNORE INTO /*_*/updatelog (ul_key) VALUES ('cl_fields_update');

View file

@ -1,19 +0,0 @@
--
-- Add iw_api and iw_wikiid to interwiki table
--
CREATE TABLE /*_*/interwiki_tmp (
iw_prefix TEXT NOT NULL,
iw_url BLOB NOT NULL,
iw_api BLOB NOT NULL,
iw_wikiid TEXT NOT NULL,
iw_local INTEGER NOT NULL,
iw_trans INTEGER NOT NULL default 0
) /*$wgDBTableOptions*/;
INSERT INTO /*_*/interwiki_tmp SELECT iw_prefix, iw_url, '', '', iw_local, iw_trans FROM /*_*/interwiki;
DROP TABLE /*_*/interwiki;
ALTER TABLE /*_*/interwiki_tmp RENAME TO /*_*/interwiki;
CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix);

View file

@ -1,6 +0,0 @@
--
-- Kill the old iwl_prefix index, which may be present on some
-- installs if they ran update.php between it being added and being renamed
--
DROP INDEX IF EXISTS /*i*/iwl_prefix;

View file

@ -1,5 +0,0 @@
--
-- Recreates the iwl_prefix for the iwlinks table
--
DROP INDEX IF EXISTS /*i*/iwl_prefix;
CREATE INDEX IF NOT EXISTS /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);