Skip to content

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

chore: reference c (#15144)

Danny Xuf116ac9ba2e5
diff --git a/backend/migrator/migrator.go b/backend/migrator/migrator.go
index 90629f5dde..c5341ca031 100644
--- a/backend/migrator/migrator.go
+++ b/backend/migrator/migrator.go
@@ -54,7 +54,7 @@ func MigrateSchema(ctx context.Context, storeDB *store.DB, storeInstance *store.
return nil, err
}
var c int
- err = metadataDriver.GetDB().QueryRowContext(ctx, "SELECT count(1) FROM instance_change_history WHERE database_id IS NOT NULL").Scan(c)
+ err = metadataDriver.GetDB().QueryRowContext(ctx, "SELECT count(1) FROM instance_change_history WHERE database_id IS NOT NULL").Scan(&c)
if err != nil && c > 0 {
return nil, errors.Errorf("Must upgrade to Bytebase 3.3.1 first")
}
diff --git a/backend/store/external_approval.go b/backend/store/external_approval.go
index bff268a4d9..9630ceb303 100644
--- a/backend/store/external_approval.go
+++ b/backend/store/external_approval.go
@@ -147,7 +147,6 @@ func (s *Store) DeleteExternalApprovalV2(ctx context.Context, id int) error {
func (*Store) findExternalApprovalImplV2(ctx context.Context, tx *Tx, find *ListExternalApprovalMessage) ([]*ExternalApprovalMessage, error) {
where, args := []string{"TRUE"}, []any{}
- where, args = append(where, fmt.Sprintf("row_status = $%d", len(args)+1)), append(args, api.Normal)
if v := find.IssueUID; v != nil {
where, args = append(where, fmt.Sprintf("issue_id = $%d", len(args)+1)), append(args, *v)
}