-- If the user is an anonymous user their IP address is stored here
-- since the user_id of 0 is ambiguous
user_ip varbinary(40) NOT NULL default '',
+ -- The highest timestamp of revisions of the talk page viewed
+ -- by this user
+ user_last_timestamp binary(14) NOT NULL default '',
INDEX user_id (user_id),
INDEX user_ip (user_ip)
-- Will be NULL for pages deleted prior to 1.11.
ar_page_id int unsigned,
+ -- Original previous revision
+ ar_parent_id int unsigned default NULL,
+
KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp),
KEY usertext_timestamp (ar_user_text,ar_timestamp)
-- Number of users, theoretically equal to SELECT COUNT(*) FROM user;
ss_users bigint default '-1',
+
+ -- Number of users that still edit
+ ss_active_users bigint default '-1',
-- Deprecated, no longer updated as of 1.5
ss_admins int default '-1',
--
CREATE TABLE /*$wgDBprefix*/hitcounter (
hc_id int unsigned NOT NULL
-) TYPE=HEAP MAX_ROWS=25000;
+) ENGINE=HEAP MAX_ROWS=25000;
--
-- Block prevents user from accessing Special:Emailuser
ipb_block_email bool NOT NULL default 0,
+ -- Block allows user to edit their own talk page
+ ipb_allow_usertalk bool NOT NULL default 0,
+
PRIMARY KEY ipb_id (ipb_id),
-- Unique index to support "user already blocked" messages
INDEX img_size (img_size),
-- Used by Special:Newimages and Special:Imagelist
INDEX img_timestamp (img_timestamp),
-
- -- For future use
+ -- Used in API and duplicate search
INDEX img_sha1 (img_sha1)
INDEX (fa_name, fa_timestamp), -- pick out by image name
INDEX (fa_storage_group, fa_storage_key), -- pick out dupe files
INDEX (fa_deleted_timestamp), -- sort by deletion time
- INDEX (fa_deleted_user) -- sort by deleter
+ INDEX fa_user_timestamp (fa_user_text,fa_timestamp) -- sort by uploader
) /*$wgDBTableOptions*/;
rc_old_len int,
rc_new_len int,
- -- Visibility of deleted revisions, bitfield
+ -- Visibility of recent changes items, bitfield
rc_deleted tinyint unsigned NOT NULL default '0',
-- Value corresonding to log_id, specific log entries
FULLTEXT si_title (si_title),
FULLTEXT si_text (si_text)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
--
-- Recognized interwiki link prefixes
keyname varbinary(255) NOT NULL default '',
value mediumblob,
exptime datetime,
- UNIQUE KEY (keyname),
+ PRIMARY KEY (keyname),
KEY (exptime)
) /*$wgDBTableOptions*/;
) /*$wgDBTableOptions*/;
CREATE TABLE /*$wgDBprefix*/logging (
+ -- Log ID, for referring to this specific log entry, probably for deletion and such.
+ log_id int unsigned NOT NULL auto_increment,
+
-- Symbolic keys for the general log type and the action type
-- within the log. The output format will be controlled by the
-- action field, but only the type controls categorization.
-- LF separated list of miscellaneous parameters
log_params blob NOT NULL,
- -- Log ID, for referring to this specific log entry, probably for deletion and such.
- log_id int unsigned NOT NULL auto_increment,
-
-- rev_deleted for logs
log_deleted tinyint unsigned NOT NULL default '0',
CREATE TABLE /*$wgDBprefix*/trackbacks (
tb_id int auto_increment,
- tb_page int REFERENCES page(page_id) ON DELETE CASCADE,
+ tb_page int REFERENCES /*$wgDBprefix*/page(page_id) ON DELETE CASCADE,
tb_title varchar(255) NOT NULL,
tb_url blob NOT NULL,
tb_ex text,
-- Protected titles - nonexistent pages that have been protected
CREATE TABLE /*$wgDBprefix*/protected_titles (
pt_namespace int NOT NULL,
- pt_title varchar(255) NOT NULL,
+ pt_title varchar(255) binary NOT NULL,
pt_user int unsigned NOT NULL,
pt_reason tinyblob,
pt_timestamp binary(14) NOT NULL,