* Updates
[lhc/web/wiklou.git] / maintenance / tables.sql
index 5d8b548..c326536 100644 (file)
@@ -622,6 +622,9 @@ CREATE TABLE /*$wgDBprefix*/ipblocks (
 
   -- Flag for entries hidden from users and Sysops
   ipb_deleted bool NOT NULL default 0,
+
+  -- Block prevents user from accessing Special:Emailuser
+  ipb_block_email bool NOT NULL default 0,
   
   PRIMARY KEY ipb_id (ipb_id),
 
@@ -716,7 +719,14 @@ CREATE TABLE /*$wgDBprefix*/oldimage (
   oi_user_text varchar(255) binary NOT NULL,
   oi_timestamp char(14) binary NOT NULL default '',
 
-  INDEX oi_name (oi_name(10))
+  oi_metadata mediumblob NOT NULL,
+  oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
+  oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
+  oi_minor_mime varchar(32) NOT NULL default "unknown",
+  oi_deleted tinyint(1) unsigned NOT NULL default '0',
+  
+  INDEX oi_name_timestamp (oi_name,oi_timestamp),
+  INDEX oi_name_archive_name (oi_name,oi_archive_name)
 
 ) /*$wgDBTableOptions*/;
 
@@ -937,7 +947,7 @@ CREATE TABLE /*$wgDBprefix*/interwiki (
   -- The URL of the wiki, with "$1" as a placeholder for an article name.
   -- Any spaces in the name will be transformed to underscores before
   -- insertion.
-  iw_url char(127) NOT NULL,
+  iw_url varchar(127) NOT NULL,
   
   -- A boolean value indicating whether the wiki is in this project
   -- (used, for example, to detect redirect loops)
@@ -955,14 +965,14 @@ CREATE TABLE /*$wgDBprefix*/interwiki (
 --
 CREATE TABLE /*$wgDBprefix*/querycache (
   -- A key name, generally the base name of of the special page.
-  qc_type char(32) NOT NULL,
+  qc_type varchar(32) binary NOT NULL,
   
   -- Some sort of stored value. Sizes, counts...
   qc_value int(5) unsigned NOT NULL default '0',
   
   -- Target namespace+title
   qc_namespace int NOT NULL default '0',
-  qc_title char(255) binary NOT NULL default '',
+  qc_title varchar(255) binary NOT NULL default '',
   
   KEY (qc_type,qc_value)
 
@@ -972,7 +982,7 @@ CREATE TABLE /*$wgDBprefix*/querycache (
 -- For a few generic cache operations if not using Memcached
 --
 CREATE TABLE /*$wgDBprefix*/objectcache (
-  keyname char(255) binary NOT NULL default '',
+  keyname varchar(255) binary NOT NULL default '',
   value mediumblob,
   exptime datetime,
   UNIQUE KEY (keyname),
@@ -1095,18 +1105,18 @@ CREATE TABLE /*$wgDBprefix*/redirect (
 -- Used for caching expensive grouped queries that need two links (for example double-redirects)
 CREATE TABLE /*$wgDBprefix*/querycachetwo (
   -- A key name, generally the base name of of the special page.
-  qcc_type char(32) NOT NULL,
+  qcc_type varchar(32) NOT NULL,
   
   -- Some sort of stored value. Sizes, counts...
   qcc_value int(5) unsigned NOT NULL default '0',
   
   -- Target namespace+title
   qcc_namespace int NOT NULL default '0',
-  qcc_title char(255) binary NOT NULL default '',
+  qcc_title varchar(255) binary NOT NULL default '',
   
   -- Target namespace+title2
   qcc_namespacetwo int NOT NULL default '0',
-  qcc_titletwo char(255) binary NOT NULL default '',
+  qcc_titletwo varchar(255) binary NOT NULL default '',
 
   KEY qcc_type (qcc_type,qcc_value),
   KEY qcc_title (qcc_type,qcc_namespace,qcc_title),
@@ -1114,7 +1124,7 @@ CREATE TABLE /*$wgDBprefix*/querycachetwo (
 
 ) /*$wgDBTableOptions*/;
 
---- Used for storing page restrictions (i.e. protection levels)
+-- Used for storing page restrictions (i.e. protection levels)
 CREATE TABLE /*$wgDBprefix*/page_restrictions (
   -- Page to apply restrictions to (Foreign Key to page).
   pr_page int(8) NOT NULL,