Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106028988
20140226.dxcustom.1.fielddata.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, Mar 21, 16:31
Size
645 B
Mime Type
text/x-php
Expires
Sun, Mar 23, 16:31 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25038758
Attached To
rPH Phabricator
20140226.dxcustom.1.fielddata.php
View Options
<?php
$conn_w
=
id
(
new
DifferentialRevision
())->
establishConnection
(
'w'
);
$rows
=
new
LiskRawMigrationIterator
(
$conn_w
,
'differential_auxiliaryfield'
);
echo
pht
(
'Modernizing Differential auxiliary field storage...'
).
"
\n
"
;
$table_name
=
id
(
new
DifferentialCustomFieldStorage
())->
getTableName
();
foreach
(
$rows
as
$row
)
{
$id
=
$row
[
'id'
];
echo
pht
(
'Migrating row %d...'
,
$id
).
"
\n
"
;
queryfx
(
$conn_w
,
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
VALUES (%s, %s, %s)'
,
$table_name
,
$row
[
'revisionPHID'
],
PhabricatorHash
::
digestForIndex
(
$row
[
'name'
]),
$row
[
'value'
]);
}
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment