@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 PhabricatorOwnersPath();
4$conn = $table->establishConnection('w');
5
6foreach (new LiskMigrationIterator($table) as $path) {
7 $index = PhabricatorHash::digestForIndex($path->getPath());
8
9 if ($index === $path->getPathIndex()) {
10 continue;
11 }
12
13 queryfx(
14 $conn,
15 'UPDATE %T SET pathIndex = %s WHERE id = %d',
16 $table->getTableName(),
17 $index,
18 $path->getID());
19}