Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

pg: fix updateHistoryQuery.

spinningbotfbf26577ee0f
diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.go
index 1639aae724..76b285bfb2 100644
--- a/plugin/db/pg/pg.go
+++ b/plugin/db/pg/pg.go
@@ -575,12 +575,12 @@ func (driver *Driver) ExecuteMigration(ctx context.Context, m *db.MigrationInfo,
RETURNING id
`
updateHistoryQuery := `
-UPDATE ` +
- `migration_history ` +
- `SET
- ` + "`status` = 'DONE'," + `
- ` + "execution_duration = $1," + `
- ` + "`schema` = $2" + `
+ UPDATE
+ migration_history
+ SET
+ status = 'DONE',
+ execution_duration = $1,
+ "schema" = $2
WHERE id = $3
`