@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 PhabricatorProjectColumn();
4$conn_w = $table->establishConnection('w');
5
6foreach (new LiskMigrationIterator($table) as $column) {
7 $id = $column->getID();
8
9 echo pht('Adjusting column %d...', $id)."\n";
10 if ($column->getSequence() == 0) {
11
12 $properties = $column->getProperties();
13 $properties['isDefault'] = true;
14
15 queryfx(
16 $conn_w,
17 'UPDATE %T SET properties = %s WHERE id = %d',
18 $table->getTableName(),
19 json_encode($properties),
20 $id);
21 }
22}
23
24echo pht('Done.')."\n";