@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
3echo pht('Giving Pholio images PHIDs');
4$table = new PholioImage();
5$table->openTransaction();
6
7foreach (new LiskMigrationIterator($table) as $image) {
8 if ($image->getPHID()) {
9 continue;
10 }
11
12 echo '.';
13
14 queryfx(
15 $image->establishConnection('w'),
16 'UPDATE %T SET phid = %s WHERE id = %d',
17 $image->getTableName(),
18 $image->generatePHID(),
19 $image->getID());
20}
21
22$table->saveTransaction();
23echo "\n".pht('Done.')."\n";