diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-04-10 16:16:08 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-04-10 16:16:08 -0400 |
| commit | 98e19c9fd34c831cce445a5d4aa0a7f277f16237 (patch) | |
| tree | 48e66b34db49902d7264f482ad59f19b8273fab1 /Jellyfin.Server.Implementations/JellyfinDb.cs | |
| parent | e6f1ffdc8d2d430cbe4ac1d797e455950bb79ed3 (diff) | |
Add device indexes
Diffstat (limited to 'Jellyfin.Server.Implementations/JellyfinDb.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/JellyfinDb.cs | 7 |
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(); |
