Fix SQLite patch-(page|template)links-fix-pk.sql column order
[lhc/web/wiklou.git] / maintenance / populateChangeTagDef.php
index 7bec25a..6c46597 100644 (file)
@@ -34,7 +34,7 @@ class PopulateChangeTagDef extends LoggedUpdateMaintenance {
                $this->setBatchSize( 1000 );
                $this->addOption(
                        'sleep',
-                       'Sleep time (in seconds) between every batch',
+                       'Sleep time (in seconds) between every batch, defaults to zero',
                        false,
                        true
                );
@@ -42,16 +42,6 @@ class PopulateChangeTagDef extends LoggedUpdateMaintenance {
                $this->addOption( 'set-user-tags-only', 'Only update ctd_user_defined from valid_tag table' );
        }
 
-       public function execute() {
-               global $wgChangeTagsSchemaMigrationStage;
-               if ( $wgChangeTagsSchemaMigrationStage === MIGRATION_OLD ) {
-                       // Return "success", but don't flag it as done so the next run will retry
-                       $this->output( '... Not run, $wgChangeTagsSchemaMigrationStage === MIGRATION_OLD' . "\n" );
-                       return true;
-               }
-               return parent::execute();
-       }
-
        protected function doDBUpdates() {
                $this->lbFactory = MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                $this->setBatchSize( $this->getOption( 'batch-size', $this->getBatchSize() ) );
@@ -207,7 +197,7 @@ class PopulateChangeTagDef extends LoggedUpdateMaintenance {
        private function backpopulateChangeTagPerTag( $tagName, $tagId ) {
                $dbr = $this->lbFactory->getMainLB()->getConnection( DB_REPLICA );
                $dbw = $this->lbFactory->getMainLB()->getConnection( DB_MASTER );
-               $sleep = (int)$this->getOption( 'sleep', 10 );
+               $sleep = (int)$this->getOption( 'sleep', 0 );
                $lastId = 0;
                $this->output( "Starting to add ct_tag_id = {$tagId} for ct_tag = {$tagName}\n" );
                while ( true ) {