[PR #13589] [MERGED] [Feature] Database code refactor #13635

Closed
opened 2026-02-07 07:16:29 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/13589
Author: @JPVenson
Created: 2/19/2025
Status: Merged
Merged: 3/26/2025
Merged by: @crobibero

Base: masterHead: feature/DatabaseRefactor


📝 Commits (10+)

  • aa811eb Prepared Seperation of Database components for future multi provider support
  • 9d1c4ea Fixed DbContext usage on Provider
  • 844646e Fixed migration runner and added docs for adding migrations
  • 433640d Added pgsql support for jellyfin 🎉
  • ce00bc0 Fixed postgres sql provider
  • 4ce0d49 Added pgsql devcontainer
  • 7485804 Added devcontainer for pgsql development
  • d07e1a1 Fixed collation settings
  • 379a104 Changed UserName to non-deterministic field
  • ebe89c0 Fixed collation and pgsql container

📊 Changes

390 files changed (+3646 additions, -1548 deletions)

View changed files

📝 .devcontainer/devcontainer.json (+6 -2)
.vscode/settings.json (+3 -0)
📝 Emby.Server.Implementations/ApplicationHost.cs (+8 -3)
📝 Emby.Server.Implementations/Collections/CollectionManager.cs (+1 -1)
📝 Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs (+1 -1)
📝 Emby.Server.Implementations/Dto/DtoService.cs (+1 -1)
📝 Emby.Server.Implementations/Emby.Server.Implementations.csproj (+1 -0)
📝 Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs (+1 -1)
📝 Emby.Server.Implementations/HttpServer/Security/AuthService.cs (+2 -1)
📝 Emby.Server.Implementations/Images/BaseFolderImageProvider.cs (+1 -0)
📝 Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs (+1 -0)
📝 Emby.Server.Implementations/Images/GenreImageProvider.cs (+1 -0)
📝 Emby.Server.Implementations/Images/MusicGenreImageProvider.cs (+1 -0)
📝 Emby.Server.Implementations/Library/LibraryManager.cs (+3 -1)
📝 Emby.Server.Implementations/Library/MediaSourceManager.cs (+3 -1)
📝 Emby.Server.Implementations/Library/MediaStreamSelector.cs (+1 -1)
📝 Emby.Server.Implementations/Library/MusicManager.cs (+2 -1)
📝 Emby.Server.Implementations/Library/SearchEngine.cs (+2 -1)
📝 Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs (+1 -0)
📝 Emby.Server.Implementations/Library/UserDataManager.cs (+2 -2)

...and 80 more files

📄 Description

Refactors code architecture for database usage.

Changes:

Moved database related code to own Project
Refactored User entity to not use collation for username for compataibility reasons
Refactored user and role entities to no longer implement buissniss logic
Added SqLite adapter
Added optional database.xml configuration file
Added document for explaining migration path

This PR supersedes the groundwork done for #13451


🔄 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/13589 **Author:** [@JPVenson](https://github.com/JPVenson) **Created:** 2/19/2025 **Status:** ✅ Merged **Merged:** 3/26/2025 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `master` ← **Head:** `feature/DatabaseRefactor` --- ### 📝 Commits (10+) - [`aa811eb`](https://github.com/jellyfin/jellyfin/commit/aa811eb1e3c78bdf8f4a751311c1bb6d639e851e) Prepared Seperation of Database components for future multi provider support - [`9d1c4ea`](https://github.com/jellyfin/jellyfin/commit/9d1c4ea169a15d580923aefb0ec43c2b6be5b3a6) Fixed DbContext usage on Provider - [`844646e`](https://github.com/jellyfin/jellyfin/commit/844646e2fe6d726edc8e086cc465396303d24f29) Fixed migration runner and added docs for adding migrations - [`433640d`](https://github.com/jellyfin/jellyfin/commit/433640d98534667602bfaac08ce7cdb600a8377b) Added pgsql support for jellyfin 🎉 - [`ce00bc0`](https://github.com/jellyfin/jellyfin/commit/ce00bc076e9a97197e7e7e83276013518ce84ec5) Fixed postgres sql provider - [`4ce0d49`](https://github.com/jellyfin/jellyfin/commit/4ce0d498abe1c52f92805a2cb04cbcfe3218817e) Added pgsql devcontainer - [`7485804`](https://github.com/jellyfin/jellyfin/commit/74858042fce56eeb7af5cf991569fee0dca50775) Added devcontainer for pgsql development - [`d07e1a1`](https://github.com/jellyfin/jellyfin/commit/d07e1a13b315fe6ebccf5c89cacf1c8a94b13a5f) Fixed collation settings - [`379a104`](https://github.com/jellyfin/jellyfin/commit/379a104cfbeaf3c3db5988865aa2db67875a76f1) Changed UserName to non-deterministic field - [`ebe89c0`](https://github.com/jellyfin/jellyfin/commit/ebe89c07b39702a3b8205d2070d95a5f79d3b1d2) Fixed collation and pgsql container ### 📊 Changes **390 files changed** (+3646 additions, -1548 deletions) <details> <summary>View changed files</summary> 📝 `.devcontainer/devcontainer.json` (+6 -2) ➕ `.vscode/settings.json` (+3 -0) 📝 `Emby.Server.Implementations/ApplicationHost.cs` (+8 -3) 📝 `Emby.Server.Implementations/Collections/CollectionManager.cs` (+1 -1) 📝 `Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs` (+1 -1) 📝 `Emby.Server.Implementations/Dto/DtoService.cs` (+1 -1) 📝 `Emby.Server.Implementations/Emby.Server.Implementations.csproj` (+1 -0) 📝 `Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs` (+1 -1) 📝 `Emby.Server.Implementations/HttpServer/Security/AuthService.cs` (+2 -1) 📝 `Emby.Server.Implementations/Images/BaseFolderImageProvider.cs` (+1 -0) 📝 `Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs` (+1 -0) 📝 `Emby.Server.Implementations/Images/GenreImageProvider.cs` (+1 -0) 📝 `Emby.Server.Implementations/Images/MusicGenreImageProvider.cs` (+1 -0) 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+3 -1) 📝 `Emby.Server.Implementations/Library/MediaSourceManager.cs` (+3 -1) 📝 `Emby.Server.Implementations/Library/MediaStreamSelector.cs` (+1 -1) 📝 `Emby.Server.Implementations/Library/MusicManager.cs` (+2 -1) 📝 `Emby.Server.Implementations/Library/SearchEngine.cs` (+2 -1) 📝 `Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs` (+1 -0) 📝 `Emby.Server.Implementations/Library/UserDataManager.cs` (+2 -2) _...and 80 more files_ </details> ### 📄 Description Refactors code architecture for database usage. Changes: Moved database related code to own Project Refactored User entity to not use collation for username for compataibility reasons Refactored user and role entities to no longer implement buissniss logic Added SqLite adapter Added optional database.xml configuration file Added document for explaining migration path This PR supersedes the groundwork done for #13451 --- <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 07:16:29 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13635