X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateArchiveRevId.php;h=c85e194eeff18b5d2e4e330edf7387a197caabe1;hb=4d10bb14e81aadb907a00e4bd13973ef668ab1f8;hp=96fcebf40973fb909d3a88ddd029301124ebdc1b;hpb=11488c2d7779117c56cfd6af96f99b5d0180949c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateArchiveRevId.php b/maintenance/populateArchiveRevId.php index 96fcebf409..c85e194eef 100644 --- a/maintenance/populateArchiveRevId.php +++ b/maintenance/populateArchiveRevId.php @@ -43,6 +43,15 @@ class PopulateArchiveRevId extends LoggedUpdateMaintenance { $this->setBatchSize( 100 ); } + /** + * @param IDatabase $dbw + * @return bool + */ + public static function isNewInstall( IDatabase $dbw ) { + return $dbw->selectRowCount( 'archive' ) === 0 && + $dbw->selectRowCount( 'revision' ) === 1; + } + protected function getUpdateKey() { return __CLASS__; }