Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92652205
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, Nov 22, 10:03
Size
674 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:03 (2 d)
Engine
blob
Format
Raw Data
Handle
22479226
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
pht
(
'Migrating custom storage for Maniphest fields...'
).
"
\n
"
;
foreach
(
$rows
as
$row
)
{
$phid
=
$row
[
'taskPHID'
];
$name
=
$row
[
'name'
];
echo
pht
(
'Migrating %s / %s...'
,
$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
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment