Get rid of dependency to SQLite

SQLite isn't properly supported by Hydra for a few years now[1], but
Hydra still depends on it. Apart from a slightly bigger closure this can
cause confusion by users since Hydra picks up SQLite rather than
PostgreSQL by default if HYDRA_DBI isn't configured properly[2]

[1] 78974abb69
[2] https://logs.nix.samueldr.com/nixos-dev/2020-04-10#3297342;
This commit is contained in:
Maximilian Bosch
2020-04-10 18:13:18 +02:00
parent a42cf35a1c
commit efcbc08686
8 changed files with 16 additions and 64 deletions

View File

@ -10,11 +10,7 @@ sub getHydraPath {
}
sub getHydraDBPath {
my $db = $ENV{"HYDRA_DBI"};
return $db if defined $db;
my $path = getHydraPath . '/hydra.sqlite';
#warn "The Hydra database ($path) does not exist!\n" unless -f $path;
return "dbi:SQLite:$path";
return $ENV{"HYDRA_DBI"} || "dbi:Pg:dbname=hydra;";
}
__PACKAGE__->config(