mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
1e2bc7775b
Summary: Depends on D19921. Ref T11351. Ref T13065. Update Pholio to use the shared mail infrastructure. See D19670 for a previous change in this vein. Test Plan: Ran upgrade, spot-checked that everything made it into the new table alive. Reviewers: amckinley Reviewed By: amckinley Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13065, T11351 Differential Revision: https://secure.phabricator.com/D19922
28 lines
685 B
PHP
28 lines
685 B
PHP
<?php
|
|
|
|
$mock_table = new PholioMock();
|
|
$mock_conn = $mock_table->establishConnection('w');
|
|
|
|
$properties_table = new PhabricatorMetaMTAMailProperties();
|
|
$conn = $properties_table->establishConnection('w');
|
|
|
|
$iterator = new LiskRawMigrationIterator(
|
|
$mock_conn,
|
|
$mock_table->getTableName());
|
|
|
|
foreach ($iterator as $row) {
|
|
queryfx(
|
|
$conn,
|
|
'INSERT IGNORE INTO %T
|
|
(objectPHID, mailProperties, dateCreated, dateModified)
|
|
VALUES
|
|
(%s, %s, %d, %d)',
|
|
$properties_table->getTableName(),
|
|
$row['phid'],
|
|
phutil_json_encode(
|
|
array(
|
|
'mailKey' => $row['mailKey'],
|
|
)),
|
|
PhabricatorTime::getNow(),
|
|
PhabricatorTime::getNow());
|
|
}
|