Page MenuHome GnuPG

20130802.heraldphids.php
No OneTemporary

20130802.heraldphids.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(HeraldRulePHIDType::TYPECONST),
$rule->getID());
}
echo "Done.\n";

File Metadata

Mime Type
text/x-php
Expires
Thu, Oct 16, 4:49 AM (8 h, 22 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
42/27/35708a98be8ed19a6ac3c6b11929

Event Timeline