Migrate to IReadableDatabase::newSelectQueryBuilder

Bug: T312469
Change-Id: I5774b8d0dc59df3404f26026b1aeeceeda413e13
This commit is contained in:
Umherirrender 2024-04-20 21:20:29 +02:00
parent 96189d343b
commit f0e11c2d1e

View file

@ -51,7 +51,11 @@ class Cleanup extends Maintenance {
$dryRun = $this->hasOption( 'dry-run' );
$dbr = $this->getReplicaDB();
$maxID = (int)$dbr->selectField( 'page', 'MAX(page_id)', [], __METHOD__ );
$maxID = (int)$dbr->newSelectQueryBuilder()
->select( 'MAX(page_id)' )
->from( 'page' )
->caller( __METHOD__ )
->fetchField();
$reportingInterval = 100;
$this->output( "Regexes are " . implode( ', ', array_map( 'strlen', $regexes ) ) . " bytes\n" );