Skip to content

Commit

Permalink
0.8.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaddix committed Feb 2, 2023
1 parent 0821a84 commit 67c460b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/MccSoft.IntegreSql.EF/MccSoft.IntegreSql.EF.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>0.8.14</Version>
<Version>0.8.15</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>MCC Soft</Authors>
<Description>OpenIddict extension to support Auth code flow fo built-in ASP.Net identity providers</Description>
Expand Down
10 changes: 4 additions & 6 deletions src/MccSoft.IntegreSql.EF/NpgsqlDatabaseInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 67c460b

Please sign in to comment.