瀏覽代碼

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();