The Free Software Media System - Server Backend & API
Add device indexes
Patrick Barron98e19c9fd34c
diff --git a/Jellyfin.Server.Implementations/JellyfinDb.cs b/Jellyfin.Server.Implementations/JellyfinDb.csindex 32a857047c..059e884e5f 100644--- a/Jellyfin.Server.Implementations/JellyfinDb.cs+++ b/Jellyfin.Server.Implementations/JellyfinDb.cs@@ -211,6 +211,13 @@ namespace Jellyfin.Server.Implementations.HasIndex(entity => entity.Username).IsUnique();+ modelBuilder.Entity<Device>()+ .HasIndex(entity => new { entity.DeviceId, entity.DateLastActivity });++ modelBuilder.Entity<DeviceOptions>()+ .HasIndex(entity => entity.DeviceId)+ .IsUnique();+modelBuilder.Entity<DisplayPreferences>().HasIndex(entity => new { entity.UserId, entity.ItemId, entity.Client }).IsUnique();