@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3$binding_table = new AlmanacBinding();
4$binding_conn = $binding_table->establishConnection('w');
5
6$properties_table = new PhabricatorMetaMTAMailProperties();
7$conn = $properties_table->establishConnection('w');
8
9$iterator = new LiskRawMigrationIterator(
10 $binding_conn,
11 $binding_table->getTableName());
12
13foreach ($iterator as $row) {
14 queryfx(
15 $conn,
16 'INSERT IGNORE INTO %R
17 (objectPHID, mailProperties, dateCreated, dateModified)
18 VALUES
19 (%s, %s, %d, %d)',
20 $properties_table,
21 $row['phid'],
22 phutil_json_encode(
23 array(
24 'mailKey' => $row['mailKey'],
25 )),
26 PhabricatorTime::getNow(),
27 PhabricatorTime::getNow());
28}