Skip to content

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

fix: batch update db (#15158)

Danny Xu2533b4cd61bb
diff --git a/backend/store/database.go b/backend/store/database.go
index 72e743e292..df3f27143f 100644
--- a/backend/store/database.go
+++ b/backend/store/database.go
@@ -406,7 +406,7 @@ func (s *Store) BatchUpdateDatabaseProject(ctx context.Context, databases []*Dat
var wheres []string
args := []any{project.UID}
for i, database := range databases {
- wheres = append(wheres, fmt.Sprintf("(instance.resource_id = $%d AND db.name = $%d)", 2*i+3, 2*i+4))
+ wheres = append(wheres, fmt.Sprintf("(instance.resource_id = $%d AND db.name = $%d)", 2*i+2, 2*i+3))
args = append(args, database.InstanceID, database.DatabaseName)
}
databaseClause := ""