Skip to content

Commit 1133966

Browse files
fix(#26): avoid NullReferenceException when creating database
1 parent 5fb1a06 commit 1133966

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dbup-postgresql/PostgresqlExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ public static void PostgresqlDatabase(this SupportedDatabasesForEnsureDatabase s
147147
/// <returns></returns>
148148
public static void PostgresqlDatabase(this SupportedDatabasesForEnsureDatabase supported, string connectionString, IUpgradeLog logger)
149149
{
150-
PostgresqlDatabase(supported, connectionString, logger, (PostgresqlConnectionOptions)null);
150+
PostgresqlDatabase(supported, connectionString, logger, new PostgresqlConnectionOptions());
151151
}
152-
153-
private static void PostgresqlDatabase(this SupportedDatabasesForEnsureDatabase supported, string connectionString, IUpgradeLog logger, X509Certificate2 certificate)
152+
153+
public static void PostgresqlDatabase(this SupportedDatabasesForEnsureDatabase supported, string connectionString, IUpgradeLog logger, X509Certificate2 certificate)
154154
{
155155
var options = new PostgresqlConnectionOptions
156156
{
@@ -159,7 +159,7 @@ private static void PostgresqlDatabase(this SupportedDatabasesForEnsureDatabase
159159
PostgresqlDatabase(supported, connectionString, logger, options);
160160
}
161161

162-
private static void PostgresqlDatabase(
162+
public static void PostgresqlDatabase(
163163
this SupportedDatabasesForEnsureDatabase supported,
164164
string connectionString,
165165
IUpgradeLog logger,

0 commit comments

Comments
 (0)