mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 06:37:21 +01:00
Note that this table will only contain entries for channels that we have deleted from the `channels` table which is why we cannot use foreign keys. Similarly, we may no longer have node entries for the nodes in the table.
30 lines
1.2 KiB
SQL
30 lines
1.2 KiB
SQL
-- Drop indexes.
|
|
DROP INDEX IF EXISTS nodes_unique;
|
|
DROP INDEX IF EXISTS node_extra_types_unique;
|
|
DROP INDEX IF EXISTS node_features_unique;
|
|
DROP INDEX IF EXISTS node_addresses_unique;
|
|
DROP INDEX IF EXISTS node_last_update_idx;
|
|
DROP INDEX IF EXISTS source_nodes_unique;
|
|
DROP INDEX IF EXISTS channels_node_id_1_idx;
|
|
DROP INDEX IF EXISTS channels_node_id_2_idx;
|
|
DROP INDEX IF EXISTS channels_unique;
|
|
DROP INDEX IF EXISTS channels_version_outpoint_idx;
|
|
DROP INDEX IF EXISTS channel_features_unique;
|
|
DROP INDEX IF EXISTS channel_extra_types_unique;
|
|
DROP INDEX IF EXISTS channel_policies_unique;
|
|
DROP INDEX IF EXISTS channel_policy_extra_types_unique;
|
|
DROP INDEX IF EXISTS channel_policy_last_update_idx;
|
|
|
|
-- Drop tables in order of reverse dependencies.
|
|
DROP TABLE IF EXISTS channel_policy_extra_types;
|
|
DROP TABLE IF EXISTS channel_policies;
|
|
DROP TABLE IF EXISTS channel_features;
|
|
DROP TABLE IF EXISTS channel_extra_types;
|
|
DROP TABLE IF EXISTS channels;
|
|
DROP TABLE IF EXISTS source_nodes;
|
|
DROP TABLE IF EXISTS node_addresses;
|
|
DROP TABLE IF EXISTS node_features;
|
|
DROP TABLE IF EXISTS node_extra_types;
|
|
DROP TABLE IF EXISTS nodes;
|
|
DROP TABLE IF EXISTS channel_policy_extra_types;
|
|
DROP TABLE IF EXISTS zombie_channels; |