Skip to content

Commit

Permalink
add columns only if not existent
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Jan 9, 2024
1 parent c049d75 commit 33c10b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrations/20231229091800_add_service_fee.up.sql
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 33c10b2

Please sign in to comment.