Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F468225
20130621.diffcommentphidmig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
577 B
Referenced Files
None
Subscribers
None
20130621.diffcommentphidmig.php
View Options
<?php
$conn
=
id
(
new
DifferentialRevision
())->
establishConnection
(
'r'
);
echo
"Assigning transaction PHIDs to DifferentialComments.
\n
"
;
foreach
(
new
LiskRawMigrationIterator
(
$conn
,
'differential_comment'
)
as
$row
)
{
$id
=
$row
[
'id'
];
echo
"Migrating comment #{$id}...
\n
"
;
if
(
$row
[
'phid'
])
{
continue
;
}
queryfx
(
$conn
,
'UPDATE %T SET phid = %s WHERE id = %d'
,
'differential_comment'
,
PhabricatorPHID
::
generateNewPHID
(
PhabricatorPHIDConstants
::
PHID_TYPE_XACT
,
PhabricatorPHIDConstants
::
PHID_TYPE_DREV
),
$id
);
}
echo
"Done.
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 4:57 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80423
Default Alt Text
20130621.diffcommentphidmig.php (577 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment