r22875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22874‎ | r22875 | r22876 >
Date:23:24, 9 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Fix the updater again so it doesn't run if it doesn't need to (checking on index existence seems unreliable)
Modified paths:
  • /branches/robchurch/newtalk/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: branches/robchurch/newtalk/maintenance/updaters.inc
@@ -964,7 +964,8 @@
965965 */
966966 function fix_newtalk() {
967967 global $wgDatabase;
968 - if( $wgDatabase->indexExists( 'user_newtalk', 'user_id' ) ) {
 968+ $info = $wgDatabase->fieldInfo( 'user_newtalk', 'user_id' );
 969+ if( !$info->nullable() ) {
969970 echo( "Fixing up `user_newtalk`..." );
970971 $wgDatabase->sourceFile( archive( 'patch-fix-newtalk.sql' ) );
971972 echo( "done.\n" );

Status & tagging log