X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateLogUsertext.php;h=55ad5368cb937c63c2651807a82ff41940d4928e;hb=27c61fb1;hp=2fe7ea631114de7710b939d1001a4ca8103be8e4;hpb=11ee7f78da9776db26098642a151a288f98bea14;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateLogUsertext.php b/maintenance/populateLogUsertext.php index 2fe7ea6311..55ad5368cb 100644 --- a/maintenance/populateLogUsertext.php +++ b/maintenance/populateLogUsertext.php @@ -58,6 +58,14 @@ class PopulateLogUsertext extends LoggedUpdateMaintenance { } $end = $db->selectField( 'logging', 'MAX(log_id)', false, __METHOD__ ); + // If this is being run during an upgrade from 1.16 or earlier, this + // will be run before the actor table change and should continue. But + // if it's being run on a new installation, the field won't exist to be populated. + if ( !$db->fieldInfo( 'logging', 'log_user_text' ) ) { + $this->output( "No log_user_text field, nothing to do.\n" ); + return true; + } + # Do remaining chunk $end += $batchSize - 1; $blockStart = $start;