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,9 +65,15 @@ sub getHydraPath {
sub getHydraDBPath { sub getHydraDBPath {
my $path = getHydraPath . '/hydra.sqlite'; my $db = $ENV{"HYDRA_DBI"};
die "The Hydra database ($path) not exist!\n" unless -f $path; if ($db ne "") {
return "dbi:SQLite:$path"; return $db ;
}
else {
my $path = getHydraPath . '/hydra.sqlite';
die "The Hydra database ($path) not exist!\n" unless -f $path;
return "dbi:SQLite:$path";
}
} }