Account merge ledger: roll-forward-only Down guard, standing-at-write through one owner for every writer, one current Patron snapshot per membership, memberless Heimdall sign-in, intake and Stripe routing through one owner
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
aa348d3b43
commit
537a477dc3
17 changed files with 405 additions and 54 deletions
|
|
@ -141,6 +141,10 @@ public sealed class BifrostDbContext(DbContextOptions<BifrostDbContext> options)
|
|||
entity.Property(x => x.Label).HasMaxLength(120);
|
||||
entity.Property(x => x.Weight).HasPrecision(18, 2);
|
||||
entity.HasIndex(x => new { x.MembershipId, x.Kind, x.IsCurrent });
|
||||
entity.HasIndex(x => x.MembershipId)
|
||||
.IsUnique()
|
||||
.HasDatabaseName("UX_TierSnapshots_MembershipId_CurrentPatron")
|
||||
.HasFilter("\"Kind\" = 'Patron' AND \"IsCurrent\"");
|
||||
entity.HasOne(x => x.Membership)
|
||||
.WithMany(x => x.TierSnapshots)
|
||||
.HasForeignKey(x => x.MembershipId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue