2014-02-27 01:52:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$conn_w = id(new DifferentialRevision())->establishConnection('w');
|
|
|
|
$rows = new LiskRawMigrationIterator($conn_w, 'differential_auxiliaryfield');
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Modernizing Differential auxiliary field storage...')."\n";
|
2014-02-27 01:52:30 +01:00
|
|
|
|
|
|
|
$table_name = id(new DifferentialCustomFieldStorage())->getTableName();
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
$id = $row['id'];
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Migrating row %d...', $id)."\n";
|
2014-02-27 01:52:30 +01:00
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
|
|
|
|
VALUES (%s, %s, %s)',
|
|
|
|
$table_name,
|
|
|
|
$row['revisionPHID'],
|
|
|
|
PhabricatorHash::digestForIndex($row['name']),
|
|
|
|
$row['value']);
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|