X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Ftables.sql;h=97d6ff20f7e9d41ac5967158bb156fd387ee94e5;hb=8d6995937f9a058a539405c195de58122b3e143d;hp=bdcd66eda5298176b56825e6bae8c97396ba1790;hpb=ed131b321320c109f08d1c5e9c515a63105d1c5f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/tables.sql b/maintenance/tables.sql index bdcd66eda5..97d6ff20f7 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -152,7 +152,7 @@ CREATE TABLE /*_*/user_groups ( -- with particular permissions. A user will have the combined -- permissions of any group they're explicitly in, plus -- the implicit '*' and 'user' groups. - ug_group varbinary(32) NOT NULL default '' + ug_group varbinary(255) NOT NULL default '' ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group); @@ -164,7 +164,7 @@ CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group); CREATE TABLE /*_*/user_former_groups ( -- Key to user_id ufg_user int unsigned NOT NULL default 0, - ufg_group varbinary(32) NOT NULL default '' + ufg_group varbinary(255) NOT NULL default '' ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group); @@ -994,8 +994,10 @@ CREATE TABLE /*_*/uploadstash ( -- chunk counter starts at 0, current offset is stored in us_size us_chunk_inx int unsigned NULL, - -- file properties from File::getPropsFromPath. these may prove unnecessary. - -- + -- Serialized file properties from File::getPropsFromPath + us_props blob, + + -- file size in bytes us_size int unsigned NOT NULL, -- this hash comes from File::sha1Base36(), and is 31 characters us_sha1 varchar(31) NOT NULL, @@ -1242,7 +1244,8 @@ CREATE TABLE /*_*/logging ( -- Freeform text. Interpreted as edit history comments. log_comment varchar(255) NOT NULL default '', - -- LF separated list of miscellaneous parameters + -- miscellaneous parameters: + -- LF separated list (old system) or serialized PHP array (new system) log_params blob NOT NULL, -- rev_deleted for logs @@ -1291,10 +1294,12 @@ CREATE TABLE /*_*/job ( -- Stored as a PHP serialized array, or an empty string if there are no parameters job_params blob NOT NULL, - -- Random, non-unique, number used for job acquisition - -- Either a simple timestamp or a totally random number (for lock concurrency) + -- Random, non-unique, number used for job acquisition (for lock concurrency) job_random integer unsigned NOT NULL default 0, + -- The number of times this job has been locked + job_attempts integer unsigned NOT NULL default 0, + -- Field that conveys process locks on rows via process UUIDs job_token varbinary(32) NOT NULL default '', @@ -1307,6 +1312,7 @@ CREATE TABLE /*_*/job ( CREATE INDEX /*i*/job_sha1 ON /*_*/job (job_sha1); CREATE INDEX /*i*/job_cmd_token ON /*_*/job (job_cmd,job_token,job_random); +CREATE INDEX /*i*/job_cmd_token_id ON /*_*/job (job_cmd,job_token,job_id); CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title, job_params(128)); CREATE INDEX /*i*/job_timestamp ON /*_*/job (job_timestamp); @@ -1411,6 +1417,7 @@ CREATE TABLE /*_*/page_props ( ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); +CREATE UNIQUE INDEX /*i*/pp_propname_page ON /*_*/page_props (pp_propname,pp_page); -- A table to log updates, one text key row per update.