aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration
diff options
context:
space:
mode:
authorShadowghost <Shadowghost@users.noreply.github.com>2026-10-05 19:19:04 -0400
committerCody Robibero <cody@robibe.ro>2026-10-05 19:19:04 -0400
commit9c28aab413756ae7b61e6b9ad8e6d89d14e55a38 (patch)
treebc5cecf0932544c77c26d43afc777c84f116c10b /src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration
parenta6cc1c196c08a0009898a14adcb38390ec948825 (diff)
Backport pull request #18276 from jellyfin/release-12.z
Make the OwnerId and ExtraType/OwnerId indexes partial so extras lookups keep using them Original-merge: 7cf12e5fb9f2a6bae7cb4196d4bb796ccf79fb0f Merged-by: crobibero <cody@robibe.ro> Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration')
-rw-r--r--src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs
index ee36be035b..9e846056ac 100644
--- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs
+++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/BaseItemConfiguration.cs
@@ -35,9 +35,11 @@ public class BaseItemConfiguration : IEntityTypeConfiguration<BaseItemEntity>
builder.HasIndex(e => e.Path);
builder.HasIndex(e => e.ParentId);
- builder.HasIndex(e => e.OwnerId);
+ builder.HasIndex(e => e.OwnerId)
+ .HasFilter("\"OwnerId\" IS NOT NULL");
builder.HasIndex(e => e.Name);
- builder.HasIndex(e => new { e.ExtraType, e.OwnerId });
+ builder.HasIndex(e => new { e.ExtraType, e.OwnerId })
+ .HasFilter("\"ExtraType\" IS NOT NULL");
builder.HasIndex(e => e.PresentationUniqueKey);
// covering index
builder.HasIndex(e => new { e.TopParentId, e.Id });