소스 검색

Delete unnecessary indexes
Multicolumn indexes can be queried on the first column without needing a separate index

Patrick Barron 4 년 전
부모
커밋
3ffef5794e
1개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 8
      Jellyfin.Server.Implementations/JellyfinDb.cs

+ 0 - 8
Jellyfin.Server.Implementations/JellyfinDb.cs

@@ -149,18 +149,10 @@ namespace Jellyfin.Server.Implementations
 
             modelBuilder.HasDefaultSchema("jellyfin");
 
-            modelBuilder.Entity<DisplayPreferences>()
-                .HasIndex(entity => entity.UserId)
-                .IsUnique(false);
-
             modelBuilder.Entity<DisplayPreferences>()
                 .HasIndex(entity => new { entity.UserId, entity.ItemId, entity.Client })
                 .IsUnique();
 
-            modelBuilder.Entity<CustomItemDisplayPreferences>()
-                .HasIndex(entity => entity.UserId)
-                .IsUnique(false);
-
             modelBuilder.Entity<CustomItemDisplayPreferences>()
                 .HasIndex(entity => new { entity.UserId, entity.ItemId, entity.Client, entity.Key })
                 .IsUnique();