-- 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.
+ -- TODO: Is that actually true? Rollback seems to violate it by setting
+ -- slot_origin to an older rev_id. Undeletions could result in the same situation.
slot_origin bigint unsigned NOT NULL,
PRIMARY KEY ( slot_revision_id, slot_role_id )
-- ApiQueryRecentChanges (T140108)
CREATE INDEX /*i*/rc_name_type_patrolled_timestamp ON /*_*/recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
+-- Article.php and friends (T139012)
+CREATE INDEX /*i*/rc_this_oldid ON /*_*/recentchanges (rc_this_oldid);
CREATE TABLE /*_*/watchlist (
wl_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
--
CREATE TABLE /*_*/interwiki (
-- The interwiki prefix, (e.g. "Meatball", or the language prefix "de")
- iw_prefix varchar(32) NOT NULL,
+ iw_prefix varchar(32) NOT NULL PRIMARY KEY,
-- The URL of the wiki, with "$1" as a placeholder for an article name.
-- Any spaces in the name will be transformed to underscores before
iw_trans tinyint NOT NULL default 0
) /*$wgDBTableOptions*/;
-CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix);
-
--
-- Used for caching expensive grouped queries
CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp);
-- Special:Log action filter
-CREATE INDEX /*i*/type_action ON /*_*/logging (log_type, log_action, log_timestamp);
+CREATE INDEX /*i*/log_type_action ON /*_*/logging (log_type, log_action, log_timestamp);
-- Special:Log filter by type and anonymous performer
CREATE INDEX /*i*/log_user_text_type_time ON /*_*/logging (log_user_text, log_type, log_timestamp);
pt_reason_id bigint unsigned NOT NULL DEFAULT 0, -- ("DEFAULT 0" is temporary, signaling that pt_reason should be used)
pt_timestamp binary(14) NOT NULL,
pt_expiry varbinary(14) NOT NULL default '',
- pt_create_perm varbinary(60) NOT NULL
+ pt_create_perm varbinary(60) NOT NULL,
+
+ PRIMARY KEY (pt_namespace,pt_title)
) /*$wgDBTableOptions*/;
-CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title);
CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp);
pp_page int NOT NULL,
pp_propname varbinary(60) NOT NULL,
pp_value blob NOT NULL,
- pp_sortkey float DEFAULT NULL
+ pp_sortkey float DEFAULT NULL,
+
+ PRIMARY KEY (pp_page,pp_propname)
) /*$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);
CREATE UNIQUE INDEX /*i*/pp_propname_sortkey_page ON /*_*/page_props (pp_propname,pp_sortkey,pp_page);
si_type varbinary(32) NOT NULL,
-- local key value, ie 'en' or 'wiktionary'
- si_key varbinary(32) NOT NULL
+ si_key varbinary(32) NOT NULL,
+
+ PRIMARY KEY (si_type, si_key)
) /*$wgDBTableOptions*/;
-CREATE UNIQUE INDEX /*i*/site_ids_type ON /*_*/site_identifiers (si_type, si_key);
CREATE INDEX /*i*/site_ids_site ON /*_*/site_identifiers (si_site);
CREATE INDEX /*i*/site_ids_key ON /*_*/site_identifiers (si_key);