From 9cfe47493c29d3c6400258bcc98153c622dacb4e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 18 Mar 2017 17:47:44 +0100 Subject: more work on auditor --- src/exchangedb/plugin_exchangedb_postgres.c | 10 ++++++++-- src/exchangedb/test_exchangedb.c | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/exchangedb') diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index f686a8c52..c975edcff 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -490,7 +490,8 @@ postgres_create_tables (void *cls) /* Table for the tracking API, mapping from wire transfer identifiers to transactions and back */ SQLEXEC("CREATE TABLE IF NOT EXISTS aggregation_tracking " - "(deposit_serial_id INT8 PRIMARY KEY REFERENCES deposits (deposit_serial_id) ON DELETE CASCADE" + "(aggregation_serial_id BIGSERIAL" + ",deposit_serial_id INT8 PRIMARY KEY REFERENCES deposits (deposit_serial_id) ON DELETE CASCADE" ",wtid_raw BYTEA CONSTRAINT wire_out_ref REFERENCES wire_out(wtid_raw) ON DELETE CASCADE DEFERRABLE" ",execution_time INT8 NOT NULL" ")"); @@ -1235,7 +1236,8 @@ postgres_prepare (PGconn *db_conn) /* Used in #postgres_lookup_wire_transfer */ PREPARE ("lookup_transactions", "SELECT" - " deposits.h_proposal_data" + " aggregation_serial_id" + ",deposits.h_proposal_data" ",deposits.wire" ",deposits.h_wire" ",deposits.coin_pub" @@ -4067,6 +4069,7 @@ postgres_lookup_wire_transfer (void *cls, } for (i=0;i