Commit Graph

198 Commits

Author SHA1 Message Date
wjones 1b68e1dc0a Update database schema and indices for improved performance and compatibility 2026-07-09 15:54:00 -04:00
wjones 8aaafdbcab Merge branch 'development' of https://gitea.wpjones.com/wjones/pgsql-jellyfin into development 2026-07-09 15:31:07 -04:00
wjones dd5c932bf6 Enhance PostgreSQL diagnostics script with improved connection pool status and query formatting 2026-07-09 15:30:57 -04:00
wjones 9081491974 Implement merge-based concurrency conflict resolution in DbContext 2026-07-09 17:16:32 +00:00
wjones b04c6c23f7 Update Postgres connection string in design-time factory for testing environment 2026-07-09 16:49:52 +00:00
wjones 0f5015bc63 Add concurrency token to UserData and enhance retry logic for DbUpdateConcurrencyException handling 2026-07-09 16:18:14 +00:00
wjones e80dbd757b Implement N+1 query optimization and response caching strategies
- Added QUERY_PATH_MAP.md to document query execution paths and analysis.
- Created QUICK_START.md for a quick guide on N+1 optimization implementation.
- Introduced RESPONSE_CACHING_STRATEGY.md outlining caching strategies for API endpoints.
- Developed TECHNICAL_REFERENCE.md detailing changes made in DtoService.cs for N+1 optimization.
- Optimized item counts retrieval by batching queries, reducing database load significantly.
- Implemented caching for child counts to minimize repeated database queries.
- Enhanced performance metrics showing substantial improvements in query counts and page load times.
2026-07-09 15:58:33 +00:00
wjones 9ccf94f10f Remove legacy startup configuration files and web assets
- Deleted startup.json, startup.json.linux, and startup.json.windows files to streamline configuration management.
- Removed web.config file as part of the cleanup process.
- Deleted jellyfin.svg and its compressed versions from the API documentation.
- Removed custom CSS files for ReDoc and Swagger documentation, including their compressed versions.
2026-07-09 15:44:10 +00:00
wjones 6f4f3d0eb9 Update .gitignore to include logs directory and change logging level for Microsoft.EntityFrameworkCore.Database.Command to Warning 2026-07-09 14:00:51 +00:00
wjones 7dd56db96e Update logging level for Microsoft.EntityFrameworkCore.Database.Command to Information 2026-07-09 08:27:56 -04:00
wjones df035a069d fix logging 2026-07-08 15:44:42 -04:00
wjones 4e6bf45701 Update logging configuration to set Microsoft.EntityFrameworkCore.Database.Command level to Error 2026-07-08 15:17:19 -04:00
wjones 2415f288f7 Refactor rebuild process and enhance service management in rebuild-solution.sh 2026-07-08 14:45:49 -04:00
wjones 94e46a04a7 remove publish test directories and update weekly monitoring script 2026-07-08 14:22:22 -04:00
wjones 0535515b11 Update Microsoft.Extensions.DependencyModel version and adjust project file references 2026-07-08 14:06:04 -04:00
wjones 401c24f599 Update package reference for Microsoft.Extensions.DependencyModel and modify restore command for Linux 2026-07-08 14:04:07 -04:00
wjones 41e737f3ec commit 2026-07-08 13:46:27 -04:00
wjones aca106bfe9 correct Unhandled exception. System.IO.FileNotFoundException: Could not find file '/opt/jellyfin/ServerSetupApp/index.mstemplate.html'. 2026-07-08 13:28:06 -04:00
wjones 72081ca13d commit changes to project file 2026-07-08 13:13:46 -04:00
wjones 9c9ad0f88e update projec t file to include wwwroot in publish output 2026-07-08 12:51:11 -04:00
wjones 90fb90d0be Add files for web ui 2026-07-08 12:44:58 -04:00
wjones 7a9981b872 feat: disable default content items in project file 2026-07-08 12:35:11 -04:00
wjones 2ba6c44ae8 fix: comment out unused custom.css references in project file 2026-07-08 12:32:40 -04:00
wjones 31d8aa1fc4 feat: include wwwroot content in output directory for preservation 2026-07-08 12:29:25 -04:00
wjones d6cd89ecd0 feat: add directory checks for log and config directories in rebuild script 2026-07-08 12:14:47 -04:00
wjones dce22a558f fix: remove unnecessary blank line before error logging in PostgresDatabaseProvider 2026-07-08 12:00:50 -04:00
wjones 1abf61a05f Add PostgresSubprocessException and refactor database initialization logic
- Introduced PostgresSubprocessException to handle errors during PostgreSQL subprocess execution.
- Refactored PostgresDatabaseProvider to improve schema initialization script discovery.
- Enhanced error handling for psql command execution, including logging of output and errors.
- Implemented methods to find the schema initialization script and the psql executable path.
2026-07-08 11:53:36 -04:00
wjones 4f651fc239 feat: enhance logging configuration with async file logging for SQL commands 2026-07-07 17:26:23 -04:00
wjones 421a8cc092 fix: implement exponential backoff strategy for concurrency exceptions in SaveChangesAsync 2026-07-07 11:31:47 -04:00
wjones 9bcb8501ab Add scripts for PostgreSQL migration and SQLite removal; update project references
- Introduced `publish-with-sql.ps1` to publish Jellyfin with SQL files.
- Added `remove-sqlite.ps1` to facilitate the removal of SQLite dependencies for PostgreSQL-only deployment.
- Created `rollback-to-net10.ps1` to revert .NET 11 changes back to .NET 10.
- Implemented `test_api.py` for testing API interactions.
- Added `verify-migration.ps1` to verify PostgreSQL migration steps.
- Updated various `.csproj` files to include `Microsoft.Kiota.Abstractions` package.
- Enhanced `JellyfinDbContext` to handle concurrency exceptions during save operations.
- Updated tests to include new package references and ensure compatibility with changes.
2026-07-07 10:59:40 -04:00
wjones bf51bff748 feat: add conditional VACUUM ANALYZE support with thresholds to performance monitor script 2026-07-07 09:28:41 -04:00
wjones 8d3f014b29 fix: remove duplicate description for VACUUM ANALYZE in performance report script 2026-07-07 09:02:51 -04:00
wjones e7c8d202cc Merge branch 'main' of https://gitea.wpjones.com/wjones/pgsql-jellyfin 2026-07-07 09:02:38 -04:00
wjones c5c5937978 Update .gitignore and remove old weekly report files; enhance performance monitor script with VACUUM ANALYZE option 2026-07-07 08:58:53 -04:00
wjones 96150a54e3 Merge pull request 'feat: add conditional VACUUM ANALYZE support to weekly monitoring scripts' (#8) from wpjonesnh-dead-tuple-vacuum into main
Reviewed-on: #8
2026-07-07 08:34:19 -04:00
wjones aa0ad68251 Merge pull request 'Development' (#7) from development into main
Reviewed-on: #7
2026-07-07 08:33:47 -04:00
wjones 81f8a702de feat: add conditional VACUUM ANALYZE support to weekly monitoring scripts 2026-07-07 08:31:33 -04:00
wjones b475a8264a feat: add PostgresPeriodicTuner for periodic database maintenance and optimize NoWarn settings 2026-07-07 08:29:35 -04:00
wjones 4a408dc625 Use execution strategy in UpdateInheritedValues
Refactored BaseItemRepository.UpdateInheritedValues to execute its transaction logic within the database execution strategy, improving resilience against transient database errors.
2026-06-10 12:09:55 -04:00
wjones b2d7513cf2 updating sql file for database creation
updating sql file for database creation
2026-05-11 14:45:48 -04:00
wjones 315b7e0bd0 fix: ensure UTC date handling for Live TV extras in database insert 2026-05-04 13:57:32 -04:00
wjones 4ccd84342b feat: implement migration tracking and history management for PostgreSQL 2026-05-04 12:47:12 -04:00
wjones e67c191843 Add comprehensive documentation for PostgreSQL schema conversion
- Introduced DATABASE_SCHEMA_MISMATCH_REPORT.md to detail critical mismatches between SQL schema and C# code configurations, highlighting issues with naming conventions and potential runtime failures.
- Created SCHEMA_COLUMN_CONVERSION_REFERENCE.md to provide a reference for column name conversions from PascalCase to snake_case across all tables.
- Developed SCHEMA_CONVERSION_GUIDE.md outlining the conversion strategy for the SQL schema, including authoritative table mappings, column naming rules, and a validation checklist to ensure accuracy in the conversion process.
2026-05-04 10:16:17 -04:00
wjones 3e5d29225a Refactor SQLite Database Provider
- Removed unused classes and files related to SQLite database provider, including SqliteDesignTimeJellyfinDbFactory, ModelBuilderExtensions, PragmaConnectionInterceptor, AssemblyInfo, SqliteDatabaseProvider, DateTimeKindValueConverter.
- Updated tests to remove dependencies on removed classes and adjusted mocking for configuration sections.
- Added Microsoft.EntityFrameworkCore.Sqlite package reference to test project.
- Improved string handling in tests for better consistency and clarity.
- Refactored logging methods in JellyfinApplicationFactory for better readability and maintainability.
2026-05-03 09:39:00 -04:00
wjones e1f7a4bee9 Refactor database configuration and migrations for PostgreSQL support
- Updated default database configuration to use PostgreSQL instead of SQLite when no database.xml exists.
- Removed obsolete migration routines: MigrateUserDb, RemoveDuplicateExtras, ReseedFolderFlag.
- Introduced new read-only view projections for PostgreSQL: ItemPersonView, ItemProviderView, LibrarySummaryView, MediaStreamInfoView, UserPlaybackHistoryView, VideoItemView.
- Registered view mappings in PostgresDatabaseProvider to ensure proper handling of read-only views.
- Cleaned up unused SQLite cache size configuration in ConfigurationExtensions.

Co-authored-by: Copilot <copilot@github.com>
2026-04-30 18:47:48 -04:00
wjones 9fc10226c9 feat: implement migration to split MediaStreamInfos into AudioStreamDetails and VideoStreamDetails 2026-04-30 17:48:49 -04:00
wjones 372d97885f Merge pull request 'Add JSON config, DB-backed library options, and docs' (#6) from development into main
Reviewed-on: #6
2026-04-30 19:58:25 +00:00
wjones 57d6342524 Optimize PostgreSQL dead tuple handling for media scans
Introduce bulk operation extensions and transaction helpers for efficient, batched EF Core operations. Refactor MediaStreamInfo schema by splitting audio/video details into dedicated tables, reducing table bloat and improving update performance. Add migration for data movement and schema changes. Update EF Core models and context for new structure. Enhance PostgreSQL provider configuration and add comprehensive documentation and monitoring guides. Includes minor middleware and code cleanups.
2026-04-30 15:52:37 -04:00
wjones 6d5282208b Merge branch 'development' of https://gitea.wpjones.com/wjones/pgsql-jellyfin into development 2026-04-30 13:28:18 -04:00
wjones f246d2ad39 update create database schema sql file 2026-04-30 13:28:09 -04:00