This commit is contained in:
parent
2cb9c8e433
commit
d65933f989
4 changed files with 0 additions and 96 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1 @@
|
||||||
_build
|
_build
|
||||||
include/sql/*.sql
|
|
||||||
include/sql/*.sql.in
|
|
||||||
|
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
||||||
# TODO
|
|
||||||
# - make test
|
|
||||||
# - PostgreSQL configuration (host, port, username, password, ..)
|
|
||||||
# - gitsubmodules?
|
|
||||||
|
|
||||||
# usage:
|
|
||||||
# `make create_database`
|
|
||||||
# create a `taler-exchange` database
|
|
||||||
# `make fetch_source`
|
|
||||||
# fetch all *.sql and *.sql.in files from GNU Taler exchange repository (latest commit)
|
|
||||||
# file `exchangedb.version` contains hash of latest commit that changed
|
|
||||||
# something in exchange/src/exchangedb
|
|
||||||
# `make init`
|
|
||||||
# initialize taler-exchange database (create tables, ...)
|
|
||||||
# `taler-exchange` database must already be created
|
|
||||||
fetch_source:
|
|
||||||
git clone https://git.taler.net/exchange.git/ ./exchange
|
|
||||||
cp ./exchange/src/exchangedb/*.sql ./
|
|
||||||
cp ./exchange/src/exchangedb/*.sql.in ./
|
|
||||||
git -C ./exchange log -n 1 --pretty=format:%H ./src/exchangedb > exchangedb.version
|
|
||||||
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 \
|
|
||||||
exchange-0002.sql \
|
|
||||||
exchange-0003.sql \
|
|
||||||
exchange-0004.sql \
|
|
||||||
exchange-0005.sql \
|
|
||||||
procedures.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' - >$@
|
|
||||||
chmod ugo-w $@
|
|
||||||
|
|
||||||
exchange-0002.sql: exchange-0002.sql.in 0002-*.sql
|
|
||||||
chmod +w $@ 2> /dev/null || true
|
|
||||||
gcc -E -P -undef - < exchange-0002.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
|
||||||
chmod ugo-w $@
|
|
||||||
|
|
||||||
exchange-0003.sql: exchange-0003.sql.in 0003-*.sql
|
|
||||||
chmod +w $@ 2> /dev/null || true
|
|
||||||
gcc -E -P -undef - < exchange-0003.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
|
||||||
chmod ugo-w $@
|
|
||||||
|
|
||||||
exchange-0004.sql: exchange-0004.sql.in 0004-*.sql
|
|
||||||
chmod +w $@ 2> /dev/null || true
|
|
||||||
gcc -E -P -undef - < exchange-0004.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
|
||||||
chmod ugo-w $@
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
# "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 $(dbname)
|
|
||||||
|
|
||||||
drop_database:
|
|
||||||
dropdb --host=localhost --port=5432 --username=mte --password $(dbname)
|
|
||||||
|
|
||||||
reset_database: drop_database create_database
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
2305679765fb14b82512b5140ae113d9633109c8
|
|
||||||
|
|
@ -31,8 +31,6 @@ let pg_todo () = assert false
|
||||||
- master signature: over smthing? *)
|
- master signature: over smthing? *)
|
||||||
let activate_signing_key _cls _exchange_public_key _master_signature = pg_todo
|
let activate_signing_key _cls _exchange_public_key _master_signature = pg_todo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
|
|
||||||
enum GNUNET_DB_QueryStatus
|
enum GNUNET_DB_QueryStatus
|
||||||
|
|
@ -70,10 +68,6 @@ TEH_PG_activate_signing_key (
|
||||||
|
|
||||||
(* ----- *)
|
(* ----- *)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let lookup_signing_key = pg_todo
|
let lookup_signing_key = pg_todo
|
||||||
let iterate_active_signkeys = pg_todo
|
let iterate_active_signkeys = pg_todo
|
||||||
let insert_signkey_revocation = pg_todo
|
let insert_signkey_revocation = pg_todo
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue