aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jellyfin.Server.Implementations/JellyfinDb.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/JellyfinDb.cs b/Jellyfin.Server.Implementations/JellyfinDb.cs
index 32a857047..059e884e5 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();