Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110544601
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
Sat, Apr 26, 20:26
Size
490 B
Mime Type
text/x-php
Expires
Mon, Apr 28, 20:26 (2 d)
Engine
blob
Format
Raw Data
Handle
25817279
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
(
HeraldPHIDTypeRule
::
TYPECONST
),
$rule
->
getID
());
}
echo
"Done.
\n
"
;
Event Timeline
Log In to Comment