Merge "Split down patch-comment-table.sql"
[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 COLUMN ar_user,
8 DROP COLUMN ar_user_text,
9 ALTER COLUMN ar_actor DROP DEFAULT;
10
11 ALTER TABLE /*_*/ipblocks
12 DROP COLUMN ipb_by,
13 DROP COLUMN ipb_by_text,
14 ALTER COLUMN ipb_by_actor DROP DEFAULT;
15
16 ALTER TABLE /*_*/image
17 DROP INDEX /*i*/img_user_timestamp,
18 DROP INDEX /*i*/img_usertext_timestamp,
19 DROP COLUMN img_user,
20 DROP COLUMN img_user_text,
21 ALTER COLUMN img_actor DROP DEFAULT;
22
23 ALTER TABLE /*_*/oldimage
24 DROP INDEX /*i*/oi_usertext_timestamp,
25 DROP COLUMN oi_user,
26 DROP COLUMN oi_user_text,
27 ALTER COLUMN oi_actor DROP DEFAULT;
28
29 ALTER TABLE /*_*/filearchive
30 DROP INDEX /*i*/fa_user_timestamp,
31 DROP COLUMN fa_user,
32 DROP COLUMN fa_user_text,
33 ALTER COLUMN fa_actor DROP DEFAULT;
34
35 ALTER TABLE /*_*/recentchanges
36 DROP INDEX /*i*/rc_ns_usertext,
37 DROP INDEX /*i*/rc_user_text,
38 DROP COLUMN rc_user,
39 DROP COLUMN rc_user_text,
40 ALTER COLUMN rc_actor DROP DEFAULT;
41
42 ALTER TABLE /*_*/logging
43 DROP INDEX /*i*/user_time,
44 DROP INDEX /*i*/log_user_type_time,
45 DROP INDEX /*i*/log_user_text_type_time,
46 DROP INDEX /*i*/log_user_text_time,
47 DROP COLUMN log_user,
48 DROP COLUMN log_user_text,
49 ALTER COLUMN log_actor DROP DEFAULT;