From 3acdd2156924036be198464ba4e50d0648b1e7c1 Mon Sep 17 00:00:00 2001 From: Nikola Knezevic Date: Fri, 5 Jun 2020 13:42:55 +0200 Subject: [PATCH] Remove references to hydra-postgresql.sql As of https://github.com/NixOS/hydra/pull/737 (removal of sqlite dependency), the only supported database is Postgresql. This change removes all references to hydra-postgresql.sql file. This file is generated using a cpp on hydra.sql, but doesn't differ from hydra.sql at all. --- src/script/hydra-init | 2 +- src/sql/Makefile.am | 6 +----- src/sql/update-dbix-harness.sh | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/script/hydra-init b/src/script/hydra-init index d9069d4d..74498186 100755 --- a/src/script/hydra-init +++ b/src/script/hydra-init @@ -25,7 +25,7 @@ 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 'Pg' ? "$home/sql/hydra-postgresql.sql" : + $dbh->{Driver}->{Name} eq 'Pg' ? "$home/sql/hydra.sql" : die "unsupported database type $dbh->{Driver}->{Name}\n"); my @statements = $sql_splitter->split($schema); eval { diff --git a/src/sql/Makefile.am b/src/sql/Makefile.am index cd4bfb9b..a6b96886 100644 --- a/src/sql/Makefile.am +++ b/src/sql/Makefile.am @@ -1,13 +1,9 @@ sqldir = $(libexecdir)/hydra/sql nobase_dist_sql_DATA = \ - hydra-postgresql.sql \ hydra.sql \ test.sql \ upgrade-*.sql \ update-dbix.pl -hydra-postgresql.sql: hydra.sql - cpp -P -E -traditional-cpp -DPOSTGRESQL hydra.sql > $@ || rm -f $@ - -update-dbix: hydra-postgresql.sql +update-dbix: hydra.sql ./update-dbix-harness.sh diff --git a/src/sql/update-dbix-harness.sh b/src/sql/update-dbix-harness.sh index d76e9e91..38407f82 100755 --- a/src/sql/update-dbix-harness.sh +++ b/src/sql/update-dbix-harness.sh @@ -33,7 +33,7 @@ pg_ctl -D "$data" \ createdb -h "$socket" "$dbname" -psql -h "$socket" "$dbname" -f ./hydra-postgresql.sql +psql -h "$socket" "$dbname" -f ./hydra.sql perl -I ../lib \ -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:../lib \