From 3f52bd8007cf4b8e6f17cfa5ee74c86477eded93 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 20 Mar 2011 16:30:59 +0000 Subject: [PATCH] Revert r83812 (schema change for cl_type enum), no longer needed after r84392. Also reverts r83821 (followup to r83812, add /*_*/ ) --- includes/installer/MysqlUpdater.php | 15 --------------- maintenance/archives/patch-cl_type.sql | 6 ------ maintenance/tables.sql | 4 +--- 3 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 maintenance/archives/patch-cl_type.sql diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index f3881a5b90..fc411941f0 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -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 index cf7b9c3a1a..0000000000 --- a/maintenance/archives/patch-cl_type.sql +++ /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'; diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 99b70e4169..11392f1855 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -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); -- 2.20.1