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:
@ -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>();
|
||||
|
Reference in New Issue
Block a user