mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
sqldb/sqlc: prune_log schema
Define the schema for the prune log.
This commit is contained in:
@@ -27,4 +27,5 @@ DROP TABLE IF EXISTS node_features;
|
|||||||
DROP TABLE IF EXISTS node_extra_types;
|
DROP TABLE IF EXISTS node_extra_types;
|
||||||
DROP TABLE IF EXISTS nodes;
|
DROP TABLE IF EXISTS nodes;
|
||||||
DROP TABLE IF EXISTS channel_policy_extra_types;
|
DROP TABLE IF EXISTS channel_policy_extra_types;
|
||||||
DROP TABLE IF EXISTS zombie_channels;
|
DROP TABLE IF EXISTS zombie_channels;
|
||||||
|
DROP TABLE IF EXISTS prune_log;
|
||||||
|
@@ -320,3 +320,15 @@ CREATE TABLE IF NOT EXISTS zombie_channels (
|
|||||||
);
|
);
|
||||||
CREATE UNIQUE INDEX IF NOT EXISTS zombie_channels_channel_id_version_idx
|
CREATE UNIQUE INDEX IF NOT EXISTS zombie_channels_channel_id_version_idx
|
||||||
ON zombie_channels(scid, version);
|
ON zombie_channels(scid, version);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS prune_log (
|
||||||
|
-- The block height that the prune was performed at.
|
||||||
|
-- NOTE: we don't use INTEGER PRIMARY KEY here since that would
|
||||||
|
-- get transformed into an auto-incrementing type by our SQL type
|
||||||
|
-- replacement logic. We don't want that since this must be the
|
||||||
|
-- actual block height and not an auto-incrementing value.
|
||||||
|
block_height BIGINT PRIMARY KEY,
|
||||||
|
|
||||||
|
-- The block hash that the prune was performed at.
|
||||||
|
block_hash BLOB NOT NULL
|
||||||
|
);
|
@@ -181,6 +181,11 @@ type NodeFeature struct {
|
|||||||
FeatureBit int32
|
FeatureBit int32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PruneLog struct {
|
||||||
|
BlockHeight int64
|
||||||
|
BlockHash []byte
|
||||||
|
}
|
||||||
|
|
||||||
type SourceNode struct {
|
type SourceNode struct {
|
||||||
NodeID int64
|
NodeID int64
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user