feat: Adding postgres support to ombi (beta) (#5050)

This commit is contained in:
David Benson 2024-07-11 04:40:43 -04:00 committed by GitHub
parent 8ff7d9995d
commit f8c61027bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 5660 additions and 12 deletions

View file

@ -0,0 +1,17 @@
using System;
using System.Runtime.CompilerServices;
namespace Ombi.Store.Context.Postgres;
public static class PostgresModuleInitializer
{
#pragma warning disable CA2255
// This is required to ensure that Npgsql uses a timestamp behavior that does not require a timezone
// Reference: https://stackoverflow.com/a/73586129
[ModuleInitializer]
#pragma warning restore CA2255
public static void Initialize()
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}
}