Skip to content

Commit

Permalink
🐛 (postgres): Add support for POSTGRES_DATABASE env
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 31, 2023
1 parent 4fe7d03 commit eb57de7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/database/dialect/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (Postgres) DefaultPort() uint16 {
}

func (Postgres) DatabaseEnvNames() []string {
return []string{"POSTGRES_DB"}
return []string{"POSTGRES_DATABASE", "POSTGRES_DB"}
}

func (Postgres) ListDatabasesQuery() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/database/dialect/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestPostgres_DatabaseEnvNames(t *testing.T) {
name string
want []string
}{
{"default", []string{"POSTGRES_DB"}},
{"default", []string{"POSTGRES_DATABASE", "POSTGRES_DB"}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit eb57de7

Please sign in to comment.