require_once __DIR__ . '/Maintenance.php';
/**
- * Maintenance script that migrates archive.ar_text and ar_flags to modern storage
+ * Maintenance script that migrates archive.ar_text and ar_flags to text storage
*
* @ingroup Maintenance
* @since 1.31
public function __construct() {
parent::__construct();
$this->addDescription(
- 'Migrates comments from pre-1.5 ar_text and ar_flags columns to modern storage'
+ 'Migrates content from pre-1.5 ar_text and ar_flags columns to text storage'
);
$this->addOption(
'replace-missing',
}
protected function doDBUpdates() {
- global $wgDefaultExternalStore;
-
$replaceMissing = $this->hasOption( 'replace-missing' );
+ $defaultExternalStore = $this->getConfig()->get( 'DefaultExternalStore' );
$batchSize = $this->getBatchSize();
$dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
if ( $data !== false ) {
$flags = Revision::compressRevisionText( $data );
- if ( $wgDefaultExternalStore ) {
+ if ( $defaultExternalStore ) {
$data = ExternalStore::insertToDefault( $data );
- if ( !$data ) {
- throw new MWException( "Unable to store text to external storage" );
- }
if ( $flags ) {
$flags .= ',';
}