@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 PhabricatorSlowvotePoll();
4$conn_w = $table->establishConnection('w');
5$iterator = new LiskMigrationIterator($table);
6foreach ($iterator as $slowvote) {
7 $id = $slowvote->getID();
8
9 echo pht('Adding mail key for Slowvote %d...', $id);
10 echo "\n";
11
12 queryfx(
13 $conn_w,
14 'UPDATE %T SET mailKey = %s WHERE id = %d',
15 $table->getTableName(),
16 Filesystem::readRandomCharacters(20),
17 $id);
18}