From a64acac7993e2c37d4cb40794df3bc83d4a2e687 Mon Sep 17 00:00:00 2001 From: cvium Date: Fri, 28 Oct 2022 22:38:59 -0400 Subject: Backport pull request #8608 from jellyfin/release-10.8.z Add index for DateCreated on ActivityLogs Original-merge: 39b29eb9f1250a025f6a78b451c1a79df39ed5e9 Merged-by: Claus Vium Backported-by: Joshua M. Boniface --- .../ModelConfiguration/ActivityLogConfiguration.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs') diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs new file mode 100644 index 000000000..9a63ed9f2 --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs @@ -0,0 +1,17 @@ +using Jellyfin.Data.Entities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace Jellyfin.Server.Implementations.ModelConfiguration; + +/// +/// FluentAPI configuration for the ActivityLog entity. +/// +public class ActivityLogConfiguration : IEntityTypeConfiguration +{ + /// + public void Configure(EntityTypeBuilder builder) + { + builder.HasIndex(entity => entity.DateCreated); + } +} -- cgit v1.2.3