1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

Bitwarden Unified Self-Host project (#2410)

This commit is contained in:
Vince Grassia
2022-11-18 14:39:01 -05:00
committed by GitHub
parent 3481fd76c1
commit 194dfe7e14
57 changed files with 1929 additions and 323 deletions

View File

@ -22,13 +22,14 @@ public static class EntityFrameworkServiceCollectionExtensions
{
if (provider == SupportedDatabaseProviders.Postgres)
{
options.UseNpgsql(connectionString);
options.UseNpgsql(connectionString, b => b.MigrationsAssembly("PostgresMigrations"));
// Handle NpgSql Legacy Support for `timestamp without timezone` issue
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}
else if (provider == SupportedDatabaseProviders.MySql)
{
options.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
options.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString),
b => b.MigrationsAssembly("MySqlMigrations"));
}
});
services.AddSingleton<ICipherRepository, CipherRepository>();