-- Adding ar_deleted field for revisiondelete
ALTER TABLE /*$wgDBprefix*/archive
- ADD ar_deleted tinyint(1) unsigned NOT NULL default '0';
+ ADD ar_deleted tinyint unsigned NOT NULL default '0';
ALTER TABLE /*$wgDBprefix*/archive
- ADD ar_len INT(8) UNSIGNED;
+ ADD ar_len INT UNSIGNED;
ALTER TABLE /*$wgDBprefix*/archive
ADD
- ar_rev_id int(8) unsigned;
+ ar_rev_id int unsigned;
ALTER TABLE /*$wgDBprefix*/archive
ADD
- ar_text_id int(8) unsigned;
+ ar_text_id int unsigned;
-- column also added to buildTables.inc
ALTER TABLE /*$wgDBprefix*/recentchanges
- ADD COLUMN rc_bot tinyint(3) unsigned NOT NULL default '0'
+ ADD COLUMN rc_bot tinyint unsigned NOT NULL default '0'
AFTER rc_minor;
-- cur_touched is later, the page must be regenerated.
ALTER TABLE /*$wgDBprefix*/cur
- ADD COLUMN cur_touched char(14) binary NOT NULL default '';
+ ADD COLUMN cur_touched binary(14) NOT NULL default '';
-- Existing pages should be initialized to the current
-- time so they don't needlessly rerender until they are
-- sent again.
ALTER TABLE /*$wgDBprefix*/user
- ADD COLUMN user_touched char(14) binary NOT NULL default '';
+ ADD COLUMN user_touched binary(14) NOT NULL default '';
UPDATE /*$wgDBprefix*/user
SET user_touched=NOW()+0;
--
CREATE TABLE /*$wgDBprefix*/categorylinks (
-- Key to page_id of the page defined as a category member.
- cl_from int(8) unsigned NOT NULL default '0',
+ cl_from int unsigned NOT NULL default '0',
-- Name of the category.
-- This is also the page_title of the category's description page;
-- isn't always ideal, but collations seem to be an exciting
-- and dangerous new world in MySQL...
--
- -- For MySQL 4.1+ with charset set to utf8, the sort key *index*
- -- needs cut to be smaller than 1024 bytes (at 3 bytes per char).
- -- To sort properly on the shorter key, this field needs to be
- -- the same shortness.
- cl_sortkey varchar(86) binary NOT NULL default '',
+ -- Truncate so that the cl_sortkey key fits in 1000 bytes
+ -- (MyISAM 5 with server_character_set=utf8)
+ cl_sortkey varchar(70) binary NOT NULL default '',
-- This isn't really used at present. Provided for an optional
-- sorting method by approximate addition time.
-- ("notification flags") at once by clicking the new button on his/her watchlist page.
-- T. Gries/M. Arndt 11.09.2004 - December 2004
-ALTER TABLE /*$wgDBprefix*/watchlist ADD (wl_notificationtimestamp varchar(14) binary);
+ALTER TABLE /*$wgDBprefix*/watchlist ADD (wl_notificationtimestamp varbinary(14));
-- Adding fa_deleted field for additional content suppression
ALTER TABLE /*$wgDBprefix*/filearchive
- ADD fa_deleted tinyint(1) unsigned NOT NULL default '0';
+ ADD fa_deleted tinyint unsigned NOT NULL default '0';
-- Which storage bin (directory tree or object store) the file data
-- is stored in. Should be 'deleted' for files that have been deleted;
-- any other bin is not yet in use.
- fa_storage_group varchar(16),
+ fa_storage_group varbinary(16),
-- SHA-1 of the file contents plus extension, used as a key for storage.
-- eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg
--
-- If NULL, the file was missing at deletion time or has been purged
-- from the archival storage.
- fa_storage_key varchar(64) binary default '',
+ fa_storage_key varbinary(64) default '',
-- Deletion information, if this file is deleted.
fa_deleted_user int,
- fa_deleted_timestamp char(14) binary default '',
+ fa_deleted_timestamp binary(14) default '',
fa_deleted_reason text,
-- Duped fields from image
- fa_size int(8) unsigned default '0',
- fa_width int(5) default '0',
- fa_height int(5) default '0',
+ fa_size int unsigned default '0',
+ fa_width int default '0',
+ fa_height int default '0',
fa_metadata mediumblob,
- fa_bits int(3) default '0',
+ fa_bits int default '0',
fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown",
- fa_minor_mime varchar(32) default "unknown",
+ fa_minor_mime varbinary(32) default "unknown",
fa_description tinyblob,
- fa_user int(5) unsigned default '0',
+ fa_user int unsigned default '0',
fa_user_text varchar(255) binary default '',
- fa_timestamp char(14) binary default '',
+ fa_timestamp binary(14) default '',
PRIMARY KEY (fa_id),
INDEX (fa_name, fa_timestamp), -- pick out by image name
-- the minor parts are not required to adher to any standard
-- but should be consistent throughout the database
-- see http://www.iana.org/assignments/media-types/
- img_minor_mime varchar(32) NOT NULL default "unknown"
+ img_minor_mime varbinary(32) NOT NULL default "unknown"
);
-- column is no longer used and has therefore be removed from this patch
ALTER TABLE /*$wgDBprefix*/image ADD (
- img_width int(5) NOT NULL default 0,
- img_height int(5) NOT NULL default 0,
- img_bits int(5) NOT NULL default 0
+ img_width int NOT NULL default 0,
+ img_height int NOT NULL default 0,
+ img_bits int NOT NULL default 0
);
ALTER TABLE /*$wgDBprefix*/oldimage ADD (
- oi_width int(5) NOT NULL default 0,
- oi_height int(5) NOT NULL default 0,
- oi_bits int(3) NOT NULL default 0
+ oi_width int NOT NULL default 0,
+ oi_height int NOT NULL default 0,
+ oi_bits int NOT NULL default 0
);
ALTER TABLE /*$wgDBprefix*/interwiki
- ADD COLUMN iw_trans TINYINT(1) NOT NULL DEFAULT 0;
+ ADD COLUMN iw_trans TINYINT NOT NULL DEFAULT 0;
CREATE TABLE /*$wgDBprefix*/interwiki (
-- The interwiki prefix, (e.g. "Meatball", or the language prefix "de")
- iw_prefix char(32) NOT NULL,
+ iw_prefix varchar(32) NOT NULL,
-- 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 blob NOT NULL,
-- A boolean value indicating whether the wiki is in this project
-- (used, for example, to detect redirect loops)
DROP TABLE IF EXISTS /*$wgDBprefix*/ipblocks_newunique;
CREATE TABLE /*$wgDBprefix*/ipblocks_newunique (
- ipb_id int(8) NOT NULL auto_increment,
+ ipb_id int NOT NULL auto_increment,
ipb_address tinyblob NOT NULL,
- ipb_user int(8) unsigned NOT NULL default '0',
- ipb_by int(8) unsigned NOT NULL default '0',
+ ipb_user int unsigned NOT NULL default '0',
+ ipb_by int unsigned NOT NULL default '0',
ipb_reason tinyblob NOT NULL,
- ipb_timestamp char(14) binary NOT NULL default '',
+ ipb_timestamp binary(14) NOT NULL default '',
ipb_auto bool NOT NULL default 0,
ipb_anon_only bool NOT NULL default 0,
ipb_create_account bool NOT NULL default 1,
- ipb_expiry char(14) binary NOT NULL default '',
+ ipb_expiry varbinary(14) NOT NULL default '',
ipb_range_start tinyblob NOT NULL,
ipb_range_end tinyblob NOT NULL,
-- Add row for email blocks --
ALTER TABLE /*$wgDBprefix*/ipblocks
- ADD ipb_block_email tinyint(1) NOT NULL default '0';
+ ADD ipb_block_email tinyint NOT NULL default '0';
-- Adds the ipb_expiry field to ipblocks
-ALTER TABLE /*$wgDBprefix*/ipblocks ADD ipb_expiry char(14) binary NOT NULL default '';
+ALTER TABLE /*$wgDBprefix*/ipblocks ADD ipb_expiry varbinary(14) NOT NULL default '';
-- All IP blocks have one day expiry
UPDATE /*$wgDBprefix*/ipblocks SET ipb_expiry = date_format(date_add(ipb_timestamp,INTERVAL 1 DAY),"%Y%m%d%H%i%s") WHERE ipb_user = 0;
-- Add the range handling fields
ALTER TABLE /*$wgDBprefix*/ipblocks
- ADD ipb_range_start varchar(32) NOT NULL default '',
- ADD ipb_range_end varchar(32) NOT NULL default '',
+ ADD ipb_range_start tinyblob NOT NULL default '',
+ ADD ipb_range_end tinyblob NOT NULL default '',
ADD INDEX ipb_range (ipb_range_start(8), ipb_range_end(8));
-- For auto-expiring blocks --
ALTER TABLE /*$wgDBprefix*/ipblocks
- ADD ipb_auto tinyint(1) NOT NULL default '0',
- ADD ipb_id int(8) NOT NULL auto_increment,
+ ADD ipb_auto tinyint NOT NULL default '0',
+ ADD ipb_id int NOT NULL auto_increment,
ADD PRIMARY KEY (ipb_id);
-- Jobs performed by parallel apache threads or a command-line daemon
CREATE TABLE /*$wgDBprefix*/job (
- job_id int(9) unsigned NOT NULL auto_increment,
+ job_id int unsigned NOT NULL auto_increment,
-- Command name, currently only refreshLinks is defined
- job_cmd varchar(255) NOT NULL default '',
+ job_cmd varbinary(60) NOT NULL default '',
-- Namespace and title to act on
-- Should be 0 and '' if the command does not operate on a title
CREATE TABLE /*$wgDBprefix*/langlinks (
-- page_id of the referring page
- ll_from int(8) unsigned NOT NULL default '0',
+ ll_from int unsigned NOT NULL default '0',
-- Language code of the target
- ll_lang varchar(10) binary NOT NULL default '',
+ ll_lang varbinary(20) NOT NULL default '',
-- Title of the target, including namespace
ll_title varchar(255) binary NOT NULL default '',
DROP TABLE IF EXISTS /*$wgDBprefix*/links;
CREATE TABLE /*$wgDBprefix*/links (
-- Key to the page_id of the page containing the link.
- l_from int(8) unsigned NOT NULL default '0',
+ l_from int unsigned NOT NULL default '0',
-- Key to the page_id of the link target.
-- An unfortunate consequence of this is that rename
-- operations require changing the links entries for
-- all links to the moved page.
- l_to int(8) unsigned NOT NULL default '0',
+ l_to int unsigned NOT NULL default '0',
UNIQUE KEY l_from(l_from,l_to),
KEY (l_to)
DROP TABLE IF EXISTS /*$wgDBprefix*/brokenlinks;
CREATE TABLE /*$wgDBprefix*/brokenlinks (
-- Key to the page_id of the page containing the link.
- bl_from int(8) unsigned NOT NULL default '0',
+ bl_from int unsigned NOT NULL default '0',
-- Text of the target page title ("namesapce:title").
-- Unfortunately this doesn't split the namespace index
DROP TABLE IF EXISTS /*$wgDBprefix*/imagelinks;
CREATE TABLE /*$wgDBprefix*/imagelinks (
-- Key to page_id of the page containing the image / media link.
- il_from int(8) unsigned NOT NULL default '0',
+ il_from int unsigned NOT NULL default '0',
-- Filename of target image.
-- This is also the page_title of the file's description page;
-- Adding ar_deleted field for revisiondelete
ALTER TABLE /*$wgDBprefix*/logging
- ADD log_deleted tinyint(1) unsigned NOT NULL default '0';
\ No newline at end of file
+ ADD log_deleted tinyint unsigned NOT NULL default '0';
-- 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.
- log_type char(10) NOT NULL default '',
- log_action char(10) NOT NULL default '',
+ log_type varbinary(10) NOT NULL default '',
+ log_action varbinary(10) NOT NULL default '',
-- Timestamp. Duh.
- log_timestamp char(14) NOT NULL default '19700101000000',
+ log_timestamp binary(14) NOT NULL default '19700101000000',
-- The user who performed this action; key to user_id
log_user int unsigned NOT NULL default 0,
DROP TABLE IF EXISTS /*$wgDBprefix*/math;
CREATE TABLE /*$wgDBprefix*/math (
-- Binary MD5 hash of the latex fragment, used as an identifier key.
- math_inputhash varchar(16) NOT NULL,
+ math_inputhash varbinary(16) NOT NULL,
-- Not sure what this is, exactly...
- math_outputhash varchar(16) NOT NULL,
+ math_outputhash varbinary(16) NOT NULL,
-- texvc reports how well it thinks the HTML conversion worked;
-- if it's a low level the PNG rendering may be preferred.
- math_html_conservativeness tinyint(1) NOT NULL,
+ math_html_conservativeness tinyint NOT NULL,
-- HTML output from texvc, if any
math_html text,
-- For a few generic cache operations if not using Memcached
CREATE TABLE /*$wgDBprefix*/objectcache (
- keyname char(255) binary not null default '',
+ keyname varbinary(255) binary not null default '',
value mediumblob,
exptime datetime,
unique key (keyname),
ADD oi_metadata mediumblob NOT NULL,
ADD oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
ADD oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
- ADD oi_minor_mime varchar(32) NOT NULL default "unknown",
- ADD oi_deleted tinyint(1) unsigned NOT NULL default '0';
+ ADD oi_minor_mime varbinary(32) NOT NULL default "unknown",
+ ADD oi_deleted tinyint unsigned NOT NULL default '0';
-- Added 2005-03-12
ALTER TABLE /*$wgDBprefix*/page
- ADD page_len int(8) unsigned NOT NULL,
+ ADD page_len int unsigned NOT NULL,
ADD INDEX (page_len);
-- Not accurate if upgrading from intermediate
--- 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,
+ pr_page int NOT NULL,
-- The protection type (edit, move, etc)
- pr_type varchar(255) NOT NULL,
+ pr_type varbinary(60) NOT NULL,
-- The protection level (Sysop, autoconfirmed, etc)
- pr_level varchar(255) NOT NULL,
+ pr_level varbinary(60) NOT NULL,
-- Whether or not to cascade the protection down to pages transcluded.
- pr_cascade tinyint(4) NOT NULL,
+ pr_cascade tinyint NOT NULL,
-- Field for future support of per-user restriction.
- pr_user int(8) NULL,
+ pr_user int NULL,
-- Field for time-limited protection.
- pr_expiry char(14) binary NULL,
+ pr_expiry varbinary(14) NULL,
PRIMARY KEY pr_pagetype (pr_page,pr_type),
KEY pr_typelevel (pr_type,pr_level),
KEY pr_level (pr_level),
KEY pr_cascade (pr_cascade)
-) /*$wgDBTableOptions*/;
\ No newline at end of file
+) /*$wgDBTableOptions*/;
--
CREATE TABLE /*$wgDBprefix*/pagelinks (
-- Key to the page_id of the page containing the link.
- pl_from int(8) unsigned NOT NULL default '0',
+ pl_from int 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
CREATE TABLE /*$wgDBprefix*/querycache (
-- A key name, generally the base name of of the special page.
- qc_type char(32) NOT NULL,
+ qc_type varbinary(32) NOT NULL,
-- Some sort of stored value. Sizes, counts...
- qc_value int(5) unsigned NOT NULL default '0',
+ qc_value int 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)
-- Special page name
-- Corresponds to a qc_type value
- qci_type varchar(32) NOT NULL default '',
+ qci_type varbinary(32) NOT NULL default '',
-- Timestamp of last update
- qci_timestamp char(14) NOT NULL default '19700101000000',
+ qci_timestamp binary(14) NOT NULL default '19700101000000',
UNIQUE KEY ( qci_type )
CREATE TABLE /*$wgDBprefix*/querycachetwo (
-- A key name, generally the base name of of the special page.
- qcc_type char(32) NOT NULL,
+ qcc_type varbinary(32) NOT NULL,
-- Some sort of stored value. Sizes, counts...
- qcc_value int(5) unsigned NOT NULL default '0',
+ qcc_value int 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),
-- Adding rc_deleted field for revisiondelete
-- Add rc_logid to match log_id
ALTER TABLE /*$wgDBprefix*/recentchanges
- ADD rc_deleted tinyint(1) unsigned NOT NULL default '0',
- ADD rc_logid int(10) unsigned NOT NULL default '0',
- ADD rc_log_type varchar(255) binary NULL default NULL,
- ADD rc_log_action varchar(255) binary NULL default NULL,
+ ADD rc_deleted tinyint unsigned NOT NULL default '0',
+ ADD rc_logid int unsigned NOT NULL default '0',
+ ADD rc_log_type varbinary(255) NULL default NULL,
+ ADD rc_log_action varbinary(255) NULL default NULL,
ADD rc_params BLOB NULL;
-- Primary key in recentchanges
ALTER TABLE /*$wgDBprefix*/recentchanges
- ADD rc_id int(8) NOT NULL auto_increment,
+ ADD rc_id int NOT NULL auto_increment,
ADD PRIMARY KEY rc_id (rc_id);
-- Adding the rc_ip field for logging of IP addresses in recentchanges
ALTER TABLE /*$wgDBprefix*/recentchanges
- ADD rc_ip char(15) NOT NULL default '',
+ ADD rc_ip varbinary(40) NOT NULL default '',
ADD INDEX rc_ip (rc_ip);
--
ALTER TABLE /*$wgDBprefix*/recentchanges
- ADD COLUMN rc_old_len int(10), ADD COLUMN rc_new_len int(10);
+ ADD COLUMN rc_old_len int, ADD COLUMN rc_new_len int;
-- recentchanges improvements --
ALTER TABLE /*$wgDBprefix*/recentchanges
- ADD rc_type tinyint(3) unsigned NOT NULL default '0',
- ADD rc_moved_to_ns tinyint(3) unsigned NOT NULL default '0',
+ ADD rc_type tinyint unsigned NOT NULL default '0',
+ ADD rc_moved_to_ns tinyint unsigned NOT NULL default '0',
ADD rc_moved_to_title varchar(255) binary NOT NULL default '';
UPDATE /*$wgDBprefix*/recentchanges SET rc_type=1 WHERE rc_new;
--
CREATE TABLE /*$wgDBprefix*/redirect (
-- Key to the page_id of the redirect page
- rd_from int(8) unsigned NOT NULL default '0',
+ rd_from int 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
+++ /dev/null
--- Rename groups table to groups, which is not a keyword
--- It was called group in a few alpha versions
-
-RENAME TABLE /*$wgDBprefix*/`group` TO /*$wgDBprefix*/groups;
-ALTER TABLE /*$wgDBprefix*/groups
- CHANGE group_id gr_id int(5) unsigned NOT NULL auto_increment,
- CHANGE group_name gr_name varchar(50) NOT NULL default '',
- CHANGE group_description gr_description varchar(255) NOT NULL default '',
- CHANGE group_rights gr_rights tinyblob;
-
ALTER TABLE /*$wgDBprefix*/user_groups
- CHANGE user_id ug_user INT(5) UNSIGNED NOT NULL DEFAULT '0',
- CHANGE group_id ug_group INT(5) UNSIGNED NOT NULL DEFAULT '0';
+ CHANGE user_id ug_user INT UNSIGNED NOT NULL DEFAULT '0',
+ CHANGE group_id ug_group INT UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE /*$wgDBprefix*/user_rights
- CHANGE user_id ur_user INT(5) UNSIGNED NOT NULL,
+ CHANGE user_id ur_user INT UNSIGNED NOT NULL,
CHANGE user_rights ur_rights TINYBLOB NOT NULL;
-- discarded when done.
CREATE TABLE /*$wgDBprefix*/page (
- page_id int(8) unsigned NOT NULL auto_increment,
+ page_id int unsigned NOT NULL auto_increment,
page_namespace tinyint NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint(20) unsigned NOT NULL default '0',
- page_is_redirect tinyint(1) unsigned NOT NULL default '0',
- page_is_new tinyint(1) unsigned NOT NULL default '0',
+ page_counter bigint unsigned NOT NULL default '0',
+ page_is_redirect tinyint unsigned NOT NULL default '0',
+ page_is_new tinyint unsigned NOT NULL default '0',
page_random real unsigned NOT NULL,
- page_touched char(14) binary NOT NULL default '',
- page_latest int(8) unsigned NOT NULL,
- page_len int(8) unsigned NOT NULL,
+ page_touched binary(14) NOT NULL default '',
+ page_latest int unsigned NOT NULL,
+ page_len int unsigned NOT NULL,
PRIMARY KEY page_id (page_id),
UNIQUE INDEX name_title (page_namespace,page_title),
);
CREATE TABLE /*$wgDBprefix*/revision (
- rev_id int(8) unsigned NOT NULL auto_increment,
- rev_page int(8) unsigned NOT NULL,
+ rev_id int unsigned NOT NULL auto_increment,
+ rev_page int unsigned NOT NULL,
rev_comment tinyblob NOT NULL,
- rev_user int(5) unsigned NOT NULL default '0',
+ rev_user int unsigned NOT NULL default '0',
rev_user_text varchar(255) binary NOT NULL default '',
- rev_timestamp char(14) binary NOT NULL default '',
- rev_minor_edit tinyint(1) unsigned NOT NULL default '0',
- rev_deleted tinyint(1) unsigned NOT NULL default '0',
+ rev_timestamp binary(14) NOT NULL default '',
+ rev_minor_edit tinyint unsigned NOT NULL default '0',
+ rev_deleted tinyint unsigned NOT NULL default '0',
PRIMARY KEY rev_page_id (rev_page, rev_id),
--
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_deleted tinyint(1) unsigned NOT NULL default '0';
+ ADD rev_deleted tinyint unsigned NOT NULL default '0';
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_len INT(8) UNSIGNED;
+ ADD rev_len INT UNSIGNED;
--
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_parent_id int(8) unsigned default NULL;
+ ADD rev_parent_id int unsigned default NULL;
--
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_text_id int(8) unsigned NOT NULL;
+ ADD rev_text_id int unsigned NOT NULL;
UPDATE /*$wgDBprefix*/revision
SET rev_text_id=rev_id;
DROP TABLE IF EXISTS /*$wgDBprefix*/searchindex;
CREATE TABLE /*$wgDBprefix*/searchindex (
-- Key to page_id
- si_page int(8) unsigned NOT NULL,
+ si_page int unsigned NOT NULL,
-- Munged version of title
si_title varchar(255) NOT NULL default '',
-- More statistics, for version 1.6
-ALTER TABLE /*$wgDBprefix*/site_stats ADD ss_images int(10) default '0';
+ALTER TABLE /*$wgDBprefix*/site_stats ADD ss_images int default '0';
SELECT @images := COUNT(*) FROM /*$wgDBprefix*/image;
UPDATE /*$wgDBprefix*/site_stats SET ss_images=@images;
-- Faster statistics, as of 1.4.3
ALTER TABLE /*$wgDBprefix*/site_stats
- ADD ss_total_pages bigint(20) default -1,
- ADD ss_users bigint(20) default -1,
- ADD ss_admins int(10) default -1;
+ ADD ss_total_pages bigint default -1,
+ ADD ss_users bigint default -1,
+ ADD ss_admins int default -1;
--
CREATE TABLE /*$wgDBprefix*/templatelinks (
-- Key to the page_id of the page containing the link.
- tl_from int(8) unsigned NOT NULL default '0',
+ tl_from int 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
tb_id INTEGER AUTO_INCREMENT PRIMARY KEY,
tb_page INTEGER REFERENCES page(page_id) ON DELETE CASCADE,
tb_title VARCHAR(255) NOT NULL,
- tb_url VARCHAR(255) NOT NULL,
+ tb_url BLOB NOT NULL,
tb_ex TEXT,
tb_name VARCHAR(255),
CREATE TABLE /*$wgDBprefix*/transcache (
- tc_url VARCHAR(255) NOT NULL,
+ tc_url varbinary(255) NOT NULL,
tc_contents TEXT,
tc_time INT NOT NULL,
UNIQUE INDEX tc_url_idx(tc_url)
--
ALTER TABLE /*$wgDBprefix*/user
- ADD COLUMN user_email_authenticated CHAR(14) BINARY,
- ADD COLUMN user_email_token CHAR(32) BINARY,
- ADD COLUMN user_email_token_expires CHAR(14) BINARY,
+ ADD COLUMN user_email_authenticated binary(14),
+ ADD COLUMN user_email_token binary(32),
+ ADD COLUMN user_email_token_expires binary(14),
ADD INDEX (user_email_token);
--
CREATE TABLE /*$wgDBprefix*/user_groups (
-- Key to user_id
- ug_user int(5) unsigned NOT NULL default '0',
+ ug_user int unsigned NOT NULL default '0',
-- Group names are short symbolic string keys.
-- The set of group names is open-ended, though in practice
-- with particular permissions. A user will have the combined
-- permissions of any group they're explicitly in, plus
-- the implicit '*' and 'user' groups.
- ug_group char(16) NOT NULL default '',
+ ug_group varbinary(16) NOT NULL default '',
PRIMARY KEY (ug_user,ug_group),
KEY (ug_group)
-- Timestamp of the last time when a new password was
-- sent, for throttling purposes
-ALTER TABLE /*$wgDBprefix*/user ADD user_newpass_time char(14) binary;
+ALTER TABLE /*$wgDBprefix*/user ADD user_newpass_time binary(14);
ALTER TABLE /*$wgDBprefix*/user
-- Timestamp of account registration.
-- Accounts predating this schema addition may contain NULL.
- ADD user_registration CHAR(14) BINARY;
+ ADD user_registration binary(14);
CREATE TABLE /*$wgDBprefix*/user_rights (
-- Key to user_id
- ur_user int(5) unsigned NOT NULL,
+ ur_user int unsigned NOT NULL,
-- Comma-separated list of permission keys
ur_rights tinyblob NOT NULL,
-- user_token patch
-- 2004-09-23
-ALTER TABLE /*$wgDBprefix*/user ADD user_token char(32) binary NOT NULL default '';
+ALTER TABLE /*$wgDBprefix*/user ADD user_token binary(32) NOT NULL default '';
UPDATE /*$wgDBprefix*/user SET user_token = concat(
substring(rand(),3,4),
+++ /dev/null
---
--- Provide default groups
--- Should probably be inserted when someone create a new database
---
-
-INSERT INTO /*$wgDBprefix*/groups (gr_id,gr_name,gr_description,gr_rights)
- VALUES (
- 1,':group-anon-name',':group-anon-desc',
- 'read,edit,createaccount'
- );
-INSERT INTO /*$wgDBprefix*/groups (gr_id,gr_name,gr_description,gr_rights)
- VALUES (
- 2,':group-loggedin-name',':group-loggedin-desc',
- 'read,edit,move,upload,validate,createaccount'
- );
-INSERT INTO /*$wgDBprefix*/groups (gr_id,gr_name,gr_description,gr_rights)
- VALUES (
- 3,':group-admin-name',':group-admin-desc',
- 'read,edit,move,upload,validate,createaccount,delete,undelete,protect,block,upload,asksql,rollback,patrol,editinterface,import'
- );
-INSERT INTO /*$wgDBprefix*/groups (gr_id,gr_name,gr_description,gr_rights)
- VALUES (
- 4,':group-bureaucrat-name',':group-bureaucrat-desc',
- 'read,edit,move,upload,validate,createaccount,delete,undelete,protect,block,upload,asksql,rollback,patrol,editinterface,import,makesysop'
- );
-INSERT INTO /*$wgDBprefix*/groups (gr_id,gr_name,gr_description,gr_rights)
- VALUES (
- 5,':group-steward-name',':group-steward-desc',
- 'read,edit,move,upload,validate,createaccount,delete,undelete,protect,block,upload,asksql,rollback,patrol,editinterface,import,makesysop,userrights,grouprights,siteadmin'
- );
+++ /dev/null
--- Oct. 24 2004
--- Adds the gr_rights field missing from early dev work
-
--- Hold group name and description
-ALTER TABLE /*$wgDBprefix*/groups ADD gr_rights tinyblob;
--- Oct. 1st 2004 - Ashar Voultoiz
--- Implement the new sitelevels
---
--- This is under development to provide a showcase in HEAD :o)
-
--- Hold group name and description
-CREATE TABLE /*$wgDBprefix*/groups (
- gr_id int(5) unsigned NOT NULL auto_increment,
- gr_name varchar(50) NOT NULL default '',
- gr_description varchar(255) NOT NULL default '',
- gr_rights tinyblob,
- PRIMARY KEY (gr_id)
-
-) /*$wgDBTableOptions*/;
-- Relation table between user and groups
CREATE TABLE /*$wgDBprefix*/user_groups (
- ug_user int(5) unsigned NOT NULL default '0',
- ug_group int(5) unsigned NOT NULL default '0',
+ ug_user int unsigned NOT NULL default '0',
+ ug_group varbinary(16) NOT NULL default '0',
PRIMARY KEY (ug_user,ug_group)
-
+ KEY (ug_group)
) /*$wgDBTableOptions*/;
--- required and therefore dropped.
CREATE TABLE /*$wgDBprefix*/user_newtalk (
- user_id int(5) NOT NULL default '0',
- user_ip varchar(40) NOT NULL default '',
+ user_id int NOT NULL default '0',
+ user_ip varbinary(40) NOT NULL default '',
KEY user_id (user_id),
KEY user_ip (user_ip)
-) TYPE=MyISAM;
+) /*$wgDBTableOptions*/;
INSERT INTO
/*$wgDBprefix*/user_newtalk (user_id, user_ip)
+++ /dev/null
-CREATE TABLE /*$wgDBprefix*/user_newtalk (
- user_id int(5) NOT NULL default '0',
- user_ip varchar(40) NOT NULL default '',
- INDEX user_id (user_id),
- INDEX user_ip (user_ip)
-);
-- 2005-08-17
ALTER TABLE /*$wgDBprefix*/watchlist
- CHANGE wl_notificationtimestamp wl_notificationtimestamp varchar(14) binary;
+ CHANGE wl_notificationtimestamp wl_notificationtimestamp varbinary(14);
UPDATE /*$wgDBprefix*/watchlist
SET wl_notificationtimestamp=NULL
DROP TABLE IF EXISTS watchlist2;
CREATE TABLE watchlist2 (
- wl_user int(5) unsigned NOT NULL,
- wl_namespace tinyint(2) unsigned NOT NULL default '0',
+ wl_user int unsigned NOT NULL,
+ wl_namespace int unsigned NOT NULL default '0',
wl_title varchar(255) binary NOT NULL default '',
UNIQUE KEY (wl_user, wl_namespace, wl_title)
-) TYPE=MyISAM PACK_KEYS=1;
+) /*$wgDBTableOptions*/;
INSERT INTO watchlist2 (wl_user,wl_namespace,wl_title)
SELECT DISTINCT wl_user,(cur_namespace | 1) - 1,cur_title