aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/JellyfinDb.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-05-20 23:56:59 -0400
committerPatrick Barron <barronpm@gmail.com>2021-05-20 23:56:59 -0400
commita0c6f7276211ac0429877fafa400368aba1430a9 (patch)
tree498d9caa19eefdf9fd93fdb181535facde652417 /Jellyfin.Server.Implementations/JellyfinDb.cs
parentb03f2353d8bb023e659e735e12bd6230f07ca19c (diff)
Migrate authentication db to EF Core
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();