diff options
Diffstat (limited to 'src/exchangedb/drop0001.sql')
-rw-r--r-- | src/exchangedb/drop0001.sql | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/exchangedb/drop0001.sql b/src/exchangedb/drop0001.sql index fe8df06f8..2b2b18e6a 100644 --- a/src/exchangedb/drop0001.sql +++ b/src/exchangedb/drop0001.sql @@ -22,6 +22,7 @@ BEGIN; -- Unlike the other SQL files, it SHOULD be updated to reflect the -- latest requirements for dropping tables. + -- Unregister patch (exchange-0001.sql) SELECT _v.unregister_patch('exchange-0001'); @@ -36,25 +37,40 @@ DROP TABLE IF EXISTS signkey_revocations CASCADE; DROP TABLE IF EXISTS work_shards CASCADE; DROP TABLE IF EXISTS prewire CASCADE; DROP TABLE IF EXISTS recoup CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_recoup_partition; DROP TABLE IF EXISTS recoup_refresh CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_recoup_refresh_partition; DROP TABLE IF EXISTS aggregation_tracking CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_aggregation_tracking_partition; DROP TABLE IF EXISTS wire_out CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_wire_out_partition; DROP TABLE IF EXISTS wire_targets CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_wire_targets_partition; DROP TABLE IF EXISTS wire_fee CASCADE; DROP TABLE IF EXISTS deposits CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_deposits_partition; DROP TABLE IF EXISTS extension_details CASCADE; DROP TABLE IF EXISTS refunds CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_refunds_partition; DROP TABLE IF EXISTS refresh_commitments CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_refresh_commitments_partition; DROP TABLE IF EXISTS refresh_revealed_coins CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_refresh_revealed_coins_partition; DROP TABLE IF EXISTS refresh_transfer_keys CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_refresh_transfer_keys_partition; DROP TABLE IF EXISTS known_coins CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_known_coins_partition; DROP TABLE IF EXISTS reserves_close CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_reserves_close_partition; DROP TABLE IF EXISTS reserves_out CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_reserves_out_partition; DROP TABLE IF EXISTS reserves_in CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_reserves_in_partition; DROP TABLE IF EXISTS reserves CASCADE; DROP TABLE IF EXISTS denomination_revocations CASCADE; DROP TABLE IF EXISTS denominations CASCADE; - +DROP TABLE IF EXISTS cs_nonce_locks CASCADE; +DROP FUNCTION IF EXISTS add_constraints_to_cs_nonce_locks_partition; DROP FUNCTION IF EXISTS exchange_do_withdraw(bigint,int,bytea,bytea,bytea,bytea,bytea,bigint,bigint) ; @@ -72,6 +88,19 @@ DROP FUNCTION IF EXISTS exchange_do_recoup_to_reserve; -- FIXME: drop other stored functions! +-- Unregister patch (partition-0001.sql) +-- SELECT _v.unregister_patch('partition-0001'); + +-- Drops for partition-0001.sql +DROP FUNCTION IF EXISTS create_table_partition; + +DROP FUNCTION IF EXISTS create_partitions; + +DROP FUNCTION IF EXISTS detach_default_partitions; + +DROP FUNCTION IF EXISTS drop_default_partitions; + + -- And we're out of here... COMMIT; |