Skip to content

Commit 6be9073

Browse files
committed
fix: fallback to postgres db if no database was specified
1 parent dad50f5 commit 6be9073

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/database/postgresql.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ func NewPostgreSQLRepository(ctx context.Context, opts PostgreSQLOptions) (*Post
3737
return nil, err
3838
}
3939

40+
if popt.Path == "" {
41+
popt.Path = "postgres"
42+
}
43+
4044
popt.User = url.UserPassword(opts.Username, opts.Password)
4145

4246
if opts.DatabaseName != "" {

0 commit comments

Comments
 (0)