X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FdeduplicateArchiveRevId.php;h=a1d4e997fd1c05a9e4ae8c8e1ceaedc1177f8b64;hp=2442caa7e0084b056e1c8c8e9e5b8f15dfd3f2bb;hb=dfec83932fd38a9086eb5a2e212889ad00f35b0e;hpb=97af92da48f0d434cf4b541e7a3f2d96619a95b2 diff --git a/maintenance/deduplicateArchiveRevId.php b/maintenance/deduplicateArchiveRevId.php index 2442caa7e0..a1d4e997fd 100644 --- a/maintenance/deduplicateArchiveRevId.php +++ b/maintenance/deduplicateArchiveRevId.php @@ -33,8 +33,13 @@ class DeduplicateArchiveRevId extends LoggedUpdateMaintenance { protected function doDBUpdates() { $this->output( "Deduplicating ar_rev_id...\n" ); - $dbw = $this->getDB( DB_MASTER ); + // Sanity check. If this is a new install, we don't need to do anything here. + if ( PopulateArchiveRevId::isNewInstall( $dbw ) ) { + $this->output( "New install, nothing to do here.\n" ); + return true; + } + PopulateArchiveRevId::checkMysqlAutoIncrementBug( $dbw ); $minId = $dbw->selectField( 'archive', 'MIN(ar_rev_id)', [], __METHOD__ );