X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2Farchives%2Fpatch-actor-table.sql;h=62c8ef7cf352cb59747dda246ec719c3ac3e6648;hp=fdd95e8014425d0542392ed9afaebd074aed69ea;hb=fb04cc5a7ef629703535dccdaecd6fe02f203c81;hpb=27c61fb1e94da9114314468fd00bcf129ec064b6 diff --git a/maintenance/archives/patch-actor-table.sql b/maintenance/archives/patch-actor-table.sql index fdd95e8014..62c8ef7cf3 100644 --- a/maintenance/archives/patch-actor-table.sql +++ b/maintenance/archives/patch-actor-table.sql @@ -1,7 +1,7 @@ -- -- patch-actor-table.sql -- --- T167246. Add an `actor` table and various columns (and temporary tables) to reference it. +-- T167246. Add an `actor` table. CREATE TABLE /*_*/actor ( actor_id bigint unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, @@ -10,48 +10,3 @@ CREATE TABLE /*_*/actor ( ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/actor_user ON /*_*/actor (actor_user); CREATE UNIQUE INDEX /*i*/actor_name ON /*_*/actor (actor_name); - -CREATE TABLE /*_*/revision_actor_temp ( - revactor_rev int unsigned NOT NULL, - revactor_actor bigint unsigned NOT NULL, - revactor_timestamp binary(14) NOT NULL default '', - revactor_page int unsigned NOT NULL, - PRIMARY KEY (revactor_rev, revactor_actor) -) /*$wgDBTableOptions*/; -CREATE UNIQUE INDEX /*i*/revactor_rev ON /*_*/revision_actor_temp (revactor_rev); -CREATE INDEX /*i*/actor_timestamp ON /*_*/revision_actor_temp (revactor_actor,revactor_timestamp); -CREATE INDEX /*i*/page_actor_timestamp ON /*_*/revision_actor_temp (revactor_page,revactor_actor,revactor_timestamp); - -ALTER TABLE /*_*/archive - ALTER COLUMN ar_user_text SET DEFAULT '', - ADD COLUMN ar_actor bigint unsigned NOT NULL DEFAULT 0 AFTER ar_user_text; -CREATE INDEX /*i*/ar_actor_timestamp ON /*_*/archive (ar_actor,ar_timestamp); - -ALTER TABLE /*_*/ipblocks - ADD COLUMN ipb_by_actor bigint unsigned NOT NULL DEFAULT 0 AFTER ipb_by_text; - -ALTER TABLE /*_*/image - ALTER COLUMN img_user_text SET DEFAULT '', - ADD COLUMN img_actor bigint unsigned NOT NULL DEFAULT 0 AFTER img_user_text; -CREATE INDEX /*i*/img_actor_timestamp ON /*_*/image (img_actor, img_timestamp); - -ALTER TABLE /*_*/oldimage - ALTER COLUMN oi_user_text SET DEFAULT '', - ADD COLUMN oi_actor bigint unsigned NOT NULL DEFAULT 0 AFTER oi_user_text; -CREATE INDEX /*i*/oi_actor_timestamp ON /*_*/oldimage (oi_actor,oi_timestamp); - -ALTER TABLE /*_*/filearchive - ALTER COLUMN fa_user_text SET DEFAULT '', - ADD COLUMN fa_actor bigint unsigned NOT NULL DEFAULT 0 AFTER fa_user_text; -CREATE INDEX /*i*/fa_actor_timestamp ON /*_*/filearchive (fa_actor,fa_timestamp); - -ALTER TABLE /*_*/recentchanges - ALTER COLUMN rc_user_text SET DEFAULT '', - ADD COLUMN rc_actor bigint unsigned NOT NULL DEFAULT 0 AFTER rc_user_text; -CREATE INDEX /*i*/rc_ns_actor ON /*_*/recentchanges (rc_namespace, rc_actor); -CREATE INDEX /*i*/rc_actor ON /*_*/recentchanges (rc_actor, rc_timestamp); - -ALTER TABLE /*_*/logging - ADD COLUMN log_actor bigint unsigned NOT NULL DEFAULT 0 AFTER log_user_text; -CREATE INDEX /*i*/actor_time ON /*_*/logging (log_actor, log_timestamp); -CREATE INDEX /*i*/log_actor_type_time ON /*_*/logging (log_actor, log_type, log_timestamp);