@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 HarbormasterBuildPlan();
4$conn_w = $table->establishConnection('w');
5
6$view_policy = PhabricatorPolicies::getMostOpenPolicy();
7queryfx(
8 $conn_w,
9 'UPDATE %T SET viewPolicy = %s WHERE viewPolicy = %s',
10 $table->getTableName(),
11 $view_policy,
12 '');
13
14$edit_policy = id(new PhabricatorHarbormasterApplication())
15 ->getPolicy(HarbormasterCreatePlansCapability::CAPABILITY);
16queryfx(
17 $conn_w,
18 'UPDATE %T SET editPolicy = %s WHERE editPolicy = %s',
19 $table->getTableName(),
20 $edit_policy,
21 '');