summaryrefslogtreecommitdiff
path: root/maintenance/archives
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-07-18 09:49:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2007-07-18 09:49:48 +0200
commitfd12989ef8eab0fc9816decb8bcabccd1d213ee8 (patch)
tree68b12cc05704f2181a90d69b898f999309a8c036 /maintenance/archives
parent1a1c15f5da352895fb32daab8550cb3dca8198ac (diff)
auf 1.10.1 aktualisiert
Diffstat (limited to 'maintenance/archives')
-rw-r--r--maintenance/archives/patch-ar_deleted.sql2
-rw-r--r--maintenance/archives/patch-ar_len.sql2
-rw-r--r--maintenance/archives/patch-archive-rev_id.sql2
-rw-r--r--maintenance/archives/patch-archive-text_id.sql2
-rw-r--r--maintenance/archives/patch-bot.sql2
-rw-r--r--maintenance/archives/patch-cache.sql4
-rw-r--r--maintenance/archives/patch-categorylinks.sql10
-rw-r--r--maintenance/archives/patch-email-notification.sql2
-rw-r--r--maintenance/archives/patch-fa_deleted.sql2
-rw-r--r--maintenance/archives/patch-filearchive.sql20
-rw-r--r--maintenance/archives/patch-img_media_type.sql2
-rw-r--r--maintenance/archives/patch-img_width.sql12
-rw-r--r--maintenance/archives/patch-interwiki-trans.sql2
-rw-r--r--maintenance/archives/patch-interwiki.sql4
-rw-r--r--maintenance/archives/patch-ipb_anon_only.sql10
-rw-r--r--maintenance/archives/patch-ipb_expiry.sql2
-rw-r--r--maintenance/archives/patch-ipb_range_start.sql4
-rw-r--r--maintenance/archives/patch-ipblocks.sql4
-rw-r--r--maintenance/archives/patch-job.sql4
-rw-r--r--maintenance/archives/patch-langlinks.sql4
-rw-r--r--maintenance/archives/patch-linktables.sql8
-rw-r--r--maintenance/archives/patch-log_deleted.sql2
-rw-r--r--maintenance/archives/patch-logging.sql6
-rw-r--r--maintenance/archives/patch-math.sql6
-rw-r--r--maintenance/archives/patch-objectcache.sql2
-rw-r--r--maintenance/archives/patch-page_len.sql2
-rw-r--r--maintenance/archives/patch-page_restrictions.sql14
-rw-r--r--maintenance/archives/patch-pagelinks.sql2
-rw-r--r--maintenance/archives/patch-querycache.sql6
-rw-r--r--maintenance/archives/patch-querycacheinfo.sql4
-rw-r--r--maintenance/archives/patch-querycachetwo.sql8
-rw-r--r--maintenance/archives/patch-rc_deleted.sql8
-rw-r--r--maintenance/archives/patch-rc_id.sql2
-rw-r--r--maintenance/archives/patch-rc_ip.sql2
-rw-r--r--maintenance/archives/patch-rc_len.sql2
-rw-r--r--maintenance/archives/patch-rc_type.sql4
-rw-r--r--maintenance/archives/patch-redirect.sql2
-rw-r--r--maintenance/archives/patch-rename-group.sql10
-rw-r--r--maintenance/archives/patch-rename-user_groups-and_rights.sql6
-rw-r--r--maintenance/archives/patch-restructure.sql26
-rw-r--r--maintenance/archives/patch-rev_deleted.sql2
-rw-r--r--maintenance/archives/patch-rev_len.sql2
-rw-r--r--maintenance/archives/patch-rev_parent_id.sql2
-rw-r--r--maintenance/archives/patch-rev_text_id.sql2
-rw-r--r--maintenance/archives/patch-searchindex.sql2
-rw-r--r--maintenance/archives/patch-ss_images.sql2
-rw-r--r--maintenance/archives/patch-ss_total_articles.sql6
-rw-r--r--maintenance/archives/patch-templatelinks.sql2
-rw-r--r--maintenance/archives/patch-trackbacks.sql2
-rw-r--r--maintenance/archives/patch-transcache.sql2
-rw-r--r--maintenance/archives/patch-user_email_token.sql6
-rw-r--r--maintenance/archives/patch-user_groups.sql4
-rw-r--r--maintenance/archives/patch-user_newpass_time.sql2
-rw-r--r--maintenance/archives/patch-user_registration.sql2
-rw-r--r--maintenance/archives/patch-user_rights.sql2
-rw-r--r--maintenance/archives/patch-user_token.sql2
-rw-r--r--maintenance/archives/patch-userlevels-defaultgroups.sql30
-rw-r--r--maintenance/archives/patch-userlevels-rights.sql5
-rw-r--r--maintenance/archives/patch-userlevels.sql20
-rw-r--r--maintenance/archives/patch-usernewtalk.sql6
-rw-r--r--maintenance/archives/patch-usernewtalk2.sql6
-rw-r--r--maintenance/archives/patch-watchlist-null.sql2
-rw-r--r--maintenance/archives/patch-watchlist.sql6
63 files changed, 134 insertions, 201 deletions
diff --git a/maintenance/archives/patch-ar_deleted.sql b/maintenance/archives/patch-ar_deleted.sql
index b1d37a5c..2e5edc44 100644
--- a/maintenance/archives/patch-ar_deleted.sql
+++ b/maintenance/archives/patch-ar_deleted.sql
@@ -1,3 +1,3 @@
-- 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';
diff --git a/maintenance/archives/patch-ar_len.sql b/maintenance/archives/patch-ar_len.sql
index 69e634b0..1710e099 100644
--- a/maintenance/archives/patch-ar_len.sql
+++ b/maintenance/archives/patch-ar_len.sql
@@ -1,3 +1,3 @@
ALTER TABLE /*$wgDBprefix*/archive
- ADD ar_len INT(8) UNSIGNED;
+ ADD ar_len INT UNSIGNED;
diff --git a/maintenance/archives/patch-archive-rev_id.sql b/maintenance/archives/patch-archive-rev_id.sql
index 375001b8..b9d789ee 100644
--- a/maintenance/archives/patch-archive-rev_id.sql
+++ b/maintenance/archives/patch-archive-rev_id.sql
@@ -3,4 +3,4 @@
ALTER TABLE /*$wgDBprefix*/archive
ADD
- ar_rev_id int(8) unsigned;
+ ar_rev_id int unsigned;
diff --git a/maintenance/archives/patch-archive-text_id.sql b/maintenance/archives/patch-archive-text_id.sql
index f59715ff..8557f2ad 100644
--- a/maintenance/archives/patch-archive-text_id.sql
+++ b/maintenance/archives/patch-archive-text_id.sql
@@ -11,4 +11,4 @@
ALTER TABLE /*$wgDBprefix*/archive
ADD
- ar_text_id int(8) unsigned;
+ ar_text_id int unsigned;
diff --git a/maintenance/archives/patch-bot.sql b/maintenance/archives/patch-bot.sql
index ce61884c..7625889c 100644
--- a/maintenance/archives/patch-bot.sql
+++ b/maintenance/archives/patch-bot.sql
@@ -7,5 +7,5 @@
-- 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;
diff --git a/maintenance/archives/patch-cache.sql b/maintenance/archives/patch-cache.sql
index 5651c3ce..0545da8b 100644
--- a/maintenance/archives/patch-cache.sql
+++ b/maintenance/archives/patch-cache.sql
@@ -15,7 +15,7 @@
-- 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
@@ -36,6 +36,6 @@ UPDATE /*$wgDBprefix*/cur
-- 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;
diff --git a/maintenance/archives/patch-categorylinks.sql b/maintenance/archives/patch-categorylinks.sql
index c5eb396e..02168d7f 100644
--- a/maintenance/archives/patch-categorylinks.sql
+++ b/maintenance/archives/patch-categorylinks.sql
@@ -5,7 +5,7 @@
--
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;
@@ -17,11 +17,9 @@ CREATE TABLE /*$wgDBprefix*/categorylinks (
-- 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.
diff --git a/maintenance/archives/patch-email-notification.sql b/maintenance/archives/patch-email-notification.sql
index f9bc0440..337e1ac2 100644
--- a/maintenance/archives/patch-email-notification.sql
+++ b/maintenance/archives/patch-email-notification.sql
@@ -8,4 +8,4 @@
-- ("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));
diff --git a/maintenance/archives/patch-fa_deleted.sql b/maintenance/archives/patch-fa_deleted.sql
index 78163149..3483f8cf 100644
--- a/maintenance/archives/patch-fa_deleted.sql
+++ b/maintenance/archives/patch-fa_deleted.sql
@@ -1,3 +1,3 @@
-- 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';
diff --git a/maintenance/archives/patch-filearchive.sql b/maintenance/archives/patch-filearchive.sql
index 71f8a5eb..587a2ab4 100644
--- a/maintenance/archives/patch-filearchive.sql
+++ b/maintenance/archives/patch-filearchive.sql
@@ -14,33 +14,33 @@ CREATE TABLE /*$wgDBprefix*/filearchive (
-- 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
diff --git a/maintenance/archives/patch-img_media_type.sql b/maintenance/archives/patch-img_media_type.sql
index 2356fc63..857eb98e 100644
--- a/maintenance/archives/patch-img_media_type.sql
+++ b/maintenance/archives/patch-img_media_type.sql
@@ -13,5 +13,5 @@ ALTER TABLE /*$wgDBprefix*/image ADD (
-- 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"
);
diff --git a/maintenance/archives/patch-img_width.sql b/maintenance/archives/patch-img_width.sql
index c99bd46d..06889ea6 100644
--- a/maintenance/archives/patch-img_width.sql
+++ b/maintenance/archives/patch-img_width.sql
@@ -4,15 +4,15 @@
-- 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
);
diff --git a/maintenance/archives/patch-interwiki-trans.sql b/maintenance/archives/patch-interwiki-trans.sql
index 2384a66a..5cc4d0b5 100644
--- a/maintenance/archives/patch-interwiki-trans.sql
+++ b/maintenance/archives/patch-interwiki-trans.sql
@@ -1,2 +1,2 @@
ALTER TABLE /*$wgDBprefix*/interwiki
- ADD COLUMN iw_trans TINYINT(1) NOT NULL DEFAULT 0;
+ ADD COLUMN iw_trans TINYINT NOT NULL DEFAULT 0;
diff --git a/maintenance/archives/patch-interwiki.sql b/maintenance/archives/patch-interwiki.sql
index 3efdac8b..321765b9 100644
--- a/maintenance/archives/patch-interwiki.sql
+++ b/maintenance/archives/patch-interwiki.sql
@@ -4,12 +4,12 @@
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)
diff --git a/maintenance/archives/patch-ipb_anon_only.sql b/maintenance/archives/patch-ipb_anon_only.sql
index d46c04e8..fcd257c7 100644
--- a/maintenance/archives/patch-ipb_anon_only.sql
+++ b/maintenance/archives/patch-ipb_anon_only.sql
@@ -10,16 +10,16 @@
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,
diff --git a/maintenance/archives/patch-ipb_expiry.sql b/maintenance/archives/patch-ipb_expiry.sql
index 0f106d70..f3b6a82b 100644
--- a/maintenance/archives/patch-ipb_expiry.sql
+++ b/maintenance/archives/patch-ipb_expiry.sql
@@ -1,6 +1,6 @@
-- 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;
diff --git a/maintenance/archives/patch-ipb_range_start.sql b/maintenance/archives/patch-ipb_range_start.sql
index c31e2d9c..64a906d4 100644
--- a/maintenance/archives/patch-ipb_range_start.sql
+++ b/maintenance/archives/patch-ipb_range_start.sql
@@ -1,7 +1,7 @@
-- 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));
diff --git a/maintenance/archives/patch-ipblocks.sql b/maintenance/archives/patch-ipblocks.sql
index 8e47798b..634fa78c 100644
--- a/maintenance/archives/patch-ipblocks.sql
+++ b/maintenance/archives/patch-ipblocks.sql
@@ -1,6 +1,6 @@
-- 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);
diff --git a/maintenance/archives/patch-job.sql b/maintenance/archives/patch-job.sql
index d931124d..a1f9094f 100644
--- a/maintenance/archives/patch-job.sql
+++ b/maintenance/archives/patch-job.sql
@@ -1,10 +1,10 @@
-- 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
diff --git a/maintenance/archives/patch-langlinks.sql b/maintenance/archives/patch-langlinks.sql
index 33eb419d..ffff07c0 100644
--- a/maintenance/archives/patch-langlinks.sql
+++ b/maintenance/archives/patch-langlinks.sql
@@ -1,9 +1,9 @@
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 '',
diff --git a/maintenance/archives/patch-linktables.sql b/maintenance/archives/patch-linktables.sql
index 8c521ad9..ae9768a8 100644
--- a/maintenance/archives/patch-linktables.sql
+++ b/maintenance/archives/patch-linktables.sql
@@ -5,13 +5,13 @@
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)
@@ -26,7 +26,7 @@ CREATE TABLE /*$wgDBprefix*/links (
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
@@ -45,7 +45,7 @@ CREATE TABLE /*$wgDBprefix*/brokenlinks (
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;
diff --git a/maintenance/archives/patch-log_deleted.sql b/maintenance/archives/patch-log_deleted.sql
index 6c777134..0fce0f51 100644
--- a/maintenance/archives/patch-log_deleted.sql
+++ b/maintenance/archives/patch-log_deleted.sql
@@ -1,3 +1,3 @@
-- 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';
diff --git a/maintenance/archives/patch-logging.sql b/maintenance/archives/patch-logging.sql
index 96847526..b5cfdf72 100644
--- a/maintenance/archives/patch-logging.sql
+++ b/maintenance/archives/patch-logging.sql
@@ -5,11 +5,11 @@ CREATE TABLE /*$wgDBprefix*/logging (
-- 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,
diff --git a/maintenance/archives/patch-math.sql b/maintenance/archives/patch-math.sql
index d217ecea..1d4b90e1 100644
--- a/maintenance/archives/patch-math.sql
+++ b/maintenance/archives/patch-math.sql
@@ -8,14 +8,14 @@
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,
diff --git a/maintenance/archives/patch-objectcache.sql b/maintenance/archives/patch-objectcache.sql
index a439dd03..223a11c9 100644
--- a/maintenance/archives/patch-objectcache.sql
+++ b/maintenance/archives/patch-objectcache.sql
@@ -1,6 +1,6 @@
-- 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),
diff --git a/maintenance/archives/patch-page_len.sql b/maintenance/archives/patch-page_len.sql
index c32dc8d4..7d01d90a 100644
--- a/maintenance/archives/patch-page_len.sql
+++ b/maintenance/archives/patch-page_len.sql
@@ -6,7 +6,7 @@
-- 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
diff --git a/maintenance/archives/patch-page_restrictions.sql b/maintenance/archives/patch-page_restrictions.sql
index c0eafab9..c18a054e 100644
--- a/maintenance/archives/patch-page_restrictions.sql
+++ b/maintenance/archives/patch-page_restrictions.sql
@@ -1,17 +1,17 @@
--- 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),
@@ -19,4 +19,4 @@ CREATE TABLE /*$wgDBprefix*/page_restrictions (
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*/;
diff --git a/maintenance/archives/patch-pagelinks.sql b/maintenance/archives/patch-pagelinks.sql
index 91e279da..118592fb 100644
--- a/maintenance/archives/patch-pagelinks.sql
+++ b/maintenance/archives/patch-pagelinks.sql
@@ -18,7 +18,7 @@
--
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
diff --git a/maintenance/archives/patch-querycache.sql b/maintenance/archives/patch-querycache.sql
index d0a592ac..e6da79cc 100644
--- a/maintenance/archives/patch-querycache.sql
+++ b/maintenance/archives/patch-querycache.sql
@@ -2,14 +2,14 @@
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)
diff --git a/maintenance/archives/patch-querycacheinfo.sql b/maintenance/archives/patch-querycacheinfo.sql
index d90189e2..7ad2bca6 100644
--- a/maintenance/archives/patch-querycacheinfo.sql
+++ b/maintenance/archives/patch-querycacheinfo.sql
@@ -2,10 +2,10 @@ CREATE TABLE /*$wgDBprefix*/querycache_info (
-- 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 )
diff --git a/maintenance/archives/patch-querycachetwo.sql b/maintenance/archives/patch-querycachetwo.sql
index 4f7a60ac..01623bc7 100644
--- a/maintenance/archives/patch-querycachetwo.sql
+++ b/maintenance/archives/patch-querycachetwo.sql
@@ -2,18 +2,18 @@
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),
diff --git a/maintenance/archives/patch-rc_deleted.sql b/maintenance/archives/patch-rc_deleted.sql
index a2bdca9b..cc668433 100644
--- a/maintenance/archives/patch-rc_deleted.sql
+++ b/maintenance/archives/patch-rc_deleted.sql
@@ -1,8 +1,8 @@
-- 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 NOT NULL default '';
diff --git a/maintenance/archives/patch-rc_id.sql b/maintenance/archives/patch-rc_id.sql
index 6dd9ef4a..3b023753 100644
--- a/maintenance/archives/patch-rc_id.sql
+++ b/maintenance/archives/patch-rc_id.sql
@@ -1,7 +1,7 @@
-- 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);
diff --git a/maintenance/archives/patch-rc_ip.sql b/maintenance/archives/patch-rc_ip.sql
index a68a22cb..6b0b0534 100644
--- a/maintenance/archives/patch-rc_ip.sql
+++ b/maintenance/archives/patch-rc_ip.sql
@@ -1,7 +1,7 @@
-- 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);
diff --git a/maintenance/archives/patch-rc_len.sql b/maintenance/archives/patch-rc_len.sql
index 920f755b..6c781a00 100644
--- a/maintenance/archives/patch-rc_len.sql
+++ b/maintenance/archives/patch-rc_len.sql
@@ -5,5 +5,5 @@
--
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;
diff --git a/maintenance/archives/patch-rc_type.sql b/maintenance/archives/patch-rc_type.sql
index 1097771b..f1fb18e5 100644
--- a/maintenance/archives/patch-rc_type.sql
+++ b/maintenance/archives/patch-rc_type.sql
@@ -1,8 +1,8 @@
-- 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;
diff --git a/maintenance/archives/patch-redirect.sql b/maintenance/archives/patch-redirect.sql
index 455a674f..5d7218bc 100644
--- a/maintenance/archives/patch-redirect.sql
+++ b/maintenance/archives/patch-redirect.sql
@@ -4,7 +4,7 @@
--
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
diff --git a/maintenance/archives/patch-rename-group.sql b/maintenance/archives/patch-rename-group.sql
index 026b60bd..e69de29b 100644
--- a/maintenance/archives/patch-rename-group.sql
+++ b/maintenance/archives/patch-rename-group.sql
@@ -1,10 +0,0 @@
--- 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;
-
diff --git a/maintenance/archives/patch-rename-user_groups-and_rights.sql b/maintenance/archives/patch-rename-user_groups-and_rights.sql
index 650f2604..978b31f7 100644
--- a/maintenance/archives/patch-rename-user_groups-and_rights.sql
+++ b/maintenance/archives/patch-rename-user_groups-and_rights.sql
@@ -1,9 +1,9 @@
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;
diff --git a/maintenance/archives/patch-restructure.sql b/maintenance/archives/patch-restructure.sql
index acf306c2..7b638483 100644
--- a/maintenance/archives/patch-restructure.sql
+++ b/maintenance/archives/patch-restructure.sql
@@ -10,17 +10,17 @@
-- 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),
@@ -29,14 +29,14 @@ CREATE TABLE /*$wgDBprefix*/page (
);
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),
diff --git a/maintenance/archives/patch-rev_deleted.sql b/maintenance/archives/patch-rev_deleted.sql
index 3af0c1d7..ba47f789 100644
--- a/maintenance/archives/patch-rev_deleted.sql
+++ b/maintenance/archives/patch-rev_deleted.sql
@@ -8,4 +8,4 @@
--
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_deleted tinyint(1) unsigned NOT NULL default '0';
+ ADD rev_deleted tinyint unsigned NOT NULL default '0';
diff --git a/maintenance/archives/patch-rev_len.sql b/maintenance/archives/patch-rev_len.sql
index b861a2bc..ccdae8b8 100644
--- a/maintenance/archives/patch-rev_len.sql
+++ b/maintenance/archives/patch-rev_len.sql
@@ -1,3 +1,3 @@
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_len INT(8) UNSIGNED;
+ ADD rev_len INT UNSIGNED;
diff --git a/maintenance/archives/patch-rev_parent_id.sql b/maintenance/archives/patch-rev_parent_id.sql
index 971122bb..4baf7927 100644
--- a/maintenance/archives/patch-rev_parent_id.sql
+++ b/maintenance/archives/patch-rev_parent_id.sql
@@ -6,4 +6,4 @@
--
ALTER TABLE /*$wgDBprefix*/revision
- ADD rev_parent_id int(8) unsigned default NULL;
+ ADD rev_parent_id int unsigned default NULL;
diff --git a/maintenance/archives/patch-rev_text_id.sql b/maintenance/archives/patch-rev_text_id.sql
index 44ef438c..3dd9127d 100644
--- a/maintenance/archives/patch-rev_text_id.sql
+++ b/maintenance/archives/patch-rev_text_id.sql
@@ -11,7 +11,7 @@
--
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;
diff --git a/maintenance/archives/patch-searchindex.sql b/maintenance/archives/patch-searchindex.sql
index 2b9b6702..452c4548 100644
--- a/maintenance/archives/patch-searchindex.sql
+++ b/maintenance/archives/patch-searchindex.sql
@@ -9,7 +9,7 @@
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 '',
diff --git a/maintenance/archives/patch-ss_images.sql b/maintenance/archives/patch-ss_images.sql
index e1950eb6..80f1295f 100644
--- a/maintenance/archives/patch-ss_images.sql
+++ b/maintenance/archives/patch-ss_images.sql
@@ -1,5 +1,5 @@
-- 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;
diff --git a/maintenance/archives/patch-ss_total_articles.sql b/maintenance/archives/patch-ss_total_articles.sql
index b4a48cf7..ce804ce5 100644
--- a/maintenance/archives/patch-ss_total_articles.sql
+++ b/maintenance/archives/patch-ss_total_articles.sql
@@ -1,6 +1,6 @@
-- 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;
diff --git a/maintenance/archives/patch-templatelinks.sql b/maintenance/archives/patch-templatelinks.sql
index 31318ba7..a545b34e 100644
--- a/maintenance/archives/patch-templatelinks.sql
+++ b/maintenance/archives/patch-templatelinks.sql
@@ -3,7 +3,7 @@
--
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
diff --git a/maintenance/archives/patch-trackbacks.sql b/maintenance/archives/patch-trackbacks.sql
index 4193d058..e3a47aae 100644
--- a/maintenance/archives/patch-trackbacks.sql
+++ b/maintenance/archives/patch-trackbacks.sql
@@ -2,7 +2,7 @@ CREATE TABLE /*$wgDBprefix*/trackbacks (
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),
diff --git a/maintenance/archives/patch-transcache.sql b/maintenance/archives/patch-transcache.sql
index 0d2204e4..d0731697 100644
--- a/maintenance/archives/patch-transcache.sql
+++ b/maintenance/archives/patch-transcache.sql
@@ -1,5 +1,5 @@
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)
diff --git a/maintenance/archives/patch-user_email_token.sql b/maintenance/archives/patch-user_email_token.sql
index d4d633b7..f8e66ca4 100644
--- a/maintenance/archives/patch-user_email_token.sql
+++ b/maintenance/archives/patch-user_email_token.sql
@@ -6,7 +6,7 @@
--
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);
diff --git a/maintenance/archives/patch-user_groups.sql b/maintenance/archives/patch-user_groups.sql
index 20e00520..c3740332 100644
--- a/maintenance/archives/patch-user_groups.sql
+++ b/maintenance/archives/patch-user_groups.sql
@@ -8,7 +8,7 @@
--
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
@@ -18,7 +18,7 @@ CREATE TABLE /*$wgDBprefix*/user_groups (
-- 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)
diff --git a/maintenance/archives/patch-user_newpass_time.sql b/maintenance/archives/patch-user_newpass_time.sql
index 47b332ba..c323f238 100644
--- a/maintenance/archives/patch-user_newpass_time.sql
+++ b/maintenance/archives/patch-user_newpass_time.sql
@@ -1,4 +1,4 @@
-- 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);
diff --git a/maintenance/archives/patch-user_registration.sql b/maintenance/archives/patch-user_registration.sql
index 65fd99df..906a6954 100644
--- a/maintenance/archives/patch-user_registration.sql
+++ b/maintenance/archives/patch-user_registration.sql
@@ -6,4 +6,4 @@
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);
diff --git a/maintenance/archives/patch-user_rights.sql b/maintenance/archives/patch-user_rights.sql
index 4c6846e0..9866654c 100644
--- a/maintenance/archives/patch-user_rights.sql
+++ b/maintenance/archives/patch-user_rights.sql
@@ -7,7 +7,7 @@
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,
diff --git a/maintenance/archives/patch-user_token.sql b/maintenance/archives/patch-user_token.sql
index 797dc98f..a3eb0bfd 100644
--- a/maintenance/archives/patch-user_token.sql
+++ b/maintenance/archives/patch-user_token.sql
@@ -1,7 +1,7 @@
-- 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),
diff --git a/maintenance/archives/patch-userlevels-defaultgroups.sql b/maintenance/archives/patch-userlevels-defaultgroups.sql
index 065653da..e69de29b 100644
--- a/maintenance/archives/patch-userlevels-defaultgroups.sql
+++ b/maintenance/archives/patch-userlevels-defaultgroups.sql
@@ -1,30 +0,0 @@
---
--- 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'
- );
diff --git a/maintenance/archives/patch-userlevels-rights.sql b/maintenance/archives/patch-userlevels-rights.sql
index 7f1cabfc..e69de29b 100644
--- a/maintenance/archives/patch-userlevels-rights.sql
+++ b/maintenance/archives/patch-userlevels-rights.sql
@@ -1,5 +0,0 @@
--- 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;
diff --git a/maintenance/archives/patch-userlevels.sql b/maintenance/archives/patch-userlevels.sql
index 17ff3c5d..399d6cb2 100644
--- a/maintenance/archives/patch-userlevels.sql
+++ b/maintenance/archives/patch-userlevels.sql
@@ -1,22 +1,8 @@
--- 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*/;
diff --git a/maintenance/archives/patch-usernewtalk.sql b/maintenance/archives/patch-usernewtalk.sql
index fb8c8655..34fae946 100644
--- a/maintenance/archives/patch-usernewtalk.sql
+++ b/maintenance/archives/patch-usernewtalk.sql
@@ -5,11 +5,11 @@
--- 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)
diff --git a/maintenance/archives/patch-usernewtalk2.sql b/maintenance/archives/patch-usernewtalk2.sql
index 477109b7..e69de29b 100644
--- a/maintenance/archives/patch-usernewtalk2.sql
+++ b/maintenance/archives/patch-usernewtalk2.sql
@@ -1,6 +0,0 @@
-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)
-);
diff --git a/maintenance/archives/patch-watchlist-null.sql b/maintenance/archives/patch-watchlist-null.sql
index 37ffc163..d4869a02 100644
--- a/maintenance/archives/patch-watchlist-null.sql
+++ b/maintenance/archives/patch-watchlist-null.sql
@@ -2,7 +2,7 @@
-- 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
diff --git a/maintenance/archives/patch-watchlist.sql b/maintenance/archives/patch-watchlist.sql
index adee010b..83826b72 100644
--- a/maintenance/archives/patch-watchlist.sql
+++ b/maintenance/archives/patch-watchlist.sql
@@ -10,11 +10,11 @@
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