Merge "Drop 1.27 upgrade patch files"

This commit is contained in:
jenkins-bot 2021-03-09 11:08:06 +00:00 committed by Gerrit Code Review
commit 19d671dcb4
9 changed files with 1 additions and 100 deletions

View file

@ -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' ],

View file

@ -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 )' ],

View file

@ -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' ],

View file

@ -1,2 +0,0 @@
-- @since 1.27
CREATE INDEX /*i*/cl_collation_ext ON /*_*/categorylinks (cl_collation, cl_to, cl_type, cl_from);

View file

@ -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*/;

View file

@ -1,6 +0,0 @@
--
-- Kill cl_collation index.
-- @since 1.27
--
DROP INDEX /*i*/cl_collation ON /*_*/categorylinks;

View file

@ -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);

View file

@ -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 )
);

View file

@ -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);