From 5b39ac9d8f7cf8c8a446fd51061b2d3bbaa31173 Mon Sep 17 00:00:00 2001
From: Özgür Kesim <oec-taler@kesim.org>
Date: Sun, 23 Jul 2023 15:57:37 +0200
Subject: [kyc] put reserve_pub into legitimization_requirements

---
 src/exchangedb/0002-legitimization_requirements.sql | 7 +++++++
 1 file changed, 7 insertions(+)

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

diff --git a/src/exchangedb/0002-legitimization_requirements.sql b/src/exchangedb/0002-legitimization_requirements.sql
index 4879b7a27..892556aab 100644
--- a/src/exchangedb/0002-legitimization_requirements.sql
+++ b/src/exchangedb/0002-legitimization_requirements.sql
@@ -25,6 +25,7 @@ BEGIN
     'CREATE TABLE %I'
       '(legitimization_requirement_serial_id BIGINT GENERATED BY DEFAULT AS IDENTITY'
       ',h_payto BYTEA NOT NULL CHECK (LENGTH(h_payto)=32)'
+      ',reserve_pub BYTEA'
       ',required_checks VARCHAR NOT NULL'
       ',UNIQUE (h_payto, required_checks)'
     ') %s ;'
@@ -49,6 +50,12 @@ BEGIN
     ,'legitimization_requirements'
     ,partition_suffix
   );
+  PERFORM comment_partitioned_column(
+     'if h_payto refers to a reserve, this is its public key, NULL otherwise.  It allows to lookup the corresponding reserve when the KYC process is done.'
+    ,'reserve_pub'
+    ,'legitimization_requirements'
+    ,partition_suffix
+  );
   PERFORM comment_partitioned_column(
      'space-separated list of required checks'
     ,'required_checks'
-- 
cgit v1.2.3

