Table page_props needed in tests after all.
[lhc/web/wiklou.git] / maintenance / tables.sql
index 615d15b..13a29de 100644 (file)
@@ -378,8 +378,11 @@ CREATE TABLE /*$wgDBprefix*/archive (
   ar_len int unsigned,
 
   -- Reference to page_id. Useful for sysadmin fixing of large pages 
-  -- merged together in the archives
-  ar_page int unsigned NOT NULL,
+  -- merged together in the archives, or for cleanly restoring a page
+  -- at its original ID number if possible.
+  --
+  -- Will be NULL for pages deleted prior to 1.11.
+  ar_page_id int unsigned,
   
   KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp),
   KEY usertext_timestamp (ar_user_text,ar_timestamp)
@@ -594,6 +597,9 @@ CREATE TABLE /*$wgDBprefix*/ipblocks (
   -- User ID who made the block.
   ipb_by int unsigned NOT NULL default '0',
   
+  -- User name of blocker
+  ipb_by_text varchar(255) binary NOT NULL default '',
+  
   -- Text comment made by blocker.
   ipb_reason tinyblob NOT NULL,
   
@@ -870,7 +876,7 @@ CREATE TABLE /*$wgDBprefix*/recentchanges (
   -- Store log action or null
   rc_log_action varbinary(255) NULL default NULL,
   -- Log params
-  rc_params blob NOT NULL default '',
+  rc_params blob NULL,
   
   PRIMARY KEY rc_id (rc_id),
   INDEX rc_timestamp (rc_timestamp),
@@ -880,7 +886,6 @@ CREATE TABLE /*$wgDBprefix*/recentchanges (
   INDEX rc_ip (rc_ip),
   INDEX rc_ns_usertext (rc_namespace, rc_user_text),
   INDEX rc_user_text (rc_user_text, rc_timestamp)
-  INDEX `rc_patrolling` ( `rc_this_oldid`, `rc_last_oldid`, `rc_patrolled` )
 
 ) /*$wgDBTableOptions*/;
 
@@ -1166,4 +1171,26 @@ CREATE TABLE /*$wgDBprefix*/page_restrictions (
   KEY pr_cascade (pr_cascade)
 ) /*$wgDBTableOptions*/;
 
+-- Protected titles - nonexistent pages that have been protected
+CREATE TABLE /*$wgDBprefix*/protected_titles (
+  pt_namespace int NOT NULL,
+  pt_title varchar(255) NOT NULL,
+  pt_user int unsigned NOT NULL,
+  pt_reason tinyblob,
+  pt_timestamp binary(14) NOT NULL,
+  pt_expiry varbinary(14) NOT NULL default '',
+  pt_create_perm varbinary(60) NOT NULL,
+  PRIMARY KEY (pt_namespace,pt_title),
+  KEY pt_timestamp (pt_timestamp)
+) /*$wgDBTableOptions*/;
+
+-- Name/value pairs indexed by page_id
+CREATE TABLE /*$wgDBprefix*/page_props (
+  pp_page int NOT NULL,
+  pp_propname varbinary(60) NOT NULL,
+  pp_value blob NOT NULL,
+
+  PRIMARY KEY (pp_page,pp_propname)
+) /*$wgDBTableOptions*/;
+
 -- vim: sw=2 sts=2 et