[PR #5623] [MERGED] EF Core Cleanup 2 #10579

Closed
opened 2026-02-07 06:22:52 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5623
Author: @barronpm
Created: 3/26/2021
Status: Merged
Merged: 5/5/2021
Merged by: @thornbill

Base: masterHead: ef-cleanup2


📝 Commits (10+)

  • 36669ff Use correct setter access modifiers
  • 3ffef57 Delete unnecessary indexes
  • 0a579e5 Configure user deletion behavior
  • f1cadb2 Add id properties for preferences and permissions
  • 3c4187e Add indexes for user permissions and preferences
  • a07ad71 Use NOCASE collation and index on username field
  • ea0a9c2 Properly configure foreign keys
  • daa21c9 Add migration
  • a7b29e2 Clean up user renaming
  • 7364155 Clean up user deletion

📊 Changes

47 files changed (+1061 additions, -278 deletions)

View changed files

📝 Jellyfin.Data/Entities/AccessSchedule.cs (+4 -4)
📝 Jellyfin.Data/Entities/ActivityLog.cs (+3 -4)
📝 Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs (+2 -2)
📝 Jellyfin.Data/Entities/DisplayPreferences.cs (+5 -7)
📝 Jellyfin.Data/Entities/Group.cs (+7 -9)
📝 Jellyfin.Data/Entities/HomeSection.cs (+3 -4)
📝 Jellyfin.Data/Entities/ImageInfo.cs (+4 -4)
📝 Jellyfin.Data/Entities/ItemDisplayPreferences.cs (+2 -2)
📝 Jellyfin.Data/Entities/Libraries/Artwork.cs (+3 -5)
📝 Jellyfin.Data/Entities/Libraries/Book.cs (+3 -5)
📝 Jellyfin.Data/Entities/Libraries/BookMetadata.cs (+2 -4)
📝 Jellyfin.Data/Entities/Libraries/Chapter.cs (+3 -5)
📝 Jellyfin.Data/Entities/Libraries/Collection.cs (+5 -6)
📝 Jellyfin.Data/Entities/Libraries/CollectionItem.cs (+1 -1)
📝 Jellyfin.Data/Entities/Libraries/Company.cs (+7 -9)
📝 Jellyfin.Data/Entities/Libraries/CustomItem.cs (+3 -5)
📝 Jellyfin.Data/Entities/Libraries/Episode.cs (+3 -5)
📝 Jellyfin.Data/Entities/Libraries/Genre.cs (+3 -3)
📝 Jellyfin.Data/Entities/Libraries/ItemMetadata.cs (+15 -22)
📝 Jellyfin.Data/Entities/Libraries/Library.cs (+3 -3)

...and 27 more files

📄 Description

Changes

  • Uses private setters for all collection properties
  • Removes unneeded indexes
  • Adds indexes for permissions and preferences to ensure correctness and speed up queries (No more duplicate permissions)
  • Renames some columns to align with conventions
  • Collates username field and adds unique index for faster queries and to ensure no duplicates.
  • Cleans up hacky renaming and delete logic caused by not having the above

Issues
Fixes #5496


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/5623 **Author:** [@barronpm](https://github.com/barronpm) **Created:** 3/26/2021 **Status:** ✅ Merged **Merged:** 5/5/2021 **Merged by:** [@thornbill](https://github.com/thornbill) **Base:** `master` ← **Head:** `ef-cleanup2` --- ### 📝 Commits (10+) - [`36669ff`](https://github.com/jellyfin/jellyfin/commit/36669ff45146dd8d4dc063b6a6b1d057f2d33464) Use correct setter access modifiers - [`3ffef57`](https://github.com/jellyfin/jellyfin/commit/3ffef5794ea6ddda565d89a58667980f1c3bddc3) Delete unnecessary indexes - [`0a579e5`](https://github.com/jellyfin/jellyfin/commit/0a579e5bbd3c36e15d322ee5d30c8ef3331863bf) Configure user deletion behavior - [`f1cadb2`](https://github.com/jellyfin/jellyfin/commit/f1cadb27d9d6ddbb2d42777e4c546a73bd5bcfe3) Add id properties for preferences and permissions - [`3c4187e`](https://github.com/jellyfin/jellyfin/commit/3c4187e7803afd1d95eac20b30d2063ca2134413) Add indexes for user permissions and preferences - [`a07ad71`](https://github.com/jellyfin/jellyfin/commit/a07ad7122281247a48c1f8a48588f49c6f64f2c4) Use NOCASE collation and index on username field - [`ea0a9c2`](https://github.com/jellyfin/jellyfin/commit/ea0a9c2cca4fd0f6ff84f79420281a7738602e60) Properly configure foreign keys - [`daa21c9`](https://github.com/jellyfin/jellyfin/commit/daa21c9e99a8b7b6e9a76c130f8e0943692bd1da) Add migration - [`a7b29e2`](https://github.com/jellyfin/jellyfin/commit/a7b29e2fe0bb08f4b8f37fa5aac7af66c7cb00e8) Clean up user renaming - [`7364155`](https://github.com/jellyfin/jellyfin/commit/7364155579c52e5019cdcb71edc03546babe3fb3) Clean up user deletion ### 📊 Changes **47 files changed** (+1061 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Data/Entities/AccessSchedule.cs` (+4 -4) 📝 `Jellyfin.Data/Entities/ActivityLog.cs` (+3 -4) 📝 `Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs` (+2 -2) 📝 `Jellyfin.Data/Entities/DisplayPreferences.cs` (+5 -7) 📝 `Jellyfin.Data/Entities/Group.cs` (+7 -9) 📝 `Jellyfin.Data/Entities/HomeSection.cs` (+3 -4) 📝 `Jellyfin.Data/Entities/ImageInfo.cs` (+4 -4) 📝 `Jellyfin.Data/Entities/ItemDisplayPreferences.cs` (+2 -2) 📝 `Jellyfin.Data/Entities/Libraries/Artwork.cs` (+3 -5) 📝 `Jellyfin.Data/Entities/Libraries/Book.cs` (+3 -5) 📝 `Jellyfin.Data/Entities/Libraries/BookMetadata.cs` (+2 -4) 📝 `Jellyfin.Data/Entities/Libraries/Chapter.cs` (+3 -5) 📝 `Jellyfin.Data/Entities/Libraries/Collection.cs` (+5 -6) 📝 `Jellyfin.Data/Entities/Libraries/CollectionItem.cs` (+1 -1) 📝 `Jellyfin.Data/Entities/Libraries/Company.cs` (+7 -9) 📝 `Jellyfin.Data/Entities/Libraries/CustomItem.cs` (+3 -5) 📝 `Jellyfin.Data/Entities/Libraries/Episode.cs` (+3 -5) 📝 `Jellyfin.Data/Entities/Libraries/Genre.cs` (+3 -3) 📝 `Jellyfin.Data/Entities/Libraries/ItemMetadata.cs` (+15 -22) 📝 `Jellyfin.Data/Entities/Libraries/Library.cs` (+3 -3) _...and 27 more files_ </details> ### 📄 Description **Changes** - Uses private setters for all collection properties - Removes unneeded indexes - Adds indexes for permissions and preferences to ensure correctness and speed up queries (No more duplicate permissions) - Renames some columns to align with conventions - Collates username field and adds unique index for faster queries and to ensure no duplicates. - Cleans up hacky renaming and delete logic caused by not having the above **Issues** Fixes #5496 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:22:52 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10579