From 2ca437dca9582de4f61c9eb23a2e11ef080317d9 Mon Sep 17 00:00:00 2001 From: Ammarpad Date: Tue, 9 Mar 2021 07:14:04 +0100 Subject: [PATCH] Drop 1.27 upgrade patch files 6 files for Mysql/Sqlite/PG Change-Id: Idef4906c5a7fdac2667c35bac7e8cc54629647f8 --- includes/installer/MysqlUpdater.php | 12 +-------- includes/installer/PostgresUpdater.php | 9 ------- includes/installer/SqliteUpdater.php | 10 -------- .../patch-add-cl_collation_ext_index.sql | 2 -- maintenance/archives/patch-bot_passwords.sql | 25 ------------------- .../patch-kill-cl_collation_index.sql | 6 ----- .../archives/patch-watchlist-wl_id.sql | 5 ---- .../postgres/archives/patch-bot_passwords.sql | 9 ------- .../sqlite/archives/patch-watchlist-wl_id.sql | 23 ----------------- 9 files changed, 1 insertion(+), 100 deletions(-) delete mode 100644 maintenance/archives/patch-add-cl_collation_ext_index.sql delete mode 100644 maintenance/archives/patch-bot_passwords.sql delete mode 100644 maintenance/archives/patch-kill-cl_collation_index.sql delete mode 100644 maintenance/archives/patch-watchlist-wl_id.sql delete mode 100644 maintenance/postgres/archives/patch-bot_passwords.sql delete mode 100644 maintenance/sqlite/archives/patch-watchlist-wl_id.sql diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 12c7a7be51b..80377cc1e98 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -33,19 +33,9 @@ use Wikimedia\Rdbms\MySQLField; class MysqlUpdater extends DatabaseUpdater { protected function getCoreUpdateList() { return [ - // 1.2 + // 1.2; T273080 [ 'doInterwikiUpdate' ], - // 1.27 - [ 'dropTable', 'msg_resource_links' ], - [ 'dropTable', 'msg_resource' ], - [ 'addTable', 'bot_passwords', 'patch-bot_passwords.sql' ], - [ 'addField', 'watchlist', 'wl_id', 'patch-watchlist-wl_id.sql' ], - [ 'dropIndex', 'categorylinks', 'cl_collation', 'patch-kill-cl_collation_index.sql' ], - [ 'addIndex', 'categorylinks', 'cl_collation_ext', - 'patch-add-cl_collation_ext_index.sql' ], - [ 'doCollationUpdate' ], - // 1.28 [ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp', 'patch-add-rc_name_type_patrolled_timestamp_index.sql' ], diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index d4dd86980a1..bbedfb6748f 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -76,15 +76,6 @@ class PostgresUpdater extends DatabaseUpdater { // **** T272199 MARKER **** - // 1.27 - [ 'dropTable', 'msg_resource_links' ], - [ 'dropTable', 'msg_resource' ], - [ - 'addPgField', 'watchlist', 'wl_id', - "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('watchlist_wl_id_seq')" - ], - [ 'addTable', 'bot_passwords', 'patch-bot_passwords.sql' ], - // 1.28 [ 'addPgIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp', '( rc_namespace, rc_type, rc_patrolled, rc_timestamp )' ], diff --git a/includes/installer/SqliteUpdater.php b/includes/installer/SqliteUpdater.php index 3e5161db224..58719f07a31 100644 --- a/includes/installer/SqliteUpdater.php +++ b/includes/installer/SqliteUpdater.php @@ -34,16 +34,6 @@ class SqliteUpdater extends DatabaseUpdater { protected function getCoreUpdateList() { return [ - // 1.27 - [ 'dropTable', 'msg_resource_links' ], - [ 'dropTable', 'msg_resource' ], - [ 'addTable', 'bot_passwords', 'patch-bot_passwords.sql' ], - [ 'addField', 'watchlist', 'wl_id', 'patch-watchlist-wl_id.sql' ], - [ 'dropIndex', 'categorylinks', 'cl_collation', 'patch-kill-cl_collation_index.sql' ], - [ 'addIndex', 'categorylinks', 'cl_collation_ext', - 'patch-add-cl_collation_ext_index.sql' ], - [ 'doCollationUpdate' ], - // 1.28 [ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp', 'patch-add-rc_name_type_patrolled_timestamp_index.sql' ], diff --git a/maintenance/archives/patch-add-cl_collation_ext_index.sql b/maintenance/archives/patch-add-cl_collation_ext_index.sql deleted file mode 100644 index 8137dc64133..00000000000 --- a/maintenance/archives/patch-add-cl_collation_ext_index.sql +++ /dev/null @@ -1,2 +0,0 @@ --- @since 1.27 -CREATE INDEX /*i*/cl_collation_ext ON /*_*/categorylinks (cl_collation, cl_to, cl_type, cl_from); diff --git a/maintenance/archives/patch-bot_passwords.sql b/maintenance/archives/patch-bot_passwords.sql deleted file mode 100644 index bd60ff72705..00000000000 --- a/maintenance/archives/patch-bot_passwords.sql +++ /dev/null @@ -1,25 +0,0 @@ --- --- This table contains a user's bot passwords: passwords that allow access to --- the account via the API with limited rights. --- -CREATE TABLE /*_*/bot_passwords ( - -- Foreign key to user.user_id - bp_user int NOT NULL, - - -- Application identifier - bp_app_id varbinary(32) NOT NULL, - - -- Password hashes, like user.user_password - bp_password tinyblob NOT NULL, - - -- Like user.user_token - bp_token binary(32) NOT NULL default '', - - -- JSON blob for MWRestrictions - bp_restrictions blob NOT NULL, - - -- Grants allowed to the account when authenticated with this bot-password - bp_grants blob NOT NULL, - - PRIMARY KEY ( bp_user, bp_app_id ) -) /*$wgDBTableOptions*/; diff --git a/maintenance/archives/patch-kill-cl_collation_index.sql b/maintenance/archives/patch-kill-cl_collation_index.sql deleted file mode 100644 index d19195b4433..00000000000 --- a/maintenance/archives/patch-kill-cl_collation_index.sql +++ /dev/null @@ -1,6 +0,0 @@ --- --- Kill cl_collation index. --- @since 1.27 --- - -DROP INDEX /*i*/cl_collation ON /*_*/categorylinks; diff --git a/maintenance/archives/patch-watchlist-wl_id.sql b/maintenance/archives/patch-watchlist-wl_id.sql deleted file mode 100644 index a73e514c8d4..00000000000 --- a/maintenance/archives/patch-watchlist-wl_id.sql +++ /dev/null @@ -1,5 +0,0 @@ --- Primary key in watchlist - -ALTER TABLE /*$wgDBprefix*/watchlist - ADD COLUMN wl_id int unsigned NOT NULL AUTO_INCREMENT FIRST, - ADD PRIMARY KEY (wl_id); diff --git a/maintenance/postgres/archives/patch-bot_passwords.sql b/maintenance/postgres/archives/patch-bot_passwords.sql deleted file mode 100644 index 8e8a794c41d..00000000000 --- a/maintenance/postgres/archives/patch-bot_passwords.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE bot_passwords ( - bp_user INTEGER NOT NULL, - bp_app_id TEXT NOT NULL, - bp_password TEXT NOT NULL, - bp_token TEXT NOT NULL, - bp_restrictions TEXT NOT NULL, - bp_grants TEXT NOT NULL, - PRIMARY KEY ( bp_user, bp_app_id ) -); diff --git a/maintenance/sqlite/archives/patch-watchlist-wl_id.sql b/maintenance/sqlite/archives/patch-watchlist-wl_id.sql deleted file mode 100644 index 771f9b7e348..00000000000 --- a/maintenance/sqlite/archives/patch-watchlist-wl_id.sql +++ /dev/null @@ -1,23 +0,0 @@ -DROP TABLE IF EXISTS /*_*/watchlist_tmp; - -CREATE TABLE /*$wgDBprefix*/watchlist_tmp ( - wl_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, - wl_user INTEGER NOT NULL, - wl_namespace INTEGER NOT NULL default 0, - wl_title TEXT NOT NULL default '', - wl_notificationtimestamp BLOB -); - -INSERT OR IGNORE INTO /*_*/watchlist_tmp ( - wl_user, wl_namespace, wl_title, wl_notificationtimestamp ) - SELECT - wl_user, wl_namespace, wl_title, wl_notificationtimestamp - FROM /*_*/watchlist; - -DROP TABLE /*_*/watchlist; - -ALTER TABLE /*_*/watchlist_tmp RENAME TO /*_*/watchlist; - -CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); -CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title); -CREATE INDEX /*i*/wl_user_notificationtimestamp ON /*_*/watchlist (wl_user, wl_notificationtimestamp);