2013-09-17 01:02:06 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$conn_w = id(new ManiphestTask())->establishConnection('w');
|
|
|
|
$table_name = id(new ManiphestCustomFieldStorage())->getTableName();
|
|
|
|
|
|
|
|
$rows = new LiskRawMigrationIterator($conn_w, 'maniphest_taskauxiliarystorage');
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Migrating custom storage for Maniphest fields...')."\n";
|
2013-09-17 01:02:06 +02:00
|
|
|
foreach ($rows as $row) {
|
|
|
|
$phid = $row['taskPHID'];
|
|
|
|
$name = $row['name'];
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Migrating %s / %s...', $phid, $name)."\n";
|
2013-09-17 01:02:06 +02:00
|
|
|
|
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
|
|
|
|
VALUES (%s, %s, %s)',
|
|
|
|
$table_name,
|
|
|
|
$phid,
|
|
|
|
PhabricatorHash::digestForIndex('std:maniphest:'.$name),
|
|
|
|
$row['value']);
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|