Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1503619
migrate-maniphest-revisions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
618 B
Referenced Files
None
Subscribers
None
migrate-maniphest-revisions.php
View Options
<?php
echo
pht
(
'Migrating task revisions to edges...'
).
"
\n
"
;
$table
=
new
ManiphestTask
();
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$task
)
{
$id
=
$task
->
getID
();
echo
pht
(
'Task %d: '
,
$id
);
$revs
=
$task
->
getAttachedPHIDs
(
DifferentialRevisionPHIDType
::
TYPECONST
);
if
(!
$revs
)
{
echo
"-
\n
"
;
continue
;
}
$editor
=
new
PhabricatorEdgeEditor
();
foreach
(
$revs
as
$rev
)
{
$editor
->
addEdge
(
$task
->
getPHID
(),
ManiphestTaskHasRevisionEdgeType
::
EDGECONST
,
$rev
);
}
$editor
->
save
();
echo
pht
(
'OKAY'
).
"
\n
"
;
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jul 13, 12:04 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
349361
Default Alt Text
migrate-maniphest-revisions.php (618 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment