hydra/src/sql/Makefile.am
Graham Christensen c2f932a7e3
sql: Generate models from postgresql
Lowercasing is due to postgresql not having case-sensitive table names.
It always technically workde before, but those table names never
existed literally.

The switch to generating from postgresql is to handle an upcoming
addition of an auto-incrementign ID to the Jobset table. Sqlite doesn't
seem to be able to handle the table having an auto incrementing ID
field which isn't the primary key, but we can't change the primary
key trivially.

Since hydra doesn't support sqlite and hasn't for many year anyway,
it is easier to just generate from pgsql directly.
2020-02-06 12:23:47 -05:00

14 lines
325 B
Makefile

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-harness.sh