*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\SlotRecord;
use MediaWiki\Storage\NameTableStore;
-use MediaWiki\Storage\SlotRecord;
use MediaWiki\Storage\SqlBlobStore;
use Wikimedia\Assert\Assert;
use Wikimedia\Rdbms\IDatabase;
-use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IResultWrapper;
require_once __DIR__ . '/Maintenance.php';
$startOption = 'start-archive';
}
+ if ( !$this->dbw->fieldExists( $table, $fields['text_id'], __METHOD__ ) ) {
+ $this->writeln( "No need to populate, $table.{$fields['text_id']} field does not exist" );
+ return;
+ }
+
$minmax = $this->dbw->selectRow(
$table,
[ 'min' => "MIN( $idField )", 'max' => "MAX( $idField )" ],
}
/**
- * @param ResultWrapper $rows
+ * @param IResultWrapper $rows
* @param int $startId
* @param string $table
* @return int|null
*/
- private function populateContentTablesForRowBatch( ResultWrapper $rows, $startId, $table ) {
+ private function populateContentTablesForRowBatch( IResultWrapper $rows, $startId, $table ) {
$this->beginTransaction( $this->dbw, __METHOD__ );
if ( $this->contentRowMap === null ) {