mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
29 lines
703 B
PHP
29 lines
703 B
PHP
|
<?php
|
||
|
|
||
|
$initiative_table = new FundInitiative();
|
||
|
$initiative_conn = $initiative_table->establishConnection('w');
|
||
|
|
||
|
$properties_table = new PhabricatorMetaMTAMailProperties();
|
||
|
$conn = $properties_table->establishConnection('w');
|
||
|
|
||
|
$iterator = new LiskRawMigrationIterator(
|
||
|
$initiative_conn,
|
||
|
$initiative_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());
|
||
|
}
|