Fix declaration of content_model and content_format fields.
authordaniel <daniel.kinzler@wikimedia.de>
Wed, 10 Oct 2012 09:40:22 +0000 (11:40 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 14 Oct 2012 23:23:22 +0000 (23:23 +0000)
The data type of content model and content format was varbinary originally,
then it got changed to int, then back again to varbinary. The latter change
was done in the updater, but was missing in tables.sql.

Change-Id: I44a92d18ca22126d9678073b272eb6345627a951

maintenance/tables.sql

index 0da3c75..a06c21c 100644 (file)
@@ -263,7 +263,7 @@ CREATE TABLE /*_*/page (
   page_len int unsigned NOT NULL,
 
   -- content model, see CONTENT_MODEL_XXX constants
-  page_content_model  int unsigned  default NULL
+  page_content_model varbinary(32) DEFAULT NULL
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title);
@@ -322,10 +322,10 @@ CREATE TABLE /*_*/revision (
   rev_sha1 varbinary(32) NOT NULL default '',
 
   -- content model, see CONTENT_MODEL_XXX constants
-  rev_content_model  int unsigned  default NULL,
+  rev_content_model varbinary(32) DEFAULT NULL,
 
   -- content format, see CONTENT_FORMAT_XXX constants
-  rev_content_format int unsigned  default NULL
+  rev_content_format varbinary(64) DEFAULT NULL
 
 ) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
 -- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit
@@ -439,10 +439,10 @@ CREATE TABLE /*_*/archive (
   ar_sha1 varbinary(32) NOT NULL default '',
 
   -- content model, see CONTENT_MODEL_XXX constants
-  ar_content_model  int unsigned default NULL,
+  ar_content_model varbinary(32) DEFAULT NULL,
 
   -- content format, see CONTENT_FORMAT_XXX constants
-  ar_content_format int unsigned default NULL
+  ar_content_format varbinary(64) DEFAULT NULL
 
 ) /*$wgDBTableOptions*/;