Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F959426
20130915.maniphestmigrate.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
674 B
Referenced Files
None
Subscribers
None
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
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 9:59 PM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224018
Default Alt Text
20130915.maniphestmigrate.php (674 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment