Skip to content

Commit

Permalink
Update postgres dialect checker
Browse files Browse the repository at this point in the history
This enables the dialect to check for postgres and cloudsql-postgres during container upgrades
  • Loading branch information
ch3ck authored Jan 3, 2024
1 parent 9d803dd commit 5c30592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/sqlstore/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package sqlstore
import (
"database/sql"
"fmt"
"strings"
)

type upgradeFunc func(*sql.Tx, *Container) error
Expand Down Expand Up @@ -250,7 +251,7 @@ func upgradeV2(tx *sql.Tx, container *Container) error {
if err != nil {
return err
}
if container.dialect == "postgres" || container.dialect == "pgx" {
if strings.Contains(container.dialect, "postgres") || container.dialect == "pgx" {
_, err = tx.Exec(fillSigKeyPostgres)
} else {
_, err = tx.Exec(fillSigKeySQLite)
Expand Down

0 comments on commit 5c30592

Please sign in to comment.