summaryrefslogtreecommitdiff
path: root/src/backenddb/drop0001.sql
blob: aec588dad86b26e811e235e2b66568d311324da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--
-- This file is part of TALER
-- Copyright (C) 2014--2020 Taler Systems SA
--
-- TALER is free software; you can redistribute it and/or modify it under the
-- terms of the GNU General Public License as published by the Free Software
-- Foundation; either version 3, or (at your option) any later version.
--
-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-- A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along with
-- TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
--

-- Everything in one big transaction
BEGIN;

-- This script DROPs all of the tables we create, including the
-- versioning schema!
--
-- Unlike the other SQL files, it SHOULD be updated to reflect the
-- latest requirements for dropping tables.

-- Drops for 0001.sql

DROP TABLE IF EXISTS merchant_exchange_wire_fees CASCADE;
DROP TABLE IF EXISTS merchant_exchange_signing_keys CASCADE;
DROP TABLE IF EXISTS merchant_instances CASCADE;
DROP TABLE IF EXISTS merchant_keys CASCADE;
DROP TABLE IF EXISTS merchant_accounts CASCADE;
DROP TABLE IF EXISTS merchant_inventory CASCADE;
DROP TABLE IF EXISTS merchant_inventory_locks CASCADE;
DROP TABLE IF EXISTS merchant_accounts CASCADE;
DROP TABLE IF EXISTS merchant_orders CASCADE;
DROP TABLE IF EXISTS merchant_order_locks CASCADE;
DROP TABLE IF EXISTS merchant_contract_terms CASCADE;
DROP TABLE IF EXISTS merchant_deposits CASCADE;
DROP TABLE IF EXISTS merchant_refunds CASCADE;
DROP TABLE IF EXISTS merchant_refund_proofs CASCADE;
DROP TABLE IF EXISTS merchant_credits CASCADE;
DROP TABLE IF EXISTS merchant_transfers CASCADE;
DROP TABLE IF EXISTS merchant_transfer_signatures CASCADE;
DROP TABLE IF EXISTS merchant_transfer_by_coin CASCADE;
DROP TABLE IF EXISTS merchant_transfer_to_coin CASCADE;
DROP TABLE IF EXISTS merchant_deposit_to_transfer CASCADE;
DROP TABLE IF EXISTS merchant_tip_reserves CASCADE;
DROP TABLE IF EXISTS merchant_tip_reserve_keys CASCADE;
DROP TABLE IF EXISTS merchant_tips CASCADE;
DROP TABLE IF EXISTS merchant_tip_pickups CASCADE;
DROP TABLE IF EXISTS merchant_tip_pickup_signatures CASCADE;

-- Unregister patch (0001.sql)
SELECT _v.unregister_patch('merchant-0001');

-- And we're out of here...
COMMIT;