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:
4 files changed
+53
-52
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user