db: update deposits table to support var length RSA denom keys

This commit is contained in:
Sree Harsha Totakura 2015-03-13 19:22:30 +01:00
parent 8e7f9c2939
commit 7a417e1de0

View File

@ -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)"