From 6bc2a449072f57de58ab8d20507dbd73953d9921 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Thu, 18 Nov 2021 12:11:43 -0600 Subject: [PATCH] =?UTF-8?q?fix(dir):=20=F0=9F=90=9B=20convention-generated?= =?UTF-8?q?=20constraint=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Persistence/Queries/Entities/FilterListLanguage.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs index 3beb75e04..7f6175f65 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs @@ -22,6 +22,13 @@ public virtual void Configure(EntityTypeBuilder builder) builder.ToTable($"{nr.RewriteName(nameof(FilterListLanguage))}s"); builder.HasKey(fll => new { fll.FilterListId, fll.Iso6391 }); + + // TODO: why does the convention-generated ConstraintName end w/'language_temp_id' (fk_filter_list_languages_languages_language_temp_id) + builder.HasOne(fll => fll.Language) + .WithMany(l => l.FilterListLanguages) + .HasForeignKey(fll => fll.Iso6391) + .HasConstraintName("fk_filter_list_languages_languages_iso6391"); + builder.HasDataJsonFile(); } }