0002-auditor_pending_deposits.sql (2037B)
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 IF NOT EXISTS auditor_pending_deposits 18 ( 19 row_id BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE PRIMARY KEY, 20 total_amount taler_amount NOT NULL, 21 wire_target_h_payto BYTEA NOT NULL CHECK (LENGTH(wire_target_h_payto)=32), 22 batch_deposit_serial_id BIGINT NOT NULL, 23 deadline BIGINT NOT NULL, 24 suppressed BOOLEAN NOT NULL DEFAULT FALSE, 25 creation_date INT8 NOT NULL 26 DEFAULT (EXTRACT(EPOCH FROM NOW()) * 1000 * 1000)::BIGINT 27 ); 28 29 COMMENT ON TABLE auditor_pending_deposits 30 IS 'Reports when deposits are delayed (can be harmless, if the aggregation and wire transfer are made shortly afterwards)'; 31 32 COMMENT ON COLUMN auditor_pending_deposits.row_id 33 IS 'Unique identifier of the report in the auditor database'; 34 COMMENT ON COLUMN auditor_pending_deposits.batch_deposit_serial_id 35 IS 'Serial ID of the deposit operation in the exchange database'; 36 COMMENT ON COLUMN auditor_pending_deposits.wire_target_h_payto 37 IS 'Hash of the bank account into which the deposit should have been made'; 38 COMMENT ON COLUMN auditor_pending_deposits.total_amount 39 IS 'Total transaction amount impacted'; 40 COMMENT ON COLUMN auditor_pending_deposits.suppressed 41 IS 'True if the report was suppressed by an administrator'; 42 COMMENT ON COLUMN auditor_pending_deposits.creation_date 43 IS 'for garbage collection';