Merge "StringUtils: Add a utility for checking if a string is a valid regex"
[lhc/web/wiklou.git] / maintenance / archives / patch-drop-user-fields.sql
1 --
2 -- patch-drop-user-fields.sql
3 --
4 -- T188327. Drop old xx_user and xx_user_text fields, and defaults from xx_actor fields.
5
6 ALTER TABLE /*_*/archive
7 DROP INDEX /*i*/ar_usertext_timestamp,
8 DROP COLUMN ar_user,
9 DROP COLUMN ar_user_text,
10 ALTER COLUMN ar_actor DROP DEFAULT;
11
12 ALTER TABLE /*_*/ipblocks
13 DROP COLUMN ipb_by,
14 DROP COLUMN ipb_by_text,
15 ALTER COLUMN ipb_by_actor DROP DEFAULT;
16
17 ALTER TABLE /*_*/image
18 DROP INDEX /*i*/img_user_timestamp,
19 DROP INDEX /*i*/img_usertext_timestamp,
20 DROP COLUMN img_user,
21 DROP COLUMN img_user_text,
22 ALTER COLUMN img_actor DROP DEFAULT;
23
24 ALTER TABLE /*_*/oldimage
25 DROP INDEX /*i*/oi_usertext_timestamp,
26 DROP COLUMN oi_user,
27 DROP COLUMN oi_user_text,
28 ALTER COLUMN oi_actor DROP DEFAULT;
29
30 ALTER TABLE /*_*/filearchive
31 DROP INDEX /*i*/fa_user_timestamp,
32 DROP COLUMN fa_user,
33 DROP COLUMN fa_user_text,
34 ALTER COLUMN fa_actor DROP DEFAULT;
35
36 ALTER TABLE /*_*/recentchanges
37 DROP INDEX /*i*/rc_ns_usertext,
38 DROP INDEX /*i*/rc_user_text,
39 DROP COLUMN rc_user,
40 DROP COLUMN rc_user_text,
41 ALTER COLUMN rc_actor DROP DEFAULT;
42
43 ALTER TABLE /*_*/logging
44 DROP INDEX /*i*/user_time,
45 DROP INDEX /*i*/log_user_type_time,
46 DROP INDEX /*i*/log_user_text_type_time,
47 DROP INDEX /*i*/log_user_text_time,
48 DROP COLUMN log_user,
49 DROP COLUMN log_user_text,
50 ALTER COLUMN log_actor DROP DEFAULT;