exchange-0007.sql (1604B)
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-0007', NULL, NULL); 20 21 SET search_path TO exchange; 22 23 24 -- 0004-refresh.sql was incorrectly added to exchange-0004 post-release, 25 -- so we need to do the migration again, in case it was skipped 26 CREATE FUNCTION alter_table_refresh7() 27 RETURNS VOID 28 LANGUAGE plpgsql 29 AS $$ 30 BEGIN 31 ALTER TABLE refresh 32 ADD COLUMN IF NOT EXISTS revealed BOOLEAN NOT NULL DEFAULT(FALSE), 33 ADD COLUMN IF NOT EXISTS transfer_pubs BYTEA[]; 34 COMMENT ON COLUMN refresh.revealed 35 IS 'TRUE if the client has successfully revealed the secrets in the cut-and-choose step.'; 36 COMMENT ON COLUMN refresh.transfer_pubs 37 IS 'The selected batch of transfer public keys, at noreveal_index'; 38 END $$; 39 40 41 INSERT INTO exchange_tables 42 (name 43 ,version 44 ,action 45 ,partitioned 46 ,by_range) 47 VALUES 48 ('refresh7' 49 ,'exchange-0007' 50 ,'alter' 51 ,TRUE 52 ,FALSE); 53 54 COMMIT;