Merge branch 'worktree-agent-a36d202be311b9289'
# Conflicts: # GerbilManagerWebAPI/ApplicationContext.cs # GerbilManagerWebAPI/Program.cs # gerbil-manager-web/e2e/mock-data.ts
This commit is contained in:
@@ -26,6 +26,7 @@ public class ApplicationContext : DbContext
|
||||
public DbSet<MailSettings> MailSettings => Set<MailSettings>();
|
||||
public DbSet<Feedback> Feedback => Set<Feedback>();
|
||||
public DbSet<AcquisitionRecord> AcquisitionRecords => Set<AcquisitionRecord>();
|
||||
public DbSet<SaleReservation> SaleReservations => Set<SaleReservation>();
|
||||
|
||||
// Keep Gerbil.NameSearch in sync on every save (separator-insensitive search key),
|
||||
// so it can never drift from Name regardless of which code path mutates the entity.
|
||||
@@ -223,6 +224,16 @@ public class ApplicationContext : DbContext
|
||||
e.HasIndex(a => a.GerbilId);
|
||||
});
|
||||
|
||||
// ABGABE-STATUS: deliberately relationship-free (same rationale as Feedback).
|
||||
// GerbilId/ReservedForContactId are plain Guid columns (no navigation properties →
|
||||
// EF creates NO foreign key), so the import re-ingest wipe of Gerbils/Contacts never
|
||||
// cascades into — or breaks — reservation rows. They survive re-ingest by design.
|
||||
modelBuilder.Entity<SaleReservation>(e =>
|
||||
{
|
||||
e.Property(r => r.Price).HasPrecision(10, 2);
|
||||
e.HasIndex(r => r.GerbilId);
|
||||
});
|
||||
|
||||
// DB-4: German collation on remaining searched/sorted text columns (Npgsql-only).
|
||||
if (isNpgsql)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user