UNIQUE INDEX user_name (user_name),
INDEX (user_email_token)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- User permissions have been broken out to a separate table;
PRIMARY KEY (ug_user,ug_group),
KEY (ug_group)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
-- Stores notifications of user talk page changes, for the display
-- of the "you have new messages" box
CREATE TABLE /*$wgDBprefix*/user_newtalk (
-- Key to user.user_id
user_id int(5) NOT NULL default '0',
- -- If the user is an anonymous user hir IP address is stored here
+ -- If the user is an anonymous user their IP address is stored here
-- since the user_id of 0 is ambiguous
user_ip varchar(40) NOT NULL default '',
INDEX user_id (user_id),
INDEX user_ip (user_ip)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
INDEX (page_random),
INDEX (page_len)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Every edit of a page creates also a revision row.
INDEX user_timestamp (rev_user,rev_timestamp),
INDEX usertext_timestamp (rev_user_text,rev_timestamp)
-) TYPE=InnoDB MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
+) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
-- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit
--
PRIMARY KEY old_id (old_id)
-) TYPE=InnoDB MAX_ROWS=10000000 AVG_ROW_LENGTH=10240;
+) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=10240;
-- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit
--
-- rev_deleted for archives
ar_deleted tinyint(1) unsigned NOT NULL default '0',
+
+ -- Length of this revision in bytes
+ ar_len int(8) unsigned,
KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
UNIQUE KEY pl_from (pl_from,pl_namespace,pl_title),
KEY (pl_namespace,pl_title,pl_from)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
UNIQUE KEY tl_from (tl_from,tl_namespace,tl_title),
KEY (tl_namespace,tl_title,tl_from)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Track links to images *used inline*
UNIQUE KEY il_from (il_from,il_to),
KEY (il_to,il_from)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Track category inclusions *used inline*
-- Not really used?
KEY cl_timestamp (cl_to,cl_timestamp)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Track links to external URLs
KEY (el_from, el_to(40)),
KEY (el_to(60), el_from),
KEY (el_index(60))
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Track interlanguage links
UNIQUE KEY (ll_from, ll_lang),
KEY (ll_lang, ll_title)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Contains a single row with some aggregate info
UNIQUE KEY ss_row_id (ss_row_id)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Stores an ID for every time any article is visited;
-- Flag for entries hidden from users and Sysops
ipb_deleted bool NOT NULL default 0,
+
+ -- Block prevents user from accessing Special:Emailuser
+ ipb_block_email bool NOT NULL default 0,
PRIMARY KEY ipb_id (ipb_id),
INDEX ipb_timestamp (ipb_timestamp),
INDEX ipb_expiry (ipb_expiry)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Used by Special:Newimages and Special:Imagelist
INDEX img_timestamp (img_timestamp)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Previous revisions of uploaded files.
oi_user_text varchar(255) binary NOT NULL,
oi_timestamp char(14) binary NOT NULL default '',
- INDEX oi_name (oi_name(10))
+ oi_metadata mediumblob NOT NULL,
+ oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
+ oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
+ oi_minor_mime varchar(32) NOT NULL default "unknown",
+ oi_deleted tinyint(1) unsigned NOT NULL default '0',
+
+ INDEX oi_name_timestamp (oi_name,oi_timestamp),
+ INDEX oi_name_archive_name (oi_name,oi_archive_name)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Record of deleted file data
INDEX (fa_deleted_timestamp), -- sort by deletion time
INDEX (fa_deleted_user) -- sort by deleter
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Primarily a summary table for Special:Recentchanges,
INDEX rc_ns_usertext (rc_namespace, rc_user_text),
INDEX rc_user_text (rc_user_text, rc_timestamp)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
CREATE TABLE /*$wgDBprefix*/watchlist (
-- Key to user.user_id
UNIQUE KEY (wl_user, wl_namespace, wl_title),
KEY namespace_title (wl_namespace, wl_title)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
UNIQUE KEY math_inputhash (math_inputhash)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- When using the default MySQL search backend, page titles
-- 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
-- insertion.
- iw_url char(127) NOT NULL,
+ iw_url varchar(127) NOT NULL,
-- A boolean value indicating whether the wiki is in this project
-- (used, for example, to detect redirect loops)
UNIQUE KEY iw_prefix (iw_prefix)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Used for caching expensive grouped queries
--
CREATE TABLE /*$wgDBprefix*/querycache (
-- A key name, generally the base name of of the special page.
- qc_type char(32) NOT NULL,
+ qc_type varchar(32) binary NOT NULL,
-- Some sort of stored value. Sizes, counts...
qc_value int(5) unsigned NOT NULL default '0',
-- Target namespace+title
qc_namespace int NOT NULL default '0',
- qc_title char(255) binary NOT NULL default '',
+ qc_title varchar(255) binary NOT NULL default '',
KEY (qc_type,qc_value)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- For a few generic cache operations if not using Memcached
--
CREATE TABLE /*$wgDBprefix*/objectcache (
- keyname char(255) binary NOT NULL default '',
+ keyname varchar(255) binary NOT NULL default '',
value mediumblob,
exptime datetime,
UNIQUE KEY (keyname),
KEY (exptime)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
--
-- Cache of interwiki transclusion
tc_contents text,
tc_time int NOT NULL,
UNIQUE INDEX tc_url_idx (tc_url)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
CREATE TABLE /*$wgDBprefix*/logging (
-- Symbolic keys for the general log type and the action type
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,
+ log_id int unsigned NOT NULL auto_increment,
-- rev_deleted for logs
log_deleted tinyint(1) unsigned NOT NULL default '0',
KEY page_time (log_namespace, log_title, log_timestamp),
KEY times (log_timestamp)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
CREATE TABLE /*$wgDBprefix*/trackbacks (
tb_id int auto_increment,
PRIMARY KEY (tb_id),
INDEX (tb_page)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
-- Jobs performed by parallel apache threads or a command-line daemon
PRIMARY KEY job_id (job_id),
KEY (job_cmd, job_namespace, job_title)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
-- Details of updates to cached special pages
UNIQUE KEY ( qci_type )
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
-- For each redirect, this table contains exactly one row defining its target
CREATE TABLE /*$wgDBprefix*/redirect (
PRIMARY KEY rd_from (rd_from),
KEY rd_ns_title (rd_namespace,rd_title,rd_from)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
-- 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,
+ qcc_type varchar(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 '',
+ qcc_title varchar(255) binary NOT NULL default '',
-- Target namespace+title2
qcc_namespacetwo int NOT NULL default '0',
- qcc_titletwo char(255) binary NOT NULL default '',
+ qcc_titletwo varchar(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;
+) /*$wgDBTableOptions*/;
---- Used for storing page restrictions (i.e. protection levels)
+-- Used for storing page restrictions (i.e. protection levels)
CREATE TABLE /*$wgDBprefix*/page_restrictions (
-- Page to apply restrictions to (Foreign Key to page).
pr_page int(8) NOT NULL,
-- Field for time-limited protection.
pr_expiry char(14) binary NULL,
-- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)
- pr_id int unsigned not null auto_increment,
+ pr_id int unsigned NOT NULL auto_increment,
PRIMARY KEY pr_pagetype (pr_page,pr_type),
- UNIQUE KEY pr_id (pr_id),
+ UNIQUE KEY pr_id (pr_id),
KEY pr_page (pr_page),
KEY pr_typelevel (pr_type,pr_level),
KEY pr_level (pr_level),
KEY pr_cascade (pr_cascade)
-) TYPE=InnoDB;
+) /*$wgDBTableOptions*/;
-- vim: sw=2 sts=2 et