Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/autopatches/20181220.pholio.01.mailkey.php
- This file was added.
<?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()); | |||||
} |