Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93628324
20150622.metamta.2.phid-mig.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
Sat, Nov 30, 06:42
Size
468 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 06:42 (2 d)
Engine
blob
Format
Raw Data
Handle
22673304
Attached To
rPH Phabricator
20150622.metamta.2.phid-mig.php
View Options
<?php
$table
=
new
PhabricatorMetaMTAMail
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
echo
pht
(
'Assigning PHIDs to mails...'
).
"
\n
"
;
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$mail
)
{
$id
=
$mail
->
getID
();
echo
pht
(
'Updating mail %d...'
,
$id
).
"
\n
"
;
if
(
$mail
->
getPHID
())
{
continue
;
}
queryfx
(
$conn_w
,
'UPDATE %T SET phid = %s WHERE id = %d'
,
$table
->
getTableName
(),
$table
->
generatePHID
(),
$id
);
}
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment