From 855e7829d764aa178020ce4423449dcb5a8536ce Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Sun, 29 Nov 2020 17:27:53 +0100
Subject: more work on DB plugin for managemetn API

---
 src/exchangedb/exchange-0002.sql | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'src/exchangedb/exchange-0002.sql')

diff --git a/src/exchangedb/exchange-0002.sql b/src/exchangedb/exchange-0002.sql
index 2162c45ef..f90097da4 100644
--- a/src/exchangedb/exchange-0002.sql
+++ b/src/exchangedb/exchange-0002.sql
@@ -98,6 +98,7 @@ CREATE TABLE IF NOT EXISTS auditor_denom_sigs
   (auditor_pub BYTEA NOT NULL REFERENCES auditors (auditor_pub) ON DELETE CASCADE
   ,denom_pub_hash BYTEA NOT NULL REFERENCES denominations (denom_pub_hash) ON DELETE CASCADE
   ,auditor_sig BYTEA PRIMARY KEY CHECK (LENGTH(auditor_sig)=64)
+  ,PRIMARY KEY (denom_pub_hash, auditor_pub)
   );
 COMMENT ON TABLE auditor_denom_sigs
   IS 'Table with auditor signatures on exchange denomination keys.';
@@ -107,9 +108,6 @@ COMMENT ON COLUMN auditor_denom_sigs.denom_pub_hash
   IS 'Denomination the signature is for.';
 COMMENT ON COLUMN auditor_denom_sigs.auditor_sig
   IS 'Signature of the auditor, of purpose TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS.';
-CREATE INDEX IF NOT EXISTS auditor_denom_sigs_denom_hash_index
-  ON auditor_denom_sigs
-  (denom_pub_hash);
 
 
 CREATE TABLE IF NOT EXISTS exchange_sign_keys
-- 
cgit v1.2.3

