Skip to content

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

chore: move release to prod (#14960)

p0nyae3de5e3d1ed
diff --git a/backend/legacyapi/task.go b/backend/legacyapi/task.go
index f844085839..79dbbfb744 100644
--- a/backend/legacyapi/task.go
+++ b/backend/legacyapi/task.go
@@ -52,6 +52,20 @@ const (
TaskDatabaseDataExport TaskType = "bb.task.database.data.export"
)
+func (t TaskType) ChangeDatabasePayload() bool {
+ switch t {
+ case
+ TaskDatabaseDataUpdate,
+ TaskDatabaseSchemaUpdate,
+ TaskDatabaseSchemaUpdateSDL,
+ TaskDatabaseSchemaBaseline,
+ TaskDatabaseSchemaUpdateGhostSync:
+ return true
+ default:
+ return false
+ }
+}
+
// Sequential returns whether the task should be executed sequentially.
func (t TaskType) Sequential() bool {
switch t {
diff --git a/backend/runner/taskrun/executor.go b/backend/runner/taskrun/executor.go
index 00f6d00a56..ab3dd410a8 100644
--- a/backend/runner/taskrun/executor.go
+++ b/backend/runner/taskrun/executor.go
@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"log/slog"
- "slices"
"sort"
"strings"
"time"
@@ -153,7 +152,7 @@ func getMigrationInfo(ctx context.Context, stores *store.Store, profile *config.
mc.sheetName = common.FormatSheet(pipeline.ProjectID, sheet.UID)
}
- if common.IsDev() && slices.Index([]api.TaskType{api.TaskDatabaseSchemaBaseline, api.TaskDatabaseSchemaUpdate, api.TaskDatabaseSchemaUpdateGhostSync, api.TaskDatabaseSchemaUpdateSDL, api.TaskDatabaseDataUpdate}, task.Type) != -1 {
+ if task.Type.ChangeDatabasePayload() {
var p storepb.TaskDatabaseUpdatePayload
if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(task.Payload), &p); err != nil {
return nil, nil, errors.Wrapf(err, "failed to unmarshal task payload")