mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
c3e6db6f0b
Summary: Ref T13065. See similar changes attached to that task. Test Plan: Ran migration, got a clean database state, saw mail keys populate in mail property table. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13065, T13641 Differential Revision: https://secure.phabricator.com/D21625
28 lines
682 B
PHP
28 lines
682 B
PHP
<?php
|
|
|
|
$device_table = new AlmanacDevice();
|
|
$device_conn = $device_table->establishConnection('w');
|
|
|
|
$properties_table = new PhabricatorMetaMTAMailProperties();
|
|
$conn = $properties_table->establishConnection('w');
|
|
|
|
$iterator = new LiskRawMigrationIterator(
|
|
$device_conn,
|
|
$device_table->getTableName());
|
|
|
|
foreach ($iterator as $row) {
|
|
queryfx(
|
|
$conn,
|
|
'INSERT IGNORE INTO %R
|
|
(objectPHID, mailProperties, dateCreated, dateModified)
|
|
VALUES
|
|
(%s, %s, %d, %d)',
|
|
$properties_table,
|
|
$row['phid'],
|
|
phutil_json_encode(
|
|
array(
|
|
'mailKey' => $row['mailKey'],
|
|
)),
|
|
PhabricatorTime::getNow(),
|
|
PhabricatorTime::getNow());
|
|
}
|