@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$table = new PhrictionContent();
4$conn = $table->establishConnection('w');
5
6foreach (new LiskMigrationIterator($table) as $row) {
7 if (strlen($row->getPHID())) {
8 continue;
9 }
10
11 queryfx(
12 $conn,
13 'UPDATE %T SET phid = %s WHERE id = %d',
14 $table->getTableName(),
15 $table->generatePHID(),
16 $row->getID());
17}