From 5effa967662b496959e59dcab9c477ec3726a3eb Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 11 Jun 2025 17:53:34 +0200 Subject: [PATCH] sqldb: closed_scids table --- sqldb/sqlc/migrations/000007_graph.down.sql | 1 + sqldb/sqlc/migrations/000007_graph.up.sql | 5 +++++ sqldb/sqlc/models.go | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/sqldb/sqlc/migrations/000007_graph.down.sql b/sqldb/sqlc/migrations/000007_graph.down.sql index 396471196..db90d8976 100644 --- a/sqldb/sqlc/migrations/000007_graph.down.sql +++ b/sqldb/sqlc/migrations/000007_graph.down.sql @@ -29,3 +29,4 @@ DROP TABLE IF EXISTS nodes; DROP TABLE IF EXISTS channel_policy_extra_types; DROP TABLE IF EXISTS zombie_channels; DROP TABLE IF EXISTS prune_log; +DROP TABLE IF EXISTS closed_scids; diff --git a/sqldb/sqlc/migrations/000007_graph.up.sql b/sqldb/sqlc/migrations/000007_graph.up.sql index 80a58cbd1..c56478ec5 100644 --- a/sqldb/sqlc/migrations/000007_graph.up.sql +++ b/sqldb/sqlc/migrations/000007_graph.up.sql @@ -331,4 +331,9 @@ CREATE TABLE IF NOT EXISTS prune_log ( -- The block hash that the prune was performed at. block_hash BLOB NOT NULL +); + +CREATE TABLE IF NOT EXISTS closed_scids ( + -- The short channel id of the channel. + scid BLOB PRIMARY KEY ); \ No newline at end of file diff --git a/sqldb/sqlc/models.go b/sqldb/sqlc/models.go index 2bb61f769..887870b1c 100644 --- a/sqldb/sqlc/models.go +++ b/sqldb/sqlc/models.go @@ -78,6 +78,10 @@ type ChannelPolicyExtraType struct { Value []byte } +type ClosedScid struct { + Scid []byte +} + type Invoice struct { ID int64 Hash []byte