@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$old_key = 'phabricator.show-beta-applications';
4$new_key = 'phabricator.show-prototypes';
5
6echo pht("Migrating '%s' to '%s'...", $old_key, $new_key)."\n";
7
8if (PhabricatorEnv::getEnvConfig($new_key)) {
9 echo pht('Skipping migration, new data is already set.')."\n";
10 return;
11}
12
13$old = PhabricatorEnv::getEnvConfigIfExists($old_key);
14if (!$old) {
15 echo pht('Skipping migration, old data does not exist.')."\n";
16 return;
17}
18
19PhabricatorConfigEntry::loadConfigEntry($new_key)
20 ->setIsDeleted(0)
21 ->setValue($old)
22 ->save();
23
24echo pht('Done.')."\n";