mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-02-23 05:44:23 +01:00
Merge pull request #479 from getAlby/fix/migration-service-fee-db
fix: enable data migration
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
alter table invoices ALTER COLUMN fee SET DEFAULT 0;
|
||||
alter table invoices ADD COLUMN IF NOT EXISTS service_fee bigint default 0;
|
||||
alter table invoices ADD COLUMN IF NOT EXISTS routing_fee bigint default 0;
|
||||
|
||||
-- maybe manually migrate existing data?
|
||||
-- alter table invoices ALTER COLUMN fee SET DEFAULT 0;
|
||||
-- update invoices set fee = 0 where fee IS NULL;
|
||||
-- update invoices set routing_fee = fee where routing_fee=0;
|
||||
-- migrate existing data
|
||||
update invoices set fee = 0 where fee IS NULL;
|
||||
update invoices set routing_fee = fee where fee > 0;
|
||||
|
||||
Reference in New Issue
Block a user