mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 06:44:23 +01:00
Add forwarding history sync from lnd to db
This commit is contained in:
1
postgresql/migrations/000005_forwarding_history.down.sql
Normal file
1
postgresql/migrations/000005_forwarding_history.down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE public.forwarding_history;
|
||||
10
postgresql/migrations/000005_forwarding_history.up.sql
Normal file
10
postgresql/migrations/000005_forwarding_history.up.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE public.forwarding_history (
|
||||
"timestamp" bigint NOT NULL,
|
||||
chanid_in bigint NOT NULL,
|
||||
chanid_out bigint NOT NULL,
|
||||
amt_msat_in bigint NOT NULL,
|
||||
amt_msat_out bigint NOT NULL,
|
||||
CONSTRAINT timestamp_pkey PRIMARY KEY ("timestamp")
|
||||
);
|
||||
CREATE INDEX forwarding_history_chanid_in_idx ON public.forwarding_history (chanid_in);
|
||||
CREATE INDEX forwarding_history_chanid_out_idx ON public.forwarding_history (chanid_out);
|
||||
1
postgresql/migrations/000006_channels.down.sql
Normal file
1
postgresql/migrations/000006_channels.down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE public.channels;
|
||||
7
postgresql/migrations/000006_channels.up.sql
Normal file
7
postgresql/migrations/000006_channels.up.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE public.channels (
|
||||
chanid bigint NOT NULL,
|
||||
channel_point varchar NULL,
|
||||
nodeid bytea NULL,
|
||||
CONSTRAINT chanid_pkey PRIMARY KEY (chanid)
|
||||
);
|
||||
CREATE INDEX channels_nodeid_idx ON public.channels (nodeid);
|
||||
Reference in New Issue
Block a user