mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
24 lines
577 B
PHP
24 lines
577 B
PHP
|
<?php
|
||
|
|
||
|
$conn = id(new DifferentialRevision())->establishConnection('r');
|
||
|
|
||
|
echo "Assigning transaction PHIDs to DifferentialComments.\n";
|
||
|
foreach (new LiskRawMigrationIterator($conn, 'differential_comment') as $row) {
|
||
|
$id = $row['id'];
|
||
|
echo "Migrating comment #{$id}...\n";
|
||
|
if ($row['phid']) {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
queryfx(
|
||
|
$conn,
|
||
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
||
|
'differential_comment',
|
||
|
PhabricatorPHID::generateNewPHID(
|
||
|
PhabricatorPHIDConstants::PHID_TYPE_XACT,
|
||
|
PhabricatorPHIDConstants::PHID_TYPE_DREV),
|
||
|
$id);
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|