Skip to content

Commit

Permalink
Merge pull request #103 from pborzenkov/fix-migration-db-with-hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
lubien authored Apr 19, 2023
2 parents a3c883f + e287736 commit b4b1d16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/flypg/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func SetReadonly(ctx context.Context, pg *pgx.Conn, enable bool) error {
continue
}

sql := fmt.Sprintf("ALTER DATABASE %s SET default_transaction_read_only=%v;", db.Name, enable)
sql := fmt.Sprintf("ALTER DATABASE %q SET default_transaction_read_only=%v;", db.Name, enable)
if _, err = pg.Exec(ctx, sql); err != nil {
return fmt.Errorf("failed to alter readonly state on db %s: %s", db.Name, err)
}
Expand Down

0 comments on commit b4b1d16

Please sign in to comment.