Updated patch files to match the recent update to tables.sql. Removed some defunct...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 22 Jun 2007 20:09:59 +0000 (20:09 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 22 Jun 2007 20:09:59 +0000 (20:09 +0000)
65 files changed:
maintenance/archives/patch-ar_deleted.sql
maintenance/archives/patch-ar_len.sql
maintenance/archives/patch-archive-rev_id.sql
maintenance/archives/patch-archive-text_id.sql
maintenance/archives/patch-bot.sql
maintenance/archives/patch-cache.sql
maintenance/archives/patch-categorylinks.sql
maintenance/archives/patch-email-notification.sql
maintenance/archives/patch-fa_deleted.sql
maintenance/archives/patch-filearchive.sql
maintenance/archives/patch-img_media_type.sql
maintenance/archives/patch-img_width.sql
maintenance/archives/patch-interwiki-trans.sql
maintenance/archives/patch-interwiki.sql
maintenance/archives/patch-ipb_anon_only.sql
maintenance/archives/patch-ipb_emailban.sql
maintenance/archives/patch-ipb_expiry.sql
maintenance/archives/patch-ipb_range_start.sql
maintenance/archives/patch-ipblocks.sql
maintenance/archives/patch-job.sql
maintenance/archives/patch-langlinks.sql
maintenance/archives/patch-linktables.sql
maintenance/archives/patch-log_deleted.sql
maintenance/archives/patch-logging.sql
maintenance/archives/patch-math.sql
maintenance/archives/patch-objectcache.sql
maintenance/archives/patch-oi_metadata.sql
maintenance/archives/patch-page_len.sql
maintenance/archives/patch-page_restrictions.sql
maintenance/archives/patch-pagelinks.sql
maintenance/archives/patch-querycache.sql
maintenance/archives/patch-querycacheinfo.sql
maintenance/archives/patch-querycachetwo.sql
maintenance/archives/patch-rc_deleted.sql
maintenance/archives/patch-rc_id.sql
maintenance/archives/patch-rc_ip.sql
maintenance/archives/patch-rc_len.sql
maintenance/archives/patch-rc_type.sql
maintenance/archives/patch-redirect.sql
maintenance/archives/patch-rename-group.sql [deleted file]
maintenance/archives/patch-rename-user_groups-and_rights.sql
maintenance/archives/patch-restructure.sql
maintenance/archives/patch-rev_deleted.sql
maintenance/archives/patch-rev_len.sql
maintenance/archives/patch-rev_parent_id.sql
maintenance/archives/patch-rev_text_id.sql
maintenance/archives/patch-searchindex.sql
maintenance/archives/patch-ss_images.sql
maintenance/archives/patch-ss_total_articles.sql
maintenance/archives/patch-templatelinks.sql
maintenance/archives/patch-trackbacks.sql
maintenance/archives/patch-transcache.sql
maintenance/archives/patch-user_email_token.sql
maintenance/archives/patch-user_groups.sql
maintenance/archives/patch-user_newpass_time.sql
maintenance/archives/patch-user_registration.sql
maintenance/archives/patch-user_rights.sql
maintenance/archives/patch-user_token.sql
maintenance/archives/patch-userlevels-defaultgroups.sql [deleted file]
maintenance/archives/patch-userlevels-rights.sql [deleted file]
maintenance/archives/patch-userlevels.sql
maintenance/archives/patch-usernewtalk.sql
maintenance/archives/patch-usernewtalk2.sql [deleted file]
maintenance/archives/patch-watchlist-null.sql
maintenance/archives/patch-watchlist.sql

index b1d37a5..2e5edc4 100644 (file)
@@ -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';
index 69e634b..1710e09 100644 (file)
@@ -1,3 +1,3 @@
 ALTER TABLE /*$wgDBprefix*/archive
-  ADD ar_len INT(8) UNSIGNED;
+  ADD ar_len INT UNSIGNED;
 
index 375001b..b9d789e 100644 (file)
@@ -3,4 +3,4 @@
 
 ALTER TABLE /*$wgDBprefix*/archive
   ADD
-    ar_rev_id int(8) unsigned;
+    ar_rev_id int unsigned;
index f59715f..8557f2a 100644 (file)
@@ -11,4 +11,4 @@
 
 ALTER TABLE /*$wgDBprefix*/archive
   ADD
-    ar_text_id int(8) unsigned;
+    ar_text_id int unsigned;
index ce61884..7625889 100644 (file)
@@ -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;
index 5651c3c..0545da8 100644 (file)
@@ -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;
index c5eb396..02168d7 100644 (file)
@@ -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.
index f9bc044..337e1ac 100644 (file)
@@ -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));
index 7816314..3483f8c 100644 (file)
@@ -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';
index 71f8a5e..587a2ab 100644 (file)
@@ -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
index 2356fc6..857eb98 100644 (file)
@@ -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"
 );
