1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Fix adjust phases for keys

Summary: Ref T1191. I renamed the phases but missed these two since I didn't have any more key issues locally.

Test Plan: Ran `bin/storage adjust` in production with key issues.

Reviewers: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10612
This commit is contained in:
epriestley 2014-10-01 10:10:32 -07:00
parent 300172e799
commit 5ce3575fb5

View file

@ -231,7 +231,7 @@ final class PhabricatorStorageManagementAdjustWorkflow
} }
break; break;
case 'key': case 'key':
if (($phase == 0) && $adjust['exists']) { if (($phase == 'drop_keys') && $adjust['exists']) {
if ($adjust['name'] == 'PRIMARY') { if ($adjust['name'] == 'PRIMARY') {
$key_name = 'PRIMARY KEY'; $key_name = 'PRIMARY KEY';
} else { } else {
@ -246,7 +246,7 @@ final class PhabricatorStorageManagementAdjustWorkflow
$key_name); $key_name);
} }
if (($phase == 2) && $adjust['keep']) { if (($phase == 'add_keys') && $adjust['keep']) {
// Different keys need different creation syntax. Notable // Different keys need different creation syntax. Notable
// special cases are primary keys and fulltext keys. // special cases are primary keys and fulltext keys.
if ($adjust['name'] == 'PRIMARY') { if ($adjust['name'] == 'PRIMARY') {