r84394 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84393‎ | r84394 | r84395 >
Date:16:30, 20 March 2011
Author:catrope
Status:ok
Tags:
Comment:
Revert r83812 (schema change for cl_type enum), no longer needed after r84392. Also reverts r83821 (followup to r83812, add /*_*/ )
Modified paths:
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-cl_type.sql (deleted) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -175,7 +175,6 @@
176176 array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ),
177177 array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ),
178178 array( 'doLangLinksLengthUpdate' ),
179 - array( 'doClTypeVarcharUpdate' ),
180179
181180 // 1.18
182181 array( 'doUserNewTalkTimestampNotNull' ),
@@ -833,20 +832,6 @@
834833 $this->output( "...ll_lang is up-to-date.\n" );
835834 }
836835 }
837 -
838 - protected function doClTypeVarcharUpdate() {
839 - $categorylinks = $this->db->tableName( 'categorylinks' );
840 - $res = $this->db->query( "SHOW COLUMNS FROM $categorylinks LIKE 'cl_type'" );
841 - $row = $this->db->fetchObject( $res );
842 -
843 - if ( $row && substr( $row->Type, 0, 4 ) == 'enum' ) {
844 - $this->output( 'Changing cl_type from enum to varchar...' );
845 - $this->applyPatch( 'patch-cl_type.sql' );
846 - $this->output( "done.\n" );
847 - } else {
848 - $this->output( "...cl_type is up-to-date.\n" );
849 - }
850 - }
851836
852837 protected function doUserNewTalkTimestampNotNull() {
853838 $info = $this->db->fieldInfo( 'user_newtalk', 'user_last_timestamp' );
Index: trunk/phase3/maintenance/tables.sql
@@ -521,9 +521,7 @@
522522 -- paginate the three categories separately. This never has to be updated
523523 -- after the page is created, since none of these page types can be moved to
524524 -- any other.
525 - -- This used to be ENUM('page', 'subcat', 'file') but was changed to a
526 - -- varchar because of the weird semantics of < and > when used on enums
527 - cl_type varchar(6) NOT NULL default 'page'
 525+ cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page'
528526 ) /*$wgDBTableOptions*/;
529527
530528 CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to);
Index: trunk/phase3/maintenance/archives/patch-cl_type.sql
@@ -1,6 +0,0 @@
2 -
3 -ALTER TABLE /*_*/categorylinks MODIFY cl_type varchar(6) NOT NULL default 'page';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83812Schema change: change cl_type from ENUM('page', 'subcat', 'file') to varchar(...catrope10:35, 13 March 2011
r83821Followup r83812, add /*_*/ to allow for prefixed tablesreedy13:10, 13 March 2011
r84392Per r83812 CR, solve the categorymembers paging problem by doing separate que...catrope16:25, 20 March 2011

Status & tagging log