Skip to content

Commit 6204cd0

Browse files
fix: adding unique constraint for screening id and nhs number (#1712)
fix: adding unique constraint for screening id and nhs number
1 parent 7cb6c51 commit 6204cd0

File tree

4 files changed

+1111
-3
lines changed

4 files changed

+1111
-3
lines changed

application/CohortManager/src/Functions/Shared/DataServices.Database/DataServicesContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
4444

4545
modelBuilder.Entity<ParticipantManagement>()
4646
.ToTable("PARTICIPANT_MANAGEMENT", "dbo")
47-
.HasIndex(i => new { i.NHSNumber, i.ScreeningId }, "ix_PARTICIPANT_MANAGEMENT_screening_nhs");
47+
.HasIndex(i => new { i.NHSNumber, i.ScreeningId }, "ix_PARTICIPANT_MANAGEMENT_screening_nhs")
48+
.IsUnique();
4849

4950
modelBuilder.Entity<ParticipantDemographic>()
5051
.ToTable("PARTICIPANT_DEMOGRAPHIC", "dbo")

0 commit comments

Comments
 (0)