mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 06:44:23 +01:00
Add postgresql migration files
This commit is contained in:
0
postgresql/migrations/000000_.down.sql
Normal file
0
postgresql/migrations/000000_.down.sql
Normal file
0
postgresql/migrations/000000_.up.sql
Normal file
0
postgresql/migrations/000000_.up.sql
Normal file
5
postgresql/migrations/000001_create_paymens_table.up.sql
Normal file
5
postgresql/migrations/000001_create_paymens_table.up.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE public.payments (
|
||||
payment_hash bytea NOT NULL,
|
||||
payment_request_out varchar NOT NULL,
|
||||
CONSTRAINT payments_pkey PRIMARY KEY (payment_hash)
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE public.payments;
|
||||
5
postgresql/migrations/000002_details.down.sql
Normal file
5
postgresql/migrations/000002_details.down.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE public.payments DROP COLUMN payment_secret;
|
||||
ALTER TABLE public.payments DROP COLUMN destination;
|
||||
ALTER TABLE public.payments DROP COLUMN incoming_amount_msat;
|
||||
ALTER TABLE public.payments DROP COLUMN outgoing_amount_msat;
|
||||
ALTER TABLE public.payments ADD payment_request_out varchar NOT NULL;
|
||||
5
postgresql/migrations/000002_details.up.sql
Normal file
5
postgresql/migrations/000002_details.up.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE public.payments DROP COLUMN payment_request_out;
|
||||
ALTER TABLE public.payments ADD payment_secret bytea NOT NULL;
|
||||
ALTER TABLE public.payments ADD destination bytea NOT NULL;
|
||||
ALTER TABLE public.payments ADD incoming_amount_msat bigint NOT NULL;
|
||||
ALTER TABLE public.payments ADD outgoing_amount_msat bigint NOT NULL;
|
||||
2
postgresql/migrations/000003_funding_tx.down.sql
Normal file
2
postgresql/migrations/000003_funding_tx.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE public.payments DROP COLUMN funding_tx_id;
|
||||
ALTER TABLE public.payments DROP COLUMN funding_tx_outnum;
|
||||
2
postgresql/migrations/000003_funding_tx.up.sql
Normal file
2
postgresql/migrations/000003_funding_tx.up.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE public.payments ADD funding_tx_id bytea NULL;
|
||||
ALTER TABLE public.payments ADD funding_tx_outnum int NULL;
|
||||
Reference in New Issue
Block a user