X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Ftables.sql;h=9aa6c20a697a5796b08536e0f9063c1e0b540bd2;hb=165217365bfb94ad17bfef86b412eb9e2eb0508b;hp=d633a9c2092ca29c3c57813004d360868f3ba29c;hpb=3bfcc2a9fe52f045206f465363ac1ba6a843ba69;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/tables.sql b/maintenance/tables.sql index d633a9c209..9aa6c20a69 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -365,7 +365,7 @@ CREATE TABLE /*_*/revision ( -- It's possible for multiple revisions to use the same text, -- for instance revisions where only metadata is altered -- or a rollback to a previous version. - rev_text_id int unsigned NOT NULL, + rev_text_id int unsigned NOT NULL default 0, -- Text comment summarizing the change. Deprecated in favor of -- revision_comment_temp.revcomment_comment_id. @@ -676,14 +676,15 @@ CREATE TABLE /*_*/slots ( -- reference to content_id slot_content_id bigint unsigned NOT NULL, - -- whether the content is inherited (1) or new in this revision (0) - slot_inherited tinyint unsigned NOT NULL DEFAULT 0, + -- The revision ID of the revision that originated the slot's content. + -- To find revisions that changed slots, look for slot_origin = slot_revision_id. + slot_origin bigint unsigned NOT NULL, PRIMARY KEY ( slot_revision_id, slot_role_id ) ) /*$wgDBTableOptions*/; -- Index for finding revisions that modified a specific slot -CREATE INDEX /*i*/slot_role_inherited ON /*_*/slots (slot_revision_id, slot_role_id, slot_inherited); +CREATE INDEX /*i*/slot_revision_origin_role ON /*_*/slots (slot_revision_id, slot_origin, slot_role_id); -- -- The content table represents content objects. It's primary purpose is to provide the necessary @@ -987,26 +988,22 @@ CREATE TABLE /*_*/site_stats ( ss_row_id int unsigned NOT NULL PRIMARY KEY, -- Total number of edits performed. - ss_total_edits bigint unsigned default 0, + ss_total_edits bigint unsigned default NULL, - -- An approximate count of pages matching the following criteria: - -- * in namespace 0 - -- * not a redirect - -- * contains the text '[[' - -- See Article::isCountable() in includes/Article.php - ss_good_articles bigint unsigned default 0, + -- See SiteStatsInit::articles(). + ss_good_articles bigint unsigned default NULL, - -- Total pages, theoretically equal to SELECT COUNT(*) FROM page; except faster - ss_total_pages bigint default '-1', + -- Total pages, theoretically equal to SELECT COUNT(*) FROM page. + ss_total_pages bigint unsigned default NULL, - -- Number of users, theoretically equal to SELECT COUNT(*) FROM user; - ss_users bigint default '-1', + -- Number of users, theoretically equal to SELECT COUNT(*) FROM user. + ss_users bigint unsigned default NULL, - -- Number of users that still edit - ss_active_users bigint default '-1', + -- Number of users that still edit. + ss_active_users bigint unsigned default NULL, - -- Number of images, equivalent to SELECT COUNT(*) FROM image - ss_images int default 0 + -- Number of images, equivalent to SELECT COUNT(*) FROM image. + ss_images bigint unsigned default NULL ) /*$wgDBTableOptions*/; -- @@ -1835,7 +1832,7 @@ CREATE TABLE /*_*/change_tag ( ct_rev_id int unsigned NULL, -- Tag applied ct_tag varchar(255) NOT NULL, - -- Parameters for the tag, presently unused + -- Parameters for the tag; used by some extensions ct_params blob NULL ) /*$wgDBTableOptions*/;