mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
cd7171ec6e
Summary: Ref T2222. Ref T3886. Differential has a legacy storage table for auxiliary fields; move the data to modern storage. Test Plan: - Ran migration. - Verified fields still worked properly afterward (view, edit, etc). Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3886, T2222 Differential Revision: https://secure.phabricator.com/D8355
22 lines
619 B
PHP
22 lines
619 B
PHP
<?php
|
|
|
|
$conn_w = id(new DifferentialRevision())->establishConnection('w');
|
|
$rows = new LiskRawMigrationIterator($conn_w, 'differential_auxiliaryfield');
|
|
|
|
echo "Modernizing Differential auxiliary field storage...\n";
|
|
|
|
$table_name = id(new DifferentialCustomFieldStorage())->getTableName();
|
|
foreach ($rows as $row) {
|
|
$id = $row['id'];
|
|
echo "Migrating row {$id}...\n";
|
|
queryfx(
|
|
$conn_w,
|
|
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
|
|
VALUES (%s, %s, %s)',
|
|
$table_name,
|
|
$row['revisionPHID'],
|
|
PhabricatorHash::digestForIndex($row['name']),
|
|
$row['value']);
|
|
}
|
|
|
|
echo "Done.\n";
|