Page MenuHomePhabricator
Paste P10600

Unbreak beta cluster eswikibooks | T246539
ActivePublic

Authored by Daimona on Mar 3 2020, 6:18 PM.
<?php
$dbw = wfGetDB( DB_MASTER );
$rows = $dbw->select(
'text',
[ 'old_text', 'old_id' ],
[ 'old_id' => [ 15, 16, 17, 18, 20, 21 ] ]
);
foreach ( $rows as $row ) {
$content = $row->old_text;
// flags: 'gzip', 'external', 'utf8'
$content = gzdeflate( $content );
$content = ExternalStore::insertToDefault( $content );
$dbw->update(
'text',
[ 'old_text' => $content ],
[ 'old_id' => $row->old_id ]
);
}

Event Timeline

Daimona created this paste.Mar 3 2020, 6:18 PM
Daimona edited the content of this paste. (Show Details)