Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109703000
20121209.xmacromigrate.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
Wed, Apr 23, 02:01
Size
446 B
Mime Type
text/x-php
Expires
Fri, Apr 25, 02:01 (2 d)
Engine
blob
Format
Raw Data
Handle
25662657
Attached To
rPH Phabricator
20121209.xmacromigrate.php
View Options
<?php
echo
"Giving image macros PHIDs"
;
$table
=
new
PhabricatorFileImageMacro
();
$table
->
openTransaction
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$macro
)
{
if
(
$macro
->
getPHID
())
{
continue
;
}
echo
"."
;
queryfx
(
$macro
->
establishConnection
(
'w'
),
'UPDATE %T SET phid = %s WHERE id = %d'
,
$macro
->
getTableName
(),
$macro
->
generatePHID
(),
$macro
->
getID
());
}
$table
->
saveTransaction
();
echo
"
\n
Done.
\n
"
;
Event Timeline
Log In to Comment