Skip to content

Commit e6789a5

Browse files
committed
sqlc: selected amount migration for static address swaps
1 parent a889d62 commit e6789a5

5 files changed

+22
-4
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- selected_amount is a fractinal amount amongst selected deposits of a static
2+
-- address loop-in swap.
3+
ALTER TABLE static_address_swaps DROP COLUMN selected_amount;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- selected_amount is a fractional amount amongst selected deposits of a static
2+
-- address loop-in swap. A selected amount of 0 indicates that the total amount
3+
-- of deposits is selected for the swap.
4+
ALTER TABLE static_address_swaps ADD selected_amount BIGINT NOT NULL DEFAULT 0;

loopdb/sqlc/models.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loopdb/sqlc/queries/static_address_loopin.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ INSERT INTO static_address_swaps (
66
payment_timeout_seconds,
77
quoted_swap_fee_satoshis,
88
deposit_outpoints,
9+
selected_amount,
910
htlc_tx_fee_rate_sat_kw,
1011
htlc_timeout_sweep_tx_id,
1112
htlc_timeout_sweep_address
@@ -18,7 +19,8 @@ INSERT INTO static_address_swaps (
1819
$6,
1920
$7,
2021
$8,
21-
$9
22+
$9,
23+
$10
2224
);
2325

2426
-- name: UpdateStaticAddressLoopIn :exec

loopdb/sqlc/static_address_loopin.sql.go

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)