-- at which point the hash is moved to user_password
-- and the old password is invalidated.
user_newpassword tinyblob NOT NULL default '',
+
+ -- Timestamp of the last time when a new password was
+ -- sent, for throttling purposes
+ user_newpass_time char(14) binary,
-- Note: email should be restricted, not public info.
-- Same with passwords.
-- Indicates that the IP address was banned because a banned
-- user accessed a page through it. If this is 1, ipb_address
-- will be hidden, and the block identified by block ID number.
- ipb_auto boolean NOT NULL default '0',
+ ipb_auto bool NOT NULL default '0',
-- If set to 1, block applies only to logged-out users
- ipb_anon_only boolean NOT NULL default 0,
+ ipb_anon_only bool NOT NULL default 0,
-- Block prevents account creation from matching IP addresses
- ipb_create_account boolean NOT NULL default 1,
+ ipb_create_account bool NOT NULL default 1,
+
+ -- Block triggers autoblocks
+ ipb_enable_autoblock bool NOT NULL default '1',
-- Time at which the block will expire.
ipb_expiry char(14) binary NOT NULL default '',
UNIQUE KEY ( qci_type )
) TYPE=InnoDB;
+
+-- For each redirect, this table contains exactly one row defining its target
+CREATE TABLE /*$wgDBprefix*/redirect (
+ -- Key to the page_id of the redirect page
+ rd_from int(8) unsigned NOT NULL default '0',
+
+ -- Key to page_namespace/page_title of the target page.
+ -- The target page may or may not exist, and due to renames
+ -- and deletions may refer to different page records as time
+ -- goes by.
+ rd_namespace int NOT NULL default '0',
+ rd_title varchar(255) binary NOT NULL default '',
+
+ PRIMARY KEY rd_from (rd_from),
+ KEY rd_ns_title (rd_namespace,rd_title,rd_from)
+) TYPE=InnoDB, DEFAULT CHARSET=utf8;
+
+-- Used for caching expensive grouped queries that need two links (for example double-redirects)
+
+CREATE TABLE /*$wgDBprefix*/querycachetwo (
+ -- A key name, generally the base name of of the special page.
+ qcc_type char(32) NOT NULL,
+
+ -- Some sort of stored value. Sizes, counts...
+ qcc_value int(5) unsigned NOT NULL default '0',
+
+ -- Target namespace+title
+ qcc_namespace int NOT NULL default '0',
+ qcc_title char(255) binary NOT NULL default '',
+
+ -- Target namespace+title2
+ qcc_namespacetwo int NOT NULL default '0',
+ qcc_titletwo char(255) binary NOT NULL default '',
+
+ KEY qcc_type (qcc_type,qcc_value),
+ KEY qcc_title (qcc_type,qcc_namespace,qcc_title),
+ KEY qcc_titletwo (qcc_type,qcc_namespacetwo,qcc_titletwo)
+
+) TYPE=InnoDB, DEFAULT CHARSET=utf8;