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:
@@ -68,11 +68,6 @@ namespace MediaBrowser.Controller.Extensions
|
||||
/// </summary>
|
||||
public const string UnixSocketPermissionsKey = "kestrel:socketPermissions";
|
||||
|
||||
/// <summary>
|
||||
/// The cache size of the SQL database, see cache_size.
|
||||
/// </summary>
|
||||
public const string SqliteCacheSizeKey = "sqlite:cacheSize";
|
||||
|
||||
/// <summary>
|
||||
/// The key for a setting that indicates whether the application should detect network status change.
|
||||
/// </summary>
|
||||
@@ -143,12 +138,5 @@ namespace MediaBrowser.Controller.Extensions
|
||||
public static string? GetUnixSocketPermissions(this IConfiguration configuration)
|
||||
=> configuration[UnixSocketPermissionsKey];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the cache_size from the <see cref="IConfiguration" />.
|
||||
/// </summary>
|
||||
/// <param name="configuration">The configuration to read the setting from.</param>
|
||||
/// <returns>The sqlite cache size.</returns>
|
||||
public static int? GetSqliteCacheSize(this IConfiguration configuration)
|
||||
=> configuration.GetValue<int?>(SqliteCacheSizeKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user