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