X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateLogUsertext.php;h=55ad5368cb937c63c2651807a82ff41940d4928e;hb=27c61fb1;hp=6e8261a6125998f8fa1772bc373c268b2de8fce9;hpb=58858df842f91d9ea1c9f9b6f3c767d8b204886b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateLogUsertext.php b/maintenance/populateLogUsertext.php index 6e8261a612..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; @@ -85,5 +93,5 @@ class PopulateLogUsertext extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateLogUsertext"; +$maintClass = PopulateLogUsertext::class; require_once RUN_MAINTENANCE_IF_MAIN;