exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 0d69fb634a7f5116118ff47f2bfad0fad3a6a570
parent 0d30def37e36a01e0f42ae518a0cbd01546e47d2
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 22 Aug 2024 22:17:59 +0200

fix #9111

Diffstat:
Msrc/exchangedb/0005-kyc_attributes.sql | 26++++++++++++++++++++++++++
1 file changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/exchangedb/0005-kyc_attributes.sql b/src/exchangedb/0005-kyc_attributes.sql @@ -28,6 +28,7 @@ BEGIN ' DROP COLUMN kyc_prox' ',DROP COLUMN provider' ',DROP COLUMN satisfied_checks' + ',DROP CONSTRAINT kyc_attributes_pkey' ',ADD COLUMN trigger_outcome_serial INT8 NOT NULL' ';' ,table_name @@ -43,6 +44,26 @@ BEGIN END $$; + +CREATE OR REPLACE FUNCTION constrain_table_kyc_attributes5( + IN partition_suffix TEXT +) +RETURNS void +LANGUAGE plpgsql +AS $$ +DECLARE + table_name TEXT DEFAULT 'kyc_attributes'; +BEGIN + table_name = concat_ws('_', table_name, partition_suffix); + -- To search accounts + EXECUTE FORMAT ( + 'CREATE INDEX ' || table_name || '_h_payto_index ' + 'ON ' || table_name || ' ' + '(h_payto);' + ); +END $$; + + CREATE FUNCTION foreign_table_kyc_attributes5() RETURNS void LANGUAGE plpgsql @@ -73,6 +94,11 @@ INSERT INTO exchange_tables ,FALSE), ('kyc_attributes5' ,'exchange-0005' + ,'constrain' + ,TRUE + ,FALSE), + ('kyc_attributes5' + ,'exchange-0005' ,'foreign' ,TRUE ,FALSE);