Skip to content

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

feat: remove issue type rollback, use rollbackDetail instead (#4838)

p0ny1171cfcd61de
diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.go
index 4c53d43338..d6e3b70900 100644
--- a/backend/api/v1/org_policy_service.go
+++ b/backend/api/v1/org_policy_service.go
@@ -685,8 +685,6 @@ func convertToPipelineApprovalPolicyPayload(policy *v1pb.DeploymentApprovalPolic
issueType = api.IssueDatabaseDataUpdate
case v1pb.DeploymentType_DATABASE_RESTORE_PITR:
issueType = api.IssueDatabaseRestorePITR
- case v1pb.DeploymentType_DATABASE_DML_ROLLBACK:
- issueType = api.IssueDatabaseRollback
default:
return nil, errors.Errorf("invalid deployment type %v", group.DeploymentType)
}
@@ -716,8 +714,6 @@ func convertIssueTypeToDeplymentType(issueType api.IssueType) v1pb.DeploymentTyp
res = v1pb.DeploymentType_DATABASE_DML
case api.IssueDatabaseRestorePITR:
res = v1pb.DeploymentType_DATABASE_RESTORE_PITR
- case api.IssueDatabaseRollback:
- res = v1pb.DeploymentType_DATABASE_DML_ROLLBACK
}
return res
diff --git a/backend/legacyapi/issue.go b/backend/legacyapi/issue.go
index 01a254ad50..85e6033688 100644
--- a/backend/legacyapi/issue.go
+++ b/backend/legacyapi/issue.go
@@ -33,8 +33,6 @@ const (
IssueDatabaseDataUpdate IssueType = "bb.issue.database.data.update"
// IssueDatabaseRestorePITR is the issue type for performing a Point-in-time Recovery.
IssueDatabaseRestorePITR IssueType = "bb.issue.database.restore.pitr"
- // IssueDatabaseRollback is the issue type for a generated rollback issue.
- IssueDatabaseRollback IssueType = "bb.issue.database.rollback"
)
// IssueFieldID is the field ID for an issue.
@@ -136,6 +134,14 @@ type CreateDatabaseContext struct {
Labels string `jsonapi:"attr,labels,omitempty"`
}
+// RollbackDetail is the detail for rolling back a task.
+type RollbackDetail struct {
+ // IssueID is the id of the issue to rollback.
+ IssueID int `json:"issueId"`
+ // TaskID is the task id to rollback.
+ TaskID int `json:"taskId"`
+}
+
// MigrationDetail is the detail for database migration such as Migrate, Data.
type MigrationDetail struct {
// MigrationType is the type of a migration.
@@ -155,6 +161,8 @@ type MigrationDetail struct {
SchemaVersion string `json:"schemaVersion"`
// If RollbackEnabled, build the rollbackStatement of the task.
RollbackEnabled bool `json:"rollbackEnabled"`
+ // if RollbackDetail is not nil, then this task is for rolling back another task.
+ RollbackDetail *RollbackDetail `json:"rollbackDetail"`
}
// MigrationContext is the issue create context for database migration such as Migrate, Data.
@@ -196,14 +204,6 @@ type PITRContext struct {
PointInTimeTs *int64 `json:"pointInTimeTs"`
}
-// RollbackContext is the issue create context for rollback a issue.
-type RollbackContext struct {
- // IssueID is the id of the issue to rollback.
- IssueID int `json:"issueId"`
- // TaskIDList is the list of task ids to rollback.
- TaskIDList []int `json:"taskIdList"`
-}
-
// IssuePatch is the API message for patching an issue.
type IssuePatch struct {
Name *string `jsonapi:"attr,name"`
diff --git a/backend/server/issue.go b/backend/server/issue.go
index bc4280926f..383119a732 100644
--- a/backend/server/issue.go
+++ b/backend/server/issue.go
@@ -554,109 +554,11 @@ func (s *Server) getPipelineCreate(ctx context.Context, issueCreate *api.IssueCr
return s.getPipelineCreateForDatabasePITR(ctx, issueCreate)
case api.IssueDatabaseSchemaUpdate, api.IssueDatabaseDataUpdate, api.IssueDatabaseSchemaUpdateGhost:
return s.getPipelineCreateForDatabaseSchemaAndDataUpdate(ctx, issueCreate)
- case api.IssueDatabaseRollback:
- return s.getPipelineCreateForDatabaseRollback(ctx, issueCreate)
default:
return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("invalid issue type %q", issueCreate.Type))
}
}
-func (s *Server) getPipelineCreateForDatabaseRollback(ctx context.Context, issueCreate *api.IssueCreate) (*api.PipelineCreate, error) {
- c := api.RollbackContext{}
- if err := json.Unmarshal([]byte(issueCreate.CreateContext), &c); err != nil {
- return nil, err
- }
-
- issueID := c.IssueID
- if len(c.TaskIDList) != 1 {
- return nil, echo.NewHTTPError(http.StatusBadRequest, "The task ID list must have exactly one element")
- }
- taskID := c.TaskIDList[0]
- issue, err := s.store.GetIssueV2(ctx, &store.FindIssueMessage{UID: &issueID})
- if err != nil {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to fetch issue with ID %d", issueID)).SetInternal(err)
- }
- if issue == nil {
- return nil, echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Issue ID not found: %d", issueID))
- }
- task, err := s.store.GetTaskV2ByID(ctx, taskID)
- if err != nil {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to get task with ID %d", taskID)).SetInternal(err)
- }
- if task == nil {
- return nil, echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Task not found with ID %d", taskID))
- }
- if task.Type != api.TaskDatabaseDataUpdate {
- return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Task type must be %s, but got %s", api.TaskDatabaseDataUpdate, task.Type))
- }
- instance, err := s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{UID: &task.InstanceID})
- if err != nil {
- return nil, err
- }
- if instance.Engine != db.MySQL {
- return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Only support rollback for MySQL now, but got %s", instance.Engine))
- }
- if task.PipelineID != issue.PipelineUID {
- return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Task %d is not in issue %d", taskID, issue.UID))
- }
- if task.Status != api.TaskDone && task.Status != api.TaskFailed {
- return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Task %d has status %s, must be %s or %s", taskID, task.Status, api.TaskDone, api.TaskFailed))
- }
-
- taskPayload := &api.TaskDatabaseDataUpdatePayload{}
- if err := json.Unmarshal([]byte(task.Payload), taskPayload); err != nil {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to unmarshal the task payload with ID %d", taskID)).SetInternal(err)
- }
- switch {
- case !taskPayload.RollbackEnabled:
- return nil, echo.NewHTTPError(http.StatusBadRequest, "Rollback SQL generation is not enabled.")
- case taskPayload.RollbackSQLStatus == api.RollbackSQLStatusPending:
- return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Rollback SQL generation for task %d is still in progress", taskID))
- case taskPayload.RollbackSQLStatus == api.RollbackSQLStatusFailed:
- return nil, echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Rollback SQL generation for task %d has already failed: %s", taskID, taskPayload.RollbackError))
- }
-
- issueCreateContext := &api.MigrationContext{
- DetailList: []*api.MigrationDetail{
- {
- MigrationType: db.Data,
- DatabaseID: *task.DatabaseID,
- Statement: taskPayload.RollbackStatement,
- },
- },
- }
- bytes, err := json.Marshal(issueCreateContext)
- if err != nil {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to marshal issue create context for rollback issue")
- }
- issueCreate.CreateContext = string(bytes)
- issueCreate.Type = api.IssueDatabaseDataUpdate
- pipelineCreate, err := s.getPipelineCreateForDatabaseSchemaAndDataUpdate(ctx, issueCreate)
- if err != nil {
- return nil, err
- }
-
- if len(pipelineCreate.StageList) != 1 {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, "Must have one stage for a rollback task")
- }
- if len(pipelineCreate.StageList[0].TaskList) != 1 {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, "Must have one task for a rollback task")
- }
- rollbackTaskPayload := &api.TaskDatabaseDataUpdatePayload{}
- if err := json.Unmarshal([]byte(pipelineCreate.StageList[0].TaskList[0].Payload), rollbackTaskPayload); err != nil {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal the rollback task create payload").SetInternal(err)
- }
- rollbackTaskPayload.RollbackFromIssueID = issueID
- rollbackTaskPayload.RollbackFromTaskID = taskID
- buf, err := json.Marshal(rollbackTaskPayload)
- if err != nil {
- return nil, echo.NewHTTPError(http.StatusInternalServerError, "Failed to marshal rollback task payload").SetInternal(err)
- }
- pipelineCreate.StageList[0].TaskList[0].Payload = string(buf)
-
- return pipelineCreate, nil
-}
-
func (s *Server) getPipelineCreateForDatabaseCreate(ctx context.Context, issueCreate *api.IssueCreate) (*api.PipelineCreate, error) {
c := api.CreateDatabaseContext{}
if err := json.Unmarshal([]byte(issueCreate.CreateContext), &c); err != nil {
@@ -1123,6 +1025,10 @@ func getUpdateTask(database *store.DatabaseMessage, instance *store.InstanceMess
RollbackEnabled: d.RollbackEnabled,
RollbackSQLStatus: api.RollbackSQLStatusPending,
}
+ if d.RollbackDetail != nil {
+ payload.RollbackFromIssueID = d.RollbackDetail.IssueID
+ payload.RollbackFromTaskID = d.RollbackDetail.TaskID
+ }
bytes, err := json.Marshal(payload)
if err != nil {
return api.TaskCreate{}, echo.NewHTTPError(http.StatusInternalServerError, "Failed to marshal database data update payload").SetInternal(err)
diff --git a/backend/tests/rollback_test.go b/backend/tests/rollback_test.go
index b54fad0005..9848511233 100644
--- a/backend/tests/rollback_test.go
+++ b/backend/tests/rollback_test.go
@@ -192,7 +192,6 @@ func TestCreateRollbackIssueMySQL(t *testing.T) {
a.Equal(api.TaskDone, status)
a.Len(issue.Pipeline.StageList, 1)
a.Len(issue.Pipeline.StageList[0].TaskList, 1)
- task := issue.Pipeline.StageList[0].TaskList[0]
// Check that the data is changed.
type record struct {
@@ -212,29 +211,59 @@ func TestCreateRollbackIssueMySQL(t *testing.T) {
want1 := []record{{2, "unknown\nunknown"}, {3, "unknown\nunknown"}}
a.Equal(want1, records1)
- // Run a rollback issue.
- var rollbackIssue *api.Issue
- rollbackCreateContext, err := json.Marshal(&api.RollbackContext{
- IssueID: issue.ID,
- TaskIDList: []int{task.ID},
- })
- a.NoError(err)
+ // wait for rollback SQL generation
for i := 0; i < 10; i++ {
- // rollbackIssue, err = ctl.createRollbackIssue(issue.ID, []int{task.ID})
- rollbackIssue, err = ctl.createIssue(api.IssueCreate{
- ProjectID: project.ID,
- Name: "rollback",
- Type: api.IssueDatabaseRollback,
- AssigneeID: api.SystemBotID,
- CreateContext: string(rollbackCreateContext),
- })
- if err == nil {
+ issue, err := ctl.getIssue(issue.ID)
+ a.NoError(err)
+ a.Len(issue.Pipeline.StageList, 1)
+ a.Len(issue.Pipeline.StageList[0].TaskList, 1)
+ task := issue.Pipeline.StageList[0].TaskList[0]
+ var payload api.TaskDatabaseDataUpdatePayload
+ err = json.Unmarshal([]byte(task.Payload), &payload)
+ a.NoError(err)
+ if payload.RollbackSQLStatus == api.RollbackSQLStatusDone {
break
}
- // Wait for the rollback SQL generation and retry.
time.Sleep(3 * time.Second)
}
+
+ issue, err = ctl.getIssue(issue.ID)
+ a.NoError(err)
+ a.Len(issue.Pipeline.StageList, 1)
+ a.Len(issue.Pipeline.StageList[0].TaskList, 1)
+ task := issue.Pipeline.StageList[0].TaskList[0]
+ var payload api.TaskDatabaseDataUpdatePayload
+ err = json.Unmarshal([]byte(task.Payload), &payload)
+ a.NoError(err)
+ a.Equal(api.RollbackSQLStatusDone, payload.RollbackSQLStatus)
+
+ // Run a rollback issue.
+ var rollbackIssue *api.Issue
+ rollbackCreateContext, err := json.Marshal(&api.MigrationContext{
+ DetailList: []*api.MigrationDetail{
+ {
+ MigrationType: db.Data,
+ DatabaseID: database.ID,
+ Statement: payload.RollbackStatement,
+ RollbackDetail: &api.RollbackDetail{
+ IssueID: issue.ID,
+ TaskID: task.ID,
+ },
+ },
+ },
+ })
+ a.NoError(err)
+
+ rollbackIssue, err = ctl.createIssue(api.IssueCreate{
+ ProjectID: project.ID,
+ Name: "rollback",
+ Type: api.IssueDatabaseDataUpdate,
+ AssigneeID: api.SystemBotID,
+ CreateContext: string(rollbackCreateContext),
+ })
+ a.NoError(err)
t.Logf("Rollback issue %d created.", rollbackIssue.ID)
+
status, err = ctl.waitIssuePipeline(rollbackIssue.ID)
a.NoError(err)
a.Equal(api.TaskDone, status)
@@ -391,29 +420,59 @@ func TestCreateRollbackIssueMySQLByPatch(t *testing.T) {
want1 := []record{{2, "unknown\nunknown"}, {3, "unknown\nunknown"}}
a.Equal(want1, records1)
- // Run a rollback issue.
- var rollbackIssue *api.Issue
- rollbackCreateContext, err := json.Marshal(&api.RollbackContext{
- IssueID: issue.ID,
- TaskIDList: []int{task.ID},
- })
- a.NoError(err)
+ // wait for rollback SQL generation
for i := 0; i < 10; i++ {
- // rollbackIssue, err = ctl.createRollbackIssue(issue.ID, []int{task.ID})
- rollbackIssue, err = ctl.createIssue(api.IssueCreate{
- ProjectID: project.ID,
- Name: "rollback",
- Type: api.IssueDatabaseRollback,
- AssigneeID: api.SystemBotID,
- CreateContext: string(rollbackCreateContext),
- })
- if err == nil {
+ issue, err := ctl.getIssue(issue.ID)
+ a.NoError(err)
+ a.Len(issue.Pipeline.StageList, 1)
+ a.Len(issue.Pipeline.StageList[0].TaskList, 1)
+ task := issue.Pipeline.StageList[0].TaskList[0]
+ var payload api.TaskDatabaseDataUpdatePayload
+ err = json.Unmarshal([]byte(task.Payload), &payload)
+ a.NoError(err)
+ if payload.RollbackSQLStatus == api.RollbackSQLStatusDone {
break
}
- // Wait for the rollback SQL generation and retry.
time.Sleep(3 * time.Second)
}
+
+ issue, err = ctl.getIssue(issue.ID)
+ a.NoError(err)
+ a.Len(issue.Pipeline.StageList, 1)
+ a.Len(issue.Pipeline.StageList[0].TaskList, 1)
+ task = issue.Pipeline.StageList[0].TaskList[0]
+ var payload api.TaskDatabaseDataUpdatePayload
+ err = json.Unmarshal([]byte(task.Payload), &payload)
+ a.NoError(err)
+ a.Equal(api.RollbackSQLStatusDone, payload.RollbackSQLStatus)
+
+ // Run a rollback issue.
+ var rollbackIssue *api.Issue
+ rollbackCreateContext, err := json.Marshal(&api.MigrationContext{
+ DetailList: []*api.MigrationDetail{
+ {
+ MigrationType: db.Data,
+ DatabaseID: database.ID,
+ Statement: payload.RollbackStatement,
+ RollbackDetail: &api.RollbackDetail{
+ IssueID: issue.ID,
+ TaskID: task.ID,
+ },
+ },
+ },
+ })
+ a.NoError(err)
+
+ rollbackIssue, err = ctl.createIssue(api.IssueCreate{
+ ProjectID: project.ID,
+ Name: "rollback",
+ Type: api.IssueDatabaseDataUpdate,
+ AssigneeID: api.SystemBotID,
+ CreateContext: string(rollbackCreateContext),
+ })
+ a.NoError(err)
t.Logf("Rollback issue %d created.", rollbackIssue.ID)
+
status, err = ctl.waitIssuePipeline(rollbackIssue.ID)
a.NoError(err)
a.Equal(api.TaskDone, status)
@@ -570,19 +629,13 @@ func TestRollbackCanceled(t *testing.T) {
want1 := []record{{2, "unknown\nunknown"}, {3, "unknown\nunknown"}}
a.Equal(want1, records1)
- // Run a rollback issue.
- rollbackCreateContext, err := json.Marshal(&api.RollbackContext{
- IssueID: issue.ID,
- TaskIDList: []int{task.ID},
- })
+ issue, err = ctl.getIssue(issue.ID)
a.NoError(err)
- _, err = ctl.createIssue(api.IssueCreate{
- ProjectID: project.ID,
- Name: "rollback",
- Type: api.IssueDatabaseRollback,
- AssigneeID: api.SystemBotID,
- CreateContext: string(rollbackCreateContext),
- })
- // should fail because rollback SQL generation was canceled.
- a.Error(err)
+ a.Len(issue.Pipeline.StageList, 1)
+ a.Len(issue.Pipeline.StageList[0].TaskList, 1)
+ task = issue.Pipeline.StageList[0].TaskList[0]
+ var payload api.TaskDatabaseDataUpdatePayload
+ err = json.Unmarshal([]byte(task.Payload), &payload)
+ a.NoError(err)
+ a.Equal(false, payload.RollbackEnabled)
}
diff --git a/frontend/src/components/Issue/rollback/RollbackStatus.vue b/frontend/src/components/Issue/rollback/RollbackStatus.vue
index 2903c0c95e..a23246b232 100644
--- a/frontend/src/components/Issue/rollback/RollbackStatus.vue
+++ b/frontend/src/components/Issue/rollback/RollbackStatus.vue
@@ -48,7 +48,7 @@ import type {
ActivityCreate,
Issue,
IssueCreate,
- RollbackContext,
+ MigrationContext,
Task,
TaskDatabaseDataUpdatePayload,
} from "@/types";
@@ -104,9 +104,19 @@ const tryRollbackTask = async () => {
try {
state.loading = true;
- const rollbackContext: RollbackContext = {
- issueId: issue.value.id,
- taskIdList: [task.value.id],
+ const rollbackContext: MigrationContext = {
+ detailList: [
+ {
+ migrationType: "DATA",
+ databaseId: task.value.database!.id,
+ statement: payload.value!.rollbackStatement!,
+ earliestAllowedTs: 0,
+ rollbackDetail: {
+ issueId: issue.value.id,
+ taskId: task.value.id,
+ },
+ },
+ ],
};
const datetime = `${dayjs(issue.value.createdTs * 1000).format(
@@ -122,10 +132,10 @@ const tryRollbackTask = async () => {
].join(" ");
const description = `The original SQL statement:
-${payload.value!.statement}`;
+ ${payload.value!.statement}`;
const issueCreate: IssueCreate = {
- type: "bb.issue.database.rollback",
+ type: "bb.issue.database.data.update",
projectId: issue.value.project.id,
name: issueName,
description,
diff --git a/frontend/src/types/issue.ts b/frontend/src/types/issue.ts
index ab987b6fe5..2e9da0b2f4 100644
--- a/frontend/src/types/issue.ts
+++ b/frontend/src/types/issue.ts
@@ -54,6 +54,7 @@ export type MigrationDetail = {
earliestAllowedTs: number;
databaseId?: DatabaseId;
rollbackEnabled?: boolean;
+ rollbackDetail?: RollbackDetail;
};
export type UpdateSchemaGhostDetail = MigrationDetail & {
@@ -61,6 +62,14 @@ export type UpdateSchemaGhostDetail = MigrationDetail & {
// more input parameters in the future
};
+// RollbackDetail is the detail for rolling back a task.
+export type RollbackDetail = {
+ // IssueID is the id of the issue to rollback.
+ issueId: IssueId;
+ // TaskID is the task id to rollback.
+ taskId: TaskId;
+};
+
export type MigrationContext = {
detailList: MigrationDetail[];
};
@@ -72,13 +81,6 @@ export type PITRContext = {
createDatabaseContext?: CreateDatabaseContext;
};
-export type RollbackContext = {
- // IssueID is the id of the issue to rollback.
- issueId: IssueId;
- // TaskIDList is the list of task ids to rollback.
- taskIdList: TaskId[];
-};
-
// eslint-disable-next-line @typescript-eslint/ban-types
export type EmptyContext = {};
@@ -86,7 +88,6 @@ export type IssueCreateContext =
| CreateDatabaseContext
| MigrationContext
| PITRContext
- | RollbackContext
| EmptyContext;
export type IssuePayload = { [key: string]: any };
diff --git a/frontend/src/types/proto/v1/deployment.ts b/frontend/src/types/proto/v1/deployment.ts
index 57e6846446..e927a44dca 100644
--- a/frontend/src/types/proto/v1/deployment.ts
+++ b/frontend/src/types/proto/v1/deployment.ts
@@ -9,7 +9,6 @@ export enum DeploymentType {
DATABASE_DDL_GHOST = 3,
DATABASE_DML = 4,
DATABASE_RESTORE_PITR = 5,
- DATABASE_DML_ROLLBACK = 6,
UNRECOGNIZED = -1,
}
@@ -33,9 +32,6 @@ export function deploymentTypeFromJSON(object: any): DeploymentType {
case 5:
case "DATABASE_RESTORE_PITR":
return DeploymentType.DATABASE_RESTORE_PITR;
- case 6:
- case "DATABASE_DML_ROLLBACK":
- return DeploymentType.DATABASE_DML_ROLLBACK;
case -1:
case "UNRECOGNIZED":
default:
@@ -57,8 +53,6 @@ export function deploymentTypeToJSON(object: DeploymentType): string {
return "DATABASE_DML";
case DeploymentType.DATABASE_RESTORE_PITR:
return "DATABASE_RESTORE_PITR";
- case DeploymentType.DATABASE_DML_ROLLBACK:
- return "DATABASE_DML_ROLLBACK";
case DeploymentType.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
diff --git a/proto/generated-go/v1/deployment.pb.go b/proto/generated-go/v1/deployment.pb.go
index 736512981f..bbc79e525b 100644
--- a/proto/generated-go/v1/deployment.pb.go
+++ b/proto/generated-go/v1/deployment.pb.go
@@ -29,7 +29,6 @@ const (
DeploymentType_DATABASE_DDL_GHOST DeploymentType = 3
DeploymentType_DATABASE_DML DeploymentType = 4
DeploymentType_DATABASE_RESTORE_PITR DeploymentType = 5
- DeploymentType_DATABASE_DML_ROLLBACK DeploymentType = 6
)
// Enum value maps for DeploymentType.
@@ -41,7 +40,6 @@ var (
3: "DATABASE_DDL_GHOST",
4: "DATABASE_DML",
5: "DATABASE_RESTORE_PITR",
- 6: "DATABASE_DML_ROLLBACK",
}
DeploymentType_value = map[string]int32{
"DEPLOYMENT_TYPE_UNSPECIFIED": 0,
@@ -50,7 +48,6 @@ var (
"DATABASE_DDL_GHOST": 3,
"DATABASE_DML": 4,
"DATABASE_RESTORE_PITR": 5,
- "DATABASE_DML_ROLLBACK": 6,
}
)
@@ -86,7 +83,7 @@ var File_v1_deployment_proto protoreflect.FileDescriptor
var file_v1_deployment_proto_rawDesc = []byte{
0x0a, 0x13, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2a, 0xb8, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e,
+ 0x76, 0x31, 0x2a, 0x9d, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d,
0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,
@@ -96,10 +93,8 @@ var file_v1_deployment_proto_rawDesc = []byte{
0x4f, 0x53, 0x54, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53,
0x45, 0x5f, 0x44, 0x4d, 0x4c, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x41, 0x54, 0x41, 0x42,
0x41, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x50, 0x49, 0x54, 0x52,
- 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x44,
- 0x4d, 0x4c, 0x5f, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x06, 0x42, 0x11, 0x5a,
- 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x10, 0x05, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,
+ 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/v1/deployment.proto b/proto/v1/deployment.proto
index 235c9ecc19..69e2dada6a 100644
--- a/proto/v1/deployment.proto
+++ b/proto/v1/deployment.proto
@@ -11,5 +11,4 @@ enum DeploymentType {
DATABASE_DDL_GHOST = 3;
DATABASE_DML = 4;
DATABASE_RESTORE_PITR = 5;
- DATABASE_DML_ROLLBACK = 6;
}