1 -- rc_moved_to_ns and rc_moved_to_title is no longer used, delete the fields
3 CREATE TABLE /*_*/recentchanges_tmp (
4 rc_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
5 rc_timestamp varbinary(14) NOT NULL default '',
6 rc_cur_time varbinary(14) NOT NULL default '',
7 rc_user int unsigned NOT NULL default 0,
8 rc_user_text varchar(255) binary NOT NULL,
9 rc_namespace int NOT NULL default 0,
10 rc_title varchar(255) binary NOT NULL default '',
11 rc_comment varchar(255) binary NOT NULL default '',
12 rc_minor tinyint unsigned NOT NULL default 0,
13 rc_bot tinyint unsigned NOT NULL default 0,
14 rc_new tinyint unsigned NOT NULL default 0,
15 rc_cur_id int unsigned NOT NULL default 0,
16 rc_this_oldid int unsigned NOT NULL default 0,
17 rc_last_oldid int unsigned NOT NULL default 0,
18 rc_type tinyint unsigned NOT NULL default 0,
19 rc_patrolled tinyint unsigned NOT NULL default 0,
20 rc_ip varbinary(40) NOT NULL default '',
23 rc_deleted tinyint unsigned NOT NULL default 0,
24 rc_logid int unsigned NOT NULL default 0,
25 rc_log_type varbinary(255) NULL default NULL,
26 rc_log_action varbinary(255) NULL default NULL,
28 ) /*$wgDBTableOptions*/;
30 INSERT INTO /*_*/recentchanges_tmp
31 SELECT rc_id, rc_timestamp, rc_cur_time, rc_user, rc_user_text, rc_namespace, rc_title, rc_comment,
32 rc_minor, rc_bot, rc_new, rc_cur_id, rc_this_oldid, rc_last_oldid, rc_type, rc_patrolled, rc_ip,
33 rc_old_len, rc_new_len, rc_deleted, rc_logid, rc_log_type, rc_log_action, rc_params
34 FROM /*_*/recentchanges;
36 DROP TABLE /*_*/recentchanges;
38 ALTER TABLE /*_*/recentchanges_tmp RENAME TO /*_*/recentchanges;
40 CREATE INDEX /*i*/rc_timestamp ON /*_*/recentchanges (rc_timestamp);
41 CREATE INDEX /*i*/rc_namespace_title ON /*_*/recentchanges (rc_namespace, rc_title);
42 CREATE INDEX /*i*/rc_cur_id ON /*_*/recentchanges (rc_cur_id);
43 CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,rc_timestamp);
44 CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip);
45 CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text);
46 CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp);