This commit is contained in:
parent
4f2e77f27f
commit
f1707b7ad2
133 changed files with 30 additions and 16904 deletions
|
|
@ -1,3 +1,23 @@
|
|||
# TODO
|
||||
# - make test
|
||||
# - PostgreSQL configuration (host, port, username, password, ..)
|
||||
|
||||
# usage:
|
||||
#
|
||||
download_source:
|
||||
git clone --depth 1 https://git.taler.net/exchange.git/ ./exchange
|
||||
mv ./exchange/src/exchangedb/*.sql ./
|
||||
mv ./exchange/src/exchangedb/*.sql.in ./
|
||||
rm -rf ./exchange
|
||||
|
||||
clean_source:
|
||||
rm -f ./*.sql
|
||||
rm -f ./*.sql.in
|
||||
|
||||
dbname := taler-exchange
|
||||
sql_INIT := init.sql
|
||||
sql_DROP := drop.sql
|
||||
|
||||
sql_DATA := \
|
||||
versioning.sql \
|
||||
exchange-0001.sql \
|
||||
|
|
@ -7,8 +27,6 @@ sql_DATA := \
|
|||
exchange-0005.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
|
||||
gcc -E -P -undef - < procedures.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
||||
|
|
@ -43,13 +61,17 @@ clean:
|
|||
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)
|
||||
# "NOTICE: function xxx() does not exist, skipping" are normal and expected
|
||||
init: gen_init
|
||||
psql --host=localhost --port=5432 --username=mte --password --dbname=$(dbname) --file=$(sql_INIT)
|
||||
|
||||
drop:
|
||||
psql --host=localhost --port=5432 --username=mte --password --dbname=$(dbname) --file=$(sql_DROP)
|
||||
|
||||
create_database:
|
||||
createdb --host=localhost --port=5432 --username=mte --password "taler-exchange"
|
||||
createdb --host=localhost --port=5432 --username=mte --password $(dbname)
|
||||
|
||||
drop_database:
|
||||
dropdb --host=localhost --port=5432 --username=mte --password "taler-exchange"
|
||||
dropdb --host=localhost --port=5432 --username=mte --password $(dbname)
|
||||
|
||||
reset_database: drop_database create_database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue