exchange-0018.sql (1602B)
1 -- 2 -- This file is part of TALER 3 -- Copyright (C) 2026 Taler Systems SA 4 -- 5 -- TALER is free software; you can redistribute it and/or modify it under the 6 -- terms of the GNU General Public License as published by the Free Software 7 -- Foundation; either version 3, or (at your option) any later version. 8 -- 9 -- TALER is distributed in the hope that it will be useful, but WITHOUT ANY 10 -- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 -- A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 -- 13 -- You should have received a copy of the GNU General Public License along with 14 -- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 -- 16 17 BEGIN; 18 19 SELECT _v.register_patch('exchange-0018', NULL, NULL); 20 21 SET search_path TO exchange; 22 23 CREATE FUNCTION alter_table_kyc_attributes18() 24 RETURNS void 25 LANGUAGE plpgsql 26 AS $$ 27 BEGIN 28 ALTER TABLE kyc_attributes 29 ADD COLUMN screened BOOLEAN NOT NULL DEFAULT (FALSE); 30 COMMENT ON COLUMN kyc_attributes.screened 31 IS 'TRUE once taler-exchange-sanctionscheck screened these attributes against the current sanctions list; reset to FALSE whenever the sanctions list changes'; 32 CREATE INDEX kyc_attributes_unscreened 33 ON kyc_attributes 34 (kyc_attributes_serial_id) 35 WHERE NOT screened; 36 COMMENT ON INDEX kyc_attributes_unscreened 37 IS 'used for iterate_unscreened_kyc_attributes'; 38 END 39 $$; 40 41 INSERT INTO exchange_tables 42 (name 43 ,version 44 ,action 45 ,partitioned 46 ,by_range) 47 VALUES 48 ('kyc_attributes18' 49 ,'exchange-0018' 50 ,'alter' 51 ,TRUE 52 ,FALSE); 53 54 COMMIT;