Page MenuHomePhorge

20130802.heraldphids.php
No OneTemporary

Size
490 B
Referenced Files
None
Subscribers
None

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
Tue, Sep 16, 1:28 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
449427
Default Alt Text
20130802.heraldphids.php (490 B)

Event Timeline