diff options
| author | cvium <clausvium@gmail.com> | 2022-10-28 22:38:59 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2022-10-28 22:38:59 -0400 |
| commit | a64acac7993e2c37d4cb40794df3bc83d4a2e687 (patch) | |
| tree | 7a724dba8fc9833096d9562baadbfddea2704ce8 /Jellyfin.Server.Implementations/ModelConfiguration | |
| parent | f6533e42287e997fd3ef54f6fc690208f51ce438 (diff) | |
Backport pull request #8608 from jellyfin/release-10.8.z
Add index for DateCreated on ActivityLogs
Original-merge: 39b29eb9f1250a025f6a78b451c1a79df39ed5e9
Merged-by: Claus Vium <cvium@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/ActivityLogConfiguration.cs | 17 |
1 files changed, 17 insertions, 0 deletions
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; + +/// <summary> +/// FluentAPI configuration for the ActivityLog entity. +/// </summary> +public class ActivityLogConfiguration : IEntityTypeConfiguration<ActivityLog> +{ + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<ActivityLog> builder) + { + builder.HasIndex(entity => entity.DateCreated); + } +} |
