exchange

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

commit 9db7a7191aa4df9a0d7e4980cec1146f9ac36244
parent 48fc0adf616a531e8b106f06533ff720a71d7b6d
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed,  7 May 2025 18:08:35 +0200

merge rest

Diffstat:
Msrc/exchangedb/0002-aggregation_transient.sql | 44++++++++++++++++++++++++++++++++++++++++++++
Msrc/exchangedb/0002-aml_history.sql | 36++++++++++++++++++++++--------------
Msrc/exchangedb/0002-batch_deposits.sql | 7+++++++
Msrc/exchangedb/0002-kyc_attributes.sql | 19++++++++++---------
Dsrc/exchangedb/0006-dummy.sql | 0
Dsrc/exchangedb/0007-batch_deposits.sql | 54------------------------------------------------------
Dsrc/exchangedb/0007-kyc_attributes.sql | 48------------------------------------------------
Dsrc/exchangedb/0008-aml_history.sql | 80-------------------------------------------------------------------------------
Dsrc/exchangedb/0009-aggregation_transient.sql | 67-------------------------------------------------------------------
Dsrc/exchangedb/0010-kyc-attributes.sql | 60------------------------------------------------------------
Msrc/exchangedb/Makefile.am | 74+-------------------------------------------------------------------------
Msrc/exchangedb/exchange-0001.sql | 8++++++++
Dsrc/exchangedb/exchange-0003.sql.in | 22----------------------
Dsrc/exchangedb/exchange-0004.sql.in | 22----------------------
Dsrc/exchangedb/exchange-0005.sql.in | 22----------------------
Dsrc/exchangedb/exchange-0006.sql.in | 22----------------------
Dsrc/exchangedb/exchange-0007.sql.in | 27---------------------------
Dsrc/exchangedb/exchange-0008.sql.in | 25-------------------------
Dsrc/exchangedb/exchange-0009.sql.in | 30------------------------------
Dsrc/exchangedb/exchange-0010.sql.in | 23-----------------------
20 files changed, 92 insertions(+), 598 deletions(-)

