Skip to content

Commit

Permalink
[1.13] fix: create table for migration only if not exists (#3356) (#3357
Browse files Browse the repository at this point in the history
)

Signed-off-by: Samantha Coyle <[email protected]>
Co-authored-by: Sam <[email protected]>
  • Loading branch information
yaron2 and sicoyle authored Feb 21, 2024
1 parent dd4db99 commit cda5cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion state/postgresql/v2/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (p *PostgreSQL) performMigrations(ctx context.Context) error {
p.logger.Infof("Creating state table: '%s'", stateTable)
_, err := p.db.Exec(ctx,
fmt.Sprintf(`
CREATE TABLE %[1]s (
CREATE TABLE IF NOT EXISTS %[1]s (
key text NOT NULL PRIMARY KEY,
value bytea NOT NULL,
etag uuid NOT NULL DEFAULT gen_random_uuid(),
Expand Down

0 comments on commit cda5cac

Please sign in to comment.