r62872 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62871‎ | r62872 | r62873 >
Date:12:24, 23 February 2010
Author:maxsem
Status:ok
Tags:
Comment:
Fixes for r62870. It still needs a patch for Oracle though
Modified paths:
  • /trunk/phase3/maintenance/archives/patch-mime_minor_length.sql (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-mime_minor_length.sql
@@ -1,9 +1,10 @@
2 -ALTER TABLE /*$wgDBprefix*/filearchive
 2+ALTER TABLE /*_*/filearchive
33 MODIFY COLUMN fa_minor_mime varbinary(100) default "unknown";
44
5 -ALTER TABLE /*$wgDBprefix*/image
 5+ALTER TABLE /*_*/image
66 MODIFY COLUMN img_minor_mime varbinary(100) NOT NULL default "unknown";
77
8 -ALTER TABLE /*$wgDBprefix*/oldimage
 8+ALTER TABLE /*_*/oldimage
99 MODIFY COLUMN oi_minor_mime varbinary(100) NOT NULL default "unknown";
1010
 11+INSERT INTO /*_*/updatelog VALUES ('mime_minor_length');
\ No newline at end of file
Index: trunk/phase3/maintenance/updaters.inc
@@ -169,6 +169,7 @@
170170 // A field changed name mid-release cycle, so fix it for anyone using
171171 // trunk
172172 array( 'rename_eu_wiki_id' ),
 173+ array( 'do_update_mime_minor_field' ),
173174 ),
174175
175176 'sqlite' => array(
@@ -194,7 +195,6 @@
195196 array( 'add_index', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
196197 array( 'add_field', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
197198 array( 'do_update_transcache_field' ),
198 - array( 'do_update_mime_minor_field' ),
199199 // version-independent searchindex setup, added in 1.16
200200 array( 'sqlite_setup_searchindex' ),
201201 ),
@@ -1357,10 +1357,14 @@
13581358 }
13591359
13601360 function do_update_mime_minor_field() {
1361 - global $wgDatabase;
1362 - wfOut( "Altering all *_mime_minor fields to 100 bytes in size ... " );
1363 - $wgDatabase->sourceFile( archive( 'patch-mime_minor_length.sql' ) );
1364 - wfOut( "ok\n" );
 1361+ if ( update_row_exists( 'mime_minor_length' ) ) {
 1362+ wfOut( "*_mime_minor fields are already long enough.\n" );
 1363+ } else {
 1364+ global $wgDatabase;
 1365+ wfOut( "Altering all *_mime_minor fields to 100 bytes in size ... " );
 1366+ $wgDatabase->sourceFile( archive( 'patch-mime_minor_length.sql' ) );
 1367+ wfOut( "ok\n" );
 1368+ }
13651369 }
13661370
13671371

Follow-up revisions

RevisionCommit summaryAuthorDate
r62877Backport r62870 and r62872freakolowsky14:13, 23 February 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62870Changed all *_mime_minor field lengths to 100; current 32 does not support so...freakolowsky11:24, 23 February 2010

Status & tagging log