addDescription( 'Script to convert old, TOTP specific, column values to new structure' ); $this->requireExtension( 'OATHAuth' ); } /** * @throws ConfigException */ public function execute() { global $wgOATHAuthDatabase; $lb = MediaWikiServices::getInstance()->getDBLoadBalancerFactory() ->getMainLB( $wgOATHAuthDatabase ); $dbw = $lb->getConnectionRef( DB_MASTER, [], $wgOATHAuthDatabase ); if ( !UpdateTables::convertToGenericFields( $dbw ) ) { $this->error( "Failed to update the data structure rows.\n", 1 ); } $this->output( "Done.\n" ); } } $maintClass = UpdateDatabaseValueFormat::class; require_once RUN_MAINTENANCE_IF_MAIN;