Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93830576
20180914.audit.01.mailkey.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
Sun, Dec 1, 20:43
Size
899 B
Mime Type
text/x-php
Expires
Tue, Dec 3, 20:43 (2 d)
Engine
blob
Format
Raw Data
Handle
22711448
Attached To
rPH Phabricator
20180914.audit.01.mailkey.php
View Options
<?php
$commit_table
=
new
PhabricatorRepositoryCommit
();
$commit_conn
=
$commit_table
->
establishConnection
(
'w'
);
$commit_name
=
$commit_table
->
getTableName
();
$properties_table
=
new
PhabricatorMetaMTAMailProperties
();
$conn
=
$properties_table
->
establishConnection
(
'w'
);
$iterator
=
new
LiskRawMigrationIterator
(
$commit_conn
,
$commit_name
);
$chunks
=
new
PhutilChunkedIterator
(
$iterator
,
100
);
foreach
(
$chunks
as
$chunk
)
{
$sql
=
array
();
foreach
(
$chunk
as
$commit
)
{
$sql
[]
=
qsprintf
(
$conn
,
'(%s, %s, %d, %d)'
,
$commit
[
'phid'
],
phutil_json_encode
(
array
(
'mailKey'
=>
$commit
[
'mailKey'
],
)),
PhabricatorTime
::
getNow
(),
PhabricatorTime
::
getNow
());
}
queryfx
(
$conn
,
'INSERT IGNORE INTO %R
(objectPHID, mailProperties, dateCreated, dateModified)
VALUES %LQ'
,
$properties_table
,
$sql
);
}
Event Timeline
Log In to Comment