);
$this->migrate( 'archive', 'ar_id', 'ar_comment' );
$this->migrate( 'ipblocks', 'ipb_id', 'ipb_reason' );
- $this->migrateToTemp(
- 'image', 'img_name', 'img_description', 'imgcomment_name', 'imgcomment_description_id'
- );
+ $this->migrate( 'image', 'img_name', 'img_description' );
$this->migrate( 'oldimage', [ 'oi_name', 'oi_timestamp' ], 'oi_description' );
$this->migrate( 'filearchive', 'fa_id', 'fa_deleted_reason' );
$this->migrate( 'filearchive', 'fa_id', 'fa_description' );
$primaryKey = (array)$primaryKey;
$pkFilter = array_flip( $primaryKey );
$this->output( "Beginning migration of $table.$oldField to $table.$newField\n" );
+ wfWaitForSlaves();
$dbw = $this->getDB( DB_MASTER );
$next = '1=1';
$next = "$field > $value OR $field = $value AND ($next)";
}
}
- $prompt = join( ' ', array_reverse( $prompt ) );
+ $prompt = implode( ' ', array_reverse( $prompt ) );
$this->output( "... $prompt\n" );
+ wfWaitForSlaves();
}
$this->output(
protected function migrateToTemp( $table, $primaryKey, $oldField, $newPrimaryKey, $newField ) {
$newTable = $table . '_comment_temp';
$this->output( "Beginning migration of $table.$oldField to $newTable.$newField\n" );
+ wfWaitForSlaves();
$dbw = $this->getDB( DB_MASTER );
$next = [];
}
}
-$maintClass = "MigrateComments";
+$maintClass = MigrateComments::class;
require_once RUN_MAINTENANCE_IF_MAIN;