mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-09 09:04:20 +01:00
Refactor the InvoiceAddresses table (#6232)
This commit is contained in:
@@ -9,6 +9,7 @@ namespace BTCPayServer.Data
|
||||
public string Address { get; set; }
|
||||
public InvoiceData InvoiceData { get; set; }
|
||||
public string InvoiceDataId { get; set; }
|
||||
public string PaymentMethodId { get; set; }
|
||||
|
||||
|
||||
internal static void OnModelCreating(ModelBuilder builder)
|
||||
@@ -18,7 +19,7 @@ namespace BTCPayServer.Data
|
||||
.WithMany(i => i.AddressInvoices).OnDelete(DeleteBehavior.Cascade);
|
||||
builder.Entity<AddressInvoiceData>()
|
||||
#pragma warning disable CS0618
|
||||
.HasKey(o => o.Address);
|
||||
.HasKey(o => new { o.PaymentMethodId, o.Address });
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user