Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92653754
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
Fri, Nov 22, 10:25
Size
516 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:25 (2 d)
Engine
blob
Format
Raw Data
Handle
22479367
Attached To
rPH Phabricator
20130802.heraldphids.php
View Options
<?php
$table
=
new
HeraldRule
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
echo
pht
(
'Assigning PHIDs to Herald Rules...'
).
"
\n
"
;
foreach
(
new
LiskMigrationIterator
(
new
HeraldRule
())
as
$rule
)
{
$id
=
$rule
->
getID
();
echo
pht
(
'Rule %d.'
,
$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
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment