Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120715080
20130802.heraldphids.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 12:24
Size
490 B
Mime Type
text/x-php
Expires
Tue, Jul 8, 12:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27212324
Attached To
rPH Phabricator
20130802.heraldphids.php
View Options
<?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
"
;
Event Timeline
Log In to Comment