Add PostgreSQL provider and EF Core 10 support

Introduce Jellyfin.Database.Providers.Postgres project, enabling PostgreSQL as a database backend using Entity Framework Core 10 and Npgsql. Add custom value converters and model builder extensions for PostgreSQL compatibility. Update solution-wide dependencies to Microsoft.EntityFrameworkCore 10.0.3 and Npgsql.EntityFrameworkCore.PostgreSQL 9.0.2 (as a temporary workaround until 10.x is released). Regenerate all relevant NuGet, build, and cache files. Add new and updated binaries, debug symbols, and XML documentation for affected projects. No application source code changes outside of the new provider and supporting infrastructure.
This commit is contained in:
2026-02-20 16:52:36 -05:00
parent ae274053a8
commit fd03e1f564
261 changed files with 1678 additions and 107 deletions
@@ -0,0 +1,24 @@
// <copyright file="DateTimeKindValueConverter.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace Jellyfin.Database.Providers.Postgres.ValueConverters;
using System;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
/// <summary>
/// ValueConverter to specify DateTime kind for PostgreSQL.
/// </summary>
public class DateTimeKindValueConverter : ValueConverter<DateTime, DateTime>
{
/// <summary>
/// Initializes a new instance of the <see cref="DateTimeKindValueConverter"/> class.
/// </summary>
/// <param name="kind">The kind to specify.</param>
/// <param name="mappingHints">The mapping hints.</param>
public DateTimeKindValueConverter(DateTimeKind kind, ConverterMappingHints? mappingHints = null)
: base(v => v.ToUniversalTime(), v => DateTime.SpecifyKind(v, kind), mappingHints)
{
}
}