restart.sql (2563B)
1 -- 2 -- This file is part of TALER 3 -- Copyright (C) 2014--2020 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 -- Everything in one big transaction 18 BEGIN; 19 20 SET search_path TO auditor; 21 22 -- This script restart the auditor state as done to RESTART 23 -- an audit from scratch. It does NOT drop tables and also 24 -- PRESERVES data that running the auditor would not recover, 25 -- such as: 26 -- * the list of audited exchanges 27 -- * deposit confirmation reports the auditor received from merchants 28 -- * schema versioning information 29 -- * signing keys of exchanges we have downloaded 30 -- 31 -- Unlike the other SQL files, it SHOULD be updated to reflect the 32 -- latest requirements for dropping tables. 33 34 DELETE FROM auditor_amount_arithmetic_inconsistency; 35 DELETE FROM auditor_bad_sig_losses; 36 DELETE FROM auditor_balances; 37 DELETE FROM auditor_closure_lags; 38 DELETE FROM auditor_coin_inconsistency; 39 DELETE FROM auditor_denomination_key_validity_withdraw_inconsistency; 40 DELETE FROM auditor_denomination_pending; 41 DELETE FROM auditor_denominations_without_sigs; 42 DELETE FROM auditor_emergency; 43 DELETE FROM auditor_emergency_by_count; 44 DELETE FROM auditor_fee_time_inconsistency; 45 DELETE FROM auditor_historic_denomination_revenue; 46 DELETE FROM auditor_historic_reserve_summary; 47 DELETE FROM auditor_misattribution_in_inconsistency; 48 DELETE FROM auditor_pending_deposits; 49 DELETE FROM auditor_progress; 50 DELETE FROM auditor_purse_not_closed_inconsistencies; 51 DELETE FROM auditor_purses; 52 DELETE FROM auditor_refreshes_hanging; 53 DELETE FROM auditor_reserve_balance_insufficient_inconsistency; 54 DELETE FROM auditor_reserve_balance_summary_wrong_inconsistency; 55 DELETE FROM auditor_reserve_in_inconsistency; 56 DELETE FROM auditor_reserve_not_closed_inconsistency; 57 DELETE FROM auditor_reserves; 58 DELETE FROM auditor_row_inconsistency; 59 DELETE FROM auditor_row_minor_inconsistencies; 60 DELETE FROM auditor_wire_format_inconsistency; 61 DELETE FROM auditor_wire_out_inconsistency; 62 63 64 -- And we're out of here... 65 COMMIT;