Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: sync schema when gh-ost cutover task completes (#1653)
p0nyf55bbf47a376
diff --git a/server/task.go b/server/task.goindex 36569a7671..4d59e68d8a 100644--- a/server/task.go+++ b/server/task.go@@ -460,9 +460,8 @@ func (s *Server) changeTaskStatusWithPatch(ctx context.Context, task *api.Task,return nil, err}- // If create database or schema update task completes, we sync the corresponding instance schema immediately.- if (taskPatched.Type == api.TaskDatabaseCreate || taskPatched.Type == api.TaskDatabaseSchemaUpdate) &&- taskPatched.Status == api.TaskDone {+ // If create database, schema update and gh-ost cutover task completes, we sync the corresponding instance schema immediately.+ if (taskPatched.Type == api.TaskDatabaseCreate || taskPatched.Type == api.TaskDatabaseSchemaUpdate || taskPatched.Type == api.TaskDatabaseSchemaUpdateGhostCutover) && taskPatched.Status == api.TaskDone {instance, err := s.store.GetInstanceByID(ctx, task.InstanceID)if err != nil {return nil, fmt.Errorf("failed to sync instance schema after completing task: %w", err)