From 2955f2f56275fca01cd3f586b3475dcdfbea78ed Mon Sep 17 00:00:00 2001 From: JPVenson Date: Wed, 9 Oct 2024 23:19:24 +0000 Subject: Fixed AncestorIds and applied review comments --- .../ModelConfiguration/AncestorIdConfiguration.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Jellyfin.Server.Implementations/ModelConfiguration') diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs index b7fe909dd..0e90b8d82 100644 --- a/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs +++ b/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs @@ -13,8 +13,7 @@ public class AncestorIdConfiguration : IEntityTypeConfiguration /// public void Configure(EntityTypeBuilder builder) { - builder.HasKey(e => new { e.ItemId, e.Id }); - builder.HasIndex(e => e.Id); - builder.HasIndex(e => new { e.ItemId, e.AncestorIdText }); + builder.HasKey(e => new { e.ItemId, e.ParentItemId }); + builder.HasIndex(e => e.ParentItemId); } } -- cgit v1.2.3