0002-global_fee.sql (1421B)
1 -- 2 -- This file is part of TALER 3 -- Copyright (C) 2014--2022 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 CREATE TABLE global_fee 18 (global_fee_serial BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE 19 ,start_date INT8 NOT NULL 20 ,end_date INT8 NOT NULL 21 ,history_fee taler_amount NOT NULL 22 ,account_fee taler_amount NOT NULL 23 ,purse_fee taler_amount NOT NULL 24 ,purse_timeout INT8 NOT NULL 25 ,history_expiration INT8 NOT NULL 26 ,purse_account_limit INT4 NOT NULL 27 ,master_sig BYTEA NOT NULL CHECK (LENGTH(master_sig)=64) 28 ,PRIMARY KEY (start_date) 29 ); 30 COMMENT ON TABLE global_fee 31 IS 'list of the global fees of this exchange, by date'; 32 COMMENT ON COLUMN global_fee.global_fee_serial 33 IS 'needed for exchange-auditor replication logic'; 34 35 CREATE INDEX global_fee_by_end_date_index 36 ON global_fee 37 (end_date);