diff --git a/db/migrations/20231229091800_add_service_fee.up.sql b/db/migrations/20231229091800_add_service_fee.up.sql index 010c9590..6bd7cb6a 100644 --- a/db/migrations/20231229091800_add_service_fee.up.sql +++ b/db/migrations/20231229091800_add_service_fee.up.sql @@ -1,5 +1,5 @@ -alter table invoices ADD COLUMN service_fee bigint default 0; -alter table invoices ADD COLUMN routing_fee bigint 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;