2014-09-18 03:25:57 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$old_key = 'phabricator.show-beta-applications';
|
|
|
|
$new_key = 'phabricator.show-prototypes';
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht("Migrating '%s' to '%s'...", $old_key, $new_key)."\n";
|
2014-09-18 03:25:57 +02:00
|
|
|
|
|
|
|
if (PhabricatorEnv::getEnvConfig($new_key)) {
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Skipping migration, new data is already set.')."\n";
|
2014-09-18 03:25:57 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$old = PhabricatorEnv::getEnvConfigIfExists($old_key);
|
|
|
|
if (!$old) {
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Skipping migration, old data does not exist.')."\n";
|
2014-09-18 03:25:57 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
PhabricatorConfigEntry::loadConfigEntry($new_key)
|
|
|
|
->setIsDeleted(0)
|
|
|
|
->setValue($old)
|
|
|
|
->save();
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|