From 67c460b83e0edd3448997f495fef32d6ec1f3a3c Mon Sep 17 00:00:00 2001 From: Artur Drobinskiy Date: Thu, 2 Feb 2023 17:42:54 +0700 Subject: [PATCH] 0.8.15 --- src/MccSoft.IntegreSql.EF/MccSoft.IntegreSql.EF.csproj | 2 +- src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/MccSoft.IntegreSql.EF/MccSoft.IntegreSql.EF.csproj b/src/MccSoft.IntegreSql.EF/MccSoft.IntegreSql.EF.csproj index 04a2a5c..6a67ee1 100644 --- a/src/MccSoft.IntegreSql.EF/MccSoft.IntegreSql.EF.csproj +++ b/src/MccSoft.IntegreSql.EF/MccSoft.IntegreSql.EF.csproj @@ -1,7 +1,7 @@  - 0.8.14 + 0.8.15 true MCC Soft OpenIddict extension to support Auth code flow fo built-in ASP.Net identity providers diff --git a/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs b/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs index 783a9ab..8f81b02 100644 --- a/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs +++ b/src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs @@ -157,12 +157,10 @@ await _integreSqlClient.ReturnTestDatabase( public override async Task RemoveDatabase(string connectionString) { - await using var connection = new NpgsqlConnection(connectionString); - string database = connection.Database; - connection.Open(); - connection.ChangeDatabase("postgres"); - var command = new NpgsqlCommand($"DROP DATABASE \"{database}\"", connection); - command.ExecuteNonQuery(); + // Do nothing. + // Old databases will be reused by IntegreSQL automatically. + // Previously we were removing databases here which actually interfere with IntegreSQL. + // It was 'hanging' when tried to reuse the removed databases. } public override void UseProvider(DbContextOptionsBuilder options, string connectionString)