Split dropping of image.img_user_timestamp
Splits the dropping of image.img_user_timestamp (which was added in MW 1.29) from patch-drop-image-img_user_timestamp.sql because if you're upgrading from a much older MW version, the index may not exist, and will cause the whole patch-drop-image-img_user_timestamp.sql patch to fail from the index not existing. It probably should have been added by the ifTableNotExists/actor entry with patch-image-user-index-2.sql (as actor wasn't added until 1.31)... Also fix up some comments relating to the patch filenames I missed whilst I split them in T257407. Bug: T267543 Change-Id: I3cdecf6df459d44b4d51a9ad9e1ff00997ff0c02
This commit is contained in:
parent
b25d48ea03
commit
8e09dbe83a
11 changed files with 16 additions and 10 deletions
|
|
@ -426,6 +426,7 @@ class MysqlUpdater extends DatabaseUpdater {
|
|||
[ 'dropIndex', 'archive', 'usertext_timestamp', 'patch-drop-archive-usertext_timestamp.sql' ],
|
||||
[ 'dropField', 'archive', 'ar_user', 'patch-drop-archive-user-fields.sql' ],
|
||||
[ 'dropField', 'ipblocks', 'ip_by', 'patch-drop-ipblocks-user-fields.sql' ],
|
||||
[ 'dropIndex', 'image', 'img_user_timestamp', 'patch-drop-image-img_user_timestamp.sql' ],
|
||||
[ 'dropField', 'image', 'img_user', 'patch-drop-image-user-fields.sql' ],
|
||||
[ 'dropField', 'oldimage', 'oi_user', 'patch-drop-oldimage-user-fields.sql' ],
|
||||
[ 'dropField', 'filearchive', 'fa_user', 'patch-drop-filearchive-user-fields.sql' ],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- T233221: The index on `archive` variously known as `ar_usertext_timestamp`
|
||||
-- and `usertext_timestamp` has a long and sordid history. We're dropping the
|
||||
-- `ar_user_text` column entirely now (see patch-drop-user-fields.sql), but
|
||||
-- `ar_user_text` column entirely now (see patch-drop-archive-user-fields.sql), but
|
||||
-- this index needs special care thanks to said history.
|
||||
|
||||
-- Do not use the /*i*/ thing here!
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-archive-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- T233221: The index on `archive` variously known as `ar_usertext_timestamp`
|
||||
-- and `usertext_timestamp` has a long and sordid history. We're dropping the
|
||||
-- `ar_user_text` column entirely now (see patch-drop-user-fields.sql), but
|
||||
-- `ar_user_text` column entirely now (see patch-drop-archive-user-fields.sql), but
|
||||
-- this index needs special care thanks to said history.
|
||||
|
||||
-- Do not use the /*i*/ thing here!
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-filearchive-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
--
|
||||
-- patch-drop-image-img_user_timestamp.sql
|
||||
--
|
||||
|
||||
ALTER TABLE /*_*/image
|
||||
DROP INDEX /*i*/img_user_timestamp;
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-image-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
ALTER TABLE /*_*/image
|
||||
DROP INDEX /*i*/img_user_timestamp,
|
||||
DROP INDEX /*i*/img_usertext_timestamp,
|
||||
DROP COLUMN img_user,
|
||||
DROP COLUMN img_user_text,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-ipblocks-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-logging-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-oldimage-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- patch-drop-user-fields.sql
|
||||
-- patch-drop-recentchanges-user-fields.sql
|
||||
--
|
||||
-- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue