Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110334219
20130915.maniphestmigrate.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, Apr 25, 20:34
Size
646 B
Mime Type
text/x-php
Expires
Sun, Apr 27, 20:34 (2 d)
Engine
blob
Format
Raw Data
Handle
25797623
Attached To
rPH Phabricator
20130915.maniphestmigrate.php
View Options
<?php
$conn_w
=
id
(
new
ManiphestTask
())->
establishConnection
(
'w'
);
$table_name
=
id
(
new
ManiphestCustomFieldStorage
())->
getTableName
();
$rows
=
new
LiskRawMigrationIterator
(
$conn_w
,
'maniphest_taskauxiliarystorage'
);
echo
"Migrating custom storage for Maniphest fields...
\n
"
;
foreach
(
$rows
as
$row
)
{
$phid
=
$row
[
'taskPHID'
];
$name
=
$row
[
'name'
];
echo
"Migrating {$phid} / {$name}...
\n
"
;
queryfx
(
$conn_w
,
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
VALUES (%s, %s, %s)'
,
$table_name
,
$phid
,
PhabricatorHash
::
digestForIndex
(
'std:maniphest:'
.
$name
),
$row
[
'value'
]);
}
echo
"Done.
\n
"
;
Event Timeline
Log In to Comment