1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

Config migration script bug fix

Summary: i think way back in D10490 I didn't incorporate feedback correctly. make this code right as it fatals in this codepath as is. Fixes T6508.

Test Plan: @joshuaspence to the rescue  (I remain unable to test this effectively with my baby-clean installation.)

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley, joshuaspence

Maniphest Tasks: T6508

Differential Revision: https://secure.phabricator.com/D10833
This commit is contained in:
Bob Trahan 2014-11-11 15:05:57 -08:00
parent b462a80cca
commit 755c518631

View file

@ -55,13 +55,14 @@ final class PhabricatorConfigManagementMigrateWorkflow
'Skipping option "%s"; already in database config.', $key)."\n");
continue;
} else {
PhabricatorConfigEditor::deleteConfig(
PhabricatorConfigEditor::storeNewValue(
$this->getViewer(),
$option,
id(new PhabricatorConfigEntry())
->loadOneWhere('namespace = %s AND key = %s', 'default', $key),
PhabricatorContentSource::newConsoleSource());
$key_count++;
$console->writeOut(pht(
'Migrated option "%s" from file to local config.', $key)."\n");
'Migrated option "%s" from file to database config.', $key)."\n");
}
}
}