From 7a417e1de07ccc6f8fdbe6519fa0041a5c1dbbb8 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Fri, 13 Mar 2015 19:22:30 +0100 Subject: [PATCH] db: update deposits table to support var length RSA denom keys --- src/mint/mint_db.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mint/mint_db.c b/src/mint/mint_db.c index 50904df39..22d04c865 100644 --- a/src/mint/mint_db.c +++ b/src/mint/mint_db.c @@ -251,12 +251,13 @@ TALER_MINT_DB_create_tables (int temporary) SQLEXEC("CREATE TABLE IF NOT EXISTS deposits " "( " " coin_pub BYTEA NOT NULL PRIMARY KEY CHECK (length(coin_pub)=32)" - ",denom_pub BYTEA NOT NULL CHECK (length(denom_pub)=32)" + ",denom_pub BYTEA NOT NULL" /* FIXME: Link this as a foreign key? */ + ",denom_sig BYTEA NOT NULL" ",transaction_id INT8 NOT NULL" ",amount_currency VARCHAR(4) NOT NULL" ",amount_value INT4 NOT NULL" ",amount_fraction INT4 NOT NULL" - ",merchant_pub BYTEA NOT NULL" + ",merchant_pub BYTEA NOT NULL CHECK (length(merchant_pub)=32)" ",h_contract BYTEA NOT NULL CHECK (length(h_contract)=64)" ",h_wire BYTEA NOT NULL CHECK (length(h_wire)=64)" ",coin_sig BYTEA NOT NULL CHECK (length(coin_sig)=64)"