addDescription( 'Script to update scratch_token column format' ); $this->requireExtension( 'OATHAuth' ); } public function execute() { global $wgOATHAuthDatabase; $lb = MediaWikiServices::getInstance()->getDBLoadBalancerFactory() ->getMainLB( $wgOATHAuthDatabase ); $dbw = $lb->getConnectionRef( DB_MASTER, [], $wgOATHAuthDatabase ); if ( !UpdateTables::schemaUpdateOldUsers( $dbw ) ) { $this->error( "Failed to update scratch_token rows.\n", 1 ); } $this->output( "Done.\n" ); } } $maintClass = UpdateScratchTokenFormat::class; require_once RUN_MAINTENANCE_IF_MAIN;