false,
true
);
+ $this->addOption( 'populate-only', 'Do not update change_tag_def table' );
}
public function execute() {
$this->countDown( 5 );
if ( $wgChangeTagsSchemaMigrationStage < MIGRATION_NEW ) {
- $this->updateCountTag();
+ if ( !$this->hasOption( 'populate-only' ) ) {
+ $this->updateCountTag();
+ }
$this->backpopulateChangeTagId();
} else {
$this->updateCountTagId();
$dbw = $this->lbFactory->getMainLB()->getConnection( DB_MASTER );
$sleep = (int)$this->getOption( 'sleep', 10 );
$lastId = 0;
- $this->output( "Starting to add ct_tag_id = {$tagId} for ct_tag = {$tagName}" );
+ $this->output( "Starting to add ct_tag_id = {$tagId} for ct_tag = {$tagName}\n" );
while ( true ) {
// Given that indexes might not be there, it's better to use replica
$ids = $dbr->selectFieldValues(
);
continue;
} else {
- $this->output( "Updating ct_tag_id = {$tagId} up to row ct_id = {$lastId}" );
+ $this->output( "Updating ct_tag_id = {$tagId} up to row ct_id = {$lastId}\n" );
}
$dbw->update(
}
}
- $this->output( "Finished adding ct_tag_id = {$tagId} for ct_tag = {$tagName}" );
+ $this->output( "Finished adding ct_tag_id = {$tagId} for ct_tag = {$tagName}\n" );
}
}