Revert r83812 (schema change for cl_type enum), no longer needed after r84392. Also...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 20 Mar 2011 16:30:59 +0000 (16:30 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 20 Mar 2011 16:30:59 +0000 (16:30 +0000)
includes/installer/MysqlUpdater.php
maintenance/archives/patch-cl_type.sql [deleted file]
maintenance/tables.sql

index f3881a5..fc41194 100644 (file)
@@ -175,7 +175,6 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'dropIndex', 'archive', 'ar_page_revid',         'patch-archive_kill_ar_page_revid.sql' ),
                        array( 'addIndex', 'archive', 'ar_revid',               'patch-archive_ar_revid.sql' ),
                        array( 'doLangLinksLengthUpdate' ),
-                       array( 'doClTypeVarcharUpdate' ),
 
                        // 1.18
                        array( 'doUserNewTalkTimestampNotNull' ),
@@ -833,20 +832,6 @@ class MysqlUpdater extends DatabaseUpdater {
                        $this->output( "...ll_lang is up-to-date.\n" );
                }
        }
-       
-       protected function doClTypeVarcharUpdate() {
-               $categorylinks = $this->db->tableName( 'categorylinks' );
-               $res = $this->db->query( "SHOW COLUMNS FROM $categorylinks LIKE 'cl_type'" );
-               $row = $this->db->fetchObject( $res );
-               
-               if ( $row && substr( $row->Type, 0, 4 ) == 'enum' ) {
-                       $this->output( 'Changing cl_type from enum to varchar...' );
-                       $this->applyPatch( 'patch-cl_type.sql' );
-                       $this->output( "done.\n" );
-               } else {
-                       $this->output( "...cl_type is up-to-date.\n" );
-               }
-       }
 
        protected function doUserNewTalkTimestampNotNull() {
                $info = $this->db->fieldInfo( 'user_newtalk', 'user_last_timestamp' );
diff --git a/maintenance/archives/patch-cl_type.sql b/maintenance/archives/patch-cl_type.sql
deleted file mode 100644 (file)
index cf7b9c3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
---
--- Change cl_type to a varchar from an enum because of the weird semantics of
--- the < and > operators when working with enums
---
-
-ALTER TABLE /*_*/categorylinks MODIFY cl_type varchar(6) NOT NULL default 'page';
index 99b70e4..11392f1 100644 (file)
@@ -521,9 +521,7 @@ CREATE TABLE /*_*/categorylinks (
   -- paginate the three categories separately.  This never has to be updated
   -- after the page is created, since none of these page types can be moved to
   -- any other.
-  -- This used to be ENUM('page', 'subcat', 'file') but was changed to a
-  -- varchar because of the weird semantics of < and > when used on enums
-  cl_type varchar(6) NOT NULL default 'page'
+  cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page'
 ) /*$wgDBTableOptions*/;
 
 CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to);