Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81007946
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
Tue, Sep 3, 18:17
Size
674 B
Mime Type
text/x-php
Expires
Thu, Sep 5, 18:17 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20494951
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