aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/JellyfinDb.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Server.Implementations/JellyfinDb.cs')
-rw-r--r--Jellyfin.Server.Implementations/JellyfinDb.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/JellyfinDb.cs b/Jellyfin.Server.Implementations/JellyfinDb.cs
index 059e884e5..6f35a2c1c 100644
--- a/Jellyfin.Server.Implementations/JellyfinDb.cs
+++ b/Jellyfin.Server.Implementations/JellyfinDb.cs
@@ -214,6 +214,15 @@ namespace Jellyfin.Server.Implementations
modelBuilder.Entity<Device>()
.HasIndex(entity => new { entity.DeviceId, entity.DateLastActivity });
+ modelBuilder.Entity<Device>()
+ .HasIndex(entity => new { entity.AccessToken, entity.DateLastActivity });
+
+ modelBuilder.Entity<Device>()
+ .HasIndex(entity => new { entity.UserId, entity.DeviceId });
+
+ modelBuilder.Entity<Device>()
+ .HasIndex(entity => entity.DeviceId);
+
modelBuilder.Entity<DeviceOptions>()
.HasIndex(entity => entity.DeviceId)
.IsUnique();