mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-08 22:41:00 +02:00
sqldb: set settled_at and settle_index on invocie insertion is set
Previously we intentially did not set settled_at and settle_index when inserting a new invoice as those fields are set when we settle an invoice through the usual invoice update. As migration requires that we set these nullable fields, we can safely add them.
This commit is contained in:
@ -7,6 +7,16 @@ INSERT INTO invoices (
|
||||
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15
|
||||
) RETURNING id;
|
||||
|
||||
-- name: InsertMigratedInvoice :one
|
||||
INSERT INTO invoices (
|
||||
hash, preimage, settle_index, settled_at, memo, amount_msat, cltv_delta,
|
||||
expiry, payment_addr, payment_request, payment_request_hash, state,
|
||||
amount_paid_msat, is_amp, is_hodl, is_keysend, created_at
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17
|
||||
) RETURNING id;
|
||||
|
||||
|
||||
-- name: InsertInvoiceFeature :exec
|
||||
INSERT INTO invoice_features (
|
||||
invoice_id, feature
|
||||
|
Reference in New Issue
Block a user