index c99bd46..06889ea 100644 (file)
@@ -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
 );
 
 
index 2384a66..5cc4d0b 100644 (file)
@@ -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;
index 3efdac8..321765b 100644 (file)
@@ -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)
index d46c04e..fcd257c 100644 (file)
 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,
   
index b990e42..e05c20b 100644 (file)
@@ -1,4 +1,4 @@
 -- 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';
index 0f106d7..f3b6a82 100644 (file)
@@ -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;
index c31e2d9..64a906d 100644 (file)
@@ -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));
 
 
index 8e47798..634fa78 100644 (file)
@@ -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);
index d931124..a1f9094 100644 (file)
@@ -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
index 33eb419..ffff07c 100644 (file)
@@ -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 '',
index 8c521ad..ae9768a 100644 (file)
@@ -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;
index 6c77713..0fce0f5 100644 (file)
@@ -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';
index 9684752..b5cfdf7 100644 (file)
@@ -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,
index d217ece..1d4b90e 100644 (file)
@@ -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,
index a439dd0..223a11c 100644 (file)
@@ -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),
index 313df18..6f22e87 100644 (file)
@@ -12,5 +12,5 @@ ALTER TABLE /*$wgDBprefix*/oldimage
    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';
index c32dc8d..7d01d90 100644 (file)
@@ -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
index c0eafab..c18a054 100644 (file)
@@ -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*/;
index 91e279d..118592f 100644 (file)
@@ -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
index d0a592a..e6da79c 100644 (file)
@@ -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)
 
index d90189e..7ad2bca 100644 (file)
@@ -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 )
 
index 4f7a60a..01623bc 100644 (file)
@@ -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),
index 720440d..04ead97 100644 (file)
@@ -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 NULL;
index 6dd9ef4..3b02375 100644 (file)
@@ -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);
 
 
index a68a22c..6b0b053 100644 (file)
@@ -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);
 
 
index 920f755..6c781a0 100644 (file)
@@ -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;
 
index 1097771..f1fb18e 100644 (file)
@@ -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;
index 455a674..5d7218b 100644 (file)
@@ -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
deleted file mode 100644 (file)
index 026b60b..0000000
+++ /dev/null
@@ -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;
-
index 650f260..978b31f 100644 (file)
@@ -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;
 
index acf306c..7b63848 100644 (file)
 -- 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),
index 3af0c1d..ba47f78 100644 (file)
@@ -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';
index b861a2b..ccdae8b 100644 (file)
@@ -1,3 +1,3 @@
 ALTER TABLE /*$wgDBprefix*/revision
-  ADD rev_len INT(8) UNSIGNED;
+  ADD rev_len INT UNSIGNED;
 
index 971122b..4baf792 100644 (file)
@@ -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;
index 44ef438..3dd9127 100644 (file)
@@ -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;
index 2b9b670..452c454 100644 (file)
@@ -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 '',
index e1950eb..80f1295 100644 (file)
@@ -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;
index b4a48cf..ce804ce 100644 (file)
@@ -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;
index 31318ba..a545b34 100644 (file)
@@ -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
index 4193d05..e3a47aa 100644 (file)
@@ -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),
 
index 0d2204e..d073169 100644 (file)
@@ -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)
index d4d633b..f8e66ca 100644 (file)
@@ -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);
index 20e0052..c374033 100644 (file)
@@ -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)
index 47b332b..c323f23 100644 (file)
@@ -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);
 
index 65fd99d..906a695 100644 (file)
@@ -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);
index 4c6846e..9866654 100644 (file)
@@ -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,
index 797dc98..a3eb0bf 100644 (file)
@@ -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
deleted file mode 100644 (file)
index 065653d..0000000
+++ /dev/null
@@ -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
deleted file mode 100644 (file)
index 7f1cabf..0000000
+++ /dev/null
@@ -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;
index 17ff3c5..399d6cb 100644 (file)
@@ -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*/;
index fb8c865..34fae94 100644 (file)
@@ -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
deleted file mode 100644 (file)
index 477109b..0000000
+++ /dev/null
@@ -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)
-);
index 37ffc16..d4869a0 100644 (file)
@@ -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
index adee010..83826b7 100644 (file)
 
 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