Path: redb/redb.Tests.Integration/Tests/Postgres/PostgresSchemaMissingTests.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Tests/Postgres/PostgresSchemaMissingTests.cs ---- using Npgsql; using redb.Core.Extensions; using redb.Postgres.Data; using redb.Postgres.Extensions; using redb.Tests.Integration.Tests.Base; namespace redb.Tests.Integration.Tests.Postgres; public class PostgresSchemaMissingTests : SchemaMissingTestsBase { private readonly string _name = $"redb_probe_empty_{Guid.NewGuid():N}"[..40]; protected override async Task CreateEmptyDatabaseAsync() { await using var admin = new NpgsqlRedbConnection(ConnString("Postgres")); await admin.ExecuteAsync($"CREATE DATABASE \"{_name}\""); return new NpgsqlConnectionStringBuilder(ConnString("Postgres")) { Database = _name }.ConnectionString; } protected override async Task DropDatabaseAsync(string connectionString) { NpgsqlConnection.ClearPool(new NpgsqlConnection(connectionString)); await using var admin = new NpgsqlRedbConnection(ConnString("Postgres")); await admin.ExecuteAsync($"DROP DATABASE IF EXISTS \"{_name}\" WITH (FORCE)"); } protected override void UseProvider(RedbOptionsBuilder options, string connectionString) => options.UsePostgres(connectionString); }