mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Correct RepositoryURI schema and propagate adjust
exit code correctly
Summary: Fixes T10830. - The return code from `storage adjust` did not propagate correct. - There was one column issue which I missed the first time around because I had a bunch of unrelated stuff locally. Test Plan: - Ran `bin/storage upgrade -f` with failures, used `echo $?` to make sure it exited nonzero. - Got fully clean `bin/storage adjust` by dropping all my extra local tables. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10830 Differential Revision: https://secure.phabricator.com/D15746
This commit is contained in:
parent
d844e51127
commit
595f203816
3 changed files with 7 additions and 2 deletions
2
resources/sql/autopatches/20160418.repouri.2.sql
Normal file
2
resources/sql/autopatches/20160418.repouri.2.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_repository.repository_uri
|
||||
ADD credentialPHID VARBINARY(64);
|
|
@ -40,6 +40,7 @@ final class PhabricatorRepositoryURI
|
|||
'uri' => 'text255',
|
||||
'builtinProtocol' => 'text32?',
|
||||
'builtinIdentifier' => 'text32?',
|
||||
'credentialPHID' => 'phid?',
|
||||
'ioType' => 'text32',
|
||||
'displayType' => 'text32',
|
||||
'isDisabled' => 'bool',
|
||||
|
|
|
@ -61,7 +61,7 @@ abstract class PhabricatorStorageManagementWorkflow
|
|||
}
|
||||
}
|
||||
|
||||
$this->didExecute($args);
|
||||
return $this->didExecute($args);
|
||||
}
|
||||
|
||||
public function didExecute(PhutilArgumentParser $args) {}
|
||||
|
@ -81,13 +81,15 @@ abstract class PhabricatorStorageManagementWorkflow
|
|||
$lock = $this->lock();
|
||||
|
||||
try {
|
||||
$this->doAdjustSchemata($unsafe);
|
||||
$err = $this->doAdjustSchemata($unsafe);
|
||||
} catch (Exception $ex) {
|
||||
$lock->unlock();
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
$lock->unlock();
|
||||
|
||||
return $err;
|
||||
}
|
||||
|
||||
final private function doAdjustSchemata($unsafe) {
|
||||
|
|
Loading…
Reference in a new issue