mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
2820fdc89b
Summary: Ref T2769. Precursor to various Herald-related modernizations. Test Plan: Ran migration; loaded Herald via web. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2769 Differential Revision: https://secure.phabricator.com/D6648
24 lines
490 B
PHP
24 lines
490 B
PHP
<?php
|
|
|
|
$table = new HeraldRule();
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
echo "Assigning PHIDs to Herald Rules...\n";
|
|
|
|
foreach (new LiskMigrationIterator(new HeraldRule()) as $rule) {
|
|
$id = $rule->getID();
|
|
echo "Rule {$id}.\n";
|
|
|
|
if ($rule->getPHID()) {
|
|
continue;
|
|
}
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
PhabricatorPHID::generateNewPHID(HeraldPHIDTypeRule::TYPECONST),
|
|
$rule->getID());
|
|
}
|
|
|
|
echo "Done.\n";
|