X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeduplicateArchiveRevId.php;h=a1d4e997fd1c05a9e4ae8c8e1ceaedc1177f8b64;hb=00e52d96addceb383baa25b9cd5b40b4fa61d9a8;hp=dad79b060d79d28dda74ae7a9ad25696f2705cd8;hpb=967a96e7fa5910f8fc451590decb381dbfb481ba;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deduplicateArchiveRevId.php b/maintenance/deduplicateArchiveRevId.php index dad79b060d..a1d4e997fd 100644 --- a/maintenance/deduplicateArchiveRevId.php +++ b/maintenance/deduplicateArchiveRevId.php @@ -33,8 +33,14 @@ 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__ ); $maxId = $dbw->selectField( 'archive', 'MAX(ar_rev_id)', [], __METHOD__ );