This commit is contained in:
parent
df2d0aba52
commit
5188fdb64c
3 changed files with 12478 additions and 8 deletions
|
|
@ -1,15 +1,13 @@
|
|||
sql_DATA := \
|
||||
benchmark-0001.sql \
|
||||
versioning.sql \
|
||||
auditor-triggers-0001.sql \
|
||||
exchange-0001.sql \
|
||||
exchange-0002.sql \
|
||||
exchange-0003.sql \
|
||||
exchange-0004.sql \
|
||||
exchange-0005.sql \
|
||||
drop.sql \
|
||||
procedures.sql \
|
||||
tops-0001.sql
|
||||
procedures.sql
|
||||
|
||||
sql_INIT := init.sql
|
||||
|
||||
procedures.sql: procedures.sql.in exchange_do_*.sql exchange_statistics_*.sql exchange_trigger_*.sql
|
||||
chmod +w $@ 2> /dev/null || true
|
||||
|
|
@ -31,11 +29,30 @@ exchange-0004.sql: exchange-0004.sql.in 0004-*.sql
|
|||
gcc -E -P -undef - < exchange-0004.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
||||
chmod ugo-w $@
|
||||
|
||||
.DEFAULT_GOAL := sql
|
||||
sql: procedures.sql exchange-0002.sql exchange-0003.sql exchange-0004.sql
|
||||
gen_sql: procedures.sql exchange-0002.sql exchange-0003.sql exchange-0004.sql
|
||||
|
||||
.DEFAULT_GOAL := gen_init
|
||||
gen_init: gen_sql $(sql_DATA)
|
||||
@printf "" > $(sql_INIT)
|
||||
@cat $(sql_DATA) >> $(sql_INIT)
|
||||
|
||||
clean:
|
||||
rm -f procedures.sql
|
||||
rm -f exchange-0002.sql
|
||||
rm -f exchange-0003.sql
|
||||
rm -f exchange-0004.sql
|
||||
rm $(sql_INIT)
|
||||
|
||||
exec: gen_init
|
||||
psql --host=localhost --port=5432 --username=mte --password --dbname="taler-exchange" --file=$(sql_INIT)
|
||||
|
||||
drop: gen_init
|
||||
psql --host=localhost --port=5432 --username=mte --password --dbname="taler-exchange" --file=drop.sql
|
||||
|
||||
create_database:
|
||||
createdb --host=localhost --port=5432 --username=mte --password "taler-exchange"
|
||||
|
||||
drop_database:
|
||||
dropdb --host=localhost --port=5432 --username=mte --password "taler-exchange"
|
||||
|
||||
reset_database: drop_database create_database
|
||||
|
|
|
|||
12452
include/sql/init.sql
Normal file
12452
include/sql/init.sql
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue