X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeduplicateArchiveRevId.php;h=a1d4e997fd1c05a9e4ae8c8e1ceaedc1177f8b64;hb=eda773a437933f2126d84a23c71b177820be3e32;hp=2442caa7e0084b056e1c8c8e9e5b8f15dfd3f2bb;hpb=74d04edec385aa86ee01943b9a27475d79f74e78;p=lhc%2Fweb%2Fwiklou.git 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__ );