mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 01:22:51 +02:00
In this commit, we define the SQL schemas for storing graph channel data. This includes a new `channels` table and a new `channel_features` table along with various indices.
22 lines
838 B
SQL
22 lines
838 B
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 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 tables in order of reverse dependencies.
|
|
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 channels;
|
|
DROP TABLE IF EXISTS channel_features;
|
|
DROP TABLE IF EXISTS channel_extra_types; |