Provide a command ‘hydra-init’ to initialise/upgrade the database
For schema upgrades, hydra-init executes the files src/sql/upgrade-<N>.sql, each of which upgrades the schema from version N-1 to N. The upgrades are wrapped in a transaction.
This commit is contained in:
@ -8,7 +8,7 @@ use Hydra::Helper::CatalystUtils;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(
|
||||
getHydraPath getHydraDBPath openHydraDB getHydraConf txn_do
|
||||
getHydraPath getHydraHome getHydraDBPath openHydraDB getHydraConf txn_do
|
||||
registerRoot getGCRootsDir gcRootFor
|
||||
getPrimaryBuildsForView
|
||||
getPrimaryBuildTotal
|
||||
@ -21,6 +21,13 @@ sub getHydraPath {
|
||||
return $dir;
|
||||
}
|
||||
|
||||
|
||||
sub getHydraHome {
|
||||
my $dir = $ENV{"HYDRA_HOME"} or die "The HYDRA_HOME directory does not exist!\n";
|
||||
return $dir;
|
||||
}
|
||||
|
||||
|
||||
sub getHydraConf {
|
||||
my $conf = $ENV{"HYDRA_CONFIG"} || (getHydraPath . "/hydra.conf");
|
||||
die "The HYDRA_CONFIG file ($conf) does not exist!\n" unless -f $conf;
|
||||
|
Reference in New Issue
Block a user