sqldb: Change payment_intent relationship to payment table

Previously a one(intent)-to-many(payment) relationship it is now
changed to a one-to-one relationship because a payment request
only can have 1 payment related to it. Looking into the future
with BOLT12 offers, the fetched invoice from the offer could be
stored here as well and the relationship would still hold.
This commit is contained in:
ziggie committed 2026-02-25 08:02:08 +01:00
1 parent f8241748a1
commit 27071acb6b
4 files changed
+53 -52

No files matched your search

+1 -1
View File
@@ -211,7 +211,6 @@ type MigrationTracker struct {
type Payment struct {
ID int64
IntentID sql.NullInt64
AmountMsat int64
CreatedAt time.Time
PaymentIdentifier []byte
@@ -264,6 +263,7 @@ type PaymentHtlcAttemptResolution struct {
type PaymentIntent struct {
ID int64
PaymentID int64
IntentType int16
IntentPayload []byte
}