Skip to content

Commit b4b1d16

Browse files
authored
Merge pull request #103 from pborzenkov/fix-migration-db-with-hyphens
2 parents a3c883f + e287736 commit b4b1d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/flypg/admin/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func SetReadonly(ctx context.Context, pg *pgx.Conn, enable bool) error {
297297
continue
298298
}
299299

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

0 commit comments

Comments
 (0)