2010-09-30 14:29:15 +00:00
|
|
|
EXTRA_DIST = hydra.sql hydra-postgresql.sql hydra-sqlite.sql
|
|
|
|
|
2012-02-28 19:16:16 +00:00
|
|
|
sqldir = $(libexecdir)/hydra/sql
|
2010-09-30 14:29:15 +00:00
|
|
|
nobase_sql_DATA = $(EXTRA_DIST)
|
2009-10-21 12:25:43 +00:00
|
|
|
|
|
|
|
hydra-postgresql.sql: hydra.sql
|
|
|
|
cpp -P -E -traditional-cpp -DPOSTGRESQL hydra.sql > $@ || rm -f $@
|
|
|
|
|
|
|
|
hydra-sqlite.sql: hydra.sql
|
|
|
|
cpp -P -E -traditional-cpp -DSQLITE hydra.sql > $@ || rm -f $@
|
|
|
|
|
|
|
|
update-dbix: hydra-sqlite.sql
|
|
|
|
rm -f tmp.sqlite
|
|
|
|
sqlite3 tmp.sqlite < hydra-sqlite.sql
|
2011-12-05 13:29:29 +00:00
|
|
|
perl -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:../lib -e 'make_schema_at("Hydra::Schema", { naming => { ALL => "v5" }, relationships => 1, moniker_map => sub {return "$$_";} }, ["dbi:SQLite:tmp.sqlite"])'
|