Payments should use composite key (#6240)

* Payments should use composite key

* Invert PK for InvoiceAddress
This commit is contained in:
Nicolas Dorier
2024-09-23 17:06:56 +09:00
committed by GitHub
parent 36a5d0ee3f
commit 3cf1aa00fa
16 changed files with 98 additions and 36 deletions

View File

@@ -19,7 +19,7 @@ namespace BTCPayServer.Data
.WithMany(i => i.AddressInvoices).OnDelete(DeleteBehavior.Cascade);
builder.Entity<AddressInvoiceData>()
#pragma warning disable CS0618
.HasKey(o => new { o.PaymentMethodId, o.Address });
.HasKey(o => new { o.Address, o.PaymentMethodId });
#pragma warning restore CS0618
}
}