$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__;
}
$dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) {
$dbw->insert( 'revision', self::$dummyRev, $fname );
$id = $dbw->insertId();
- $toDelete[] = $id;
+ $toDelete = [ $id ];
$maxId = max(
(int)$dbw->selectField( 'archive', 'MAX(ar_rev_id)', [], $fname ),