File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,6 @@ DROP TABLE IF EXISTS source_nodes;
25
25
DROP TABLE IF EXISTS node_addresses;
26
26
DROP TABLE IF EXISTS node_features;
27
27
DROP TABLE IF EXISTS node_extra_types;
28
- DROP TABLE IF EXISTS nodes;
28
+ DROP TABLE IF EXISTS nodes;
29
+ DROP TABLE IF EXISTS channel_policy_extra_types;
30
+ DROP TABLE IF EXISTS zombie_channels;
Original file line number Diff line number Diff line change @@ -292,3 +292,31 @@ CREATE TABLE IF NOT EXISTS channel_policy_extra_types (
292
292
CREATE UNIQUE INDEX IF NOT EXISTS channel_policy_extra_types_unique ON channel_policy_extra_types (
293
293
type, channel_policy_id
294
294
);
295
+
296
+ /* ─────────────────────────────────────────────
297
+ Other graph related tables
298
+ ─────────────────────────────────────────────
299
+ */
300
+
301
+ CREATE TABLE IF NOT EXISTS zombie_channels (
302
+ -- The channel id (short channel id) of the channel.
303
+ -- NOTE: we don't use a foreign key here to the `channels`
304
+ -- table since we may delete the channel record once it
305
+ -- is marked as a zombie.
306
+ scid BLOB NOT NULL ,
307
+
308
+ -- The protocol version that this node was gossiped on.
309
+ version SMALLINT NOT NULL ,
310
+
311
+ -- The public key of the node 1 node of the channel. If
312
+ -- this is not null, it means an update from this node
313
+ -- will be able to resurrect the channel.
314
+ node_key_1 BLOB,
315
+
316
+ -- The public key of the node 2 node of the channel. If
317
+ -- this is not null, it means an update from this node
318
+ -- will be able to resurrect the channel.
319
+ node_key_2 BLOB
320
+ );
321
+ CREATE UNIQUE INDEX IF NOT EXISTS zombie_channels_channel_id_version_idx
322
+ ON zombie_channels(scid, version);
You can’t perform that action at this time.
0 commit comments