diff --git a/src/exchangedb/0002-aggregation_transient.sql b/src/exchangedb/0002-aggregation_transient.sql @@ -68,6 +68,40 @@ BEGIN END $$; +CREATE FUNCTION foreign_table_aggregation_transient() +RETURNS void +LANGUAGE plpgsql +AS $$ +DECLARE + table_name TEXT DEFAULT 'aggregation_transient'; +BEGIN + EXECUTE FORMAT ( + 'ALTER TABLE ' || table_name || + ' ADD CONSTRAINT ' || table_name || '_foreign_wire_target_h_payto' + ' FOREIGN KEY (wire_target_h_payto) ' + ' REFERENCES wire_targets (wire_target_h_payto) ON DELETE RESTRICT' + ); +END +$$; + +CREATE FUNCTION constrain_table_aggregation_transient( + IN partition_suffix TEXT +) +RETURNS VOID +LANGUAGE plpgsql +AS $$ +DECLARE + table_name TEXT DEFAULT 'aggregation_transient'; +BEGIN + table_name = concat_ws('_', table_name, partition_suffix); + EXECUTE FORMAT ( + 'ALTER TABLE ' || table_name || + ' ADD CONSTRAINT ' || table_name || '_wire_target_h_payto_and_wtid_unique' + ' UNIQUE (wire_target_h_payto,wtid_raw)' + ); +END $$; + + INSERT INTO exchange_tables (name ,version @@ -79,4 +113,14 @@ INSERT INTO exchange_tables ,'exchange-0002' ,'create' ,TRUE + ,FALSE), + ('aggregation_transient' + ,'exchange-0002' + ,'foreign' + ,TRUE + ,FALSE), + ('aggregation_transient' + ,'exchange-0002' + ,'constrain' + ,TRUE ,FALSE); diff --git a/src/exchangedb/0002-aml_history.sql b/src/exchangedb/0002-aml_history.sql @@ -31,6 +31,8 @@ BEGIN ',decider_pub BYTEA CHECK (LENGTH(decider_pub)=32)' ',decider_sig BYTEA CHECK (LENGTH(decider_sig)=64)' ',outcome_serial_id INT8 NOT NULL' + ',kyc_attributes_hash BYTEA CHECK(LENGTH(kyc_attributes_hash)=64) DEFAULT NULL' + ',kyc_attributes_serial_id INT8 DEFAULT NULL' ') %s ;' ,table_name ,'PARTITION BY HASH (h_payto)' @@ -60,18 +62,6 @@ BEGIN ,partition_suffix ); PERFORM comment_partitioned_column( - 'Additional KYC requirements imposed by the AML staff member. Serialized JSON array of strings.' - ,'kyc_requirements' - ,table_name - ,partition_suffix - ); - PERFORM comment_partitioned_column( - 'Row in the KYC table for this KYC requirement, 0 for none.' - ,'kyc_req_row' - ,table_name - ,partition_suffix - ); - PERFORM comment_partitioned_column( 'Signature key of the staff member affirming the AML decision; of type AML_DECISION' ,'decider_sig' ,table_name @@ -83,6 +73,19 @@ BEGIN ,table_name ,partition_suffix ); + PERFORM comment_partitioned_column( + 'Hash of the new attributes inserted by the AML officer.' + ,'kyc_attributes_hash' + ,'aml_history' + ,NULL + ); + + PERFORM comment_partitioned_column( + 'Attributes inserted by the AML officer.' + ,'kyc_attributes_serial_id' + ,'aml_history' + ,NULL + ); END $$; COMMENT ON FUNCTION create_table_aml_history @@ -107,7 +110,7 @@ BEGIN EXECUTE FORMAT ( 'CREATE INDEX ' || table_name || '_main_index ' 'ON ' || table_name || ' ' - '(h_payto, decision_time DESC);' + '(h_payto);' ); END $$; @@ -124,6 +127,11 @@ BEGIN ' FOREIGN KEY (outcome_serial_id)' ' REFERENCES legitimization_outcomes (outcome_serial_id)' ); + EXECUTE FORMAT ( + 'ALTER TABLE ' || table_name || + ' ADD CONSTRAINT ' || table_name || '_foreign_key_kyc_attributes' + ' FOREIGN KEY (kyc_attributes_serial_id)' + ' REFERENCES kyc_attributes (kyc_attributes_serial_id)'); END $$; @@ -145,7 +153,7 @@ INSERT INTO exchange_tables ,TRUE ,FALSE), ('aml_history' - ,'exchange-0005' + ,'exchange-0002' ,'foreign' ,TRUE ,FALSE); diff --git a/src/exchangedb/0002-batch_deposits.sql b/src/exchangedb/0002-batch_deposits.sql @@ -39,6 +39,7 @@ BEGIN ',policy_details_serial_id INT8' ',policy_blocked BOOLEAN NOT NULL DEFAULT FALSE' ',total_amount taler_amount NOT NULL' + ',merchant_sig BYTEA CHECK(LENGTH(merchant_sig)=64) NOT NULL' ',done BOOLEAN NOT NULL DEFAULT FALSE' ') %s ;' ,table_name @@ -98,6 +99,12 @@ BEGIN ,'batch_deposits' ,partition_suffix ); + PERFORM comment_partitioned_column( + 'signature by the merchant over the contract terms, of purpose TALER_SIGNATURE_MERCHANT_CONTRACT' + ,'merchant_sig' + ,'batch_deposits' + ,partition_suffix + ); END $$; diff --git a/src/exchangedb/0002-kyc_attributes.sql b/src/exchangedb/0002-kyc_attributes.sql @@ -31,7 +31,8 @@ BEGIN ',expiration_time INT8 NOT NULL' ',encrypted_attributes BYTEA NOT NULL' ',legitimization_serial INT8 NOT NULL' - ',trigger_outcome_serial INT8 NOT NULL' + ',form_name TEXT DEFAULT(NULL)' + ',by_aml_officer BOOL NOT NULL DEFAULT(FALSE)' ') %s ;' ,table_name ,'PARTITION BY HASH (h_payto)' @@ -73,8 +74,14 @@ BEGIN ,partition_suffix ); PERFORM comment_partitioned_column( - 'ID of the outcome that was returned by the AML program based on the KYC data collected' - ,'trigger_outcome_serial' + 'Name of the form (FORM_ID) that is captured in the attributes.' + ,'form_name' + ,table_name + ,partition_suffix + ); + PERFORM comment_partitioned_column( + 'TRUE if the attributes were submitted by an AML officer.' + ,'by_aml_officer' ,table_name ,partition_suffix ); @@ -127,12 +134,6 @@ BEGIN ' FOREIGN KEY (legitimization_serial) ' ' REFERENCES legitimization_processes (legitimization_process_serial_id)' -- ON DELETE SET NULL? ); - EXECUTE FORMAT ( - 'ALTER TABLE ' || table_name || - ' ADD CONSTRAINT ' || table_name || '_foreign_legitimization_outcomes' - ' FOREIGN KEY (trigger_outcome_serial)' - ' REFERENCES legitimization_outcomes (outcome_serial_id) ON DELETE CASCADE' - ); END $$; diff --git a/src/exchangedb/0006-dummy.sql b/src/exchangedb/0006-dummy.sql diff --git a/src/exchangedb/0007-batch_deposits.sql b/src/exchangedb/0007-batch_deposits.sql @@ -1,54 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -CREATE FUNCTION alter_table_batch_deposits7( - IN partition_suffix TEXT DEFAULT NULL -) -RETURNS VOID -LANGUAGE plpgsql -AS $$ -BEGIN - PERFORM create_partitioned_table( - 'ALTER TABLE %I' - ' ADD COLUMN merchant_sig BYTEA CHECK(LENGTH(merchant_sig)=64)' - ' DEFAULT NULL' - ';', - 'batch_deposits' - ,'' - ,partition_suffix - ); - - PERFORM comment_partitioned_column( - 'signature by the merchant over the contract terms, of purpose TALER_SIGNATURE_MERCHANT_CONTRACT' - ,'merchant_sig' - ,'batch_deposits' - ,partition_suffix - ); -END $$; - - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('batch_deposits7' - ,'exchange-0007' - ,'alter' - ,TRUE - ,FALSE); diff --git a/src/exchangedb/0007-kyc_attributes.sql b/src/exchangedb/0007-kyc_attributes.sql @@ -1,48 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -CREATE FUNCTION alter_table_kyc_attributes7( - IN partition_suffix TEXT DEFAULT NULL -) -RETURNS VOID -LANGUAGE plpgsql -AS $$ -DECLARE - table_name TEXT DEFAULT 'kyc_attributes'; -BEGIN - PERFORM create_partitioned_table( - 'ALTER TABLE %I' - ' DROP COLUMN trigger_outcome_serial' - ';' - ,table_name - ,'' - ,partition_suffix - ); -END $$; - - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('kyc_attributes7' - ,'exchange-0007' - ,'alter' - ,TRUE - ,FALSE); diff --git a/src/exchangedb/0008-aml_history.sql b/src/exchangedb/0008-aml_history.sql @@ -1,80 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -CREATE FUNCTION alter_table_aml_history8() -RETURNS VOID -LANGUAGE plpgsql -AS $$ -BEGIN - EXECUTE FORMAT ( - 'ALTER TABLE aml_history' - ' ADD COLUMN kyc_attributes_hash BYTEA CHECK(LENGTH(kyc_attributes_hash)=64)' - ' DEFAULT NULL' - ',ADD COLUMN kyc_attributes_serial_id INT8' - ' DEFAULT NULL' - ';' - ); - - PERFORM comment_partitioned_column( - 'Hash of the new attributes inserted by the AML officer.' - ,'kyc_attributes_hash' - ,'aml_history' - ,NULL - ); - - PERFORM comment_partitioned_column( - 'Attributes inserted by the AML officer.' - ,'kyc_attributes_serial_id' - ,'aml_history' - ,NULL - ); -END $$; - - --- We need a separate function for this, as we call create_table only once but need to add --- those constraints to each partition which gets created -CREATE FUNCTION foreign_table_aml_history8() -RETURNS void -LANGUAGE plpgsql -AS $$ -DECLARE - table_name TEXT DEFAULT 'aml_history'; -BEGIN - EXECUTE FORMAT ( - 'ALTER TABLE ' || table_name || - ' ADD CONSTRAINT ' || table_name || '_foreign_key_kyc_attributes' - ' FOREIGN KEY (kyc_attributes_serial_id)' - ' REFERENCES kyc_attributes (kyc_attributes_serial_id)'); -END -$$; - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('aml_history8' - ,'exchange-0008' - ,'alter' - ,TRUE - ,FALSE), - ('aml_history8' - ,'exchange-0008' - ,'foreign' - ,TRUE - ,FALSE); diff --git a/src/exchangedb/0009-aggregation_transient.sql b/src/exchangedb/0009-aggregation_transient.sql @@ -1,67 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2025 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - - -CREATE FUNCTION foreign_table_aggregation_transient9() -RETURNS void -LANGUAGE plpgsql -AS $$ -DECLARE - table_name TEXT DEFAULT 'aggregation_transient'; -BEGIN - EXECUTE FORMAT ( - 'ALTER TABLE ' || table_name || - ' ADD CONSTRAINT ' || table_name || '_foreign_wire_target_h_payto' - ' FOREIGN KEY (wire_target_h_payto) ' - ' REFERENCES wire_targets (wire_target_h_payto) ON DELETE RESTRICT' - ); -END -$$; - -CREATE FUNCTION constrain_table_aggregation_transient9( - IN partition_suffix TEXT -) -RETURNS VOID -LANGUAGE plpgsql -AS $$ -DECLARE - table_name TEXT DEFAULT 'aggregation_transient'; -BEGIN - table_name = concat_ws('_', table_name, partition_suffix); - EXECUTE FORMAT ( - 'ALTER TABLE ' || table_name || - ' ADD CONSTRAINT ' || table_name || '_wire_target_h_payto_and_wtid_unique' - ' UNIQUE (wire_target_h_payto,wtid_raw)' - ); -END $$; - - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('aggregation_transient9' - ,'exchange-0009' - ,'foreign' - ,TRUE - ,FALSE), - ('aggregation_transient9' - ,'exchange-0009' - ,'constrain' - ,TRUE - ,FALSE); diff --git a/src/exchangedb/0010-kyc-attributes.sql b/src/exchangedb/0010-kyc-attributes.sql @@ -1,60 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2025 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -CREATE OR REPLACE FUNCTION alter_table_kyc_attributes10( - IN partition_suffix TEXT DEFAULT NULL -) -RETURNS VOID -LANGUAGE plpgsql -AS $$ -DECLARE - table_name TEXT DEFAULT 'kyc_attributes'; -BEGIN - PERFORM create_partitioned_table( - 'ALTER TABLE %I' - ' ADD COLUMN form_name TEXT DEFAULT(NULL)' - ',ADD COLUMN by_aml_officer BOOL NOT NULL DEFAULT(FALSE)' - ';' - ,table_name - ,'' - ,partition_suffix - ); - PERFORM comment_partitioned_column( - 'Name of the form (FORM_ID) that is captured in the attributes.' - ,'form_name' - ,table_name - ,partition_suffix - ); - PERFORM comment_partitioned_column( - 'TRUE if the attributes were submitted by an AML officer.' - ,'by_aml_officer' - ,table_name - ,partition_suffix - ); -END $$; - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('kyc_attributes10' - ,'exchange-0010' - ,'alter' - ,TRUE - ,FALSE); diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am @@ -26,23 +26,7 @@ sqlinputs = \ exchange_statistics_*.sql \ procedures.sql.in \ 0002-*.sql \ - 0003-*.sql \ - 0004-*.sql \ - 0005-*.sql \ - 0006-*.sql \ - 0007-*.sql \ - 0008-*.sql \ - 0009-*.sql \ - 0010-*.sql \ - exchange-0002.sql.in \ - exchange-0003.sql.in \ - exchange-0004.sql.in \ - exchange-0005.sql.in \ - exchange-0006.sql.in \ - exchange-0007.sql.in \ - exchange-0008.sql.in \ - exchange-0009.sql.in \ - exchange-0010.sql.in + exchange-0002.sql.in sql_DATA = \ benchmark-0001.sql \ @@ -50,14 +34,6 @@ sql_DATA = \ auditor-triggers-0001.sql \ exchange-0001.sql \ exchange-0002.sql \ - exchange-0003.sql \ - exchange-0004.sql \ - exchange-0005.sql \ - exchange-0006.sql \ - exchange-0007.sql \ - exchange-0008.sql \ - exchange-0009.sql \ - exchange-0010.sql \ drop.sql \ procedures.sql \ tops-0001.sql @@ -70,14 +46,6 @@ BUILT_SOURCES = \ CLEANFILES = \ exchange-0002.sql \ - exchange-0003.sql \ - exchange-0004.sql \ - exchange-0005.sql \ - exchange-0006.sql \ - exchange-0007.sql \ - exchange-0008.sql \ - exchange-0009.sql \ - exchange-0010.sql \ procedures.sql procedures.sql: procedures.sql.in exchange_do_*.sql exchange_statistics_helpers.sql @@ -90,46 +58,6 @@ exchange-0002.sql: exchange-0002.sql.in 0002-*.sql gcc -E -P -undef - < exchange-0002.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ chmod ugo-w $@ -exchange-0003.sql: exchange-0003.sql.in 0003-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0003.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0004.sql: exchange-0004.sql.in 0004-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0004.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0005.sql: exchange-0005.sql.in 0005-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0005.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0006.sql: exchange-0006.sql.in 0006-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0006.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0007.sql: exchange-0007.sql.in 0007-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0007.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0008.sql: exchange-0008.sql.in 0008-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0008.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0009.sql: exchange-0009.sql.in 0009-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0009.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - -exchange-0010.sql: exchange-0010.sql.in 0010-*.sql - chmod +w $@ 2> /dev/null || true - gcc -E -P -undef - < exchange-0010.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ - chmod ugo-w $@ - check_SCRIPTS = \ test_idempotency.sh diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql @@ -50,4 +50,12 @@ COMMENT ON COLUMN exchange_tables.by_range COMMENT ON COLUMN exchange_tables.finished IS 'TRUE if the respective migration has been run'; +CREATE INDEX exchange_tables_by_pending + ON exchange_tables (table_serial_id) + WHERE NOT finished; +COMMENT ON INDEX exchange_tables_by_pending + IS 'Used by exchange_do_create_tables'; + + + COMMIT; diff --git a/src/exchangedb/exchange-0003.sql.in b/src/exchangedb/exchange-0003.sql.in @@ -1,22 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -BEGIN; - -SELECT _v.register_patch('exchange-0003', NULL, NULL); -SET search_path TO exchange; - -COMMIT; diff --git a/src/exchangedb/exchange-0004.sql.in b/src/exchangedb/exchange-0004.sql.in @@ -1,22 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -BEGIN; - -SELECT _v.register_patch('exchange-0004', NULL, NULL); -SET search_path TO exchange; - -COMMIT; diff --git a/src/exchangedb/exchange-0005.sql.in b/src/exchangedb/exchange-0005.sql.in @@ -1,22 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -BEGIN; - -SELECT _v.register_patch('exchange-0005', NULL, NULL); -SET search_path TO exchange; - -COMMIT; diff --git a/src/exchangedb/exchange-0006.sql.in b/src/exchangedb/exchange-0006.sql.in @@ -1,22 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2014--2023 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -BEGIN; - -SELECT _v.register_patch('exchange-0006', NULL, NULL); -SET search_path TO exchange; - -COMMIT; diff --git a/src/exchangedb/exchange-0007.sql.in b/src/exchangedb/exchange-0007.sql.in @@ -1,27 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -BEGIN; - -SELECT _v.register_patch('exchange-0007', NULL, NULL); -SET search_path TO exchange; - -#include "0007-legitimization_outcomes.sql" -#include "0007-batch_deposits.sql" -#include "0007-kyc_attributes.sql" - - -COMMIT; diff --git a/src/exchangedb/exchange-0008.sql.in b/src/exchangedb/exchange-0008.sql.in @@ -1,25 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2024 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - -BEGIN; - -SELECT _v.register_patch('exchange-0008', NULL, NULL); -SET search_path TO exchange; - -#include "0008-aml_history.sql" - - -COMMIT; diff --git a/src/exchangedb/exchange-0009.sql.in b/src/exchangedb/exchange-0009.sql.in @@ -1,30 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2025 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - -BEGIN; - -SELECT _v.register_patch('exchange-0009', NULL, NULL); -SET search_path TO exchange; - -CREATE INDEX exchange_tables_by_pending - ON exchange_tables (table_serial_id) - WHERE NOT finished; -COMMENT ON INDEX exchange_tables_by_pending - IS 'Used by exchange_do_create_tables'; - - -#include "0009-aggregation_transient.sql" - -COMMIT; diff --git a/src/exchangedb/exchange-0010.sql.in b/src/exchangedb/exchange-0010.sql.in @@ -1,23 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2025 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - -BEGIN; - -SELECT _v.register_patch('exchange-0010', NULL, NULL); -SET search_path TO exchange; - -#include "0010-kyc-attributes.sql" - -COMMIT;