Skip to content

Commit

Permalink
fix: redshift driver issue (#567)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Fridman <[email protected]>
  • Loading branch information
vpetrosian and mfridman authored Dec 15, 2023
1 parent 90a4f4f commit 6e43ae9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/goose/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func main() {
case "sqlite3":
// Internally uses the CGo-free port of SQLite: modernc.org/sqlite
driver = "sqlite"
case "postgres":
case "postgres", "redshift":
driver = "pgx"
}
db, err := goose.OpenDBWithDriver(driver, normalizeDBString(driver, dbstring, *certfile, *sslcert, *sslkey))
Expand Down
2 changes: 0 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ func OpenDBWithDriver(driver string, dbstring string) (*sql.DB, error) {
switch driver {
case "mssql":
driver = "sqlserver"
case "redshift":
driver = "postgres"
case "tidb":
driver = "mysql"
}
Expand Down

0 comments on commit 6e43ae9

Please sign in to comment.