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' ),
$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' );
-- 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);