From 1ca062fc7a303202130f194a15739ea7ce6c2dc2 Mon Sep 17 00:00:00 2001
From: Christian Grothoff <christian@grothoff.org>
Date: Wed, 8 Jul 2020 12:35:50 +0200
Subject: introduce known_coin_id, alas not yet used

---
 src/exchangedb/exchange-0001.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql
index ad05e7797..25b778238 100644
--- a/src/exchangedb/exchange-0001.sql
+++ b/src/exchangedb/exchange-0001.sql
@@ -168,7 +168,8 @@ CREATE INDEX IF NOT EXISTS reserves_out_for_get_withdraw_info
 
 
 CREATE TABLE IF NOT EXISTS known_coins
-  (coin_pub BYTEA NOT NULL PRIMARY KEY CHECK (LENGTH(coin_pub)=32)
+  (known_coin_id BIGSERIAL UNIQUE
+  ,coin_pub BYTEA NOT NULL PRIMARY KEY CHECK (LENGTH(coin_pub)=32)
   ,denom_pub_hash BYTEA NOT NULL REFERENCES denominations (denom_pub_hash) ON DELETE CASCADE
   ,denom_sig BYTEA NOT NULL
   );
-- 
cgit v1.2.3

