Hydra now uses an optional HYDRA_DBI environment variable which holds the DBI url. If this variable is not set, sqlite is used like before.

This commit is contained in:
Rob Vermaas 2009-04-29 11:07:46 +00:00
parent d774cd6f18
commit a509694220

View file

@ -65,10 +65,16 @@ sub getHydraPath {
sub getHydraDBPath {
my $db = $ENV{"HYDRA_DBI"};
if ($db ne "") {
return $db ;
}
else {
my $path = getHydraPath . '/hydra.sqlite';
die "The Hydra database ($path) not exist!\n" unless -f $path;
return "dbi:SQLite:$path";
}
}
sub openHydraDB {