Skip to content

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

pg: fix query in insertHistoryQuery.

spinningbotf12f958ff029
diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.go
index fc03124560..928a21f287 100644
--- a/plugin/db/pg/pg.go
+++ b/plugin/db/pg/pg.go
@@ -560,18 +560,18 @@ func (driver *Driver) ExecuteMigration(ctx context.Context, m *db.MigrationInfo,
updated_ts,
namespace,
sequence,
- ` + "`engine`," + `
- ` + "`type`," + `
- ` + "`status`," + `
+ engine,
+ type,
+ status,
version,
description,
statement,
- ` + "`schema`," + `
+ ` + `"schema",` + `
execution_duration,
issue_id,
payload
)
- VALUES ($1, EXTRACT(epoch from NOW()), $2, EXTRACT(epoch from NOW()), $3, $4, $5, %6, 'PENDING', $7, $8, $9, $10, 0, $11, $12)
+ VALUES ($1, EXTRACT(epoch from NOW()), $2, EXTRACT(epoch from NOW()), $3, $4, $5, $6, 'PENDING', $7, $8, $9, $10, 0, $11, $12)
`
updateHistoryQuery := `
UPDATE ` +
diff --git a/plugin/db/util/driverutil.go b/plugin/db/util/driverutil.go
index aeb06b5603..54a30d69c3 100644
--- a/plugin/db/util/driverutil.go
+++ b/plugin/db/util/driverutil.go
@@ -330,7 +330,7 @@ func FindMigrationHistoryList(ctx context.Context, dbType db.Type, driver db.Dri
version,
description,
statement,
- ` + "`schema`," + `
+ ` + `"schema",` + `
execution_duration,
issue_id,
payload