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>
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
// <copyright file="LibrarySummaryView.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace Jellyfin.Database.Implementations.Entities.Views;
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable SA1600
|
||||
|
||||
/// <summary>
|
||||
/// Read-only projection of the library."LibrarySummary_v" view.
|
||||
/// One row per item type with aggregate statistics across the whole library.
|
||||
/// </summary>
|
||||
public class LibrarySummaryView
|
||||
{
|
||||
public string? Type { get; set; }
|
||||
public long? ItemCount { get; set; }
|
||||
public long? WithYear { get; set; }
|
||||
public int? OldestYear { get; set; }
|
||||
public int? NewestYear { get; set; }
|
||||
public decimal? AvgCommunityRating { get; set; }
|
||||
public decimal? TotalRunTimeTicks { get; set; }
|
||||
public decimal? TotalRuntimeHours { get; set; }
|
||||
public decimal? TotalSizeBytes { get; set; }
|
||||
public decimal? TotalSizeGB { get; set; }
|
||||
public long? Count4K { get; set; }
|
||||
public long? Count1080p { get; set; }
|
||||
public long? Count720p { get; set; }
|
||||
public long? CountSD { get; set; }
|
||||
public long? CountDolbyVision { get; set; }
|
||||
public long? CountHDR10Plus { get; set; }
|
||||
public long? CountHDR10 { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user