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:
@ -25,9 +25,8 @@ my @tables = $dbh->tables;
|
||||
if (! grep { /SchemaVersion/i } @tables) {
|
||||
print STDERR "initialising the Hydra database schema...\n";
|
||||
my $schema = read_file(
|
||||
$dbh->{Driver}->{Name} eq 'SQLite' ? "$home/sql/hydra-sqlite.sql" :
|
||||
$dbh->{Driver}->{Name} eq 'Pg' ? "$home/sql/hydra-postgresql.sql" :
|
||||
die "unsupported database type\n");
|
||||
die "unsupported database type $dbh->{Driver}->{Name}\n");
|
||||
my @statements = $sql_splitter->split($schema);
|
||||
eval {
|
||||
$dbh->begin_work;
|
||||
|
Reference in New Issue
Block a user