Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: execute detail flag (#10135)
Danny Xu9cb41dd63794
diff --git a/backend/bin/server/cmd/profile.go b/backend/bin/server/cmd/profile.goindex 87d4956d56..87d590064a 100644--- a/backend/bin/server/cmd/profile.go+++ b/backend/bin/server/cmd/profile.go@@ -42,5 +42,6 @@ func getBaseProfile(dataDir string) config.Profile {Lsp: flags.lsp,PreUpdateBackup: flags.preUpdateBackup,DevelopmentIAM: flags.developmentIAM,+ ExecuteDetail: flags.executeDetail,}}diff --git a/backend/bin/server/cmd/root.go b/backend/bin/server/cmd/root.goindex 190d571cf1..e3a62a4944 100644--- a/backend/bin/server/cmd/root.go+++ b/backend/bin/server/cmd/root.go@@ -89,6 +89,7 @@ var (backupCredential stringdevelopmentIAM bool+ executeDetail bool}rootCmd = &cobra.Command{@@ -142,6 +143,7 @@ func init() {rootCmd.PersistentFlags().StringVar(&flags.backupCredential, "backup-credential", "", "credentials file to use for the backup bucket. It should be the same format as the AWS/GCP credential files.")rootCmd.PersistentFlags().BoolVar(&flags.developmentIAM, "development-iam", false, "(development only) whether to use the IAM manager")+ rootCmd.PersistentFlags().BoolVar(&flags.executeDetail, "execute-detail", true, "expose execute details")}// -----------------------------------Command Line Config END--------------------------------------diff --git a/backend/component/config/profile.go b/backend/component/config/profile.goindex c63eb25b56..38db86e8e9 100644--- a/backend/component/config/profile.go+++ b/backend/component/config/profile.go@@ -72,6 +72,7 @@ type Profile struct {Lsp boolPreUpdateBackup boolDevelopmentIAM bool+ ExecuteDetail bool}// UseEmbedDB returns whether to use embedDB.diff --git a/backend/runner/taskrun/executor.go b/backend/runner/taskrun/executor.goindex e561562ec5..abd1667fcf 100644--- a/backend/runner/taskrun/executor.go+++ b/backend/runner/taskrun/executor.go@@ -185,8 +185,7 @@ func executeMigration(taskRunUID int,statement string,sheetID *int,- mi *db.MigrationInfo,- license enterprise.LicenseService) (string, string, error) {+ mi *db.MigrationInfo) (string, string, error) {instance, err := stores.GetInstanceV2(ctx, &store.FindInstanceMessage{UID: &task.InstanceID})if err != nil {return "", "", err@@ -228,7 +227,7 @@ func executeMigration(opts.EndTransactionFunc = getSetOracleTransactionIDFunc(ctx, task, stores)}- if (profile.Mode == common.ReleaseModeDev || license.GetEffectivePlan() == api.FREE) && stateCfg != nil {+ if profile.ExecuteDetail && stateCfg != nil {switch task.Type {case api.TaskDatabaseSchemaUpdate, api.TaskDatabaseDataUpdate:switch instance.Engine {@@ -666,7 +665,7 @@ func runMigration(ctx context.Context, driverCtx context.Context, store *store.Sreturn true, nil, err}- migrationID, schema, err := executeMigration(ctx, driverCtx, store, dbFactory, stateCfg, profile, task, taskRunUID, statement, sheetID, mi, license)+ migrationID, schema, err := executeMigration(ctx, driverCtx, store, dbFactory, stateCfg, profile, task, taskRunUID, statement, sheetID, mi)if err != nil {return true, nil, err}