Skip to content

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

refactor: consolidate duplicate protobuf enum definitions (#17747)

Danny Xu1d074d03bf0a
diff --git a/backend/api/v1/database_service_changelog.go b/backend/api/v1/database_service_changelog.go
index 3bd59eed6e..56756c3573 100644
--- a/backend/api/v1/database_service_changelog.go
+++ b/backend/api/v1/database_service_changelog.go
@@ -217,7 +217,7 @@ func convertToChangelogStatus(s store.ChangelogStatus) v1pb.Changelog_Status {
}
}
-func convertToChangelogTypeAndMigrationType(t storepb.ChangelogPayload_Type, mt storepb.ChangelogPayload_MigrationType) (v1pb.Changelog_Type, v1pb.Changelog_MigrationType) {
+func convertToChangelogTypeAndMigrationType(t storepb.ChangelogPayload_Type, mt storepb.MigrationType) (v1pb.Changelog_Type, v1pb.Changelog_MigrationType) {
//exhaustive:enforce
switch t {
case storepb.ChangelogPayload_BASELINE:
@@ -225,11 +225,11 @@ func convertToChangelogTypeAndMigrationType(t storepb.ChangelogPayload_Type, mt
case storepb.ChangelogPayload_MIGRATE:
// For MIGRATE type, check the migration type
switch mt {
- case storepb.ChangelogPayload_DDL:
+ case storepb.MigrationType_DDL:
return v1pb.Changelog_MIGRATE, v1pb.Changelog_DDL
- case storepb.ChangelogPayload_DML:
+ case storepb.MigrationType_DML:
return v1pb.Changelog_MIGRATE, v1pb.Changelog_DML
- case storepb.ChangelogPayload_GHOST:
+ case storepb.MigrationType_GHOST:
return v1pb.Changelog_MIGRATE, v1pb.Changelog_GHOST
default:
return v1pb.Changelog_MIGRATE, v1pb.Changelog_MIGRATION_TYPE_UNSPECIFIED
diff --git a/backend/api/v1/issue_service.go b/backend/api/v1/issue_service.go
index 1f476f1e57..e6504e1735 100644
--- a/backend/api/v1/issue_service.go
+++ b/backend/api/v1/issue_service.go
@@ -165,15 +165,15 @@ func (s *IssueService) getIssueFind(ctx context.Context, filter string, query st
issueFind.TaskTypes = &[]storepb.Task_Type{
storepb.Task_DATABASE_MIGRATE,
}
- issueFind.MigrateTypes = &[]storepb.Task_MigrateType{
- storepb.Task_DDL,
+ issueFind.MigrateTypes = &[]storepb.MigrationType{
+ storepb.MigrationType_DDL,
}
case "DML":
issueFind.TaskTypes = &[]storepb.Task_Type{
storepb.Task_DATABASE_MIGRATE,
}
- issueFind.MigrateTypes = &[]storepb.Task_MigrateType{
- storepb.Task_DML,
+ issueFind.MigrateTypes = &[]storepb.MigrationType{
+ storepb.MigrationType_DML,
}
default:
return "", connect.NewError(connect.CodeInvalidArgument, errors.Errorf(`unknown value %q`, value))
@@ -772,7 +772,7 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1
Comment: req.Msg.Comment,
Event: &storepb.IssueCommentPayload_Approval_{
Approval: &storepb.IssueCommentPayload_Approval{
- Status: storepb.IssueCommentPayload_Approval_APPROVED,
+ Status: storepb.IssuePayloadApproval_Approver_APPROVED,
},
},
}
@@ -955,7 +955,7 @@ func (s *IssueService) RejectIssue(ctx context.Context, req *connect.Request[v1p
Comment: req.Msg.Comment,
Event: &storepb.IssueCommentPayload_Approval_{
Approval: &storepb.IssueCommentPayload_Approval{
- Status: storepb.IssueCommentPayload_Approval_REJECTED,
+ Status: storepb.IssuePayloadApproval_Approver_REJECTED,
},
},
}
@@ -1060,7 +1060,7 @@ func (s *IssueService) RequestIssue(ctx context.Context, req *connect.Request[v1
Comment: req.Msg.Comment,
Event: &storepb.IssueCommentPayload_Approval_{
Approval: &storepb.IssueCommentPayload_Approval{
- Status: storepb.IssueCommentPayload_Approval_PENDING,
+ Status: storepb.IssuePayloadApproval_Approver_PENDING,
},
},
}
diff --git a/backend/api/v1/issue_service_convert.go b/backend/api/v1/issue_service_convert.go
index bbeacc349a..8c608a6f82 100644
--- a/backend/api/v1/issue_service_convert.go
+++ b/backend/api/v1/issue_service_convert.go
@@ -365,39 +365,39 @@ func convertToIssueCommentEventStageEnd(e *storepb.IssueCommentPayload_StageEnd_
}
}
-func convertToIssueCommentPayloadIssueUpdateIssueStatus(s *v1pb.IssueStatus) *storepb.IssueCommentPayload_IssueUpdate_IssueStatus {
+func convertToIssueCommentPayloadIssueUpdateIssueStatus(s *v1pb.IssueStatus) *storepb.Issue_Status {
if s == nil {
return nil
}
- var is storepb.IssueCommentPayload_IssueUpdate_IssueStatus
+ var is storepb.Issue_Status
switch *s {
case v1pb.IssueStatus_CANCELED:
- is = storepb.IssueCommentPayload_IssueUpdate_CANCELED
+ is = storepb.Issue_CANCELED
case v1pb.IssueStatus_DONE:
- is = storepb.IssueCommentPayload_IssueUpdate_DONE
+ is = storepb.Issue_DONE
case v1pb.IssueStatus_OPEN:
- is = storepb.IssueCommentPayload_IssueUpdate_OPEN
+ is = storepb.Issue_OPEN
case v1pb.IssueStatus_ISSUE_STATUS_UNSPECIFIED:
- is = storepb.IssueCommentPayload_IssueUpdate_ISSUE_STATUS_UNSPECIFIED
+ is = storepb.Issue_ISSUE_STATUS_UNSPECIFIED
default:
- is = storepb.IssueCommentPayload_IssueUpdate_ISSUE_STATUS_UNSPECIFIED
+ is = storepb.Issue_ISSUE_STATUS_UNSPECIFIED
}
return &is
}
-func convertToIssueCommentEventIssueUpdateStatus(s *storepb.IssueCommentPayload_IssueUpdate_IssueStatus) *v1pb.IssueStatus {
+func convertToIssueCommentEventIssueUpdateStatus(s *storepb.Issue_Status) *v1pb.IssueStatus {
if s == nil {
return nil
}
var is v1pb.IssueStatus
switch *s {
- case storepb.IssueCommentPayload_IssueUpdate_CANCELED:
+ case storepb.Issue_CANCELED:
is = v1pb.IssueStatus_CANCELED
- case storepb.IssueCommentPayload_IssueUpdate_DONE:
+ case storepb.Issue_DONE:
is = v1pb.IssueStatus_DONE
- case storepb.IssueCommentPayload_IssueUpdate_OPEN:
+ case storepb.Issue_OPEN:
is = v1pb.IssueStatus_OPEN
- case storepb.IssueCommentPayload_IssueUpdate_ISSUE_STATUS_UNSPECIFIED:
+ case storepb.Issue_ISSUE_STATUS_UNSPECIFIED:
is = v1pb.IssueStatus_ISSUE_STATUS_UNSPECIFIED
default:
is = v1pb.IssueStatus_ISSUE_STATUS_UNSPECIFIED
@@ -405,15 +405,15 @@ func convertToIssueCommentEventIssueUpdateStatus(s *storepb.IssueCommentPayload_
return &is
}
-func convertToIssueCommentEventApprovalStatus(s storepb.IssueCommentPayload_Approval_Status) v1pb.IssueComment_Approval_Status {
+func convertToIssueCommentEventApprovalStatus(s storepb.IssuePayloadApproval_Approver_Status) v1pb.IssueComment_Approval_Status {
switch s {
- case storepb.IssueCommentPayload_Approval_APPROVED:
+ case storepb.IssuePayloadApproval_Approver_APPROVED:
return v1pb.IssueComment_Approval_APPROVED
- case storepb.IssueCommentPayload_Approval_PENDING:
+ case storepb.IssuePayloadApproval_Approver_PENDING:
return v1pb.IssueComment_Approval_PENDING
- case storepb.IssueCommentPayload_Approval_REJECTED:
+ case storepb.IssuePayloadApproval_Approver_REJECTED:
return v1pb.IssueComment_Approval_REJECTED
- case storepb.IssueCommentPayload_Approval_STATUS_UNSPECIFIED:
+ case storepb.IssuePayloadApproval_Approver_STATUS_UNSPECIFIED:
return v1pb.IssueComment_Approval_STATUS_UNSPECIFIED
default:
return v1pb.IssueComment_Approval_STATUS_UNSPECIFIED
@@ -431,26 +431,28 @@ func convertToIssueCommentEventTaskUpdate(u *storepb.IssueCommentPayload_TaskUpd
}
}
-func convertToIssueCommentEventTaskUpdateStatus(s *storepb.IssueCommentPayload_TaskUpdate_Status) *v1pb.IssueComment_TaskUpdate_Status {
+func convertToIssueCommentEventTaskUpdateStatus(s *storepb.TaskRun_Status) *v1pb.IssueComment_TaskUpdate_Status {
if s == nil {
return nil
}
var r v1pb.IssueComment_TaskUpdate_Status
//exhaustive:enforce
switch *s {
- case storepb.IssueCommentPayload_TaskUpdate_DONE:
+ case storepb.TaskRun_DONE:
r = v1pb.IssueComment_TaskUpdate_DONE
- case storepb.IssueCommentPayload_TaskUpdate_CANCELED:
+ case storepb.TaskRun_CANCELED:
r = v1pb.IssueComment_TaskUpdate_CANCELED
- case storepb.IssueCommentPayload_TaskUpdate_FAILED:
+ case storepb.TaskRun_FAILED:
r = v1pb.IssueComment_TaskUpdate_FAILED
- case storepb.IssueCommentPayload_TaskUpdate_PENDING:
+ case storepb.TaskRun_PENDING:
r = v1pb.IssueComment_TaskUpdate_PENDING
- case storepb.IssueCommentPayload_TaskUpdate_RUNNING:
+ case storepb.TaskRun_RUNNING:
r = v1pb.IssueComment_TaskUpdate_RUNNING
- case storepb.IssueCommentPayload_TaskUpdate_SKIPPED:
+ case storepb.TaskRun_SKIPPED:
r = v1pb.IssueComment_TaskUpdate_SKIPPED
- case storepb.IssueCommentPayload_TaskUpdate_STATUS_UNSPECIFIED:
+ case storepb.TaskRun_NOT_STARTED:
+ r = v1pb.IssueComment_TaskUpdate_STATUS_UNSPECIFIED
+ case storepb.TaskRun_STATUS_UNSPECIFIED:
r = v1pb.IssueComment_TaskUpdate_STATUS_UNSPECIFIED
default:
r = v1pb.IssueComment_TaskUpdate_STATUS_UNSPECIFIED
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.go
index 45872ed46b..a88f6b473f 100644
--- a/backend/api/v1/plan_service.go
+++ b/backend/api/v1/plan_service.go
@@ -877,7 +877,7 @@ func (*PlanService) parsePlanCheckRunFilter(filter string, find *store.FindPlanC
}
storeResultStatus := convertToStoreResultStatus(v1pb.PlanCheckRun_Result_Status(v1ResultStatus))
if find.ResultStatus == nil {
- find.ResultStatus = &[]storepb.PlanCheckRunResult_Result_Status{}
+ find.ResultStatus = &[]storepb.Advice_Status{}
}
*find.ResultStatus = append(*find.ResultStatus, storeResultStatus)
default:
@@ -919,7 +919,7 @@ func (*PlanService) parsePlanCheckRunFilter(filter string, find *store.FindPlanC
return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("empty list value for filter %v", variable))
}
if find.ResultStatus == nil {
- find.ResultStatus = &[]storepb.PlanCheckRunResult_Result_Status{}
+ find.ResultStatus = &[]storepb.Advice_Status{}
}
for _, raw := range rawList {
resultStatusStr, ok := raw.(string)
@@ -965,17 +965,17 @@ func convertToStorePlanCheckRunStatus(status v1pb.PlanCheckRun_Status) store.Pla
}
}
-// convertToStoreResultStatus converts v1pb.PlanCheckRun_Result_Status to storepb.PlanCheckRunResult_Result_Status.
-func convertToStoreResultStatus(status v1pb.PlanCheckRun_Result_Status) storepb.PlanCheckRunResult_Result_Status {
+// convertToStoreResultStatus converts v1pb.PlanCheckRun_Result_Status to storepb.Advice_Status.
+func convertToStoreResultStatus(status v1pb.PlanCheckRun_Result_Status) storepb.Advice_Status {
switch status {
case v1pb.PlanCheckRun_Result_ERROR:
- return storepb.PlanCheckRunResult_Result_ERROR
+ return storepb.Advice_ERROR
case v1pb.PlanCheckRun_Result_WARNING:
- return storepb.PlanCheckRunResult_Result_WARNING
+ return storepb.Advice_WARNING
case v1pb.PlanCheckRun_Result_SUCCESS:
- return storepb.PlanCheckRunResult_Result_SUCCESS
+ return storepb.Advice_SUCCESS
default:
- return storepb.PlanCheckRunResult_Result_STATUS_UNSPECIFIED
+ return storepb.Advice_STATUS_UNSPECIFIED
}
}
diff --git a/backend/api/v1/plan_service_plan_check.go b/backend/api/v1/plan_service_plan_check.go
index 3ffa96ca1e..b0e5af3d96 100644
--- a/backend/api/v1/plan_service_plan_check.go
+++ b/backend/api/v1/plan_service_plan_check.go
@@ -90,9 +90,9 @@ func getPlanCheckRunsFromChangeDatabaseConfigDatabaseGroupTarget(ctx context.Con
case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE:
// Only DDL, DML, and MIGRATE_TYPE_UNSPECIFIED (treated as DDL) migrate types are supported for database group targets
switch config.MigrateType {
- case storepb.PlanConfig_ChangeDatabaseConfig_DDL:
- case storepb.PlanConfig_ChangeDatabaseConfig_DML:
- case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_TYPE_UNSPECIFIED:
+ case storepb.MigrationType_DDL:
+ case storepb.MigrationType_DML:
+ case storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED:
default:
return nil, errors.Errorf("unsupported migrate type %q for database group target", config.MigrateType)
}
@@ -221,7 +221,7 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
DatabaseName: database.DatabaseName,
},
})
- if config.Type == storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE && config.MigrateType == storepb.PlanConfig_ChangeDatabaseConfig_GHOST {
+ if config.Type == storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE && config.MigrateType == storepb.MigrationType_GHOST {
planCheckRuns = append(planCheckRuns, &store.PlanCheckRunMessage{
PlanUID: plan.UID,
Status: store.PlanCheckRunStatusRunning,
@@ -239,15 +239,15 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
return planCheckRuns, nil
}
-func convertToChangeDatabaseType(t storepb.PlanConfig_ChangeDatabaseConfig_Type, migrateType storepb.PlanConfig_ChangeDatabaseConfig_MigrateType) storepb.PlanCheckRunConfig_ChangeDatabaseType {
+func convertToChangeDatabaseType(t storepb.PlanConfig_ChangeDatabaseConfig_Type, migrateType storepb.MigrationType) storepb.PlanCheckRunConfig_ChangeDatabaseType {
switch t {
case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE:
switch migrateType {
- case storepb.PlanConfig_ChangeDatabaseConfig_DDL:
+ case storepb.MigrationType_DDL:
return storepb.PlanCheckRunConfig_DDL
- case storepb.PlanConfig_ChangeDatabaseConfig_GHOST:
+ case storepb.MigrationType_GHOST:
return storepb.PlanCheckRunConfig_DDL_GHOST
- case storepb.PlanConfig_ChangeDatabaseConfig_DML:
+ case storepb.MigrationType_DML:
return storepb.PlanCheckRunConfig_DML
default:
return storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED
diff --git a/backend/api/v1/plan_service_test.go b/backend/api/v1/plan_service_test.go
index d3d434c9bd..72b3d4bbb9 100644
--- a/backend/api/v1/plan_service_test.go
+++ b/backend/api/v1/plan_service_test.go
@@ -64,8 +64,8 @@ func TestParsePlanCheckRunFilter(t *testing.T) {
name: "result_status equals SUCCESS",
filter: `result_status == "SUCCESS"`,
want: &store.FindPlanCheckRunMessage{
- ResultStatus: &[]storepb.PlanCheckRunResult_Result_Status{
- storepb.PlanCheckRunResult_Result_SUCCESS,
+ ResultStatus: &[]storepb.Advice_Status{
+ storepb.Advice_SUCCESS,
},
},
},
@@ -73,8 +73,8 @@ func TestParsePlanCheckRunFilter(t *testing.T) {
name: "result_status equals ERROR",
filter: `result_status == "ERROR"`,
want: &store.FindPlanCheckRunMessage{
- ResultStatus: &[]storepb.PlanCheckRunResult_Result_Status{
- storepb.PlanCheckRunResult_Result_ERROR,
+ ResultStatus: &[]storepb.Advice_Status{
+ storepb.Advice_ERROR,
},
},
},
@@ -82,8 +82,8 @@ func TestParsePlanCheckRunFilter(t *testing.T) {
name: "result_status equals WARNING",
filter: `result_status == "WARNING"`,
want: &store.FindPlanCheckRunMessage{
- ResultStatus: &[]storepb.PlanCheckRunResult_Result_Status{
- storepb.PlanCheckRunResult_Result_WARNING,
+ ResultStatus: &[]storepb.Advice_Status{
+ storepb.Advice_WARNING,
},
},
},
@@ -91,9 +91,9 @@ func TestParsePlanCheckRunFilter(t *testing.T) {
name: "result_status in list",
filter: `result_status in ["SUCCESS", "WARNING"]`,
want: &store.FindPlanCheckRunMessage{
- ResultStatus: &[]storepb.PlanCheckRunResult_Result_Status{
- storepb.PlanCheckRunResult_Result_SUCCESS,
- storepb.PlanCheckRunResult_Result_WARNING,
+ ResultStatus: &[]storepb.Advice_Status{
+ storepb.Advice_SUCCESS,
+ storepb.Advice_WARNING,
},
},
},
@@ -102,8 +102,8 @@ func TestParsePlanCheckRunFilter(t *testing.T) {
filter: `status == "DONE" && result_status == "SUCCESS"`,
want: &store.FindPlanCheckRunMessage{
Status: &[]store.PlanCheckRunStatus{store.PlanCheckRunStatusDone},
- ResultStatus: &[]storepb.PlanCheckRunResult_Result_Status{
- storepb.PlanCheckRunResult_Result_SUCCESS,
+ ResultStatus: &[]storepb.Advice_Status{
+ storepb.Advice_SUCCESS,
},
},
},
@@ -115,8 +115,8 @@ func TestParsePlanCheckRunFilter(t *testing.T) {
store.PlanCheckRunStatusDone,
store.PlanCheckRunStatusFailed,
},
- ResultStatus: &[]storepb.PlanCheckRunResult_Result_Status{
- storepb.PlanCheckRunResult_Result_ERROR,
+ ResultStatus: &[]storepb.Advice_Status{
+ storepb.Advice_ERROR,
},
},
},
diff --git a/backend/api/v1/release_service.go b/backend/api/v1/release_service.go
index d1681dfee7..6735b4bd46 100644
--- a/backend/api/v1/release_service.go
+++ b/backend/api/v1/release_service.go
@@ -488,9 +488,9 @@ func convertReleaseFiles(ctx context.Context, s *store.Store, files []*v1pb.Rele
Path: f.Path,
Sheet: f.Sheet,
SheetSha256: sheet.GetSha256Hex(),
- Type: storepb.ReleasePayload_File_Type(f.Type),
+ Type: storepb.SchemaChangeType(f.Type),
Version: f.Version,
- MigrationType: storepb.ReleasePayload_File_MigrationType(f.MigrationType),
+ MigrationType: storepb.MigrationType(f.MigrationType),
})
}
return rFiles, nil
diff --git a/backend/api/v1/release_service_check.go b/backend/api/v1/release_service_check.go
index 598014d168..8cf6dd89b9 100644
--- a/backend/api/v1/release_service_check.go
+++ b/backend/api/v1/release_service_check.go
@@ -165,7 +165,7 @@ loop:
revisions, err := s.store.ListRevisions(ctx, &store.FindRevisionMessage{
InstanceID: &database.InstanceID,
DatabaseName: &database.DatabaseName,
- Type: common.NewP(storepb.RevisionPayload_VERSIONED),
+ Type: common.NewP(storepb.SchemaChangeType_VERSIONED),
Versions: &releaseFileVersions,
ShowDeleted: false,
})
@@ -343,7 +343,7 @@ func (s *ReleaseService) checkReleaseDeclarative(ctx context.Context, files []*v
revisions, err := s.store.ListRevisions(ctx, &store.FindRevisionMessage{
InstanceID: &database.InstanceID,
DatabaseName: &database.DatabaseName,
- Type: common.NewP(storepb.RevisionPayload_DECLARATIVE),
+ Type: common.NewP(storepb.SchemaChangeType_DECLARATIVE),
Limit: common.NewP(1),
ShowDeleted: false,
})
diff --git a/backend/api/v1/revision_service.go b/backend/api/v1/revision_service.go
index 61e9f7ad27..e50f6bf70d 100644
--- a/backend/api/v1/revision_service.go
+++ b/backend/api/v1/revision_service.go
@@ -340,14 +340,14 @@ func convertToRevision(ctx context.Context, s *store.Store, parent string, revis
return r, nil
}
-func convertToRevisionType(t storepb.RevisionPayload_Type) v1pb.Revision_Type {
+func convertToRevisionType(t storepb.SchemaChangeType) v1pb.Revision_Type {
//exhaustive:enforce
switch t {
- case storepb.RevisionPayload_TYPE_UNSPECIFIED:
+ case storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED:
return v1pb.Revision_TYPE_UNSPECIFIED
- case storepb.RevisionPayload_VERSIONED:
+ case storepb.SchemaChangeType_VERSIONED:
return v1pb.Revision_VERSIONED
- case storepb.RevisionPayload_DECLARATIVE:
+ case storepb.SchemaChangeType_DECLARATIVE:
return v1pb.Revision_DECLARATIVE
default:
return v1pb.Revision_TYPE_UNSPECIFIED
@@ -371,16 +371,16 @@ func convertRevision(revision *v1pb.Revision, database *store.DatabaseMessage, s
return r
}
-func convertRevisionType(t v1pb.Revision_Type) storepb.RevisionPayload_Type {
+func convertRevisionType(t v1pb.Revision_Type) storepb.SchemaChangeType {
//exhaustive:enforce
switch t {
case v1pb.Revision_TYPE_UNSPECIFIED:
- return storepb.RevisionPayload_TYPE_UNSPECIFIED
+ return storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED
case v1pb.Revision_VERSIONED:
- return storepb.RevisionPayload_VERSIONED
+ return storepb.SchemaChangeType_VERSIONED
case v1pb.Revision_DECLARATIVE:
- return storepb.RevisionPayload_DECLARATIVE
+ return storepb.SchemaChangeType_DECLARATIVE
default:
- return storepb.RevisionPayload_TYPE_UNSPECIFIED
+ return storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED
}
}
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index c7988009d2..19afeaf4de 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -724,7 +724,7 @@ func (s *RolloutService) BatchRunTasks(ctx context.Context, req *connect.Request
}
if issueN != nil {
- if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issueN.UID, request.Tasks, storepb.IssueCommentPayload_TaskUpdate_PENDING, user.ID, request.Reason); err != nil {
+ if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issueN.UID, request.Tasks, storepb.TaskRun_PENDING, user.ID, request.Reason); err != nil {
slog.Warn("failed to create issue comment", "issueUID", issueN.UID, log.BBError(err))
}
}
@@ -825,7 +825,7 @@ func (s *RolloutService) BatchSkipTasks(ctx context.Context, req *connect.Reques
}
if issueN != nil {
- if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issueN.UID, request.Tasks, storepb.IssueCommentPayload_TaskUpdate_SKIPPED, user.ID, request.Reason); err != nil {
+ if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issueN.UID, request.Tasks, storepb.TaskRun_SKIPPED, user.ID, request.Reason); err != nil {
slog.Warn("failed to create issue comment", "issueUID", issueN.UID, log.BBError(err))
}
}
@@ -944,7 +944,7 @@ func (s *RolloutService) BatchCancelTaskRuns(ctx context.Context, req *connect.R
}
if issueN != nil {
- if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issueN.UID, taskNames, storepb.IssueCommentPayload_TaskUpdate_CANCELED, user.ID, request.Reason); err != nil {
+ if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issueN.UID, taskNames, storepb.TaskRun_CANCELED, user.ID, request.Reason); err != nil {
slog.Warn("failed to create issue comment", "issueUID", issueN.UID, log.BBError(err))
}
}
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index 3d1c50b618..a2d3592c74 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -86,7 +86,7 @@ func convertToPlan(ctx context.Context, s *store.Store, plan *store.PlanMessage)
for _, run := range planCheckRuns {
p.PlanCheckRunStatusCount[string(run.Status)]++
for _, result := range run.Result.Results {
- p.PlanCheckRunStatusCount[storepb.PlanCheckRunResult_Result_Status_name[int32(result.Status)]]++
+ p.PlanCheckRunStatusCount[storepb.Advice_Status_name[int32(result.Status)]]++
}
}
return p, nil
@@ -161,13 +161,13 @@ func convertToPlanSpecChangeDatabaseConfigType(t storepb.PlanConfig_ChangeDataba
}
}
-func convertToPlanSpecMigrationType(t storepb.PlanConfig_ChangeDatabaseConfig_MigrateType) v1pb.MigrationType {
+func convertToPlanSpecMigrationType(t storepb.MigrationType) v1pb.MigrationType {
switch t {
- case storepb.PlanConfig_ChangeDatabaseConfig_DDL:
+ case storepb.MigrationType_DDL:
return v1pb.MigrationType_DDL
- case storepb.PlanConfig_ChangeDatabaseConfig_GHOST:
+ case storepb.MigrationType_GHOST:
return v1pb.MigrationType_GHOST
- case storepb.PlanConfig_ChangeDatabaseConfig_DML:
+ case storepb.MigrationType_DML:
return v1pb.MigrationType_DML
default:
return v1pb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
@@ -286,16 +286,16 @@ func convertPlanSpecChangeDatabaseConfig(config *v1pb.Plan_Spec_ChangeDatabaseCo
}
// Convert v1 MigrationType to store MigrateType
- var storeMigrateType storepb.PlanConfig_ChangeDatabaseConfig_MigrateType
+ var storeMigrateType storepb.MigrationType
switch c.MigrationType {
case v1pb.MigrationType_DDL:
- storeMigrateType = storepb.PlanConfig_ChangeDatabaseConfig_DDL
+ storeMigrateType = storepb.MigrationType_DDL
case v1pb.MigrationType_DML:
- storeMigrateType = storepb.PlanConfig_ChangeDatabaseConfig_DML
+ storeMigrateType = storepb.MigrationType_DML
case v1pb.MigrationType_GHOST:
- storeMigrateType = storepb.PlanConfig_ChangeDatabaseConfig_GHOST
+ storeMigrateType = storepb.MigrationType_GHOST
default:
- storeMigrateType = storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_TYPE_UNSPECIFIED
+ storeMigrateType = storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
return &storepb.PlanConfig_Spec_ChangeDatabaseConfig{
@@ -431,15 +431,15 @@ func convertToPlanCheckRunResult(result *storepb.PlanCheckRunResult_Result) *v1p
return resultV1
}
-func convertToPlanCheckRunResultStatus(status storepb.PlanCheckRunResult_Result_Status) v1pb.PlanCheckRun_Result_Status {
+func convertToPlanCheckRunResultStatus(status storepb.Advice_Status) v1pb.PlanCheckRun_Result_Status {
switch status {
- case storepb.PlanCheckRunResult_Result_STATUS_UNSPECIFIED:
+ case storepb.Advice_STATUS_UNSPECIFIED:
return v1pb.PlanCheckRun_Result_STATUS_UNSPECIFIED
- case storepb.PlanCheckRunResult_Result_SUCCESS:
+ case storepb.Advice_SUCCESS:
return v1pb.PlanCheckRun_Result_SUCCESS
- case storepb.PlanCheckRunResult_Result_WARNING:
+ case storepb.Advice_WARNING:
return v1pb.PlanCheckRun_Result_WARNING
- case storepb.PlanCheckRunResult_Result_ERROR:
+ case storepb.Advice_ERROR:
return v1pb.PlanCheckRun_Result_ERROR
default:
return v1pb.PlanCheckRun_Result_STATUS_UNSPECIFIED
@@ -731,9 +731,9 @@ func convertToTask(ctx context.Context, s *store.Store, project *store.ProjectMe
case storepb.Task_DATABASE_MIGRATE:
// Handle DATABASE_MIGRATE based on migrate_type
switch task.Payload.GetMigrateType() {
- case storepb.Task_DDL, storepb.Task_GHOST, storepb.Task_MIGRATE_TYPE_UNSPECIFIED:
+ case storepb.MigrationType_DDL, storepb.MigrationType_GHOST, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED:
return convertToTaskFromSchemaUpdate(ctx, s, project, task)
- case storepb.Task_DML:
+ case storepb.MigrationType_DML:
return convertToTaskFromDataUpdate(ctx, s, project, task)
default:
return nil, errors.Errorf("unsupported migrate type %v", task.Payload.GetMigrateType())
@@ -804,9 +804,9 @@ func convertToTaskFromSchemaUpdate(ctx context.Context, s *store.Store, project
case storepb.Task_DATABASE_MIGRATE:
databaseChangeType = v1pb.DatabaseChangeType_MIGRATE
switch task.Payload.GetMigrateType() {
- case storepb.Task_DDL:
+ case storepb.MigrationType_DDL:
migrationType = v1pb.MigrationType_DDL
- case storepb.Task_GHOST:
+ case storepb.MigrationType_GHOST:
migrationType = v1pb.MigrationType_GHOST
default:
migrationType = v1pb.MigrationType_DDL
@@ -981,17 +981,17 @@ func convertToStoreTaskType(taskType v1pb.Task_Type) storepb.Task_Type {
}
}
-// getMigrateTypeFromMigrationType converts v1pb.MigrationType to storepb.Task_MigrateType
-func getMigrateTypeFromMigrationType(migrationType v1pb.MigrationType) storepb.Task_MigrateType {
+// getMigrateTypeFromMigrationType converts v1pb.MigrationType to storepb.MigrationType
+func getMigrateTypeFromMigrationType(migrationType v1pb.MigrationType) storepb.MigrationType {
switch migrationType {
case v1pb.MigrationType_DDL:
- return storepb.Task_DDL
+ return storepb.MigrationType_DDL
case v1pb.MigrationType_GHOST:
- return storepb.Task_GHOST
+ return storepb.MigrationType_GHOST
case v1pb.MigrationType_DML:
- return storepb.Task_DML
+ return storepb.MigrationType_DML
default:
- return storepb.Task_MIGRATE_TYPE_UNSPECIFIED
+ return storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
}
diff --git a/backend/api/v1/rollout_service_task.go b/backend/api/v1/rollout_service_task.go
index 9a751145be..7b81b1af70 100644
--- a/backend/api/v1/rollout_service_task.go
+++ b/backend/api/v1/rollout_service_task.go
@@ -302,21 +302,21 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(
}
// Determine task migrate type from plan config migrate type
- var taskMigrateType storepb.Task_MigrateType
+ var taskMigrateType storepb.MigrationType
var flags map[string]string
switch c.MigrateType {
- case storepb.PlanConfig_ChangeDatabaseConfig_DDL:
- taskMigrateType = storepb.Task_DDL
- case storepb.PlanConfig_ChangeDatabaseConfig_DML:
- taskMigrateType = storepb.Task_DML
- case storepb.PlanConfig_ChangeDatabaseConfig_GHOST:
- taskMigrateType = storepb.Task_GHOST
+ case storepb.MigrationType_DDL:
+ taskMigrateType = storepb.MigrationType_DDL
+ case storepb.MigrationType_DML:
+ taskMigrateType = storepb.MigrationType_DML
+ case storepb.MigrationType_GHOST:
+ taskMigrateType = storepb.MigrationType_GHOST
if _, err := ghost.GetUserFlags(c.GhostFlags); err != nil {
return nil, errors.Wrapf(err, "invalid ghost flags %q", c.GhostFlags)
}
flags = c.GhostFlags
default:
- taskMigrateType = storepb.Task_DDL
+ taskMigrateType = storepb.MigrationType_DDL
}
taskCreate := &store.TaskMessage{
@@ -400,9 +400,9 @@ func getTaskCreatesFromChangeDatabaseConfigWithRelease(
appliedVersions := make(map[string]string) // version -> sha256
for _, revision := range revisions {
switch revision.Payload.Type {
- case storepb.RevisionPayload_VERSIONED:
+ case storepb.SchemaChangeType_VERSIONED:
appliedVersions[revision.Version] = revision.Payload.SheetSha256
- case storepb.RevisionPayload_DECLARATIVE:
+ case storepb.SchemaChangeType_DECLARATIVE:
v, err := model.NewVersion(revision.Version)
if err != nil {
return nil, errors.Wrapf(err, "failed to parse revision version %q", revision.Version)
@@ -417,7 +417,7 @@ func getTaskCreatesFromChangeDatabaseConfigWithRelease(
for _, file := range release.Payload.Files {
switch file.Type {
- case storepb.ReleasePayload_File_VERSIONED:
+ case storepb.SchemaChangeType_VERSIONED:
// Skip if this version has already been applied
if _, ok := appliedVersions[file.Version]; ok {
// Skip files that have been applied with the same content
@@ -432,16 +432,16 @@ func getTaskCreatesFromChangeDatabaseConfigWithRelease(
}
// Determine migrate type based on file change type
- var migrateType storepb.Task_MigrateType
+ var migrateType storepb.MigrationType
switch file.MigrationType {
- case storepb.ReleasePayload_File_DDL:
- migrateType = storepb.Task_DDL
- case storepb.ReleasePayload_File_DDL_GHOST:
- migrateType = storepb.Task_GHOST
- case storepb.ReleasePayload_File_DML:
- migrateType = storepb.Task_DML
- case storepb.ReleasePayload_File_MIGRATION_TYPE_UNSPECIFIED:
- migrateType = storepb.Task_MIGRATE_TYPE_UNSPECIFIED
+ case storepb.MigrationType_DDL:
+ migrateType = storepb.MigrationType_DDL
+ case storepb.MigrationType_GHOST:
+ migrateType = storepb.MigrationType_GHOST
+ case storepb.MigrationType_DML:
+ migrateType = storepb.MigrationType_DML
+ case storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED:
+ migrateType = storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
default:
return nil, errors.Errorf("unsupported release file migration type %q", file.MigrationType)
}
@@ -458,11 +458,11 @@ func getTaskCreatesFromChangeDatabaseConfigWithRelease(
}
// Add ghost flags if this is a ghost migration
- if migrateType == storepb.Task_GHOST && c.GhostFlags != nil {
+ if migrateType == storepb.MigrationType_GHOST && c.GhostFlags != nil {
payload.Flags = c.GhostFlags
}
- if migrateType == storepb.Task_DML {
+ if migrateType == storepb.MigrationType_DML {
payload.EnablePriorBackup = c.EnablePriorBackup
}
@@ -478,7 +478,7 @@ func getTaskCreatesFromChangeDatabaseConfigWithRelease(
Payload: payload,
}
taskCreates = append(taskCreates, taskCreate)
- case storepb.ReleasePayload_File_DECLARATIVE:
+ case storepb.SchemaChangeType_DECLARATIVE:
// skip if applied revisions contain an equal or higher version than the declarative file
v, err := model.NewVersion(file.Version)
if err != nil {
diff --git a/backend/api/v1/sheet_service.go b/backend/api/v1/sheet_service.go
index 93ee6e516e..410cd483cf 100644
--- a/backend/api/v1/sheet_service.go
+++ b/backend/api/v1/sheet_service.go
@@ -319,7 +319,7 @@ func convertToStoreSheetMessage(projectID string, creatorID int, sheet *v1pb.She
return sheetMessage
}
-func convertToSheetCommands(commands []*storepb.SheetCommand) []*v1pb.SheetCommand {
+func convertToSheetCommands(commands []*storepb.Range) []*v1pb.SheetCommand {
var cs []*v1pb.SheetCommand
for _, command := range commands {
c := &v1pb.SheetCommand{
diff --git a/backend/component/sheet/sheet.go b/backend/component/sheet/sheet.go
index b60ea3812d..73fbc65b6d 100644
--- a/backend/component/sheet/sheet.go
+++ b/backend/component/sheet/sheet.go
@@ -88,7 +88,7 @@ func (sm *Manager) BatchCreateSheets(ctx context.Context, sheets []*store.SheetM
return sheets, nil
}
-func getSheetCommands(engine storepb.Engine, statement string) []*storepb.SheetCommand {
+func getSheetCommands(engine storepb.Engine, statement string) []*storepb.Range {
// Burnout for large SQL.
if len(statement) > common.MaxSheetCheckSize {
return nil
@@ -106,7 +106,7 @@ func getSheetCommands(engine storepb.Engine, statement string) []*storepb.SheetC
}
}
-func getSheetCommandsGeneral(engine storepb.Engine, statement string) []*storepb.SheetCommand {
+func getSheetCommandsGeneral(engine storepb.Engine, statement string) []*storepb.Range {
singleSQLs, err := base.SplitMultiSQL(engine, statement)
if err != nil {
if !strings.Contains(err.Error(), "not supported") {
@@ -119,11 +119,11 @@ func getSheetCommandsGeneral(engine storepb.Engine, statement string) []*storepb
return nil
}
- var sheetCommands []*storepb.SheetCommand
+ var sheetCommands []*storepb.Range
p := 0
for _, s := range singleSQLs {
np := p + len(s.Text)
- sheetCommands = append(sheetCommands, &storepb.SheetCommand{
+ sheetCommands = append(sheetCommands, &storepb.Range{
Start: int32(p),
End: int32(np),
})
@@ -132,7 +132,7 @@ func getSheetCommandsGeneral(engine storepb.Engine, statement string) []*storepb
return sheetCommands
}
-func getSheetCommandsFromByteOffset(engine storepb.Engine, statement string) []*storepb.SheetCommand {
+func getSheetCommandsFromByteOffset(engine storepb.Engine, statement string) []*storepb.Range {
singleSQLs, err := base.SplitMultiSQL(engine, statement)
if err != nil {
if !strings.Contains(err.Error(), "not supported") {
@@ -144,9 +144,9 @@ func getSheetCommandsFromByteOffset(engine storepb.Engine, statement string) []*
return nil
}
- var sheetCommands []*storepb.SheetCommand
+ var sheetCommands []*storepb.Range
for _, s := range singleSQLs {
- sheetCommands = append(sheetCommands, &storepb.SheetCommand{
+ sheetCommands = append(sheetCommands, &storepb.Range{
Start: int32(s.ByteOffsetStart),
End: int32(s.ByteOffsetEnd),
})
@@ -154,15 +154,15 @@ func getSheetCommandsFromByteOffset(engine storepb.Engine, statement string) []*
return sheetCommands
}
-func getSheetCommandsForMSSQL(statement string) []*storepb.SheetCommand {
- var sheetCommands []*storepb.SheetCommand
+func getSheetCommandsForMSSQL(statement string) []*storepb.Range {
+ var sheetCommands []*storepb.Range
batch := tsqlbatch.NewBatcher(statement)
for {
command, err := batch.Next()
if err == io.EOF {
b := batch.Batch()
- sheetCommands = append(sheetCommands, &storepb.SheetCommand{
+ sheetCommands = append(sheetCommands, &storepb.Range{
Start: int32(b.Start),
End: int32(b.End),
})
@@ -179,7 +179,7 @@ func getSheetCommandsForMSSQL(statement string) []*storepb.SheetCommand {
switch command.(type) {
case *tsqlbatch.GoCommand:
b := batch.Batch()
- sheetCommands = append(sheetCommands, &storepb.SheetCommand{
+ sheetCommands = append(sheetCommands, &storepb.Range{
Start: int32(b.Start),
End: int32(b.End),
})
diff --git a/backend/generated-go/store/advice.pb.go b/backend/generated-go/store/advice.pb.go
index 4fb6e800c3..7bec4d35cf 100644
--- a/backend/generated-go/store/advice.pb.go
+++ b/backend/generated-go/store/advice.pb.go
@@ -21,10 +21,10 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
+// Status represents the result status of the advice.
type Advice_Status int32
const (
- // Unspecified status.
Advice_STATUS_UNSPECIFIED Advice_Status = 0
Advice_SUCCESS Advice_Status = 1
Advice_WARNING Advice_Status = 2
diff --git a/backend/generated-go/store/changelog.pb.go b/backend/generated-go/store/changelog.pb.go
index b9f3eb62b8..bce7d65e9b 100644
--- a/backend/generated-go/store/changelog.pb.go
+++ b/backend/generated-go/store/changelog.pb.go
@@ -73,62 +73,6 @@ func (ChangelogPayload_Type) EnumDescriptor() ([]byte, []int) {
return file_store_changelog_proto_rawDescGZIP(), []int{0, 0}
}
-// MigrationType is the type for imperative schema migration.
-type ChangelogPayload_MigrationType int32
-
-const (
- ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED ChangelogPayload_MigrationType = 0
- // Used for DDL changes.
- ChangelogPayload_DDL ChangelogPayload_MigrationType = 1
- // Used for DML changes.
- ChangelogPayload_DML ChangelogPayload_MigrationType = 2
- // Used for DDL changes using gh-ost.
- ChangelogPayload_GHOST ChangelogPayload_MigrationType = 3
-)
-
-// Enum value maps for ChangelogPayload_MigrationType.
-var (
- ChangelogPayload_MigrationType_name = map[int32]string{
- 0: "MIGRATION_TYPE_UNSPECIFIED",
- 1: "DDL",
- 2: "DML",
- 3: "GHOST",
- }
- ChangelogPayload_MigrationType_value = map[string]int32{
- "MIGRATION_TYPE_UNSPECIFIED": 0,
- "DDL": 1,
- "DML": 2,
- "GHOST": 3,
- }
-)
-
-func (x ChangelogPayload_MigrationType) Enum() *ChangelogPayload_MigrationType {
- p := new(ChangelogPayload_MigrationType)
- *p = x
- return p
-}
-
-func (x ChangelogPayload_MigrationType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (ChangelogPayload_MigrationType) Descriptor() protoreflect.EnumDescriptor {
- return file_store_changelog_proto_enumTypes[1].Descriptor()
-}
-
-func (ChangelogPayload_MigrationType) Type() protoreflect.EnumType {
- return &file_store_changelog_proto_enumTypes[1]
-}
-
-func (x ChangelogPayload_MigrationType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use ChangelogPayload_MigrationType.Descriptor instead.
-func (ChangelogPayload_MigrationType) EnumDescriptor() ([]byte, []int) {
- return file_store_changelog_proto_rawDescGZIP(), []int{0, 1}
-}
-
type ChangelogPayload struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskruns/{taskrun}
@@ -141,11 +85,11 @@ type ChangelogPayload struct {
ChangedResources *ChangedResources `protobuf:"bytes,4,opt,name=changed_resources,json=changedResources,proto3" json:"changed_resources,omitempty"`
// The sheet that holds the content.
// Format: projects/{project}/sheets/{sheet}
- Sheet string `protobuf:"bytes,5,opt,name=sheet,proto3" json:"sheet,omitempty"`
- Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
- Type ChangelogPayload_Type `protobuf:"varint,7,opt,name=type,proto3,enum=bytebase.store.ChangelogPayload_Type" json:"type,omitempty"`
- GitCommit string `protobuf:"bytes,8,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`
- MigrationType ChangelogPayload_MigrationType `protobuf:"varint,9,opt,name=migration_type,json=migrationType,proto3,enum=bytebase.store.ChangelogPayload_MigrationType" json:"migration_type,omitempty"`
+ Sheet string `protobuf:"bytes,5,opt,name=sheet,proto3" json:"sheet,omitempty"`
+ Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
+ Type ChangelogPayload_Type `protobuf:"varint,7,opt,name=type,proto3,enum=bytebase.store.ChangelogPayload_Type" json:"type,omitempty"`
+ GitCommit string `protobuf:"bytes,8,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`
+ MigrationType MigrationType `protobuf:"varint,9,opt,name=migration_type,json=migrationType,proto3,enum=bytebase.store.MigrationType" json:"migration_type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -236,11 +180,11 @@ func (x *ChangelogPayload) GetGitCommit() string {
return ""
}
-func (x *ChangelogPayload) GetMigrationType() ChangelogPayload_MigrationType {
+func (x *ChangelogPayload) GetMigrationType() MigrationType {
if x != nil {
return x.MigrationType
}
- return ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED
+ return MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
type ChangedResources struct {
@@ -640,7 +584,7 @@ var File_store_changelog_proto protoreflect.FileDescriptor
const file_store_changelog_proto_rawDesc = "" +
"\n" +
- "\x15store/changelog.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"\x9f\x04\n" +
+ "\x15store/changelog.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"\xc0\x03\n" +
"\x10ChangelogPayload\x12\x19\n" +
"\btask_run\x18\x01 \x01(\tR\ataskRun\x12\x14\n" +
"\x05issue\x18\x02 \x01(\tR\x05issue\x12\x1a\n" +
@@ -650,18 +594,13 @@ const file_store_changelog_proto_rawDesc = "" +
"\aversion\x18\x06 \x01(\tR\aversion\x129\n" +
"\x04type\x18\a \x01(\x0e2%.bytebase.store.ChangelogPayload.TypeR\x04type\x12\x1d\n" +
"\n" +
- "git_commit\x18\b \x01(\tR\tgitCommit\x12U\n" +
- "\x0emigration_type\x18\t \x01(\x0e2..bytebase.store.ChangelogPayload.MigrationTypeR\rmigrationType\"@\n" +
+ "git_commit\x18\b \x01(\tR\tgitCommit\x12D\n" +
+ "\x0emigration_type\x18\t \x01(\x0e2\x1d.bytebase.store.MigrationTypeR\rmigrationType\"@\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\f\n" +
"\bBASELINE\x10\x01\x12\v\n" +
"\aMIGRATE\x10\x02\x12\a\n" +
- "\x03SDL\x10\x03\"L\n" +
- "\rMigrationType\x12\x1e\n" +
- "\x1aMIGRATION_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
- "\x03DDL\x10\x01\x12\a\n" +
- "\x03DML\x10\x02\x12\t\n" +
- "\x05GHOST\x10\x03\"Y\n" +
+ "\x03SDL\x10\x03\"Y\n" +
"\x10ChangedResources\x12E\n" +
"\tdatabases\x18\x01 \x03(\v2'.bytebase.store.ChangedResourceDatabaseR\tdatabases\"n\n" +
"\x17ChangedResourceDatabase\x12\x12\n" +
@@ -702,31 +641,31 @@ func file_store_changelog_proto_rawDescGZIP() []byte {
return file_store_changelog_proto_rawDescData
}
-var file_store_changelog_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_store_changelog_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_store_changelog_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_store_changelog_proto_goTypes = []any{
- (ChangelogPayload_Type)(0), // 0: bytebase.store.ChangelogPayload.Type
- (ChangelogPayload_MigrationType)(0), // 1: bytebase.store.ChangelogPayload.MigrationType
- (*ChangelogPayload)(nil), // 2: bytebase.store.ChangelogPayload
- (*ChangedResources)(nil), // 3: bytebase.store.ChangedResources
- (*ChangedResourceDatabase)(nil), // 4: bytebase.store.ChangedResourceDatabase
- (*ChangedResourceSchema)(nil), // 5: bytebase.store.ChangedResourceSchema
- (*ChangedResourceTable)(nil), // 6: bytebase.store.ChangedResourceTable
- (*ChangedResourceView)(nil), // 7: bytebase.store.ChangedResourceView
- (*ChangedResourceFunction)(nil), // 8: bytebase.store.ChangedResourceFunction
- (*ChangedResourceProcedure)(nil), // 9: bytebase.store.ChangedResourceProcedure
- (*Range)(nil), // 10: bytebase.store.Range
+ (ChangelogPayload_Type)(0), // 0: bytebase.store.ChangelogPayload.Type
+ (*ChangelogPayload)(nil), // 1: bytebase.store.ChangelogPayload
+ (*ChangedResources)(nil), // 2: bytebase.store.ChangedResources
+ (*ChangedResourceDatabase)(nil), // 3: bytebase.store.ChangedResourceDatabase
+ (*ChangedResourceSchema)(nil), // 4: bytebase.store.ChangedResourceSchema
+ (*ChangedResourceTable)(nil), // 5: bytebase.store.ChangedResourceTable
+ (*ChangedResourceView)(nil), // 6: bytebase.store.ChangedResourceView
+ (*ChangedResourceFunction)(nil), // 7: bytebase.store.ChangedResourceFunction
+ (*ChangedResourceProcedure)(nil), // 8: bytebase.store.ChangedResourceProcedure
+ (MigrationType)(0), // 9: bytebase.store.MigrationType
+ (*Range)(nil), // 10: bytebase.store.Range
}
var file_store_changelog_proto_depIdxs = []int32{
- 3, // 0: bytebase.store.ChangelogPayload.changed_resources:type_name -> bytebase.store.ChangedResources
+ 2, // 0: bytebase.store.ChangelogPayload.changed_resources:type_name -> bytebase.store.ChangedResources
0, // 1: bytebase.store.ChangelogPayload.type:type_name -> bytebase.store.ChangelogPayload.Type
- 1, // 2: bytebase.store.ChangelogPayload.migration_type:type_name -> bytebase.store.ChangelogPayload.MigrationType
- 4, // 3: bytebase.store.ChangedResources.databases:type_name -> bytebase.store.ChangedResourceDatabase
- 5, // 4: bytebase.store.ChangedResourceDatabase.schemas:type_name -> bytebase.store.ChangedResourceSchema
- 6, // 5: bytebase.store.ChangedResourceSchema.tables:type_name -> bytebase.store.ChangedResourceTable
- 7, // 6: bytebase.store.ChangedResourceSchema.views:type_name -> bytebase.store.ChangedResourceView
- 8, // 7: bytebase.store.ChangedResourceSchema.functions:type_name -> bytebase.store.ChangedResourceFunction
- 9, // 8: bytebase.store.ChangedResourceSchema.procedures:type_name -> bytebase.store.ChangedResourceProcedure
+ 9, // 2: bytebase.store.ChangelogPayload.migration_type:type_name -> bytebase.store.MigrationType
+ 3, // 3: bytebase.store.ChangedResources.databases:type_name -> bytebase.store.ChangedResourceDatabase
+ 4, // 4: bytebase.store.ChangedResourceDatabase.schemas:type_name -> bytebase.store.ChangedResourceSchema
+ 5, // 5: bytebase.store.ChangedResourceSchema.tables:type_name -> bytebase.store.ChangedResourceTable
+ 6, // 6: bytebase.store.ChangedResourceSchema.views:type_name -> bytebase.store.ChangedResourceView
+ 7, // 7: bytebase.store.ChangedResourceSchema.functions:type_name -> bytebase.store.ChangedResourceFunction
+ 8, // 8: bytebase.store.ChangedResourceSchema.procedures:type_name -> bytebase.store.ChangedResourceProcedure
10, // 9: bytebase.store.ChangedResourceTable.ranges:type_name -> bytebase.store.Range
10, // 10: bytebase.store.ChangedResourceView.ranges:type_name -> bytebase.store.Range
10, // 11: bytebase.store.ChangedResourceFunction.ranges:type_name -> bytebase.store.Range
@@ -749,7 +688,7 @@ func file_store_changelog_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_changelog_proto_rawDesc), len(file_store_changelog_proto_rawDesc)),
- NumEnums: 2,
+ NumEnums: 1,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
diff --git a/backend/generated-go/store/common.pb.go b/backend/generated-go/store/common.pb.go
index 0393213a68..5f84abf42c 100644
--- a/backend/generated-go/store/common.pb.go
+++ b/backend/generated-go/store/common.pb.go
@@ -361,6 +361,114 @@ func (RiskLevel) EnumDescriptor() ([]byte, []int) {
return file_store_common_proto_rawDescGZIP(), []int{4}
}
+// MigrationType represents the type of database migration.
+type MigrationType int32
+
+const (
+ MigrationType_MIGRATION_TYPE_UNSPECIFIED MigrationType = 0
+ // DDL changes (Data Definition Language) for schema modifications.
+ MigrationType_DDL MigrationType = 1
+ // DML changes (Data Manipulation Language) for data modifications.
+ MigrationType_DML MigrationType = 2
+ // Online schema migration using gh-ost tool.
+ MigrationType_GHOST MigrationType = 3
+)
+
+// Enum value maps for MigrationType.
+var (
+ MigrationType_name = map[int32]string{
+ 0: "MIGRATION_TYPE_UNSPECIFIED",
+ 1: "DDL",
+ 2: "DML",
+ 3: "GHOST",
+ }
+ MigrationType_value = map[string]int32{
+ "MIGRATION_TYPE_UNSPECIFIED": 0,
+ "DDL": 1,
+ "DML": 2,
+ "GHOST": 3,
+ }
+)
+
+func (x MigrationType) Enum() *MigrationType {
+ p := new(MigrationType)
+ *p = x
+ return p
+}
+
+func (x MigrationType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MigrationType) Descriptor() protoreflect.EnumDescriptor {
+ return file_store_common_proto_enumTypes[5].Descriptor()
+}
+
+func (MigrationType) Type() protoreflect.EnumType {
+ return &file_store_common_proto_enumTypes[5]
+}
+
+func (x MigrationType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MigrationType.Descriptor instead.
+func (MigrationType) EnumDescriptor() ([]byte, []int) {
+ return file_store_common_proto_rawDescGZIP(), []int{5}
+}
+
+// SchemaChangeType represents the strategy for schema changes.
+type SchemaChangeType int32
+
+const (
+ SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED SchemaChangeType = 0
+ // Versioned migration with explicit migration scripts.
+ SchemaChangeType_VERSIONED SchemaChangeType = 1
+ // Declarative schema definition (state-based).
+ SchemaChangeType_DECLARATIVE SchemaChangeType = 2
+)
+
+// Enum value maps for SchemaChangeType.
+var (
+ SchemaChangeType_name = map[int32]string{
+ 0: "SCHEMA_CHANGE_TYPE_UNSPECIFIED",
+ 1: "VERSIONED",
+ 2: "DECLARATIVE",
+ }
+ SchemaChangeType_value = map[string]int32{
+ "SCHEMA_CHANGE_TYPE_UNSPECIFIED": 0,
+ "VERSIONED": 1,
+ "DECLARATIVE": 2,
+ }
+)
+
+func (x SchemaChangeType) Enum() *SchemaChangeType {
+ p := new(SchemaChangeType)
+ *p = x
+ return p
+}
+
+func (x SchemaChangeType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SchemaChangeType) Descriptor() protoreflect.EnumDescriptor {
+ return file_store_common_proto_enumTypes[6].Descriptor()
+}
+
+func (SchemaChangeType) Type() protoreflect.EnumType {
+ return &file_store_common_proto_enumTypes[6]
+}
+
+func (x SchemaChangeType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SchemaChangeType.Descriptor instead.
+func (SchemaChangeType) EnumDescriptor() ([]byte, []int) {
+ return file_store_common_proto_rawDescGZIP(), []int{6}
+}
+
// PageToken is used internally for obfuscating pagination tokens.
type PageToken struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -595,7 +703,16 @@ const file_store_common_proto_rawDesc = "" +
"\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\a\n" +
"\x03LOW\x10\x01\x12\f\n" +
"\bMODERATE\x10\x02\x12\b\n" +
- "\x04HIGH\x10\x03B\x14Z\x12generated-go/storeb\x06proto3"
+ "\x04HIGH\x10\x03*L\n" +
+ "\rMigrationType\x12\x1e\n" +
+ "\x1aMIGRATION_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
+ "\x03DDL\x10\x01\x12\a\n" +
+ "\x03DML\x10\x02\x12\t\n" +
+ "\x05GHOST\x10\x03*V\n" +
+ "\x10SchemaChangeType\x12\"\n" +
+ "\x1eSCHEMA_CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\r\n" +
+ "\tVERSIONED\x10\x01\x12\x0f\n" +
+ "\vDECLARATIVE\x10\x02B\x14Z\x12generated-go/storeb\x06proto3"
var (
file_store_common_proto_rawDescOnce sync.Once
@@ -609,17 +726,19 @@ func file_store_common_proto_rawDescGZIP() []byte {
return file_store_common_proto_rawDescData
}
-var file_store_common_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
+var file_store_common_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
var file_store_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_store_common_proto_goTypes = []any{
- (Engine)(0), // 0: bytebase.store.Engine
- (VCSType)(0), // 1: bytebase.store.VCSType
- (MaskingLevel)(0), // 2: bytebase.store.MaskingLevel
- (ExportFormat)(0), // 3: bytebase.store.ExportFormat
- (RiskLevel)(0), // 4: bytebase.store.RiskLevel
- (*PageToken)(nil), // 5: bytebase.store.PageToken
- (*Position)(nil), // 6: bytebase.store.Position
- (*Range)(nil), // 7: bytebase.store.Range
+ (Engine)(0), // 0: bytebase.store.Engine
+ (VCSType)(0), // 1: bytebase.store.VCSType
+ (MaskingLevel)(0), // 2: bytebase.store.MaskingLevel
+ (ExportFormat)(0), // 3: bytebase.store.ExportFormat
+ (RiskLevel)(0), // 4: bytebase.store.RiskLevel
+ (MigrationType)(0), // 5: bytebase.store.MigrationType
+ (SchemaChangeType)(0), // 6: bytebase.store.SchemaChangeType
+ (*PageToken)(nil), // 7: bytebase.store.PageToken
+ (*Position)(nil), // 8: bytebase.store.Position
+ (*Range)(nil), // 9: bytebase.store.Range
}
var file_store_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@@ -639,7 +758,7 @@ func file_store_common_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_common_proto_rawDesc), len(file_store_common_proto_rawDesc)),
- NumEnums: 5,
+ NumEnums: 7,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
diff --git a/backend/generated-go/store/db_group.pb.go b/backend/generated-go/store/db_group.pb.go
deleted file mode 100644
index 92e9fcf488..0000000000
--- a/backend/generated-go/store/db_group.pb.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.36.10
-// protoc (unknown)
-// source: store/db_group.proto
-
-package store
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- unsafe "unsafe"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type DatabaseGroupPayload struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DatabaseGroupPayload) Reset() {
- *x = DatabaseGroupPayload{}
- mi := &file_store_db_group_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DatabaseGroupPayload) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DatabaseGroupPayload) ProtoMessage() {}
-
-func (x *DatabaseGroupPayload) ProtoReflect() protoreflect.Message {
- mi := &file_store_db_group_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DatabaseGroupPayload.ProtoReflect.Descriptor instead.
-func (*DatabaseGroupPayload) Descriptor() ([]byte, []int) {
- return file_store_db_group_proto_rawDescGZIP(), []int{0}
-}
-
-var File_store_db_group_proto protoreflect.FileDescriptor
-
-const file_store_db_group_proto_rawDesc = "" +
- "\n" +
- "\x14store/db_group.proto\x12\x0ebytebase.store\"\x16\n" +
- "\x14DatabaseGroupPayloadB\x14Z\x12generated-go/storeb\x06proto3"
-
-var (
- file_store_db_group_proto_rawDescOnce sync.Once
- file_store_db_group_proto_rawDescData []byte
-)
-
-func file_store_db_group_proto_rawDescGZIP() []byte {
- file_store_db_group_proto_rawDescOnce.Do(func() {
- file_store_db_group_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_db_group_proto_rawDesc), len(file_store_db_group_proto_rawDesc)))
- })
- return file_store_db_group_proto_rawDescData
-}
-
-var file_store_db_group_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_store_db_group_proto_goTypes = []any{
- (*DatabaseGroupPayload)(nil), // 0: bytebase.store.DatabaseGroupPayload
-}
-var file_store_db_group_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_store_db_group_proto_init() }
-func file_store_db_group_proto_init() {
- if File_store_db_group_proto != nil {
- return
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_db_group_proto_rawDesc), len(file_store_db_group_proto_rawDesc)),
- NumEnums: 0,
- NumMessages: 1,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_store_db_group_proto_goTypes,
- DependencyIndexes: file_store_db_group_proto_depIdxs,
- MessageInfos: file_store_db_group_proto_msgTypes,
- }.Build()
- File_store_db_group_proto = out.File
- file_store_db_group_proto_goTypes = nil
- file_store_db_group_proto_depIdxs = nil
-}
diff --git a/backend/generated-go/store/db_group_equal.pb.go b/backend/generated-go/store/db_group_equal.pb.go
deleted file mode 100644
index 66543e547d..0000000000
--- a/backend/generated-go/store/db_group_equal.pb.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Code generated by protoc-gen-equal-go. DO NOT EDIT.
-// source: store/db_group.proto
-
-package store
-
-func (x *DatabaseGroupPayload) Equal(y *DatabaseGroupPayload) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- return true
-}
diff --git a/backend/generated-go/store/issue_comment.pb.go b/backend/generated-go/store/issue_comment.pb.go
index 6e838b4c4e..126b523b4c 100644
--- a/backend/generated-go/store/issue_comment.pb.go
+++ b/backend/generated-go/store/issue_comment.pb.go
@@ -21,171 +21,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-type IssueCommentPayload_Approval_Status int32
-
-const (
- IssueCommentPayload_Approval_STATUS_UNSPECIFIED IssueCommentPayload_Approval_Status = 0
- IssueCommentPayload_Approval_PENDING IssueCommentPayload_Approval_Status = 1
- IssueCommentPayload_Approval_APPROVED IssueCommentPayload_Approval_Status = 2
- IssueCommentPayload_Approval_REJECTED IssueCommentPayload_Approval_Status = 3
-)
-
-// Enum value maps for IssueCommentPayload_Approval_Status.
-var (
- IssueCommentPayload_Approval_Status_name = map[int32]string{
- 0: "STATUS_UNSPECIFIED",
- 1: "PENDING",
- 2: "APPROVED",
- 3: "REJECTED",
- }
- IssueCommentPayload_Approval_Status_value = map[string]int32{
- "STATUS_UNSPECIFIED": 0,
- "PENDING": 1,
- "APPROVED": 2,
- "REJECTED": 3,
- }
-)
-
-func (x IssueCommentPayload_Approval_Status) Enum() *IssueCommentPayload_Approval_Status {
- p := new(IssueCommentPayload_Approval_Status)
- *p = x
- return p
-}
-
-func (x IssueCommentPayload_Approval_Status) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (IssueCommentPayload_Approval_Status) Descriptor() protoreflect.EnumDescriptor {
- return file_store_issue_comment_proto_enumTypes[0].Descriptor()
-}
-
-func (IssueCommentPayload_Approval_Status) Type() protoreflect.EnumType {
- return &file_store_issue_comment_proto_enumTypes[0]
-}
-
-func (x IssueCommentPayload_Approval_Status) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use IssueCommentPayload_Approval_Status.Descriptor instead.
-func (IssueCommentPayload_Approval_Status) EnumDescriptor() ([]byte, []int) {
- return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 0, 0}
-}
-
-type IssueCommentPayload_IssueUpdate_IssueStatus int32
-
-const (
- IssueCommentPayload_IssueUpdate_ISSUE_STATUS_UNSPECIFIED IssueCommentPayload_IssueUpdate_IssueStatus = 0
- IssueCommentPayload_IssueUpdate_OPEN IssueCommentPayload_IssueUpdate_IssueStatus = 1
- IssueCommentPayload_IssueUpdate_DONE IssueCommentPayload_IssueUpdate_IssueStatus = 2
- IssueCommentPayload_IssueUpdate_CANCELED IssueCommentPayload_IssueUpdate_IssueStatus = 3
-)
-
-// Enum value maps for IssueCommentPayload_IssueUpdate_IssueStatus.
-var (
- IssueCommentPayload_IssueUpdate_IssueStatus_name = map[int32]string{
- 0: "ISSUE_STATUS_UNSPECIFIED",
- 1: "OPEN",
- 2: "DONE",
- 3: "CANCELED",
- }
- IssueCommentPayload_IssueUpdate_IssueStatus_value = map[string]int32{
- "ISSUE_STATUS_UNSPECIFIED": 0,
- "OPEN": 1,
- "DONE": 2,
- "CANCELED": 3,
- }
-)
-
-func (x IssueCommentPayload_IssueUpdate_IssueStatus) Enum() *IssueCommentPayload_IssueUpdate_IssueStatus {
- p := new(IssueCommentPayload_IssueUpdate_IssueStatus)
- *p = x
- return p
-}
-
-func (x IssueCommentPayload_IssueUpdate_IssueStatus) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (IssueCommentPayload_IssueUpdate_IssueStatus) Descriptor() protoreflect.EnumDescriptor {
- return file_store_issue_comment_proto_enumTypes[1].Descriptor()
-}
-
-func (IssueCommentPayload_IssueUpdate_IssueStatus) Type() protoreflect.EnumType {
- return &file_store_issue_comment_proto_enumTypes[1]
-}
-
-func (x IssueCommentPayload_IssueUpdate_IssueStatus) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use IssueCommentPayload_IssueUpdate_IssueStatus.Descriptor instead.
-func (IssueCommentPayload_IssueUpdate_IssueStatus) EnumDescriptor() ([]byte, []int) {
- return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 1, 0}
-}
-
-type IssueCommentPayload_TaskUpdate_Status int32
-
-const (
- IssueCommentPayload_TaskUpdate_STATUS_UNSPECIFIED IssueCommentPayload_TaskUpdate_Status = 0
- IssueCommentPayload_TaskUpdate_PENDING IssueCommentPayload_TaskUpdate_Status = 1
- IssueCommentPayload_TaskUpdate_RUNNING IssueCommentPayload_TaskUpdate_Status = 2
- IssueCommentPayload_TaskUpdate_DONE IssueCommentPayload_TaskUpdate_Status = 3
- IssueCommentPayload_TaskUpdate_FAILED IssueCommentPayload_TaskUpdate_Status = 4
- IssueCommentPayload_TaskUpdate_SKIPPED IssueCommentPayload_TaskUpdate_Status = 5
- IssueCommentPayload_TaskUpdate_CANCELED IssueCommentPayload_TaskUpdate_Status = 6
-)
-
-// Enum value maps for IssueCommentPayload_TaskUpdate_Status.
-var (
- IssueCommentPayload_TaskUpdate_Status_name = map[int32]string{
- 0: "STATUS_UNSPECIFIED",
- 1: "PENDING",
- 2: "RUNNING",
- 3: "DONE",
- 4: "FAILED",
- 5: "SKIPPED",
- 6: "CANCELED",
- }
- IssueCommentPayload_TaskUpdate_Status_value = map[string]int32{
- "STATUS_UNSPECIFIED": 0,
- "PENDING": 1,
- "RUNNING": 2,
- "DONE": 3,
- "FAILED": 4,
- "SKIPPED": 5,
- "CANCELED": 6,
- }
-)
-
-func (x IssueCommentPayload_TaskUpdate_Status) Enum() *IssueCommentPayload_TaskUpdate_Status {
- p := new(IssueCommentPayload_TaskUpdate_Status)
- *p = x
- return p
-}
-
-func (x IssueCommentPayload_TaskUpdate_Status) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (IssueCommentPayload_TaskUpdate_Status) Descriptor() protoreflect.EnumDescriptor {
- return file_store_issue_comment_proto_enumTypes[2].Descriptor()
-}
-
-func (IssueCommentPayload_TaskUpdate_Status) Type() protoreflect.EnumType {
- return &file_store_issue_comment_proto_enumTypes[2]
-}
-
-func (x IssueCommentPayload_TaskUpdate_Status) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use IssueCommentPayload_TaskUpdate_Status.Descriptor instead.
-func (IssueCommentPayload_TaskUpdate_Status) EnumDescriptor() ([]byte, []int) {
- return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 3, 0}
-}
-
type IssueCommentPayload struct {
state protoimpl.MessageState `protogen:"open.v1"`
Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"`
@@ -325,8 +160,8 @@ func (*IssueCommentPayload_TaskUpdate_) isIssueCommentPayload_Event() {}
func (*IssueCommentPayload_TaskPriorBackup_) isIssueCommentPayload_Event() {}
type IssueCommentPayload_Approval struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Status IssueCommentPayload_Approval_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.IssueCommentPayload_Approval_Status" json:"status,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status IssuePayloadApproval_Approver_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.IssuePayloadApproval_Approver_Status" json:"status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -361,23 +196,23 @@ func (*IssueCommentPayload_Approval) Descriptor() ([]byte, []int) {
return file_store_issue_comment_proto_rawDescGZIP(), []int{0, 0}
}
-func (x *IssueCommentPayload_Approval) GetStatus() IssueCommentPayload_Approval_Status {
+func (x *IssueCommentPayload_Approval) GetStatus() IssuePayloadApproval_Approver_Status {
if x != nil {
return x.Status
}
- return IssueCommentPayload_Approval_STATUS_UNSPECIFIED
+ return IssuePayloadApproval_Approver_STATUS_UNSPECIFIED
}
type IssueCommentPayload_IssueUpdate struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- FromTitle *string `protobuf:"bytes,1,opt,name=from_title,json=fromTitle,proto3,oneof" json:"from_title,omitempty"`
- ToTitle *string `protobuf:"bytes,2,opt,name=to_title,json=toTitle,proto3,oneof" json:"to_title,omitempty"`
- FromDescription *string `protobuf:"bytes,3,opt,name=from_description,json=fromDescription,proto3,oneof" json:"from_description,omitempty"`
- ToDescription *string `protobuf:"bytes,4,opt,name=to_description,json=toDescription,proto3,oneof" json:"to_description,omitempty"`
- FromStatus *IssueCommentPayload_IssueUpdate_IssueStatus `protobuf:"varint,5,opt,name=from_status,json=fromStatus,proto3,enum=bytebase.store.IssueCommentPayload_IssueUpdate_IssueStatus,oneof" json:"from_status,omitempty"`
- ToStatus *IssueCommentPayload_IssueUpdate_IssueStatus `protobuf:"varint,6,opt,name=to_status,json=toStatus,proto3,enum=bytebase.store.IssueCommentPayload_IssueUpdate_IssueStatus,oneof" json:"to_status,omitempty"`
- FromLabels []string `protobuf:"bytes,7,rep,name=from_labels,json=fromLabels,proto3" json:"from_labels,omitempty"`
- ToLabels []string `protobuf:"bytes,8,rep,name=to_labels,json=toLabels,proto3" json:"to_labels,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ FromTitle *string `protobuf:"bytes,1,opt,name=from_title,json=fromTitle,proto3,oneof" json:"from_title,omitempty"`
+ ToTitle *string `protobuf:"bytes,2,opt,name=to_title,json=toTitle,proto3,oneof" json:"to_title,omitempty"`
+ FromDescription *string `protobuf:"bytes,3,opt,name=from_description,json=fromDescription,proto3,oneof" json:"from_description,omitempty"`
+ ToDescription *string `protobuf:"bytes,4,opt,name=to_description,json=toDescription,proto3,oneof" json:"to_description,omitempty"`
+ FromStatus *Issue_Status `protobuf:"varint,5,opt,name=from_status,json=fromStatus,proto3,enum=bytebase.store.Issue_Status,oneof" json:"from_status,omitempty"`
+ ToStatus *Issue_Status `protobuf:"varint,6,opt,name=to_status,json=toStatus,proto3,enum=bytebase.store.Issue_Status,oneof" json:"to_status,omitempty"`
+ FromLabels []string `protobuf:"bytes,7,rep,name=from_labels,json=fromLabels,proto3" json:"from_labels,omitempty"`
+ ToLabels []string `protobuf:"bytes,8,rep,name=to_labels,json=toLabels,proto3" json:"to_labels,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -440,18 +275,18 @@ func (x *IssueCommentPayload_IssueUpdate) GetToDescription() string {
return ""
}
-func (x *IssueCommentPayload_IssueUpdate) GetFromStatus() IssueCommentPayload_IssueUpdate_IssueStatus {
+func (x *IssueCommentPayload_IssueUpdate) GetFromStatus() Issue_Status {
if x != nil && x.FromStatus != nil {
return *x.FromStatus
}
- return IssueCommentPayload_IssueUpdate_ISSUE_STATUS_UNSPECIFIED
+ return Issue_ISSUE_STATUS_UNSPECIFIED
}
-func (x *IssueCommentPayload_IssueUpdate) GetToStatus() IssueCommentPayload_IssueUpdate_IssueStatus {
+func (x *IssueCommentPayload_IssueUpdate) GetToStatus() Issue_Status {
if x != nil && x.ToStatus != nil {
return *x.ToStatus
}
- return IssueCommentPayload_IssueUpdate_ISSUE_STATUS_UNSPECIFIED
+ return Issue_ISSUE_STATUS_UNSPECIFIED
}
func (x *IssueCommentPayload_IssueUpdate) GetFromLabels() []string {
@@ -518,8 +353,8 @@ type IssueCommentPayload_TaskUpdate struct {
// Format: projects/{project}/sheets/{sheet}
FromSheet *string `protobuf:"bytes,2,opt,name=from_sheet,json=fromSheet,proto3,oneof" json:"from_sheet,omitempty"`
// Format: projects/{project}/sheets/{sheet}
- ToSheet *string `protobuf:"bytes,3,opt,name=to_sheet,json=toSheet,proto3,oneof" json:"to_sheet,omitempty"`
- ToStatus *IssueCommentPayload_TaskUpdate_Status `protobuf:"varint,6,opt,name=to_status,json=toStatus,proto3,enum=bytebase.store.IssueCommentPayload_TaskUpdate_Status,oneof" json:"to_status,omitempty"`
+ ToSheet *string `protobuf:"bytes,3,opt,name=to_sheet,json=toSheet,proto3,oneof" json:"to_sheet,omitempty"`
+ ToStatus *TaskRun_Status `protobuf:"varint,6,opt,name=to_status,json=toStatus,proto3,enum=bytebase.store.TaskRun_Status,oneof" json:"to_status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -575,11 +410,11 @@ func (x *IssueCommentPayload_TaskUpdate) GetToSheet() string {
return ""
}
-func (x *IssueCommentPayload_TaskUpdate) GetToStatus() IssueCommentPayload_TaskUpdate_Status {
+func (x *IssueCommentPayload_TaskUpdate) GetToStatus() TaskRun_Status {
if x != nil && x.ToStatus != nil {
return *x.ToStatus
}
- return IssueCommentPayload_TaskUpdate_STATUS_UNSPECIFIED
+ return TaskRun_STATUS_UNSPECIFIED
}
type IssueCommentPayload_TaskPriorBackup struct {
@@ -714,7 +549,7 @@ var File_store_issue_comment_proto protoreflect.FileDescriptor
const file_store_issue_comment_proto_rawDesc = "" +
"\n" +
- "\x19store/issue_comment.proto\x12\x0ebytebase.store\"\xfe\x0e\n" +
+ "\x19store/issue_comment.proto\x12\x0ebytebase.store\x1a\x14store/approval.proto\x1a\x11store/issue.proto\x1a\x14store/task_run.proto\"\xa2\f\n" +
"\x13IssueCommentPayload\x12\x18\n" +
"\acomment\x18\x01 \x01(\tR\acomment\x12J\n" +
"\bapproval\x18\x02 \x01(\v2,.bytebase.store.IssueCommentPayload.ApprovalH\x00R\bapproval\x12T\n" +
@@ -722,31 +557,21 @@ const file_store_issue_comment_proto_rawDesc = "" +
"\tstage_end\x18\x04 \x01(\v2,.bytebase.store.IssueCommentPayload.StageEndH\x00R\bstageEnd\x12Q\n" +
"\vtask_update\x18\x05 \x01(\v2..bytebase.store.IssueCommentPayload.TaskUpdateH\x00R\n" +
"taskUpdate\x12a\n" +
- "\x11task_prior_backup\x18\x06 \x01(\v23.bytebase.store.IssueCommentPayload.TaskPriorBackupH\x00R\x0ftaskPriorBackup\x1a\xa2\x01\n" +
- "\bApproval\x12K\n" +
- "\x06status\x18\x01 \x01(\x0e23.bytebase.store.IssueCommentPayload.Approval.StatusR\x06status\"I\n" +
- "\x06Status\x12\x16\n" +
- "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +
- "\aPENDING\x10\x01\x12\f\n" +
- "\bAPPROVED\x10\x02\x12\f\n" +
- "\bREJECTED\x10\x03\x1a\xde\x04\n" +
+ "\x11task_prior_backup\x18\x06 \x01(\v23.bytebase.store.IssueCommentPayload.TaskPriorBackupH\x00R\x0ftaskPriorBackup\x1aX\n" +
+ "\bApproval\x12L\n" +
+ "\x06status\x18\x01 \x01(\x0e24.bytebase.store.IssuePayloadApproval.Approver.StatusR\x06status\x1a\xd1\x03\n" +
"\vIssueUpdate\x12\"\n" +
"\n" +
"from_title\x18\x01 \x01(\tH\x00R\tfromTitle\x88\x01\x01\x12\x1e\n" +
"\bto_title\x18\x02 \x01(\tH\x01R\atoTitle\x88\x01\x01\x12.\n" +
"\x10from_description\x18\x03 \x01(\tH\x02R\x0ffromDescription\x88\x01\x01\x12*\n" +
- "\x0eto_description\x18\x04 \x01(\tH\x03R\rtoDescription\x88\x01\x01\x12a\n" +
- "\vfrom_status\x18\x05 \x01(\x0e2;.bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatusH\x04R\n" +
- "fromStatus\x88\x01\x01\x12]\n" +
- "\tto_status\x18\x06 \x01(\x0e2;.bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatusH\x05R\btoStatus\x88\x01\x01\x12\x1f\n" +
+ "\x0eto_description\x18\x04 \x01(\tH\x03R\rtoDescription\x88\x01\x01\x12B\n" +
+ "\vfrom_status\x18\x05 \x01(\x0e2\x1c.bytebase.store.Issue.StatusH\x04R\n" +
+ "fromStatus\x88\x01\x01\x12>\n" +
+ "\tto_status\x18\x06 \x01(\x0e2\x1c.bytebase.store.Issue.StatusH\x05R\btoStatus\x88\x01\x01\x12\x1f\n" +
"\vfrom_labels\x18\a \x03(\tR\n" +
"fromLabels\x12\x1b\n" +
- "\tto_labels\x18\b \x03(\tR\btoLabels\"M\n" +
- "\vIssueStatus\x12\x1c\n" +
- "\x18ISSUE_STATUS_UNSPECIFIED\x10\x00\x12\b\n" +
- "\x04OPEN\x10\x01\x12\b\n" +
- "\x04DONE\x10\x02\x12\f\n" +
- "\bCANCELED\x10\x03B\r\n" +
+ "\tto_labels\x18\b \x03(\tR\btoLabelsB\r\n" +
"\v_from_titleB\v\n" +
"\t_to_titleB\x13\n" +
"\x11_from_descriptionB\x11\n" +
@@ -755,23 +580,14 @@ const file_store_issue_comment_proto_rawDesc = "" +
"\n" +
"_to_status\x1a \n" +
"\bStageEnd\x12\x14\n" +
- "\x05stage\x18\x01 \x01(\tR\x05stage\x1a\xd6\x02\n" +
+ "\x05stage\x18\x01 \x01(\tR\x05stage\x1a\xd2\x01\n" +
"\n" +
"TaskUpdate\x12\x14\n" +
"\x05tasks\x18\x01 \x03(\tR\x05tasks\x12\"\n" +
"\n" +
"from_sheet\x18\x02 \x01(\tH\x00R\tfromSheet\x88\x01\x01\x12\x1e\n" +
- "\bto_sheet\x18\x03 \x01(\tH\x01R\atoSheet\x88\x01\x01\x12W\n" +
- "\tto_status\x18\x06 \x01(\x0e25.bytebase.store.IssueCommentPayload.TaskUpdate.StatusH\x02R\btoStatus\x88\x01\x01\"k\n" +
- "\x06Status\x12\x16\n" +
- "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +
- "\aPENDING\x10\x01\x12\v\n" +
- "\aRUNNING\x10\x02\x12\b\n" +
- "\x04DONE\x10\x03\x12\n" +
- "\n" +
- "\x06FAILED\x10\x04\x12\v\n" +
- "\aSKIPPED\x10\x05\x12\f\n" +
- "\bCANCELED\x10\x06B\r\n" +
+ "\bto_sheet\x18\x03 \x01(\tH\x01R\atoSheet\x88\x01\x01\x12@\n" +
+ "\tto_status\x18\x06 \x01(\x0e2\x1e.bytebase.store.TaskRun.StatusH\x02R\btoStatus\x88\x01\x01B\r\n" +
"\v_from_sheetB\v\n" +
"\t_to_sheetB\f\n" +
"\n" +
@@ -800,31 +616,30 @@ func file_store_issue_comment_proto_rawDescGZIP() []byte {
return file_store_issue_comment_proto_rawDescData
}
-var file_store_issue_comment_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_store_issue_comment_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_store_issue_comment_proto_goTypes = []any{
- (IssueCommentPayload_Approval_Status)(0), // 0: bytebase.store.IssueCommentPayload.Approval.Status
- (IssueCommentPayload_IssueUpdate_IssueStatus)(0), // 1: bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus
- (IssueCommentPayload_TaskUpdate_Status)(0), // 2: bytebase.store.IssueCommentPayload.TaskUpdate.Status
- (*IssueCommentPayload)(nil), // 3: bytebase.store.IssueCommentPayload
- (*IssueCommentPayload_Approval)(nil), // 4: bytebase.store.IssueCommentPayload.Approval
- (*IssueCommentPayload_IssueUpdate)(nil), // 5: bytebase.store.IssueCommentPayload.IssueUpdate
- (*IssueCommentPayload_StageEnd)(nil), // 6: bytebase.store.IssueCommentPayload.StageEnd
- (*IssueCommentPayload_TaskUpdate)(nil), // 7: bytebase.store.IssueCommentPayload.TaskUpdate
- (*IssueCommentPayload_TaskPriorBackup)(nil), // 8: bytebase.store.IssueCommentPayload.TaskPriorBackup
- (*IssueCommentPayload_TaskPriorBackup_Table)(nil), // 9: bytebase.store.IssueCommentPayload.TaskPriorBackup.Table
+ (*IssueCommentPayload)(nil), // 0: bytebase.store.IssueCommentPayload
+ (*IssueCommentPayload_Approval)(nil), // 1: bytebase.store.IssueCommentPayload.Approval
+ (*IssueCommentPayload_IssueUpdate)(nil), // 2: bytebase.store.IssueCommentPayload.IssueUpdate
+ (*IssueCommentPayload_StageEnd)(nil), // 3: bytebase.store.IssueCommentPayload.StageEnd
+ (*IssueCommentPayload_TaskUpdate)(nil), // 4: bytebase.store.IssueCommentPayload.TaskUpdate
+ (*IssueCommentPayload_TaskPriorBackup)(nil), // 5: bytebase.store.IssueCommentPayload.TaskPriorBackup
+ (*IssueCommentPayload_TaskPriorBackup_Table)(nil), // 6: bytebase.store.IssueCommentPayload.TaskPriorBackup.Table
+ (IssuePayloadApproval_Approver_Status)(0), // 7: bytebase.store.IssuePayloadApproval.Approver.Status
+ (Issue_Status)(0), // 8: bytebase.store.Issue.Status
+ (TaskRun_Status)(0), // 9: bytebase.store.TaskRun.Status
}
var file_store_issue_comment_proto_depIdxs = []int32{
- 4, // 0: bytebase.store.IssueCommentPayload.approval:type_name -> bytebase.store.IssueCommentPayload.Approval
- 5, // 1: bytebase.store.IssueCommentPayload.issue_update:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate
- 6, // 2: bytebase.store.IssueCommentPayload.stage_end:type_name -> bytebase.store.IssueCommentPayload.StageEnd
- 7, // 3: bytebase.store.IssueCommentPayload.task_update:type_name -> bytebase.store.IssueCommentPayload.TaskUpdate
- 8, // 4: bytebase.store.IssueCommentPayload.task_prior_backup:type_name -> bytebase.store.IssueCommentPayload.TaskPriorBackup
- 0, // 5: bytebase.store.IssueCommentPayload.Approval.status:type_name -> bytebase.store.IssueCommentPayload.Approval.Status
- 1, // 6: bytebase.store.IssueCommentPayload.IssueUpdate.from_status:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus
- 1, // 7: bytebase.store.IssueCommentPayload.IssueUpdate.to_status:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus
- 2, // 8: bytebase.store.IssueCommentPayload.TaskUpdate.to_status:type_name -> bytebase.store.IssueCommentPayload.TaskUpdate.Status
- 9, // 9: bytebase.store.IssueCommentPayload.TaskPriorBackup.tables:type_name -> bytebase.store.IssueCommentPayload.TaskPriorBackup.Table
+ 1, // 0: bytebase.store.IssueCommentPayload.approval:type_name -> bytebase.store.IssueCommentPayload.Approval
+ 2, // 1: bytebase.store.IssueCommentPayload.issue_update:type_name -> bytebase.store.IssueCommentPayload.IssueUpdate
+ 3, // 2: bytebase.store.IssueCommentPayload.stage_end:type_name -> bytebase.store.IssueCommentPayload.StageEnd
+ 4, // 3: bytebase.store.IssueCommentPayload.task_update:type_name -> bytebase.store.IssueCommentPayload.TaskUpdate
+ 5, // 4: bytebase.store.IssueCommentPayload.task_prior_backup:type_name -> bytebase.store.IssueCommentPayload.TaskPriorBackup
+ 7, // 5: bytebase.store.IssueCommentPayload.Approval.status:type_name -> bytebase.store.IssuePayloadApproval.Approver.Status
+ 8, // 6: bytebase.store.IssueCommentPayload.IssueUpdate.from_status:type_name -> bytebase.store.Issue.Status
+ 8, // 7: bytebase.store.IssueCommentPayload.IssueUpdate.to_status:type_name -> bytebase.store.Issue.Status
+ 9, // 8: bytebase.store.IssueCommentPayload.TaskUpdate.to_status:type_name -> bytebase.store.TaskRun.Status
+ 6, // 9: bytebase.store.IssueCommentPayload.TaskPriorBackup.tables:type_name -> bytebase.store.IssueCommentPayload.TaskPriorBackup.Table
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
@@ -837,6 +652,9 @@ func file_store_issue_comment_proto_init() {
if File_store_issue_comment_proto != nil {
return
}
+ file_store_approval_proto_init()
+ file_store_issue_proto_init()
+ file_store_task_run_proto_init()
file_store_issue_comment_proto_msgTypes[0].OneofWrappers = []any{
(*IssueCommentPayload_Approval_)(nil),
(*IssueCommentPayload_IssueUpdate_)(nil),
@@ -852,14 +670,13 @@ func file_store_issue_comment_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_issue_comment_proto_rawDesc), len(file_store_issue_comment_proto_rawDesc)),
- NumEnums: 3,
+ NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_store_issue_comment_proto_goTypes,
DependencyIndexes: file_store_issue_comment_proto_depIdxs,
- EnumInfos: file_store_issue_comment_proto_enumTypes,
MessageInfos: file_store_issue_comment_proto_msgTypes,
}.Build()
File_store_issue_comment_proto = out.File
diff --git a/backend/generated-go/store/plan.pb.go b/backend/generated-go/store/plan.pb.go
index 02c30c752b..c5bdb1d5e7 100644
--- a/backend/generated-go/store/plan.pb.go
+++ b/backend/generated-go/store/plan.pb.go
@@ -74,63 +74,6 @@ func (PlanConfig_ChangeDatabaseConfig_Type) EnumDescriptor() ([]byte, []int) {
return file_store_plan_proto_rawDescGZIP(), []int{0, 2, 0}
}
-// MigrateType is the migration type for imperative schema migration.
-// It is only set when type is MIGRATE.
-type PlanConfig_ChangeDatabaseConfig_MigrateType int32
-
-const (
- PlanConfig_ChangeDatabaseConfig_MIGRATE_TYPE_UNSPECIFIED PlanConfig_ChangeDatabaseConfig_MigrateType = 0
- // Used for DDL changes.
- PlanConfig_ChangeDatabaseConfig_DDL PlanConfig_ChangeDatabaseConfig_MigrateType = 1
- // Used for DML changes.
- PlanConfig_ChangeDatabaseConfig_DML PlanConfig_ChangeDatabaseConfig_MigrateType = 2
- // Used for DDL changes using gh-ost.
- PlanConfig_ChangeDatabaseConfig_GHOST PlanConfig_ChangeDatabaseConfig_MigrateType = 3
-)
-
-// Enum value maps for PlanConfig_ChangeDatabaseConfig_MigrateType.
-var (
- PlanConfig_ChangeDatabaseConfig_MigrateType_name = map[int32]string{
- 0: "MIGRATE_TYPE_UNSPECIFIED",
- 1: "DDL",
- 2: "DML",
- 3: "GHOST",
- }
- PlanConfig_ChangeDatabaseConfig_MigrateType_value = map[string]int32{
- "MIGRATE_TYPE_UNSPECIFIED": 0,
- "DDL": 1,
- "DML": 2,
- "GHOST": 3,
- }
-)
-
-func (x PlanConfig_ChangeDatabaseConfig_MigrateType) Enum() *PlanConfig_ChangeDatabaseConfig_MigrateType {
- p := new(PlanConfig_ChangeDatabaseConfig_MigrateType)
- *p = x
- return p
-}
-
-func (x PlanConfig_ChangeDatabaseConfig_MigrateType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (PlanConfig_ChangeDatabaseConfig_MigrateType) Descriptor() protoreflect.EnumDescriptor {
- return file_store_plan_proto_enumTypes[1].Descriptor()
-}
-
-func (PlanConfig_ChangeDatabaseConfig_MigrateType) Type() protoreflect.EnumType {
- return &file_store_plan_proto_enumTypes[1]
-}
-
-func (x PlanConfig_ChangeDatabaseConfig_MigrateType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use PlanConfig_ChangeDatabaseConfig_MigrateType.Descriptor instead.
-func (PlanConfig_ChangeDatabaseConfig_MigrateType) EnumDescriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 2, 1}
-}
-
type PlanConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
Specs []*PlanConfig_Spec `protobuf:"bytes,1,rep,name=specs,proto3" json:"specs,omitempty"`
@@ -412,10 +355,12 @@ type PlanConfig_ChangeDatabaseConfig struct {
Sheet string `protobuf:"bytes,2,opt,name=sheet,proto3" json:"sheet,omitempty"`
// The resource name of the release.
// Format: projects/{project}/releases/{release}
- Release string `protobuf:"bytes,9,opt,name=release,proto3" json:"release,omitempty"`
- Type PlanConfig_ChangeDatabaseConfig_Type `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.store.PlanConfig_ChangeDatabaseConfig_Type" json:"type,omitempty"`
- MigrateType PlanConfig_ChangeDatabaseConfig_MigrateType `protobuf:"varint,11,opt,name=migrate_type,json=migrateType,proto3,enum=bytebase.store.PlanConfig_ChangeDatabaseConfig_MigrateType" json:"migrate_type,omitempty"`
- GhostFlags map[string]string `protobuf:"bytes,7,rep,name=ghost_flags,json=ghostFlags,proto3" json:"ghost_flags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ Release string `protobuf:"bytes,9,opt,name=release,proto3" json:"release,omitempty"`
+ Type PlanConfig_ChangeDatabaseConfig_Type `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.store.PlanConfig_ChangeDatabaseConfig_Type" json:"type,omitempty"`
+ // The migration type for imperative schema migration.
+ // It is only set when type is MIGRATE.
+ MigrateType MigrationType `protobuf:"varint,11,opt,name=migrate_type,json=migrateType,proto3,enum=bytebase.store.MigrationType" json:"migrate_type,omitempty"`
+ GhostFlags map[string]string `protobuf:"bytes,7,rep,name=ghost_flags,json=ghostFlags,proto3" json:"ghost_flags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// If set, a backup of the modified data will be created automatically before any changes are applied.
EnablePriorBackup bool `protobuf:"varint,8,opt,name=enable_prior_backup,json=enablePriorBackup,proto3" json:"enable_prior_backup,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -480,11 +425,11 @@ func (x *PlanConfig_ChangeDatabaseConfig) GetType() PlanConfig_ChangeDatabaseCon
return PlanConfig_ChangeDatabaseConfig_TYPE_UNSPECIFIED
}
-func (x *PlanConfig_ChangeDatabaseConfig) GetMigrateType() PlanConfig_ChangeDatabaseConfig_MigrateType {
+func (x *PlanConfig_ChangeDatabaseConfig) GetMigrateType() MigrationType {
if x != nil {
return x.MigrateType
}
- return PlanConfig_ChangeDatabaseConfig_MIGRATE_TYPE_UNSPECIFIED
+ return MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
func (x *PlanConfig_ChangeDatabaseConfig) GetGhostFlags() map[string]string {
@@ -689,7 +634,7 @@ var File_store_plan_proto protoreflect.FileDescriptor
const file_store_plan_proto_rawDesc = "" +
"\n" +
- "\x10store/plan.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x12store/common.proto\"\x85\x0e\n" +
+ "\x10store/plan.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x12store/common.proto\"\x9d\r\n" +
"\n" +
"PlanConfig\x125\n" +
"\x05specs\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\x05specs\x12E\n" +
@@ -710,14 +655,14 @@ const file_store_plan_proto_rawDesc = "" +
"\tcollation\x18\x05 \x01(\tB\x03\xe0A\x01R\tcollation\x12\x1d\n" +
"\acluster\x18\x06 \x01(\tB\x03\xe0A\x01R\acluster\x12\x19\n" +
"\x05owner\x18\a \x01(\tB\x03\xe0A\x01R\x05owner\x12%\n" +
- "\venvironment\x18\t \x01(\tB\x03\xe0A\x01R\venvironment\x1a\xd9\x04\n" +
+ "\venvironment\x18\t \x01(\tB\x03\xe0A\x01R\venvironment\x1a\xf1\x03\n" +
"\x14ChangeDatabaseConfig\x12\x18\n" +
"\atargets\x18\n" +
" \x03(\tR\atargets\x12\x14\n" +
"\x05sheet\x18\x02 \x01(\tR\x05sheet\x12\x18\n" +
"\arelease\x18\t \x01(\tR\arelease\x12H\n" +
- "\x04type\x18\x03 \x01(\x0e24.bytebase.store.PlanConfig.ChangeDatabaseConfig.TypeR\x04type\x12^\n" +
- "\fmigrate_type\x18\v \x01(\x0e2;.bytebase.store.PlanConfig.ChangeDatabaseConfig.MigrateTypeR\vmigrateType\x12`\n" +
+ "\x04type\x18\x03 \x01(\x0e24.bytebase.store.PlanConfig.ChangeDatabaseConfig.TypeR\x04type\x12@\n" +
+ "\fmigrate_type\x18\v \x01(\x0e2\x1d.bytebase.store.MigrationTypeR\vmigrateType\x12`\n" +
"\vghost_flags\x18\a \x03(\v2?.bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntryR\n" +
"ghostFlags\x12.\n" +
"\x13enable_prior_backup\x18\b \x01(\bR\x11enablePriorBackup\x1a=\n" +
@@ -727,12 +672,7 @@ const file_store_plan_proto_rawDesc = "" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" +
"\aMIGRATE\x10\x02\x12\a\n" +
- "\x03SDL\x10\x03\"H\n" +
- "\vMigrateType\x12\x1c\n" +
- "\x18MIGRATE_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
- "\x03DDL\x10\x01\x12\a\n" +
- "\x03DML\x10\x02\x12\t\n" +
- "\x05GHOST\x10\x03\x1a\xa6\x01\n" +
+ "\x03SDL\x10\x03\x1a\xa6\x01\n" +
"\x10ExportDataConfig\x12\x18\n" +
"\atargets\x18\x05 \x03(\tR\atargets\x12\x14\n" +
"\x05sheet\x18\x02 \x01(\tR\x05sheet\x124\n" +
@@ -759,32 +699,32 @@ func file_store_plan_proto_rawDescGZIP() []byte {
return file_store_plan_proto_rawDescData
}
-var file_store_plan_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_store_plan_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_store_plan_proto_goTypes = []any{
(PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
- (PlanConfig_ChangeDatabaseConfig_MigrateType)(0), // 1: bytebase.store.PlanConfig.ChangeDatabaseConfig.MigrateType
- (*PlanConfig)(nil), // 2: bytebase.store.PlanConfig
- (*PlanConfig_Spec)(nil), // 3: bytebase.store.PlanConfig.Spec
- (*PlanConfig_CreateDatabaseConfig)(nil), // 4: bytebase.store.PlanConfig.CreateDatabaseConfig
- (*PlanConfig_ChangeDatabaseConfig)(nil), // 5: bytebase.store.PlanConfig.ChangeDatabaseConfig
- (*PlanConfig_ExportDataConfig)(nil), // 6: bytebase.store.PlanConfig.ExportDataConfig
- (*PlanConfig_Deployment)(nil), // 7: bytebase.store.PlanConfig.Deployment
- nil, // 8: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- (*PlanConfig_Deployment_DatabaseGroupMapping)(nil), // 9: bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
+ (*PlanConfig)(nil), // 1: bytebase.store.PlanConfig
+ (*PlanConfig_Spec)(nil), // 2: bytebase.store.PlanConfig.Spec
+ (*PlanConfig_CreateDatabaseConfig)(nil), // 3: bytebase.store.PlanConfig.CreateDatabaseConfig
+ (*PlanConfig_ChangeDatabaseConfig)(nil), // 4: bytebase.store.PlanConfig.ChangeDatabaseConfig
+ (*PlanConfig_ExportDataConfig)(nil), // 5: bytebase.store.PlanConfig.ExportDataConfig
+ (*PlanConfig_Deployment)(nil), // 6: bytebase.store.PlanConfig.Deployment
+ nil, // 7: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ (*PlanConfig_Deployment_DatabaseGroupMapping)(nil), // 8: bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
+ (MigrationType)(0), // 9: bytebase.store.MigrationType
(ExportFormat)(0), // 10: bytebase.store.ExportFormat
}
var file_store_plan_proto_depIdxs = []int32{
- 3, // 0: bytebase.store.PlanConfig.specs:type_name -> bytebase.store.PlanConfig.Spec
- 7, // 1: bytebase.store.PlanConfig.deployment:type_name -> bytebase.store.PlanConfig.Deployment
- 4, // 2: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig
- 5, // 3: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig
- 6, // 4: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig
+ 2, // 0: bytebase.store.PlanConfig.specs:type_name -> bytebase.store.PlanConfig.Spec
+ 6, // 1: bytebase.store.PlanConfig.deployment:type_name -> bytebase.store.PlanConfig.Deployment
+ 3, // 2: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig
+ 4, // 3: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig
+ 5, // 4: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig
0, // 5: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
- 1, // 6: bytebase.store.PlanConfig.ChangeDatabaseConfig.migrate_type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.MigrateType
- 8, // 7: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ 9, // 6: bytebase.store.PlanConfig.ChangeDatabaseConfig.migrate_type:type_name -> bytebase.store.MigrationType
+ 7, // 7: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
10, // 8: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
- 9, // 9: bytebase.store.PlanConfig.Deployment.database_group_mappings:type_name -> bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
+ 8, // 9: bytebase.store.PlanConfig.Deployment.database_group_mappings:type_name -> bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
@@ -809,7 +749,7 @@ func file_store_plan_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_plan_proto_rawDesc), len(file_store_plan_proto_rawDesc)),
- NumEnums: 2,
+ NumEnums: 1,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
diff --git a/backend/generated-go/store/plan_check_run.pb.go b/backend/generated-go/store/plan_check_run.pb.go
index fb8e75b0af..539c931e42 100644
--- a/backend/generated-go/store/plan_check_run.pb.go
+++ b/backend/generated-go/store/plan_check_run.pb.go
@@ -21,6 +21,8 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
+// ChangeDatabaseType extends MigrationType with additional execution contexts.
+// Note: DDL, DML, and DDL_GHOST values align with MigrationType enum values.
type PlanCheckRunConfig_ChangeDatabaseType int32
const (
@@ -79,58 +81,6 @@ func (PlanCheckRunConfig_ChangeDatabaseType) EnumDescriptor() ([]byte, []int) {
return file_store_plan_check_run_proto_rawDescGZIP(), []int{0, 0}
}
-type PlanCheckRunResult_Result_Status int32
-
-const (
- PlanCheckRunResult_Result_STATUS_UNSPECIFIED PlanCheckRunResult_Result_Status = 0
- PlanCheckRunResult_Result_ERROR PlanCheckRunResult_Result_Status = 1
- PlanCheckRunResult_Result_WARNING PlanCheckRunResult_Result_Status = 2
- PlanCheckRunResult_Result_SUCCESS PlanCheckRunResult_Result_Status = 3
-)
-
-// Enum value maps for PlanCheckRunResult_Result_Status.
-var (
- PlanCheckRunResult_Result_Status_name = map[int32]string{
- 0: "STATUS_UNSPECIFIED",
- 1: "ERROR",
- 2: "WARNING",
- 3: "SUCCESS",
- }
- PlanCheckRunResult_Result_Status_value = map[string]int32{
- "STATUS_UNSPECIFIED": 0,
- "ERROR": 1,
- "WARNING": 2,
- "SUCCESS": 3,
- }
-)
-
-func (x PlanCheckRunResult_Result_Status) Enum() *PlanCheckRunResult_Result_Status {
- p := new(PlanCheckRunResult_Result_Status)
- *p = x
- return p
-}
-
-func (x PlanCheckRunResult_Result_Status) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (PlanCheckRunResult_Result_Status) Descriptor() protoreflect.EnumDescriptor {
- return file_store_plan_check_run_proto_enumTypes[1].Descriptor()
-}
-
-func (PlanCheckRunResult_Result_Status) Type() protoreflect.EnumType {
- return &file_store_plan_check_run_proto_enumTypes[1]
-}
-
-func (x PlanCheckRunResult_Result_Status) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use PlanCheckRunResult_Result_Status.Descriptor instead.
-func (PlanCheckRunResult_Result_Status) EnumDescriptor() ([]byte, []int) {
- return file_store_plan_check_run_proto_rawDescGZIP(), []int{1, 0, 0}
-}
-
type PlanCheckRunConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
SheetUid int32 `protobuf:"varint,1,opt,name=sheet_uid,json=sheetUid,proto3" json:"sheet_uid,omitempty"`
@@ -279,11 +229,11 @@ func (x *PlanCheckRunResult) GetError() string {
}
type PlanCheckRunResult_Result struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Status PlanCheckRunResult_Result_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.PlanCheckRunResult_Result_Status" json:"status,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
- Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status Advice_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.Advice_Status" json:"status,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
+ Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
// Types that are valid to be assigned to Report:
//
// *PlanCheckRunResult_Result_SqlSummaryReport_
@@ -323,11 +273,11 @@ func (*PlanCheckRunResult_Result) Descriptor() ([]byte, []int) {
return file_store_plan_check_run_proto_rawDescGZIP(), []int{1, 0}
}
-func (x *PlanCheckRunResult_Result) GetStatus() PlanCheckRunResult_Result_Status {
+func (x *PlanCheckRunResult_Result) GetStatus() Advice_Status {
if x != nil {
return x.Status
}
- return PlanCheckRunResult_Result_STATUS_UNSPECIFIED
+ return Advice_STATUS_UNSPECIFIED
}
func (x *PlanCheckRunResult_Result) GetTitle() string {
@@ -527,7 +477,7 @@ var File_store_plan_check_run_proto protoreflect.FileDescriptor
const file_store_plan_check_run_proto_rawDesc = "" +
"\n" +
- "\x1astore/plan_check_run.proto\x12\x0ebytebase.store\x1a\x15store/changelog.proto\x1a\x12store/common.proto\"\xe8\x04\n" +
+ "\x1astore/plan_check_run.proto\x12\x0ebytebase.store\x1a\x12store/advice.proto\x1a\x15store/changelog.proto\x1a\x12store/common.proto\"\xe8\x04\n" +
"\x12PlanCheckRunConfig\x12\x1b\n" +
"\tsheet_uid\x18\x01 \x01(\x05R\bsheetUid\x12g\n" +
"\x14change_database_type\x18\x02 \x01(\x0e25.bytebase.store.PlanCheckRunConfig.ChangeDatabaseTypeR\x12changeDatabaseType\x12\x1f\n" +
@@ -549,12 +499,12 @@ const file_store_plan_check_run_proto_rawDesc = "" +
"\tDDL_GHOST\x10\x04\x12\x0e\n" +
"\n" +
"SQL_EDITOR\x10\x05B\x15\n" +
- "\x13_database_group_uid\"\xb0\a\n" +
+ "\x13_database_group_uid\"\xd6\x06\n" +
"\x12PlanCheckRunResult\x12C\n" +
"\aresults\x18\x01 \x03(\v2).bytebase.store.PlanCheckRunResult.ResultR\aresults\x12\x14\n" +
- "\x05error\x18\x02 \x01(\tR\x05error\x1a\xbe\x06\n" +
- "\x06Result\x12H\n" +
- "\x06status\x18\x01 \x01(\x0e20.bytebase.store.PlanCheckRunResult.Result.StatusR\x06status\x12\x14\n" +
+ "\x05error\x18\x02 \x01(\tR\x05error\x1a\xe4\x05\n" +
+ "\x06Result\x125\n" +
+ "\x06status\x18\x01 \x01(\x0e2\x1d.bytebase.store.Advice.StatusR\x06status\x12\x14\n" +
"\x05title\x18\x02 \x01(\tR\x05title\x12\x18\n" +
"\acontent\x18\x03 \x01(\tR\acontent\x12\x12\n" +
"\x04code\x18\x04 \x01(\x05R\x04code\x12j\n" +
@@ -568,12 +518,7 @@ const file_store_plan_check_run_proto_rawDesc = "" +
"\x04line\x18\x01 \x01(\x05R\x04line\x12\x16\n" +
"\x06column\x18\x02 \x01(\x05R\x06column\x12?\n" +
"\x0estart_position\x18\b \x01(\v2\x18.bytebase.store.PositionR\rstartPosition\x12;\n" +
- "\fend_position\x18\t \x01(\v2\x18.bytebase.store.PositionR\vendPositionJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05\"E\n" +
- "\x06Status\x12\x16\n" +
- "\x12STATUS_UNSPECIFIED\x10\x00\x12\t\n" +
- "\x05ERROR\x10\x01\x12\v\n" +
- "\aWARNING\x10\x02\x12\v\n" +
- "\aSUCCESS\x10\x03B\b\n" +
+ "\fend_position\x18\t \x01(\v2\x18.bytebase.store.PositionR\vendPositionJ\x04\b\x03\x10\x04J\x04\b\x04\x10\x05B\b\n" +
"\x06reportB\x14Z\x12generated-go/storeb\x06proto3"
var (
@@ -588,27 +533,27 @@ func file_store_plan_check_run_proto_rawDescGZIP() []byte {
return file_store_plan_check_run_proto_rawDescData
}
-var file_store_plan_check_run_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_store_plan_check_run_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_store_plan_check_run_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_store_plan_check_run_proto_goTypes = []any{
- (PlanCheckRunConfig_ChangeDatabaseType)(0), // 0: bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
- (PlanCheckRunResult_Result_Status)(0), // 1: bytebase.store.PlanCheckRunResult.Result.Status
- (*PlanCheckRunConfig)(nil), // 2: bytebase.store.PlanCheckRunConfig
- (*PlanCheckRunResult)(nil), // 3: bytebase.store.PlanCheckRunResult
- nil, // 4: bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
- (*PlanCheckRunResult_Result)(nil), // 5: bytebase.store.PlanCheckRunResult.Result
- (*PlanCheckRunResult_Result_SqlSummaryReport)(nil), // 6: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
- (*PlanCheckRunResult_Result_SqlReviewReport)(nil), // 7: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
- (*ChangedResources)(nil), // 8: bytebase.store.ChangedResources
- (*Position)(nil), // 9: bytebase.store.Position
+ (PlanCheckRunConfig_ChangeDatabaseType)(0), // 0: bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
+ (*PlanCheckRunConfig)(nil), // 1: bytebase.store.PlanCheckRunConfig
+ (*PlanCheckRunResult)(nil), // 2: bytebase.store.PlanCheckRunResult
+ nil, // 3: bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
+ (*PlanCheckRunResult_Result)(nil), // 4: bytebase.store.PlanCheckRunResult.Result
+ (*PlanCheckRunResult_Result_SqlSummaryReport)(nil), // 5: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
+ (*PlanCheckRunResult_Result_SqlReviewReport)(nil), // 6: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
+ (Advice_Status)(0), // 7: bytebase.store.Advice.Status
+ (*ChangedResources)(nil), // 8: bytebase.store.ChangedResources
+ (*Position)(nil), // 9: bytebase.store.Position
}
var file_store_plan_check_run_proto_depIdxs = []int32{
0, // 0: bytebase.store.PlanCheckRunConfig.change_database_type:type_name -> bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
- 4, // 1: bytebase.store.PlanCheckRunConfig.ghost_flags:type_name -> bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
- 5, // 2: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result
- 1, // 3: bytebase.store.PlanCheckRunResult.Result.status:type_name -> bytebase.store.PlanCheckRunResult.Result.Status
- 6, // 4: bytebase.store.PlanCheckRunResult.Result.sql_summary_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
- 7, // 5: bytebase.store.PlanCheckRunResult.Result.sql_review_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
+ 3, // 1: bytebase.store.PlanCheckRunConfig.ghost_flags:type_name -> bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
+ 4, // 2: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result
+ 7, // 3: bytebase.store.PlanCheckRunResult.Result.status:type_name -> bytebase.store.Advice.Status
+ 5, // 4: bytebase.store.PlanCheckRunResult.Result.sql_summary_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
+ 6, // 5: bytebase.store.PlanCheckRunResult.Result.sql_review_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
8, // 6: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.store.ChangedResources
9, // 7: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport.start_position:type_name -> bytebase.store.Position
9, // 8: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport.end_position:type_name -> bytebase.store.Position
@@ -624,6 +569,7 @@ func file_store_plan_check_run_proto_init() {
if File_store_plan_check_run_proto != nil {
return
}
+ file_store_advice_proto_init()
file_store_changelog_proto_init()
file_store_common_proto_init()
file_store_plan_check_run_proto_msgTypes[0].OneofWrappers = []any{}
@@ -636,7 +582,7 @@ func file_store_plan_check_run_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_plan_check_run_proto_rawDesc), len(file_store_plan_check_run_proto_rawDesc)),
- NumEnums: 2,
+ NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
diff --git a/backend/generated-go/store/release.pb.go b/backend/generated-go/store/release.pb.go
index 5690ef589b..06c5587c3c 100644
--- a/backend/generated-go/store/release.pb.go
+++ b/backend/generated-go/store/release.pb.go
@@ -22,107 +22,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-type ReleasePayload_File_Type int32
-
-const (
- ReleasePayload_File_TYPE_UNSPECIFIED ReleasePayload_File_Type = 0
- ReleasePayload_File_VERSIONED ReleasePayload_File_Type = 1
- ReleasePayload_File_DECLARATIVE ReleasePayload_File_Type = 2
-)
-
-// Enum value maps for ReleasePayload_File_Type.
-var (
- ReleasePayload_File_Type_name = map[int32]string{
- 0: "TYPE_UNSPECIFIED",
- 1: "VERSIONED",
- 2: "DECLARATIVE",
- }
- ReleasePayload_File_Type_value = map[string]int32{
- "TYPE_UNSPECIFIED": 0,
- "VERSIONED": 1,
- "DECLARATIVE": 2,
- }
-)
-
-func (x ReleasePayload_File_Type) Enum() *ReleasePayload_File_Type {
- p := new(ReleasePayload_File_Type)
- *p = x
- return p
-}
-
-func (x ReleasePayload_File_Type) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (ReleasePayload_File_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_store_release_proto_enumTypes[0].Descriptor()
-}
-
-func (ReleasePayload_File_Type) Type() protoreflect.EnumType {
- return &file_store_release_proto_enumTypes[0]
-}
-
-func (x ReleasePayload_File_Type) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use ReleasePayload_File_Type.Descriptor instead.
-func (ReleasePayload_File_Type) EnumDescriptor() ([]byte, []int) {
- return file_store_release_proto_rawDescGZIP(), []int{0, 0, 0}
-}
-
-type ReleasePayload_File_MigrationType int32
-
-const (
- ReleasePayload_File_MIGRATION_TYPE_UNSPECIFIED ReleasePayload_File_MigrationType = 0
- ReleasePayload_File_DDL ReleasePayload_File_MigrationType = 1
- ReleasePayload_File_DDL_GHOST ReleasePayload_File_MigrationType = 2
- ReleasePayload_File_DML ReleasePayload_File_MigrationType = 3
-)
-
-// Enum value maps for ReleasePayload_File_MigrationType.
-var (
- ReleasePayload_File_MigrationType_name = map[int32]string{
- 0: "MIGRATION_TYPE_UNSPECIFIED",
- 1: "DDL",
- 2: "DDL_GHOST",
- 3: "DML",
- }
- ReleasePayload_File_MigrationType_value = map[string]int32{
- "MIGRATION_TYPE_UNSPECIFIED": 0,
- "DDL": 1,
- "DDL_GHOST": 2,
- "DML": 3,
- }
-)
-
-func (x ReleasePayload_File_MigrationType) Enum() *ReleasePayload_File_MigrationType {
- p := new(ReleasePayload_File_MigrationType)
- *p = x
- return p
-}
-
-func (x ReleasePayload_File_MigrationType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (ReleasePayload_File_MigrationType) Descriptor() protoreflect.EnumDescriptor {
- return file_store_release_proto_enumTypes[1].Descriptor()
-}
-
-func (ReleasePayload_File_MigrationType) Type() protoreflect.EnumType {
- return &file_store_release_proto_enumTypes[1]
-}
-
-func (x ReleasePayload_File_MigrationType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use ReleasePayload_File_MigrationType.Descriptor instead.
-func (ReleasePayload_File_MigrationType) EnumDescriptor() ([]byte, []int) {
- return file_store_release_proto_rawDescGZIP(), []int{0, 0, 1}
-}
-
type ReleasePayload struct {
state protoimpl.MessageState `protogen:"open.v1"`
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
@@ -193,10 +92,10 @@ type ReleasePayload_File struct {
// Format: projects/{project}/sheets/{sheet}
Sheet string `protobuf:"bytes,3,opt,name=sheet,proto3" json:"sheet,omitempty"`
// The SHA256 hash value of the sheet.
- SheetSha256 string `protobuf:"bytes,4,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`
- Type ReleasePayload_File_Type `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.store.ReleasePayload_File_Type" json:"type,omitempty"`
- Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
- MigrationType ReleasePayload_File_MigrationType `protobuf:"varint,7,opt,name=migration_type,json=migrationType,proto3,enum=bytebase.store.ReleasePayload_File_MigrationType" json:"migration_type,omitempty"`
+ SheetSha256 string `protobuf:"bytes,4,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`
+ Type SchemaChangeType `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.store.SchemaChangeType" json:"type,omitempty"`
+ Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
+ MigrationType MigrationType `protobuf:"varint,7,opt,name=migration_type,json=migrationType,proto3,enum=bytebase.store.MigrationType" json:"migration_type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -259,11 +158,11 @@ func (x *ReleasePayload_File) GetSheetSha256() string {
return ""
}
-func (x *ReleasePayload_File) GetType() ReleasePayload_File_Type {
+func (x *ReleasePayload_File) GetType() SchemaChangeType {
if x != nil {
return x.Type
}
- return ReleasePayload_File_TYPE_UNSPECIFIED
+ return SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED
}
func (x *ReleasePayload_File) GetVersion() string {
@@ -273,11 +172,11 @@ func (x *ReleasePayload_File) GetVersion() string {
return ""
}
-func (x *ReleasePayload_File) GetMigrationType() ReleasePayload_File_MigrationType {
+func (x *ReleasePayload_File) GetMigrationType() MigrationType {
if x != nil {
return x.MigrationType
}
- return ReleasePayload_File_MIGRATION_TYPE_UNSPECIFIED
+ return MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
type ReleasePayload_VCSSource struct {
@@ -336,30 +235,21 @@ var File_store_release_proto protoreflect.FileDescriptor
const file_store_release_proto_rawDesc = "" +
"\n" +
- "\x13store/release.proto\x12\x0ebytebase.store\x1a\x19google/api/resource.proto\x1a\x12store/common.proto\"\xbe\x05\n" +
+ "\x13store/release.proto\x12\x0ebytebase.store\x1a\x19google/api/resource.proto\x1a\x12store/common.proto\"\x92\x04\n" +
"\x0eReleasePayload\x12\x14\n" +
"\x05title\x18\x01 \x01(\tR\x05title\x129\n" +
"\x05files\x18\x02 \x03(\v2#.bytebase.store.ReleasePayload.FileR\x05files\x12G\n" +
"\n" +
- "vcs_source\x18\x03 \x01(\v2(.bytebase.store.ReleasePayload.VCSSourceR\tvcsSource\x1a\xbe\x03\n" +
+ "vcs_source\x18\x03 \x01(\v2(.bytebase.store.ReleasePayload.VCSSourceR\tvcsSource\x1a\x92\x02\n" +
"\x04File\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04path\x12-\n" +
"\x05sheet\x18\x03 \x01(\tB\x17\xfaA\x14\n" +
"\x12bytebase.com/SheetR\x05sheet\x12!\n" +
- "\fsheet_sha256\x18\x04 \x01(\tR\vsheetSha256\x12<\n" +
- "\x04type\x18\x05 \x01(\x0e2(.bytebase.store.ReleasePayload.File.TypeR\x04type\x12\x18\n" +
- "\aversion\x18\x06 \x01(\tR\aversion\x12X\n" +
- "\x0emigration_type\x18\a \x01(\x0e21.bytebase.store.ReleasePayload.File.MigrationTypeR\rmigrationType\"<\n" +
- "\x04Type\x12\x14\n" +
- "\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n" +
- "\tVERSIONED\x10\x01\x12\x0f\n" +
- "\vDECLARATIVE\x10\x02\"P\n" +
- "\rMigrationType\x12\x1e\n" +
- "\x1aMIGRATION_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
- "\x03DDL\x10\x01\x12\r\n" +
- "\tDDL_GHOST\x10\x02\x12\a\n" +
- "\x03DML\x10\x03\x1aQ\n" +
+ "\fsheet_sha256\x18\x04 \x01(\tR\vsheetSha256\x124\n" +
+ "\x04type\x18\x05 \x01(\x0e2 .bytebase.store.SchemaChangeTypeR\x04type\x12\x18\n" +
+ "\aversion\x18\x06 \x01(\tR\aversion\x12D\n" +
+ "\x0emigration_type\x18\a \x01(\x0e2\x1d.bytebase.store.MigrationTypeR\rmigrationType\x1aQ\n" +
"\tVCSSource\x122\n" +
"\bvcs_type\x18\x01 \x01(\x0e2\x17.bytebase.store.VCSTypeR\avcsType\x12\x10\n" +
"\x03url\x18\x02 \x01(\tR\x03urlB\x14Z\x12generated-go/storeb\x06proto3"
@@ -376,21 +266,20 @@ func file_store_release_proto_rawDescGZIP() []byte {
return file_store_release_proto_rawDescData
}
-var file_store_release_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_store_release_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_store_release_proto_goTypes = []any{
- (ReleasePayload_File_Type)(0), // 0: bytebase.store.ReleasePayload.File.Type
- (ReleasePayload_File_MigrationType)(0), // 1: bytebase.store.ReleasePayload.File.MigrationType
- (*ReleasePayload)(nil), // 2: bytebase.store.ReleasePayload
- (*ReleasePayload_File)(nil), // 3: bytebase.store.ReleasePayload.File
- (*ReleasePayload_VCSSource)(nil), // 4: bytebase.store.ReleasePayload.VCSSource
- (VCSType)(0), // 5: bytebase.store.VCSType
+ (*ReleasePayload)(nil), // 0: bytebase.store.ReleasePayload
+ (*ReleasePayload_File)(nil), // 1: bytebase.store.ReleasePayload.File
+ (*ReleasePayload_VCSSource)(nil), // 2: bytebase.store.ReleasePayload.VCSSource
+ (SchemaChangeType)(0), // 3: bytebase.store.SchemaChangeType
+ (MigrationType)(0), // 4: bytebase.store.MigrationType
+ (VCSType)(0), // 5: bytebase.store.VCSType
}
var file_store_release_proto_depIdxs = []int32{
- 3, // 0: bytebase.store.ReleasePayload.files:type_name -> bytebase.store.ReleasePayload.File
- 4, // 1: bytebase.store.ReleasePayload.vcs_source:type_name -> bytebase.store.ReleasePayload.VCSSource
- 0, // 2: bytebase.store.ReleasePayload.File.type:type_name -> bytebase.store.ReleasePayload.File.Type
- 1, // 3: bytebase.store.ReleasePayload.File.migration_type:type_name -> bytebase.store.ReleasePayload.File.MigrationType
+ 1, // 0: bytebase.store.ReleasePayload.files:type_name -> bytebase.store.ReleasePayload.File
+ 2, // 1: bytebase.store.ReleasePayload.vcs_source:type_name -> bytebase.store.ReleasePayload.VCSSource
+ 3, // 2: bytebase.store.ReleasePayload.File.type:type_name -> bytebase.store.SchemaChangeType
+ 4, // 3: bytebase.store.ReleasePayload.File.migration_type:type_name -> bytebase.store.MigrationType
5, // 4: bytebase.store.ReleasePayload.VCSSource.vcs_type:type_name -> bytebase.store.VCSType
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
@@ -410,14 +299,13 @@ func file_store_release_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_release_proto_rawDesc), len(file_store_release_proto_rawDesc)),
- NumEnums: 2,
+ NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_store_release_proto_goTypes,
DependencyIndexes: file_store_release_proto_depIdxs,
- EnumInfos: file_store_release_proto_enumTypes,
MessageInfos: file_store_release_proto_msgTypes,
}.Build()
File_store_release_proto = out.File
diff --git a/backend/generated-go/store/revision.pb.go b/backend/generated-go/store/revision.pb.go
index 41630b66b1..0e91a08ee7 100644
--- a/backend/generated-go/store/revision.pb.go
+++ b/backend/generated-go/store/revision.pb.go
@@ -22,55 +22,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-type RevisionPayload_Type int32
-
-const (
- RevisionPayload_TYPE_UNSPECIFIED RevisionPayload_Type = 0
- RevisionPayload_VERSIONED RevisionPayload_Type = 1
- RevisionPayload_DECLARATIVE RevisionPayload_Type = 2
-)
-
-// Enum value maps for RevisionPayload_Type.
-var (
- RevisionPayload_Type_name = map[int32]string{
- 0: "TYPE_UNSPECIFIED",
- 1: "VERSIONED",
- 2: "DECLARATIVE",
- }
- RevisionPayload_Type_value = map[string]int32{
- "TYPE_UNSPECIFIED": 0,
- "VERSIONED": 1,
- "DECLARATIVE": 2,
- }
-)
-
-func (x RevisionPayload_Type) Enum() *RevisionPayload_Type {
- p := new(RevisionPayload_Type)
- *p = x
- return p
-}
-
-func (x RevisionPayload_Type) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (RevisionPayload_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_store_revision_proto_enumTypes[0].Descriptor()
-}
-
-func (RevisionPayload_Type) Type() protoreflect.EnumType {
- return &file_store_revision_proto_enumTypes[0]
-}
-
-func (x RevisionPayload_Type) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use RevisionPayload_Type.Descriptor instead.
-func (RevisionPayload_Type) EnumDescriptor() ([]byte, []int) {
- return file_store_revision_proto_rawDescGZIP(), []int{0, 0}
-}
-
type RevisionPayload struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Format: projects/{project}/releases/{release}
@@ -89,7 +40,7 @@ type RevisionPayload struct {
// Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
TaskRun string `protobuf:"bytes,5,opt,name=task_run,json=taskRun,proto3" json:"task_run,omitempty"`
// The type of the revision.
- Type RevisionPayload_Type `protobuf:"varint,6,opt,name=type,proto3,enum=bytebase.store.RevisionPayload_Type" json:"type,omitempty"`
+ Type SchemaChangeType `protobuf:"varint,6,opt,name=type,proto3,enum=bytebase.store.SchemaChangeType" json:"type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -159,18 +110,18 @@ func (x *RevisionPayload) GetTaskRun() string {
return ""
}
-func (x *RevisionPayload) GetType() RevisionPayload_Type {
+func (x *RevisionPayload) GetType() SchemaChangeType {
if x != nil {
return x.Type
}
- return RevisionPayload_TYPE_UNSPECIFIED
+ return SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED
}
var File_store_revision_proto protoreflect.FileDescriptor
const file_store_revision_proto_rawDesc = "" +
"\n" +
- "\x14store/revision.proto\x12\x0ebytebase.store\x1a\x19google/api/resource.proto\"\xda\x02\n" +
+ "\x14store/revision.proto\x12\x0ebytebase.store\x1a\x19google/api/resource.proto\x1a\x12store/common.proto\"\x98\x02\n" +
"\x0fRevisionPayload\x123\n" +
"\arelease\x18\x01 \x01(\tB\x19\xfaA\x16\n" +
"\x14bytebase.com/ReleaseR\arelease\x12\x12\n" +
@@ -179,12 +130,8 @@ const file_store_revision_proto_rawDesc = "" +
"\x12bytebase.com/SheetR\x05sheet\x12!\n" +
"\fsheet_sha256\x18\x04 \x01(\tR\vsheetSha256\x124\n" +
"\btask_run\x18\x05 \x01(\tB\x19\xfaA\x16\n" +
- "\x14bytebase.com/TaskRunR\ataskRun\x128\n" +
- "\x04type\x18\x06 \x01(\x0e2$.bytebase.store.RevisionPayload.TypeR\x04type\"<\n" +
- "\x04Type\x12\x14\n" +
- "\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n" +
- "\tVERSIONED\x10\x01\x12\x0f\n" +
- "\vDECLARATIVE\x10\x02B\x14Z\x12generated-go/storeb\x06proto3"
+ "\x14bytebase.com/TaskRunR\ataskRun\x124\n" +
+ "\x04type\x18\x06 \x01(\x0e2 .bytebase.store.SchemaChangeTypeR\x04typeB\x14Z\x12generated-go/storeb\x06proto3"
var (
file_store_revision_proto_rawDescOnce sync.Once
@@ -198,14 +145,13 @@ func file_store_revision_proto_rawDescGZIP() []byte {
return file_store_revision_proto_rawDescData
}
-var file_store_revision_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_store_revision_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_store_revision_proto_goTypes = []any{
- (RevisionPayload_Type)(0), // 0: bytebase.store.RevisionPayload.Type
- (*RevisionPayload)(nil), // 1: bytebase.store.RevisionPayload
+ (*RevisionPayload)(nil), // 0: bytebase.store.RevisionPayload
+ (SchemaChangeType)(0), // 1: bytebase.store.SchemaChangeType
}
var file_store_revision_proto_depIdxs = []int32{
- 0, // 0: bytebase.store.RevisionPayload.type:type_name -> bytebase.store.RevisionPayload.Type
+ 1, // 0: bytebase.store.RevisionPayload.type:type_name -> bytebase.store.SchemaChangeType
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
@@ -218,19 +164,19 @@ func file_store_revision_proto_init() {
if File_store_revision_proto != nil {
return
}
+ file_store_common_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_revision_proto_rawDesc), len(file_store_revision_proto_rawDesc)),
- NumEnums: 1,
+ NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_store_revision_proto_goTypes,
DependencyIndexes: file_store_revision_proto_depIdxs,
- EnumInfos: file_store_revision_proto_enumTypes,
MessageInfos: file_store_revision_proto_msgTypes,
}.Build()
File_store_revision_proto = out.File
diff --git a/backend/generated-go/store/sheet.pb.go b/backend/generated-go/store/sheet.pb.go
index e73f037042..5de5a1c58c 100644
--- a/backend/generated-go/store/sheet.pb.go
+++ b/backend/generated-go/store/sheet.pb.go
@@ -26,7 +26,7 @@ type SheetPayload struct {
// The SQL dialect.
Engine Engine `protobuf:"varint,3,opt,name=engine,proto3,enum=bytebase.store.Engine" json:"engine,omitempty"`
// The start and end position of each command in the sheet statement.
- Commands []*SheetCommand `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"`
+ Commands []*Range `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -68,76 +68,21 @@ func (x *SheetPayload) GetEngine() Engine {
return Engine_ENGINE_UNSPECIFIED
}
-func (x *SheetPayload) GetCommands() []*SheetCommand {
+func (x *SheetPayload) GetCommands() []*Range {
if x != nil {
return x.Commands
}
return nil
}
-type SheetCommand struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
- End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *SheetCommand) Reset() {
- *x = SheetCommand{}
- mi := &file_store_sheet_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *SheetCommand) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SheetCommand) ProtoMessage() {}
-
-func (x *SheetCommand) ProtoReflect() protoreflect.Message {
- mi := &file_store_sheet_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SheetCommand.ProtoReflect.Descriptor instead.
-func (*SheetCommand) Descriptor() ([]byte, []int) {
- return file_store_sheet_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *SheetCommand) GetStart() int32 {
- if x != nil {
- return x.Start
- }
- return 0
-}
-
-func (x *SheetCommand) GetEnd() int32 {
- if x != nil {
- return x.End
- }
- return 0
-}
-
var File_store_sheet_proto protoreflect.FileDescriptor
const file_store_sheet_proto_rawDesc = "" +
"\n" +
- "\x11store/sheet.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"x\n" +
+ "\x11store/sheet.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"q\n" +
"\fSheetPayload\x12.\n" +
- "\x06engine\x18\x03 \x01(\x0e2\x16.bytebase.store.EngineR\x06engine\x128\n" +
- "\bcommands\x18\x04 \x03(\v2\x1c.bytebase.store.SheetCommandR\bcommands\"6\n" +
- "\fSheetCommand\x12\x14\n" +
- "\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
- "\x03end\x18\x02 \x01(\x05R\x03endB\x14Z\x12generated-go/storeb\x06proto3"
+ "\x06engine\x18\x03 \x01(\x0e2\x16.bytebase.store.EngineR\x06engine\x121\n" +
+ "\bcommands\x18\x04 \x03(\v2\x15.bytebase.store.RangeR\bcommandsB\x14Z\x12generated-go/storeb\x06proto3"
var (
file_store_sheet_proto_rawDescOnce sync.Once
@@ -151,15 +96,15 @@ func file_store_sheet_proto_rawDescGZIP() []byte {
return file_store_sheet_proto_rawDescData
}
-var file_store_sheet_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_store_sheet_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_store_sheet_proto_goTypes = []any{
(*SheetPayload)(nil), // 0: bytebase.store.SheetPayload
- (*SheetCommand)(nil), // 1: bytebase.store.SheetCommand
- (Engine)(0), // 2: bytebase.store.Engine
+ (Engine)(0), // 1: bytebase.store.Engine
+ (*Range)(nil), // 2: bytebase.store.Range
}
var file_store_sheet_proto_depIdxs = []int32{
- 2, // 0: bytebase.store.SheetPayload.engine:type_name -> bytebase.store.Engine
- 1, // 1: bytebase.store.SheetPayload.commands:type_name -> bytebase.store.SheetCommand
+ 1, // 0: bytebase.store.SheetPayload.engine:type_name -> bytebase.store.Engine
+ 2, // 1: bytebase.store.SheetPayload.commands:type_name -> bytebase.store.Range
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@@ -179,7 +124,7 @@ func file_store_sheet_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_sheet_proto_rawDesc), len(file_store_sheet_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 2,
+ NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/backend/generated-go/store/sheet_equal.pb.go b/backend/generated-go/store/sheet_equal.pb.go
index 6901d50b11..ffd3f8ee97 100644
--- a/backend/generated-go/store/sheet_equal.pb.go
+++ b/backend/generated-go/store/sheet_equal.pb.go
@@ -23,19 +23,3 @@ func (x *SheetPayload) Equal(y *SheetPayload) bool {
}
return true
}
-
-func (x *SheetCommand) Equal(y *SheetCommand) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Start != y.Start {
- return false
- }
- if x.End != y.End {
- return false
- }
- return true
-}
diff --git a/backend/generated-go/store/task.pb.go b/backend/generated-go/store/task.pb.go
index ea7128ef10..139c7ac165 100644
--- a/backend/generated-go/store/task.pb.go
+++ b/backend/generated-go/store/task.pb.go
@@ -81,62 +81,6 @@ func (Task_Type) EnumDescriptor() ([]byte, []int) {
return file_store_task_proto_rawDescGZIP(), []int{0, 0}
}
-// MigrateType is the database migration type for imperative migrations.
-type Task_MigrateType int32
-
-const (
- Task_MIGRATE_TYPE_UNSPECIFIED Task_MigrateType = 0
- // DDL changes (Data Definition Language) for schema modifications.
- Task_DDL Task_MigrateType = 1
- // DML changes (Data Manipulation Language) for data modifications.
- Task_DML Task_MigrateType = 2
- // Online schema migration using gh-ost tool.
- Task_GHOST Task_MigrateType = 3
-)
-
-// Enum value maps for Task_MigrateType.
-var (
- Task_MigrateType_name = map[int32]string{
- 0: "MIGRATE_TYPE_UNSPECIFIED",
- 1: "DDL",
- 2: "DML",
- 3: "GHOST",
- }
- Task_MigrateType_value = map[string]int32{
- "MIGRATE_TYPE_UNSPECIFIED": 0,
- "DDL": 1,
- "DML": 2,
- "GHOST": 3,
- }
-)
-
-func (x Task_MigrateType) Enum() *Task_MigrateType {
- p := new(Task_MigrateType)
- *p = x
- return p
-}
-
-func (x Task_MigrateType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (Task_MigrateType) Descriptor() protoreflect.EnumDescriptor {
- return file_store_task_proto_enumTypes[1].Descriptor()
-}
-
-func (Task_MigrateType) Type() protoreflect.EnumType {
- return &file_store_task_proto_enumTypes[1]
-}
-
-func (x Task_MigrateType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use Task_MigrateType.Descriptor instead.
-func (Task_MigrateType) EnumDescriptor() ([]byte, []int) {
- return file_store_task_proto_rawDescGZIP(), []int{0, 1}
-}
-
// Task is the metadata for database operation tasks.
type Task struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -167,7 +111,7 @@ type Task struct {
// Source information if task is created from a release.
TaskReleaseSource *TaskReleaseSource `protobuf:"bytes,13,opt,name=task_release_source,json=taskReleaseSource,proto3" json:"task_release_source,omitempty"`
// The type of migration (DDL, DML, or GHOST).
- MigrateType Task_MigrateType `protobuf:"varint,16,opt,name=migrate_type,json=migrateType,proto3,enum=bytebase.store.Task_MigrateType" json:"migrate_type,omitempty"`
+ MigrateType MigrationType `protobuf:"varint,16,opt,name=migrate_type,json=migrateType,proto3,enum=bytebase.store.MigrationType" json:"migrate_type,omitempty"`
// Password to encrypt the exported data archive.
Password string `protobuf:"bytes,14,opt,name=password,proto3" json:"password,omitempty"`
// Format of the exported data (SQL, CSV, JSON, etc).
@@ -297,11 +241,11 @@ func (x *Task) GetTaskReleaseSource() *TaskReleaseSource {
return nil
}
-func (x *Task) GetMigrateType() Task_MigrateType {
+func (x *Task) GetMigrateType() MigrationType {
if x != nil {
return x.MigrateType
}
- return Task_MIGRATE_TYPE_UNSPECIFIED
+ return MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
func (x *Task) GetPassword() string {
@@ -369,7 +313,7 @@ var File_store_task_proto protoreflect.FileDescriptor
const file_store_task_proto_rawDesc = "" +
"\n" +
- "\x10store/task.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"\x9a\a\n" +
+ "\x10store/task.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"\xcd\x06\n" +
"\x04Task\x12\x18\n" +
"\askipped\x18\x01 \x01(\bR\askipped\x12%\n" +
"\x0eskipped_reason\x18\x02 \x01(\tR\rskippedReason\x12\x17\n" +
@@ -385,8 +329,8 @@ const file_store_task_proto_rawDesc = "" +
" \x01(\tR\rschemaVersion\x12.\n" +
"\x13enable_prior_backup\x18\v \x01(\bR\x11enablePriorBackup\x125\n" +
"\x05flags\x18\f \x03(\v2\x1f.bytebase.store.Task.FlagsEntryR\x05flags\x12Q\n" +
- "\x13task_release_source\x18\r \x01(\v2!.bytebase.store.TaskReleaseSourceR\x11taskReleaseSource\x12C\n" +
- "\fmigrate_type\x18\x10 \x01(\x0e2 .bytebase.store.Task.MigrateTypeR\vmigrateType\x12\x1a\n" +
+ "\x13task_release_source\x18\r \x01(\v2!.bytebase.store.TaskReleaseSourceR\x11taskReleaseSource\x12@\n" +
+ "\fmigrate_type\x18\x10 \x01(\x0e2\x1d.bytebase.store.MigrationTypeR\vmigrateType\x12\x1a\n" +
"\bpassword\x18\x0e \x01(\tR\bpassword\x124\n" +
"\x06format\x18\x0f \x01(\x0e2\x1c.bytebase.store.ExportFormatR\x06format\x1a8\n" +
"\n" +
@@ -398,12 +342,7 @@ const file_store_task_proto_rawDesc = "" +
"\x0fDATABASE_CREATE\x10\x01\x12\x14\n" +
"\x10DATABASE_MIGRATE\x10\x02\x12\x13\n" +
"\x0fDATABASE_EXPORT\x10\x05\x12\x10\n" +
- "\fDATABASE_SDL\x10\x06\"H\n" +
- "\vMigrateType\x12\x1c\n" +
- "\x18MIGRATE_TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
- "\x03DDL\x10\x01\x12\a\n" +
- "\x03DML\x10\x02\x12\t\n" +
- "\x05GHOST\x10\x03\"'\n" +
+ "\fDATABASE_SDL\x10\x06\"'\n" +
"\x11TaskReleaseSource\x12\x12\n" +
"\x04file\x18\x01 \x01(\tR\x04fileB\x14Z\x12generated-go/storeb\x06proto3"
@@ -419,20 +358,20 @@ func file_store_task_proto_rawDescGZIP() []byte {
return file_store_task_proto_rawDescData
}
-var file_store_task_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_store_task_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_store_task_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_store_task_proto_goTypes = []any{
(Task_Type)(0), // 0: bytebase.store.Task.Type
- (Task_MigrateType)(0), // 1: bytebase.store.Task.MigrateType
- (*Task)(nil), // 2: bytebase.store.Task
- (*TaskReleaseSource)(nil), // 3: bytebase.store.TaskReleaseSource
- nil, // 4: bytebase.store.Task.FlagsEntry
+ (*Task)(nil), // 1: bytebase.store.Task
+ (*TaskReleaseSource)(nil), // 2: bytebase.store.TaskReleaseSource
+ nil, // 3: bytebase.store.Task.FlagsEntry
+ (MigrationType)(0), // 4: bytebase.store.MigrationType
(ExportFormat)(0), // 5: bytebase.store.ExportFormat
}
var file_store_task_proto_depIdxs = []int32{
- 4, // 0: bytebase.store.Task.flags:type_name -> bytebase.store.Task.FlagsEntry
- 3, // 1: bytebase.store.Task.task_release_source:type_name -> bytebase.store.TaskReleaseSource
- 1, // 2: bytebase.store.Task.migrate_type:type_name -> bytebase.store.Task.MigrateType
+ 3, // 0: bytebase.store.Task.flags:type_name -> bytebase.store.Task.FlagsEntry
+ 2, // 1: bytebase.store.Task.task_release_source:type_name -> bytebase.store.TaskReleaseSource
+ 4, // 2: bytebase.store.Task.migrate_type:type_name -> bytebase.store.MigrationType
5, // 3: bytebase.store.Task.format:type_name -> bytebase.store.ExportFormat
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
@@ -452,7 +391,7 @@ func file_store_task_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_task_proto_rawDesc), len(file_store_task_proto_rawDesc)),
- NumEnums: 2,
+ NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
diff --git a/backend/migrator/migration/3.11/0014##migrate_release_migration_type.sql b/backend/migrator/migration/3.11/0014##migrate_release_migration_type.sql
new file mode 100644
index 0000000000..be54973a38
--- /dev/null
+++ b/backend/migrator/migration/3.11/0014##migrate_release_migration_type.sql
@@ -0,0 +1,18 @@
+-- Migrate release files from changeType to migrationType
+-- Also convert DDL_GHOST to GHOST
+--
+-- Old structure: payload.files[].changeType with values "DDL", "DDL_GHOST", "DML"
+-- New structure: payload.files[].migrationType with values "DDL", "GHOST", "DML"
+
+-- Simple string replacement: rename field and replace DDL_GHOST with GHOST
+UPDATE release
+SET payload = replace(
+ replace(
+ payload::text,
+ '"changeType"',
+ '"migrationType"'
+ ),
+ '"DDL_GHOST"',
+ '"GHOST"'
+)::jsonb
+WHERE payload::text LIKE '%"changeType"%';
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 13087dff23..9984e2e22f 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.11.13"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.11.14"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/plugin/parser/mysql/statement_type_check.go b/backend/plugin/parser/mysql/statement_type_check.go
index d1cdaf5ef5..f760368c85 100644
--- a/backend/plugin/parser/mysql/statement_type_check.go
+++ b/backend/plugin/parser/mysql/statement_type_check.go
@@ -23,7 +23,7 @@ func (checker *CreateAndDropDatabaseChecker) EnterQuery(ctx *mysql.QueryContext)
// EnterCreateDatabase is called when production createDatabase is entered.
func (checker *CreateAndDropDatabaseChecker) EnterCreateDatabase(_ *mysql.CreateDatabaseContext) {
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Code: common.TaskTypeCreateDatabase.Int32(),
Title: "Cannot create database",
Content: fmt.Sprintf(`The statement "%s" creates database`, checker.Text),
@@ -33,7 +33,7 @@ func (checker *CreateAndDropDatabaseChecker) EnterCreateDatabase(_ *mysql.Create
// EnterDropDatabase is called when production dropDatabase is entered.
func (checker *CreateAndDropDatabaseChecker) EnterDropDatabase(_ *mysql.DropDatabaseContext) {
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Code: common.TaskTypeDropDatabase.Int32(),
Title: "Cannot drop database",
Content: fmt.Sprintf(`The statement "%s" drops database`, checker.Text),
@@ -249,7 +249,7 @@ func (checker *SDLTypeChecker) EnterDropTable(ctx *mysql.DropTableContext) {
for _, tableRef := range ctx.TableRefList().AllTableRef() {
_, tableName := NormalizeMySQLTableRef(tableRef)
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.TaskTypeDropTable.Int32(),
Title: "Plan to drop table",
Content: fmt.Sprintf("Plan to drop table `%s`", tableName),
@@ -271,7 +271,7 @@ func (checker *SDLTypeChecker) EnterDropIndex(ctx *mysql.DropIndexContext) {
_, _, indexName := NormalizeIndexRef(ctx.IndexRef())
_, tableName := NormalizeMySQLTableRef(ctx.TableRef())
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.TaskTypeDropIndex.Int32(),
Title: "Plan to drop index",
Content: fmt.Sprintf("Plan to drop index `%s` on table `%s`", indexName, tableName),
@@ -314,7 +314,7 @@ func (checker *SDLTypeChecker) EnterAlterTable(ctx *mysql.AlterTableContext) {
case alterListItem.ColumnInternalRef() != nil:
columnName := NormalizeMySQLColumnInternalRef(alterListItem.ColumnInternalRef())
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.TaskTypeDropColumn.Int32(),
Title: "Plan to drop column",
Content: fmt.Sprintf("Plan to drop column `%s` on table `%s`", columnName, tableName),
@@ -327,7 +327,7 @@ func (checker *SDLTypeChecker) EnterAlterTable(ctx *mysql.AlterTableContext) {
// drop primary key.
case alterListItem.PRIMARY_SYMBOL() != nil && alterListItem.KEY_SYMBOL() != nil:
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.TaskTypeDropPrimaryKey.Int32(),
Title: "Plan to drop primary key",
Content: fmt.Sprintf("Plan to drop primary key on table `%s`", tableName),
@@ -341,7 +341,7 @@ func (checker *SDLTypeChecker) EnterAlterTable(ctx *mysql.AlterTableContext) {
case alterListItem.FOREIGN_SYMBOL() != nil && alterListItem.KEY_SYMBOL() != nil && alterListItem.ColumnInternalRef() != nil:
name := NormalizeMySQLColumnInternalRef(alterListItem.ColumnInternalRef())
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.TaskTypeDropForeignKey.Int32(),
Title: "Plan to drop foreign key",
Content: fmt.Sprintf("Plan to drop foreign key `%s` on table `%s`", name, tableName),
@@ -355,7 +355,7 @@ func (checker *SDLTypeChecker) EnterAlterTable(ctx *mysql.AlterTableContext) {
case alterListItem.CHECK_SYMBOL() != nil && alterListItem.Identifier() != nil:
constraintName := NormalizeMySQLIdentifier(alterListItem.Identifier())
checker.Results = append(checker.Results, &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.TaskTypeDropCheck.Int32(),
Title: "Plan to drop check constraint",
Content: fmt.Sprintf("Plan to drop check constraint `%s` on table `%s`", constraintName, tableName),
diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.go
index c67f789c94..084055e0ab 100644
--- a/backend/runner/approval/runner.go
+++ b/backend/runner/approval/runner.go
@@ -762,7 +762,7 @@ func getRiskSourceFromPlan(config *storepb.PlanConfig) store.RiskSource {
case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE:
// For MIGRATE type, check the migrate type
switch v.ChangeDatabaseConfig.MigrateType {
- case storepb.PlanConfig_ChangeDatabaseConfig_DML:
+ case storepb.MigrationType_DML:
return store.RiskSourceDatabaseDataUpdate
default:
return store.RiskSourceDatabaseSchemaUpdate
diff --git a/backend/runner/plancheck/database_connect_executor.go b/backend/runner/plancheck/database_connect_executor.go
index 9bd78f33d7..8a37df227e 100644
--- a/backend/runner/plancheck/database_connect_executor.go
+++ b/backend/runner/plancheck/database_connect_executor.go
@@ -61,14 +61,14 @@ func (e *DatabaseConnectExecutor) checkDatabaseConnection(ctx context.Context, i
}()
if err != nil {
return &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Code: common.DBConnectionFailure.Int32(),
Title: fmt.Sprintf("Failed to connect %q", database.DatabaseName),
Content: err.Error(),
}
}
return &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Code: common.Ok.Int32(),
Title: "OK",
Content: fmt.Sprintf("Successfully connected %q", database.DatabaseName),
diff --git a/backend/runner/plancheck/ghost_sync_executor.go b/backend/runner/plancheck/ghost_sync_executor.go
index cbd8a86ebe..9b05ec6944 100644
--- a/backend/runner/plancheck/ghost_sync_executor.go
+++ b/backend/runner/plancheck/ghost_sync_executor.go
@@ -51,7 +51,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
results = []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Title: "gh-ost dry run failed",
Content: panicErr.Error(),
Code: common.Internal.Int32(),
@@ -113,7 +113,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
if err != nil {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Title: "Failed to connect to database",
Content: fmt.Sprintf("Cannot establish connection: %v", err),
Code: common.Internal.Int32(),
@@ -127,7 +127,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
title, content := validationResult.GetUserFriendlyError()
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Title: title,
Content: content,
Code: common.Internal.Int32(),
@@ -180,7 +180,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
if err := migrator.Migrate(); err != nil {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Title: "gh-ost dry run failed",
Content: err.Error(),
Code: common.Internal.Int32(),
@@ -191,7 +191,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Title: "OK",
Content: "gh-ost dry run succeeded",
Code: common.Ok.Int32(),
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index 05d67d33b1..cce921ca7e 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -59,7 +59,7 @@ func (e *StatementAdviseExecutor) Run(ctx context.Context, config *storepb.PlanC
if sheet.Size > common.MaxSheetCheckSize {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.SizeExceeded.Int32(),
Title: "Large SQL review policy is disabled",
Content: "",
@@ -82,7 +82,7 @@ func (e *StatementAdviseExecutor) Run(ctx context.Context, config *storepb.PlanC
if !common.EngineSupportStatementAdvise(instance.Metadata.GetEngine()) {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Code: common.Ok.Int32(),
Title: fmt.Sprintf("Statement advise is not supported for %s", instance.Metadata.GetEngine()),
Content: "",
@@ -106,7 +106,7 @@ func (e *StatementAdviseExecutor) Run(ctx context.Context, config *storepb.PlanC
if len(results) == 0 {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Title: "OK",
Content: "",
Code: common.Ok.Int32(),
@@ -194,14 +194,14 @@ func (e *StatementAdviseExecutor) runReview(
var results []*storepb.PlanCheckRunResult_Result
for _, advice := range adviceList {
- status := storepb.PlanCheckRunResult_Result_SUCCESS
+ status := storepb.Advice_SUCCESS
switch advice.Status {
case storepb.Advice_SUCCESS:
continue
case storepb.Advice_WARNING:
- status = storepb.PlanCheckRunResult_Result_WARNING
+ status = storepb.Advice_WARNING
case storepb.Advice_ERROR:
- status = storepb.PlanCheckRunResult_Result_ERROR
+ status = storepb.Advice_ERROR
default:
// Other status types
}
@@ -225,7 +225,7 @@ func (e *StatementAdviseExecutor) runReview(
if len(results) == 0 {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Title: "OK",
Content: "",
Code: common.Ok.Int32(),
diff --git a/backend/runner/plancheck/statement_report_executor.go b/backend/runner/plancheck/statement_report_executor.go
index 62f7788cfc..80bd6a056b 100644
--- a/backend/runner/plancheck/statement_report_executor.go
+++ b/backend/runner/plancheck/statement_report_executor.go
@@ -59,7 +59,7 @@ func (e *StatementReportExecutor) Run(ctx context.Context, config *storepb.PlanC
if sheet.Size > common.MaxSheetCheckSize {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_WARNING,
+ Status: storepb.Advice_WARNING,
Code: common.SizeExceeded.Int32(),
Title: "Report for large SQL is not supported",
Content: "",
@@ -81,7 +81,7 @@ func (e *StatementReportExecutor) Run(ctx context.Context, config *storepb.PlanC
if !common.EngineSupportStatementReport(instance.Metadata.GetEngine()) {
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Code: common.Ok.Int32(),
Title: fmt.Sprintf("Statement report is not supported for %s", instance.Metadata.GetEngine()),
Content: "",
@@ -103,7 +103,7 @@ func (e *StatementReportExecutor) Run(ctx context.Context, config *storepb.PlanC
advice := syntaxAdvices[0]
return []*storepb.PlanCheckRunResult_Result{
{
- Status: storepb.PlanCheckRunResult_Result_ERROR,
+ Status: storepb.Advice_ERROR,
Title: advice.Title,
Content: advice.Content,
Code: advice.Code,
@@ -120,7 +120,7 @@ func (e *StatementReportExecutor) Run(ctx context.Context, config *storepb.PlanC
}
planCheckRunResult := &storepb.PlanCheckRunResult_Result{
- Status: storepb.PlanCheckRunResult_Result_SUCCESS,
+ Status: storepb.Advice_SUCCESS,
Code: common.Ok.Int32(),
Title: "OK",
}
diff --git a/backend/runner/taskrun/database_migrate_executor.go b/backend/runner/taskrun/database_migrate_executor.go
index 48fe91d83e..84dbdd6ce4 100644
--- a/backend/runner/taskrun/database_migrate_executor.go
+++ b/backend/runner/taskrun/database_migrate_executor.go
@@ -59,13 +59,13 @@ func (exec *DatabaseMigrateExecutor) RunOnce(ctx context.Context, driverCtx cont
//exhaustive:enforce
switch migrateType {
- case storepb.Task_DDL:
+ case storepb.MigrationType_DDL:
return exec.runDDLMigration(ctx, driverCtx, task, taskRunUID)
- case storepb.Task_DML:
+ case storepb.MigrationType_DML:
return exec.runDMLMigration(ctx, driverCtx, task, taskRunUID)
- case storepb.Task_GHOST:
+ case storepb.MigrationType_GHOST:
return exec.runGhostMigration(ctx, driverCtx, task, taskRunUID)
- case storepb.Task_MIGRATE_TYPE_UNSPECIFIED:
+ case storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED:
// Execute SQL without backup, same as DDL
return exec.runDDLMigration(ctx, driverCtx, task, taskRunUID)
default:
diff --git a/backend/runner/taskrun/executor.go b/backend/runner/taskrun/executor.go
index c80ca1c73a..2f27fabe36 100644
--- a/backend/runner/taskrun/executor.go
+++ b/backend/runner/taskrun/executor.go
@@ -263,7 +263,7 @@ func getMigrationInfo(ctx context.Context, stores *store.Store, profile *config.
continue
}
for _, result := range run.Result.Results {
- if result.Status != storepb.PlanCheckRunResult_Result_SUCCESS {
+ if result.Status != storepb.Advice_SUCCESS {
continue
}
if report := result.GetSqlSummaryReport(); report != nil {
@@ -443,7 +443,7 @@ func beginMigration(ctx context.Context, stores *store.Store, mc *migrateContext
InstanceID: &mc.database.InstanceID,
DatabaseName: &mc.database.DatabaseName,
Limit: common.NewP(1),
- Type: common.NewP(storepb.RevisionPayload_DECLARATIVE),
+ Type: common.NewP(storepb.SchemaChangeType_DECLARATIVE),
})
if err != nil {
return false, errors.Wrapf(err, "failed to list revisions")
@@ -469,7 +469,7 @@ func beginMigration(ctx context.Context, stores *store.Store, mc *migrateContext
InstanceID: &mc.database.InstanceID,
DatabaseName: &mc.database.DatabaseName,
Version: &mc.version,
- Type: common.NewP(storepb.RevisionPayload_VERSIONED),
+ Type: common.NewP(storepb.SchemaChangeType_VERSIONED),
})
if err != nil {
return false, errors.Wrapf(err, "failed to list revisions")
@@ -552,11 +552,11 @@ func endMigration(ctx context.Context, storeInstance *store.Store, mc *migrateCo
Sheet: "",
SheetSha256: "",
TaskRun: mc.taskRunName,
- Type: storepb.RevisionPayload_VERSIONED,
+ Type: storepb.SchemaChangeType_VERSIONED,
},
}
if mc.task.Type == storepb.Task_DATABASE_SDL {
- r.Payload.Type = storepb.RevisionPayload_DECLARATIVE
+ r.Payload.Type = storepb.SchemaChangeType_DECLARATIVE
}
if mc.sheet != nil {
r.Payload.Sheet = mc.sheetName
@@ -620,32 +620,32 @@ func shouldUpdateVersion(currentVersion, newVersion string) bool {
return current.LessThan(nv)
}
-func convertTaskType(t *store.TaskMessage) (storepb.ChangelogPayload_Type, storepb.ChangelogPayload_MigrationType) {
+func convertTaskType(t *store.TaskMessage) (storepb.ChangelogPayload_Type, storepb.MigrationType) {
//exhaustive:enforce
switch t.Type {
case storepb.Task_DATABASE_MIGRATE:
// Determine migration type based on migrate_type
switch t.Payload.GetMigrateType() {
- case storepb.Task_DML:
- return storepb.ChangelogPayload_MIGRATE, storepb.ChangelogPayload_DML
- case storepb.Task_DDL:
- return storepb.ChangelogPayload_MIGRATE, storepb.ChangelogPayload_DDL
- case storepb.Task_GHOST:
- return storepb.ChangelogPayload_MIGRATE, storepb.ChangelogPayload_GHOST
- case storepb.Task_MIGRATE_TYPE_UNSPECIFIED:
- return storepb.ChangelogPayload_MIGRATE, storepb.ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED
+ case storepb.MigrationType_DML:
+ return storepb.ChangelogPayload_MIGRATE, storepb.MigrationType_DML
+ case storepb.MigrationType_DDL:
+ return storepb.ChangelogPayload_MIGRATE, storepb.MigrationType_DDL
+ case storepb.MigrationType_GHOST:
+ return storepb.ChangelogPayload_MIGRATE, storepb.MigrationType_GHOST
+ case storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED:
+ return storepb.ChangelogPayload_MIGRATE, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
default:
- return storepb.ChangelogPayload_MIGRATE, storepb.ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED
+ return storepb.ChangelogPayload_MIGRATE, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
case storepb.Task_DATABASE_SDL:
- return storepb.ChangelogPayload_SDL, storepb.ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED
+ return storepb.ChangelogPayload_SDL, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
case
storepb.Task_TASK_TYPE_UNSPECIFIED,
storepb.Task_DATABASE_CREATE,
storepb.Task_DATABASE_EXPORT:
- return storepb.ChangelogPayload_TYPE_UNSPECIFIED, storepb.ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED
+ return storepb.ChangelogPayload_TYPE_UNSPECIFIED, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
default:
- return storepb.ChangelogPayload_TYPE_UNSPECIFIED, storepb.ChangelogPayload_MIGRATION_TYPE_UNSPECIFIED
+ return storepb.ChangelogPayload_TYPE_UNSPECIFIED, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED
}
}
@@ -666,7 +666,7 @@ func isChangeDatabaseTask(task *store.TaskMessage) bool {
func needDump(task *store.TaskMessage, instance *store.InstanceMessage) bool {
// Skip dump for TiDB DML operations
- if task.Type == storepb.Task_DATABASE_MIGRATE && task.Payload.GetMigrateType() == storepb.Task_DML && instance.Metadata.GetEngine() == storepb.Engine_TIDB {
+ if task.Type == storepb.Task_DATABASE_MIGRATE && task.Payload.GetMigrateType() == storepb.MigrationType_DML && instance.Metadata.GetEngine() == storepb.Engine_TIDB {
return false
}
diff --git a/backend/runner/taskrun/schedulerv2.go b/backend/runner/taskrun/schedulerv2.go
index a96cccc803..38f16cc609 100644
--- a/backend/runner/taskrun/schedulerv2.go
+++ b/backend/runner/taskrun/schedulerv2.go
@@ -227,11 +227,11 @@ func (s *SchedulerV2) scheduleAutoRolloutTask(ctx context.Context, taskUID int)
}
for _, result := range run.Result.Results {
// Block on errors for both ERROR_ONLY and STRICT enforcement
- if result.Status == storepb.PlanCheckRunResult_Result_ERROR {
+ if result.Status == storepb.Advice_ERROR {
return false, nil
}
// Block on warnings only for STRICT enforcement
- if planCheckEnforcement == storepb.RolloutPolicy_Checkers_STRICT && result.Status == storepb.PlanCheckRunResult_Result_WARNING {
+ if planCheckEnforcement == storepb.RolloutPolicy_Checkers_STRICT && result.Status == storepb.Advice_WARNING {
return false, nil
}
}
@@ -261,7 +261,7 @@ func (s *SchedulerV2) scheduleAutoRolloutTask(ctx context.Context, taskUID int)
if issue != nil {
tasks := []string{common.FormatTask(issue.Project.ResourceID, task.PipelineID, task.Environment, taskUID)}
- if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issue.UID, tasks, storepb.IssueCommentPayload_TaskUpdate_PENDING, common.SystemBotID, ""); err != nil {
+ if err := s.store.CreateIssueCommentTaskUpdateStatus(ctx, issue.UID, tasks, storepb.TaskRun_PENDING, common.SystemBotID, ""); err != nil {
slog.Warn("failed to create issue comment", "issueUID", issue.UID, log.BBError(err))
}
}
@@ -673,7 +673,7 @@ func (s *SchedulerV2) runTaskRunOnce(ctx context.Context, taskRun *store.TaskRun
return nil
}
tasks := []string{common.FormatTask(issue.Project.ResourceID, task.PipelineID, task.Environment, task.ID)}
- return s.store.CreateIssueCommentTaskUpdateStatus(ctx, issue.UID, tasks, storepb.IssueCommentPayload_TaskUpdate_FAILED, common.SystemBotID, "")
+ return s.store.CreateIssueCommentTaskUpdateStatus(ctx, issue.UID, tasks, storepb.TaskRun_FAILED, common.SystemBotID, "")
}(); err != nil {
slog.Warn("failed to create issue comment", log.BBError(err))
}
@@ -717,7 +717,7 @@ func (s *SchedulerV2) runTaskRunOnce(ctx context.Context, taskRun *store.TaskRun
return nil
}
tasks := []string{common.FormatTask(issue.Project.ResourceID, task.PipelineID, task.Environment, task.ID)}
- return s.store.CreateIssueCommentTaskUpdateStatus(ctx, issue.UID, tasks, storepb.IssueCommentPayload_TaskUpdate_DONE, common.SystemBotID, "")
+ return s.store.CreateIssueCommentTaskUpdateStatus(ctx, issue.UID, tasks, storepb.TaskRun_DONE, common.SystemBotID, "")
}(); err != nil {
slog.Warn("failed to create issue comment", log.BBError(err))
}
@@ -924,8 +924,8 @@ func (s *SchedulerV2) ListenTaskSkippedOrDone(ctx context.Context) {
return errors.Wrapf(err, "failed to update issue status")
}
- fromStatus := storepb.IssueCommentPayload_IssueUpdate_IssueStatus(storepb.IssueCommentPayload_IssueUpdate_IssueStatus_value[issueN.Status.String()])
- toStatus := storepb.IssueCommentPayload_IssueUpdate_IssueStatus(storepb.IssueCommentPayload_IssueUpdate_IssueStatus_value[updatedIssue.Status.String()])
+ fromStatus := storepb.Issue_Status(storepb.Issue_Status_value[issueN.Status.String()])
+ toStatus := storepb.Issue_Status(storepb.Issue_Status_value[updatedIssue.Status.String()])
if _, err := s.store.CreateIssueComment(ctx, &store.IssueCommentMessage{
IssueUID: issueN.UID,
Payload: &storepb.IssueCommentPayload{
@@ -1022,9 +1022,9 @@ func isSequentialTask(task *store.TaskMessage) bool {
case storepb.Task_DATABASE_MIGRATE:
// DDL, GHOST, and MIGRATE_TYPE_UNSPECIFIED (treated as DDL) operations should be sequential
switch task.Payload.GetMigrateType() {
- case storepb.Task_DDL, storepb.Task_GHOST, storepb.Task_MIGRATE_TYPE_UNSPECIFIED:
+ case storepb.MigrationType_DDL, storepb.MigrationType_GHOST, storepb.MigrationType_MIGRATION_TYPE_UNSPECIFIED:
return true
- case storepb.Task_DML:
+ case storepb.MigrationType_DML:
return false
default:
return true
diff --git a/backend/store/database_group.go b/backend/store/database_group.go
index d9a77b39b8..5ccf3b7025 100644
--- a/backend/store/database_group.go
+++ b/backend/store/database_group.go
@@ -11,7 +11,6 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"github.com/bytebase/bytebase/backend/common"
- storepb "github.com/bytebase/bytebase/backend/generated-go/store"
)
// DatabaseGroupMessage is the message for database groups.
@@ -20,7 +19,6 @@ type DatabaseGroupMessage struct {
ResourceID string
Title string
Expression *expr.Expr
- Payload *storepb.DatabaseGroupPayload
}
// FindDatabaseGroupMessage is the message for finding database group.
@@ -33,7 +31,6 @@ type FindDatabaseGroupMessage struct {
type UpdateDatabaseGroupMessage struct {
Title *string
Expression *expr.Expr
- Payload *storepb.DatabaseGroupPayload
}
// DeleteDatabaseGroup deletes a database group.
@@ -126,7 +123,6 @@ func (*Store) listDatabaseGroupImpl(ctx context.Context, txn *sql.Tx, find *Find
"resource_id",
"name",
"expression",
- "payload",
}
query := fmt.Sprintf(`SELECT %s FROM db_group WHERE %s ORDER BY project, resource_id ASC;`, strings.Join(fields, ","), strings.Join(where, " AND "))
var databaseGroups []*DatabaseGroupMessage
@@ -137,13 +133,12 @@ func (*Store) listDatabaseGroupImpl(ctx context.Context, txn *sql.Tx, find *Find
defer rows.Close()
for rows.Next() {
var databaseGroup DatabaseGroupMessage
- var exprBytes, payloadBytes []byte
+ var exprBytes []byte
dest := []any{
&databaseGroup.ProjectID,
&databaseGroup.ResourceID,
&databaseGroup.Title,
&exprBytes,
- &payloadBytes,
}
if err := rows.Scan(dest...); err != nil {
return nil, errors.Wrapf(err, "failed to scan")
@@ -152,12 +147,7 @@ func (*Store) listDatabaseGroupImpl(ctx context.Context, txn *sql.Tx, find *Find
if err := common.ProtojsonUnmarshaler.Unmarshal(exprBytes, &expression); err != nil {
return nil, errors.Wrapf(err, "failed to unmarshal expression")
}
- var payload storepb.DatabaseGroupPayload
- if err := common.ProtojsonUnmarshaler.Unmarshal(payloadBytes, &payload); err != nil {
- return nil, errors.Wrapf(err, "failed to unmarshal payload")
- }
databaseGroup.Expression = &expression
- databaseGroup.Payload = &payload
databaseGroups = append(databaseGroups, &databaseGroup)
}
if err := rows.Err(); err != nil {
@@ -179,19 +169,12 @@ func (s *Store) UpdateDatabaseGroup(ctx context.Context, projectID, resourceID s
}
set, args = append(set, fmt.Sprintf("expression = $%d", len(args)+1)), append(args, exprBytes)
}
- if v := patch.Payload; v != nil {
- payloadBytes, err := protojson.Marshal(patch.Payload)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to marshal payload")
- }
- set, args = append(set, fmt.Sprintf("payload = $%d", len(args)+1)), append(args, payloadBytes)
- }
args = append(args, projectID, resourceID)
query := fmt.Sprintf(`
UPDATE db_group SET
%s
WHERE project = $%d AND resource_id = $%d
- RETURNING project, resource_id, name, expression, payload;
+ RETURNING project, resource_id, name, expression;
`, strings.Join(set, ", "), len(args)-1, len(args))
tx, err := s.GetDB().BeginTx(ctx, nil)
@@ -200,7 +183,7 @@ func (s *Store) UpdateDatabaseGroup(ctx context.Context, projectID, resourceID s
}
var updatedDatabaseGroup DatabaseGroupMessage
- var exprBytes, payloadBytes []byte
+ var exprBytes []byte
if err := tx.QueryRowContext(
ctx,
query,
@@ -210,7 +193,6 @@ func (s *Store) UpdateDatabaseGroup(ctx context.Context, projectID, resourceID s
&updatedDatabaseGroup.ResourceID,
&updatedDatabaseGroup.Title,
&exprBytes,
- &payloadBytes,
); err != nil {
return nil, errors.Wrapf(err, "failed to scan")
}
@@ -222,11 +204,6 @@ func (s *Store) UpdateDatabaseGroup(ctx context.Context, projectID, resourceID s
return nil, errors.Wrapf(err, "failed to unmarshal expression")
}
updatedDatabaseGroup.Expression = &expression
- var payload storepb.DatabaseGroupPayload
- if err := common.ProtojsonUnmarshaler.Unmarshal(payloadBytes, &payload); err != nil {
- return nil, errors.Wrapf(err, "failed to unmarshal payload")
- }
- updatedDatabaseGroup.Payload = &payload
s.databaseGroupCache.Add(getDatabaseGroupCacheKey(updatedDatabaseGroup.ProjectID, updatedDatabaseGroup.ResourceID), &updatedDatabaseGroup)
return &updatedDatabaseGroup, nil
}
@@ -238,18 +215,13 @@ func (s *Store) CreateDatabaseGroup(ctx context.Context, create *DatabaseGroupMe
project,
resource_id,
name,
- expression,
- payload
- ) VALUES ($1, $2, $3, $4, $5);
+ expression
+ ) VALUES ($1, $2, $3, $4);
`
exprBytes, err := protojson.Marshal(create.Expression)
if err != nil {
return nil, errors.Wrapf(err, "failed to marshal expression")
}
- payloadBytes, err := protojson.Marshal(create.Payload)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to marshal payload")
- }
tx, err := s.GetDB().BeginTx(ctx, nil)
if err != nil {
@@ -264,7 +236,6 @@ func (s *Store) CreateDatabaseGroup(ctx context.Context, create *DatabaseGroupMe
create.ResourceID,
create.Title,
exprBytes,
- payloadBytes,
); err != nil {
return nil, errors.Wrapf(err, "failed to scan")
}
diff --git a/backend/store/issue.go b/backend/store/issue.go
index 94f629f803..3bc60c23b5 100644
--- a/backend/store/issue.go
+++ b/backend/store/issue.go
@@ -81,7 +81,7 @@ type FindIssueMessage struct {
StatusList []storepb.Issue_Status
TaskTypes *[]storepb.Task_Type
- MigrateTypes *[]storepb.Task_MigrateType
+ MigrateTypes *[]storepb.MigrationType
// Any of the task in the issue changes the instance with InstanceResourceID.
InstanceResourceID *string
// Any of the task in the issue changes the database with InstanceID and DatabaseName.
diff --git a/backend/store/issue_comment.go b/backend/store/issue_comment.go
index 542c05b6a2..38fbb168f6 100644
--- a/backend/store/issue_comment.go
+++ b/backend/store/issue_comment.go
@@ -128,7 +128,7 @@ func (s *Store) ListIssueComment(ctx context.Context, find *FindIssueCommentMess
return issueComments, nil
}
-func (s *Store) CreateIssueCommentTaskUpdateStatus(ctx context.Context, issueUID int, tasks []string, status storepb.IssueCommentPayload_TaskUpdate_Status, creatorUID int, comment string) error {
+func (s *Store) CreateIssueCommentTaskUpdateStatus(ctx context.Context, issueUID int, tasks []string, status storepb.TaskRun_Status, creatorUID int, comment string) error {
create := &IssueCommentMessage{
IssueUID: issueUID,
Payload: &storepb.IssueCommentPayload{
diff --git a/backend/store/plan_check_run.go b/backend/store/plan_check_run.go
index 9c31435b24..1439510d26 100644
--- a/backend/store/plan_check_run.go
+++ b/backend/store/plan_check_run.go
@@ -65,7 +65,7 @@ type FindPlanCheckRunMessage struct {
UIDs *[]int
Status *[]PlanCheckRunStatus
Type *[]PlanCheckRunType
- ResultStatus *[]storepb.PlanCheckRunResult_Result_Status
+ ResultStatus *[]storepb.Advice_Status
}
// CreatePlanCheckRuns creates new plan check runs.
diff --git a/backend/store/revision.go b/backend/store/revision.go
index 85560fbc8e..1b9a19a78c 100644
--- a/backend/store/revision.go
+++ b/backend/store/revision.go
@@ -31,7 +31,7 @@ type FindRevisionMessage struct {
UID *int64
InstanceID *string
DatabaseName *string
- Type *storepb.RevisionPayload_Type
+ Type *storepb.SchemaChangeType
Version *string
Versions *[]string
diff --git a/backend/store/task.go b/backend/store/task.go
index ffdb90bfe2..84076e8637 100644
--- a/backend/store/task.go
+++ b/backend/store/task.go
@@ -84,7 +84,7 @@ type TaskPatch struct {
ExportFormat *storepb.ExportFormat
ExportPassword *string
EnablePriorBackup *bool
- MigrateType *storepb.Task_MigrateType
+ MigrateType *storepb.MigrationType
// Flags for gh-ost.
Flags *map[string]string
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 911e6de7e3..fba3b646ce 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -11,7 +11,9 @@
- [Engine](#bytebase-store-Engine)
- [ExportFormat](#bytebase-store-ExportFormat)
- [MaskingLevel](#bytebase-store-MaskingLevel)
+ - [MigrationType](#bytebase-store-MigrationType)
- [RiskLevel](#bytebase-store-RiskLevel)
+ - [SchemaChangeType](#bytebase-store-SchemaChangeType)
- [VCSType](#bytebase-store-VCSType)
- [store/advice.proto](#store_advice-proto)
@@ -47,7 +49,6 @@
- [ChangedResources](#bytebase-store-ChangedResources)
- [ChangelogPayload](#bytebase-store-ChangelogPayload)
- - [ChangelogPayload.MigrationType](#bytebase-store-ChangelogPayload-MigrationType)
- [ChangelogPayload.Type](#bytebase-store-ChangelogPayload-Type)
- [store/database.proto](#store_database-proto)
@@ -105,9 +106,6 @@
- [TablePartitionMetadata.Type](#bytebase-store-TablePartitionMetadata-Type)
- [TaskMetadata.State](#bytebase-store-TaskMetadata-State)
-- [store/db_group.proto](#store_db_group-proto)
- - [DatabaseGroupPayload](#bytebase-store-DatabaseGroupPayload)
-
- [store/export_archive.proto](#store_export_archive-proto)
- [ExportArchivePayload](#bytebase-store-ExportArchivePayload)
@@ -161,6 +159,17 @@
- [Issue.Status](#bytebase-store-Issue-Status)
- [Issue.Type](#bytebase-store-Issue-Type)
+- [store/task_run.proto](#store_task_run-proto)
+ - [PriorBackupDetail](#bytebase-store-PriorBackupDetail)
+ - [PriorBackupDetail.Item](#bytebase-store-PriorBackupDetail-Item)
+ - [PriorBackupDetail.Item.Table](#bytebase-store-PriorBackupDetail-Item-Table)
+ - [SchedulerInfo](#bytebase-store-SchedulerInfo)
+ - [SchedulerInfo.WaitingCause](#bytebase-store-SchedulerInfo-WaitingCause)
+ - [TaskRun](#bytebase-store-TaskRun)
+ - [TaskRunResult](#bytebase-store-TaskRunResult)
+
+ - [TaskRun.Status](#bytebase-store-TaskRun-Status)
+
- [store/issue_comment.proto](#store_issue_comment-proto)
- [IssueCommentPayload](#bytebase-store-IssueCommentPayload)
- [IssueCommentPayload.Approval](#bytebase-store-IssueCommentPayload-Approval)
@@ -170,10 +179,6 @@
- [IssueCommentPayload.TaskPriorBackup.Table](#bytebase-store-IssueCommentPayload-TaskPriorBackup-Table)
- [IssueCommentPayload.TaskUpdate](#bytebase-store-IssueCommentPayload-TaskUpdate)
- - [IssueCommentPayload.Approval.Status](#bytebase-store-IssueCommentPayload-Approval-Status)
- - [IssueCommentPayload.IssueUpdate.IssueStatus](#bytebase-store-IssueCommentPayload-IssueUpdate-IssueStatus)
- - [IssueCommentPayload.TaskUpdate.Status](#bytebase-store-IssueCommentPayload-TaskUpdate-Status)
-
- [store/plan.proto](#store_plan-proto)
- [PlanConfig](#bytebase-store-PlanConfig)
- [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig)
@@ -184,7 +189,6 @@
- [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig)
- [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)
- - [PlanConfig.ChangeDatabaseConfig.MigrateType](#bytebase-store-PlanConfig-ChangeDatabaseConfig-MigrateType)
- [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type)
- [store/plan_check_run.proto](#store_plan_check_run-proto)
@@ -196,7 +200,6 @@
- [PlanCheckRunResult.Result.SqlSummaryReport](#bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport)
- [PlanCheckRunConfig.ChangeDatabaseType](#bytebase-store-PlanCheckRunConfig-ChangeDatabaseType)
- - [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status)
- [store/policy.proto](#store_policy-proto)
- [Binding](#bytebase-store-Binding)
@@ -241,17 +244,12 @@
- [ReleasePayload.File](#bytebase-store-ReleasePayload-File)
- [ReleasePayload.VCSSource](#bytebase-store-ReleasePayload-VCSSource)
- - [ReleasePayload.File.MigrationType](#bytebase-store-ReleasePayload-File-MigrationType)
- - [ReleasePayload.File.Type](#bytebase-store-ReleasePayload-File-Type)
-
- [store/review_config.proto](#store_review_config-proto)
- [ReviewConfigPayload](#bytebase-store-ReviewConfigPayload)
- [store/revision.proto](#store_revision-proto)
- [RevisionPayload](#bytebase-store-RevisionPayload)
- - [RevisionPayload.Type](#bytebase-store-RevisionPayload-Type)
-
- [store/role.proto](#store_role-proto)
- [RolePermissions](#bytebase-store-RolePermissions)
@@ -297,7 +295,6 @@
- [SettingName](#bytebase-store-SettingName)
- [store/sheet.proto](#store_sheet-proto)
- - [SheetCommand](#bytebase-store-SheetCommand)
- [SheetPayload](#bytebase-store-SheetPayload)
- [store/task.proto](#store_task-proto)
@@ -305,20 +302,8 @@
- [Task.FlagsEntry](#bytebase-store-Task-FlagsEntry)
- [TaskReleaseSource](#bytebase-store-TaskReleaseSource)
- - [Task.MigrateType](#bytebase-store-Task-MigrateType)
- [Task.Type](#bytebase-store-Task-Type)
-- [store/task_run.proto](#store_task_run-proto)
- - [PriorBackupDetail](#bytebase-store-PriorBackupDetail)
- - [PriorBackupDetail.Item](#bytebase-store-PriorBackupDetail-Item)
- - [PriorBackupDetail.Item.Table](#bytebase-store-PriorBackupDetail-Item-Table)
- - [SchedulerInfo](#bytebase-store-SchedulerInfo)
- - [SchedulerInfo.WaitingCause](#bytebase-store-SchedulerInfo-WaitingCause)
- - [TaskRun](#bytebase-store-TaskRun)
- - [TaskRunResult](#bytebase-store-TaskRunResult)
-
- - [TaskRun.Status](#bytebase-store-TaskRun-Status)
-
- [store/task_run_log.proto](#store_task_run_log-proto)
- [TaskRunLog](#bytebase-store-TaskRunLog)
- [TaskRunLog.CommandExecute](#bytebase-store-TaskRunLog-CommandExecute)
@@ -471,6 +456,20 @@ MaskingLevel represents the level of data masking applied to sensitive informati
+<a name="bytebase-store-MigrationType"></a>
+
+### MigrationType
+MigrationType represents the type of database migration.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MIGRATION_TYPE_UNSPECIFIED | 0 | |
+| DDL | 1 | DDL changes (Data Definition Language) for schema modifications. |
+| DML | 2 | DML changes (Data Manipulation Language) for data modifications. |
+| GHOST | 3 | Online schema migration using gh-ost tool. |
+
+
+
<a name="bytebase-store-RiskLevel"></a>
### RiskLevel
@@ -485,6 +484,19 @@ RiskLevel represents the assessed risk level of a database operation.
+<a name="bytebase-store-SchemaChangeType"></a>
+
+### SchemaChangeType
+SchemaChangeType represents the strategy for schema changes.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SCHEMA_CHANGE_TYPE_UNSPECIFIED | 0 | |
+| VERSIONED | 1 | Versioned migration with explicit migration scripts. |
+| DECLARATIVE | 2 | Declarative schema definition (state-based). |
+
+
+
<a name="bytebase-store-VCSType"></a>
### VCSType
@@ -539,11 +551,11 @@ VCSType represents the type of version control system.
<a name="bytebase-store-Advice-Status"></a>
### Advice.Status
-
+Status represents the result status of the advice.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| STATUS_UNSPECIFIED | 0 | |
| SUCCESS | 1 | |
| WARNING | 2 | |
| ERROR | 3 | |
@@ -917,7 +929,7 @@ Change represents a single database modification within the changelist.
| version | [string](#string) | | |
| type | [ChangelogPayload.Type](#bytebase-store-ChangelogPayload-Type) | | |
| git_commit | [string](#string) | | |
-| migration_type | [ChangelogPayload.MigrationType](#bytebase-store-ChangelogPayload-MigrationType) | | |
+| migration_type | [MigrationType](#bytebase-store-MigrationType) | | |
@@ -926,20 +938,6 @@ Change represents a single database modification within the changelist.
-<a name="bytebase-store-ChangelogPayload-MigrationType"></a>
-
-### ChangelogPayload.MigrationType
-MigrationType is the type for imperative schema migration.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MIGRATION_TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | Used for DDL changes. |
-| DML | 2 | Used for DML changes. |
-| GHOST | 3 | Used for DDL changes using gh-ost. |
-
-
-
<a name="bytebase-store-ChangelogPayload-Type"></a>
### ChangelogPayload.Type
@@ -2011,32 +2009,6 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)
-<a name="store_db_group-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## store/db_group.proto
-
-
-
-<a name="bytebase-store-DatabaseGroupPayload"></a>
-
-### DatabaseGroupPayload
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<a name="store_export_archive-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -2804,6 +2776,154 @@ Type represents the category of issue.
+<a name="store_task_run-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## store/task_run.proto
+
+
+
+<a name="bytebase-store-PriorBackupDetail"></a>
+
+### PriorBackupDetail
+PriorBackupDetail contains information about automatic backups created before migration.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| items | [PriorBackupDetail.Item](#bytebase-store-PriorBackupDetail-Item) | repeated | List of backup operations performed. |
+
+
+
+
+
+
+<a name="bytebase-store-PriorBackupDetail-Item"></a>
+
+### PriorBackupDetail.Item
+Item represents a single backup operation for a table.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| source_table | [PriorBackupDetail.Item.Table](#bytebase-store-PriorBackupDetail-Item-Table) | | The original table that was backed up. |
+| target_table | [PriorBackupDetail.Item.Table](#bytebase-store-PriorBackupDetail-Item-Table) | | The backup table where data was copied. |
+| start_position | [Position](#bytebase-store-Position) | | Starting position in SQL for this backup operation. |
+| end_position | [Position](#bytebase-store-Position) | | Ending position in SQL for this backup operation. |
+
+
+
+
+
+
+<a name="bytebase-store-PriorBackupDetail-Item-Table"></a>
+
+### PriorBackupDetail.Item.Table
+Table identifies a database table.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| database | [string](#string) | | The database containing the table. Format: instances/{instance}/databases/{database} |
+| schema | [string](#string) | | Schema name (for databases that support schemas). |
+| table | [string](#string) | | Table name. |
+
+
+
+
+
+
+<a name="bytebase-store-SchedulerInfo"></a>
+
+### SchedulerInfo
+SchedulerInfo contains information about task scheduling and execution delays.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when the scheduler reported this information. |
+| waiting_cause | [SchedulerInfo.WaitingCause](#bytebase-store-SchedulerInfo-WaitingCause) | | Reason why the task run is currently waiting. |
+
+
+
+
+
+
+<a name="bytebase-store-SchedulerInfo-WaitingCause"></a>
+
+### SchedulerInfo.WaitingCause
+WaitingCause indicates why a task run is waiting to execute.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| connection_limit | [bool](#bool) | | Task is waiting due to database connection limit. |
+| task_uid | [int32](#int32) | | Task is waiting for another task to complete. |
+| parallel_tasks_limit | [bool](#bool) | | Task is waiting due to parallel execution limit. |
+
+
+
+
+
+
+<a name="bytebase-store-TaskRun"></a>
+
+### TaskRun
+TaskRun represents an execution attempt of a task.
+
+
+
+
+
+
+<a name="bytebase-store-TaskRunResult"></a>
+
+### TaskRunResult
+TaskRunResult contains the outcome and metadata from a task run execution.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| detail | [string](#string) | | Detailed execution information or error message. |
+| changelog | [string](#string) | | Resource name of the changelog entry created by this run. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| version | [string](#string) | | Schema version after the migration was applied. |
+| start_position | [Position](#bytebase-store-Position) | | Starting position in the SQL statement where an error occurred. |
+| end_position | [Position](#bytebase-store-Position) | | Ending position in the SQL statement where an error occurred. |
+| export_archive_uid | [int32](#int32) | | UID of the export archive generated for export tasks. |
+| prior_backup_detail | [PriorBackupDetail](#bytebase-store-PriorBackupDetail) | | Backup details that can be used to rollback changes. |
+
+
+
+
+
+
+
+
+<a name="bytebase-store-TaskRun-Status"></a>
+
+### TaskRun.Status
+Status represents the current execution state of a task run.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | Task run is queued and waiting to execute. |
+| RUNNING | 2 | Task run is currently executing. |
+| DONE | 3 | Task run completed successfully. |
+| FAILED | 4 | Task run encountered an error and failed. |
+| CANCELED | 5 | Task run was canceled by user or system. |
+| NOT_STARTED | 6 | Task run has not started yet. |
+| SKIPPED | 7 | Task run was skipped and will not execute. |
+
+
+
+
+
+
+
+
+
+
<a name="store_issue_comment-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -2839,7 +2959,7 @@ Type represents the category of issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [IssueCommentPayload.Approval.Status](#bytebase-store-IssueCommentPayload-Approval-Status) | | |
+| status | [IssuePayloadApproval.Approver.Status](#bytebase-store-IssuePayloadApproval-Approver-Status) | | |
@@ -2858,8 +2978,8 @@ Type represents the category of issue.
| to_title | [string](#string) | optional | |
| from_description | [string](#string) | optional | |
| to_description | [string](#string) | optional | |
-| from_status | [IssueCommentPayload.IssueUpdate.IssueStatus](#bytebase-store-IssueCommentPayload-IssueUpdate-IssueStatus) | optional | |
-| to_status | [IssueCommentPayload.IssueUpdate.IssueStatus](#bytebase-store-IssueCommentPayload-IssueUpdate-IssueStatus) | optional | |
+| from_status | [Issue.Status](#bytebase-store-Issue-Status) | optional | |
+| to_status | [Issue.Status](#bytebase-store-Issue-Status) | optional | |
| from_labels | [string](#string) | repeated | |
| to_labels | [string](#string) | repeated | |
@@ -2929,7 +3049,7 @@ Type represents the category of issue.
| tasks | [string](#string) | repeated | |
| from_sheet | [string](#string) | optional | Format: projects/{project}/sheets/{sheet} |
| to_sheet | [string](#string) | optional | Format: projects/{project}/sheets/{sheet} |
-| to_status | [IssueCommentPayload.TaskUpdate.Status](#bytebase-store-IssueCommentPayload-TaskUpdate-Status) | optional | |
+| to_status | [TaskRun.Status](#bytebase-store-TaskRun-Status) | optional | |
@@ -2937,51 +3057,6 @@ Type represents the category of issue.
-
-<a name="bytebase-store-IssueCommentPayload-Approval-Status"></a>
-
-### IssueCommentPayload.Approval.Status
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| APPROVED | 2 | |
-| REJECTED | 3 | |
-
-
-
-<a name="bytebase-store-IssueCommentPayload-IssueUpdate-IssueStatus"></a>
-
-### IssueCommentPayload.IssueUpdate.IssueStatus
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ISSUE_STATUS_UNSPECIFIED | 0 | |
-| OPEN | 1 | |
-| DONE | 2 | |
-| CANCELED | 3 | |
-
-
-
-<a name="bytebase-store-IssueCommentPayload-TaskUpdate-Status"></a>
-
-### IssueCommentPayload.TaskUpdate.Status
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| RUNNING | 2 | |
-| DONE | 3 | |
-| FAILED | 4 | |
-| SKIPPED | 5 | |
-| CANCELED | 6 | |
-
-
@@ -3025,7 +3100,7 @@ Type represents the category of issue.
| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
| type | [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type) | | |
-| migrate_type | [PlanConfig.ChangeDatabaseConfig.MigrateType](#bytebase-store-PlanConfig-ChangeDatabaseConfig-MigrateType) | | |
+| migrate_type | [MigrationType](#bytebase-store-MigrationType) | | The migration type for imperative schema migration. It is only set when type is MIGRATE. |
| ghost_flags | [PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | |
| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
@@ -3142,21 +3217,6 @@ Type represents the category of issue.
-<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-MigrateType"></a>
-
-### PlanConfig.ChangeDatabaseConfig.MigrateType
-MigrateType is the migration type for imperative schema migration.
-It is only set when type is MIGRATE.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MIGRATE_TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | Used for DDL changes. |
-| DML | 2 | Used for DML changes. |
-| GHOST | 3 | Used for DDL changes using gh-ost. |
-
-
-
<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-Type"></a>
### PlanConfig.ChangeDatabaseConfig.Type
@@ -3245,7 +3305,7 @@ Type is the database change type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status) | | |
+| status | [Advice.Status](#bytebase-store-Advice-Status) | | |
| title | [string](#string) | | |
| content | [string](#string) | | |
| code | [int32](#int32) | | |
@@ -3297,7 +3357,8 @@ Type is the database change type.
<a name="bytebase-store-PlanCheckRunConfig-ChangeDatabaseType"></a>
### PlanCheckRunConfig.ChangeDatabaseType
-
+ChangeDatabaseType extends MigrationType with additional execution contexts.
+Note: DDL, DML, and DDL_GHOST values align with MigrationType enum values.
| Name | Number | Description |
| ---- | ------ | ----------- |
@@ -3309,20 +3370,6 @@ Type is the database change type.
| SQL_EDITOR | 5 | |
-
-<a name="bytebase-store-PlanCheckRunResult-Result-Status"></a>
-
-### PlanCheckRunResult.Result.Status
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| ERROR | 1 | |
-| WARNING | 2 | |
-| SUCCESS | 3 | |
-
-
@@ -3894,9 +3941,9 @@ ExecutionRetryPolicy defines retry behavior for failed task executions.
| path | [string](#string) | | The path of the file, e.g., `2.2/V0001_create_table.sql`. |
| sheet | [string](#string) | | The sheet that holds the content. Format: projects/{project}/sheets/{sheet} |
| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet. |
-| type | [ReleasePayload.File.Type](#bytebase-store-ReleasePayload-File-Type) | | |
+| type | [SchemaChangeType](#bytebase-store-SchemaChangeType) | | |
| version | [string](#string) | | |
-| migration_type | [ReleasePayload.File.MigrationType](#bytebase-store-ReleasePayload-File-MigrationType) | | |
+| migration_type | [MigrationType](#bytebase-store-MigrationType) | | |
@@ -3920,33 +3967,6 @@ ExecutionRetryPolicy defines retry behavior for failed task executions.
-
-<a name="bytebase-store-ReleasePayload-File-MigrationType"></a>
-
-### ReleasePayload.File.MigrationType
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MIGRATION_TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | |
-| DDL_GHOST | 2 | |
-| DML | 3 | |
-
-
-
-<a name="bytebase-store-ReleasePayload-File-Type"></a>
-
-### ReleasePayload.File.Type
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| VERSIONED | 1 | |
-| DECLARATIVE | 2 | |
-
-
@@ -4006,7 +4026,7 @@ ExecutionRetryPolicy defines retry behavior for failed task executions.
| sheet | [string](#string) | | The sheet that holds the content. Format: projects/{project}/sheets/{sheet} |
| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet. |
| task_run | [string](#string) | | The task run associated with the revision. Can be empty. Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-| type | [RevisionPayload.Type](#bytebase-store-RevisionPayload-Type) | | The type of the revision. |
+| type | [SchemaChangeType](#bytebase-store-SchemaChangeType) | | The type of the revision. |
@@ -4014,19 +4034,6 @@ ExecutionRetryPolicy defines retry behavior for failed task executions.
-
-<a name="bytebase-store-RevisionPayload-Type"></a>
-
-### RevisionPayload.Type
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| VERSIONED | 1 | |
-| DECLARATIVE | 2 | |
-
-
@@ -4743,22 +4750,6 @@ We support three levels of AlertLevel: INFO, WARNING, and ERROR.
-<a name="bytebase-store-SheetCommand"></a>
-
-### SheetCommand
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| start | [int32](#int32) | | |
-| end | [int32](#int32) | | |
-
-
-
-
-
-
<a name="bytebase-store-SheetPayload"></a>
### SheetPayload
@@ -4768,7 +4759,7 @@ We support three levels of AlertLevel: INFO, WARNING, and ERROR.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| engine | [Engine](#bytebase-store-Engine) | | The SQL dialect. |
-| commands | [SheetCommand](#bytebase-store-SheetCommand) | repeated | The start and end position of each command in the sheet statement. |
+| commands | [Range](#bytebase-store-Range) | repeated | The start and end position of each command in the sheet statement. |
@@ -4812,7 +4803,7 @@ Task is the metadata for database operation tasks.
| enable_prior_backup | [bool](#bool) | | Whether to create an automatic backup before applying changes. |
| flags | [Task.FlagsEntry](#bytebase-store-Task-FlagsEntry) | repeated | Configuration flags for gh-ost migration tool. |
| task_release_source | [TaskReleaseSource](#bytebase-store-TaskReleaseSource) | | Source information if task is created from a release. |
-| migrate_type | [Task.MigrateType](#bytebase-store-Task-MigrateType) | | The type of migration (DDL, DML, or GHOST). |
+| migrate_type | [MigrationType](#bytebase-store-MigrationType) | | The type of migration (DDL, DML, or GHOST). |
| password | [string](#string) | | Password to encrypt the exported data archive. |
| format | [ExportFormat](#bytebase-store-ExportFormat) | | Format of the exported data (SQL, CSV, JSON, etc). |
@@ -4854,20 +4845,6 @@ TaskReleaseSource contains information about the release file this task originat
-<a name="bytebase-store-Task-MigrateType"></a>
-
-### Task.MigrateType
-MigrateType is the database migration type for imperative migrations.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MIGRATE_TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | DDL changes (Data Definition Language) for schema modifications. |
-| DML | 2 | DML changes (Data Manipulation Language) for data modifications. |
-| GHOST | 3 | Online schema migration using gh-ost tool. |
-
-
-
<a name="bytebase-store-Task-Type"></a>
### Task.Type
@@ -4890,154 +4867,6 @@ Type represents the type of database operation to perform.
-<a name="store_task_run-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## store/task_run.proto
-
-
-
-<a name="bytebase-store-PriorBackupDetail"></a>
-
-### PriorBackupDetail
-PriorBackupDetail contains information about automatic backups created before migration.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| items | [PriorBackupDetail.Item](#bytebase-store-PriorBackupDetail-Item) | repeated | List of backup operations performed. |
-
-
-
-
-
-
-<a name="bytebase-store-PriorBackupDetail-Item"></a>
-
-### PriorBackupDetail.Item
-Item represents a single backup operation for a table.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| source_table | [PriorBackupDetail.Item.Table](#bytebase-store-PriorBackupDetail-Item-Table) | | The original table that was backed up. |
-| target_table | [PriorBackupDetail.Item.Table](#bytebase-store-PriorBackupDetail-Item-Table) | | The backup table where data was copied. |
-| start_position | [Position](#bytebase-store-Position) | | Starting position in SQL for this backup operation. |
-| end_position | [Position](#bytebase-store-Position) | | Ending position in SQL for this backup operation. |
-
-
-
-
-
-
-<a name="bytebase-store-PriorBackupDetail-Item-Table"></a>
-
-### PriorBackupDetail.Item.Table
-Table identifies a database table.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| database | [string](#string) | | The database containing the table. Format: instances/{instance}/databases/{database} |
-| schema | [string](#string) | | Schema name (for databases that support schemas). |
-| table | [string](#string) | | Table name. |
-
-
-
-
-
-
-<a name="bytebase-store-SchedulerInfo"></a>
-
-### SchedulerInfo
-SchedulerInfo contains information about task scheduling and execution delays.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when the scheduler reported this information. |
-| waiting_cause | [SchedulerInfo.WaitingCause](#bytebase-store-SchedulerInfo-WaitingCause) | | Reason why the task run is currently waiting. |
-
-
-
-
-
-
-<a name="bytebase-store-SchedulerInfo-WaitingCause"></a>
-
-### SchedulerInfo.WaitingCause
-WaitingCause indicates why a task run is waiting to execute.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| connection_limit | [bool](#bool) | | Task is waiting due to database connection limit. |
-| task_uid | [int32](#int32) | | Task is waiting for another task to complete. |
-| parallel_tasks_limit | [bool](#bool) | | Task is waiting due to parallel execution limit. |
-
-
-
-
-
-
-<a name="bytebase-store-TaskRun"></a>
-
-### TaskRun
-TaskRun represents an execution attempt of a task.
-
-
-
-
-
-
-<a name="bytebase-store-TaskRunResult"></a>
-
-### TaskRunResult
-TaskRunResult contains the outcome and metadata from a task run execution.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| detail | [string](#string) | | Detailed execution information or error message. |
-| changelog | [string](#string) | | Resource name of the changelog entry created by this run. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
-| version | [string](#string) | | Schema version after the migration was applied. |
-| start_position | [Position](#bytebase-store-Position) | | Starting position in the SQL statement where an error occurred. |
-| end_position | [Position](#bytebase-store-Position) | | Ending position in the SQL statement where an error occurred. |
-| export_archive_uid | [int32](#int32) | | UID of the export archive generated for export tasks. |
-| prior_backup_detail | [PriorBackupDetail](#bytebase-store-PriorBackupDetail) | | Backup details that can be used to rollback changes. |
-
-
-
-
-
-
-
-
-<a name="bytebase-store-TaskRun-Status"></a>
-
-### TaskRun.Status
-Status represents the current execution state of a task run.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | Task run is queued and waiting to execute. |
-| RUNNING | 2 | Task run is currently executing. |
-| DONE | 3 | Task run completed successfully. |
-| FAILED | 4 | Task run encountered an error and failed. |
-| CANCELED | 5 | Task run was canceled by user or system. |
-| NOT_STARTED | 6 | Task run has not started yet. |
-| SKIPPED | 7 | Task run was skipped and will not execute. |
-
-
-
-
-
-
-
-
-
-
<a name="store_task_run_log-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 1426295959..c794fda6e0 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -203,10 +203,18 @@
<a href="#bytebase.store.MaskingLevel"><span class="badge">E</span>MaskingLevel</a>
</li>
+ <li>
+ <a href="#bytebase.store.MigrationType"><span class="badge">E</span>MigrationType</a>
+ </li>
+
<li>
<a href="#bytebase.store.RiskLevel"><span class="badge">E</span>RiskLevel</a>
</li>
+ <li>
+ <a href="#bytebase.store.SchemaChangeType"><span class="badge">E</span>SchemaChangeType</a>
+ </li>
+
<li>
<a href="#bytebase.store.VCSType"><span class="badge">E</span>VCSType</a>
</li>
@@ -346,10 +354,6 @@
</li>
- <li>
- <a href="#bytebase.store.ChangelogPayload.MigrationType"><span class="badge">E</span>ChangelogPayload.MigrationType</a>
- </li>
-
<li>
<a href="#bytebase.store.ChangelogPayload.Type"><span class="badge">E</span>ChangelogPayload.Type</a>
</li>
@@ -579,21 +583,6 @@
</li>
- <li>
- <a href="#store%2fdb_group.proto">store/db_group.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.store.DatabaseGroupPayload"><span class="badge">M</span>DatabaseGroupPayload</a>
- </li>
-
-
-
-
- </ul>
- </li>
-
-
<li>
<a href="#store%2fexport_archive.proto">store/export_archive.proto</a>
<ul>
@@ -809,52 +798,83 @@
<li>
- <a href="#store%2fissue_comment.proto">store/issue_comment.proto</a>
+ <a href="#store%2ftask_run.proto">store/task_run.proto</a>
<ul>
<li>
- <a href="#bytebase.store.IssueCommentPayload"><span class="badge">M</span>IssueCommentPayload</a>
+ <a href="#bytebase.store.PriorBackupDetail"><span class="badge">M</span>PriorBackupDetail</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.Approval"><span class="badge">M</span>IssueCommentPayload.Approval</a>
+ <a href="#bytebase.store.PriorBackupDetail.Item"><span class="badge">M</span>PriorBackupDetail.Item</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.IssueUpdate"><span class="badge">M</span>IssueCommentPayload.IssueUpdate</a>
+ <a href="#bytebase.store.PriorBackupDetail.Item.Table"><span class="badge">M</span>PriorBackupDetail.Item.Table</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.StageEnd"><span class="badge">M</span>IssueCommentPayload.StageEnd</a>
+ <a href="#bytebase.store.SchedulerInfo"><span class="badge">M</span>SchedulerInfo</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup"><span class="badge">M</span>IssueCommentPayload.TaskPriorBackup</a>
+ <a href="#bytebase.store.SchedulerInfo.WaitingCause"><span class="badge">M</span>SchedulerInfo.WaitingCause</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup.Table"><span class="badge">M</span>IssueCommentPayload.TaskPriorBackup.Table</a>
+ <a href="#bytebase.store.TaskRun"><span class="badge">M</span>TaskRun</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.TaskUpdate"><span class="badge">M</span>IssueCommentPayload.TaskUpdate</a>
+ <a href="#bytebase.store.TaskRunResult"><span class="badge">M</span>TaskRunResult</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.store.TaskRun.Status"><span class="badge">E</span>TaskRun.Status</a>
+ </li>
+
+
+
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#store%2fissue_comment.proto">store/issue_comment.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.store.IssueCommentPayload"><span class="badge">M</span>IssueCommentPayload</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.IssueCommentPayload.Approval"><span class="badge">M</span>IssueCommentPayload.Approval</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.IssueCommentPayload.IssueUpdate"><span class="badge">M</span>IssueCommentPayload.IssueUpdate</a>
</li>
+ <li>
+ <a href="#bytebase.store.IssueCommentPayload.StageEnd"><span class="badge">M</span>IssueCommentPayload.StageEnd</a>
+ </li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.Approval.Status"><span class="badge">E</span>IssueCommentPayload.Approval.Status</a>
+ <a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup"><span class="badge">M</span>IssueCommentPayload.TaskPriorBackup</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus"><span class="badge">E</span>IssueCommentPayload.IssueUpdate.IssueStatus</a>
+ <a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup.Table"><span class="badge">M</span>IssueCommentPayload.TaskPriorBackup.Table</a>
</li>
<li>
- <a href="#bytebase.store.IssueCommentPayload.TaskUpdate.Status"><span class="badge">E</span>IssueCommentPayload.TaskUpdate.Status</a>
+ <a href="#bytebase.store.IssueCommentPayload.TaskUpdate"><span class="badge">M</span>IssueCommentPayload.TaskUpdate</a>
</li>
+
</ul>
</li>
@@ -896,10 +916,6 @@
</li>
- <li>
- <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.MigrateType"><span class="badge">E</span>PlanConfig.ChangeDatabaseConfig.MigrateType</a>
- </li>
-
<li>
<a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type"><span class="badge">E</span>PlanConfig.ChangeDatabaseConfig.Type</a>
</li>
@@ -943,10 +959,6 @@
<a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType"><span class="badge">E</span>PlanCheckRunConfig.ChangeDatabaseType</a>
</li>
- <li>
- <a href="#bytebase.store.PlanCheckRunResult.Result.Status"><span class="badge">E</span>PlanCheckRunResult.Result.Status</a>
- </li>
-
</ul>
@@ -1130,14 +1142,6 @@
</li>
- <li>
- <a href="#bytebase.store.ReleasePayload.File.MigrationType"><span class="badge">E</span>ReleasePayload.File.MigrationType</a>
- </li>
-
- <li>
- <a href="#bytebase.store.ReleasePayload.File.Type"><span class="badge">E</span>ReleasePayload.File.Type</a>
- </li>
-
</ul>
@@ -1168,10 +1172,6 @@
</li>
- <li>
- <a href="#bytebase.store.RevisionPayload.Type"><span class="badge">E</span>RevisionPayload.Type</a>
- </li>
-
</ul>
@@ -1360,10 +1360,6 @@
<a href="#store%2fsheet.proto">store/sheet.proto</a>
<ul>
- <li>
- <a href="#bytebase.store.SheetCommand"><span class="badge">M</span>SheetCommand</a>
- </li>
-
<li>
<a href="#bytebase.store.SheetPayload"><span class="badge">M</span>SheetPayload</a>
</li>
@@ -1392,10 +1388,6 @@
</li>
- <li>
- <a href="#bytebase.store.Task.MigrateType"><span class="badge">E</span>Task.MigrateType</a>
- </li>
-
<li>
<a href="#bytebase.store.Task.Type"><span class="badge">E</span>Task.Type</a>
</li>
@@ -1406,49 +1398,6 @@
</li>
- <li>
- <a href="#store%2ftask_run.proto">store/task_run.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.store.PriorBackupDetail"><span class="badge">M</span>PriorBackupDetail</a>
- </li>
-
- <li>
- <a href="#bytebase.store.PriorBackupDetail.Item"><span class="badge">M</span>PriorBackupDetail.Item</a>
- </li>
-
- <li>
- <a href="#bytebase.store.PriorBackupDetail.Item.Table"><span class="badge">M</span>PriorBackupDetail.Item.Table</a>
- </li>
-
- <li>
- <a href="#bytebase.store.SchedulerInfo"><span class="badge">M</span>SchedulerInfo</a>
- </li>
-
- <li>
- <a href="#bytebase.store.SchedulerInfo.WaitingCause"><span class="badge">M</span>SchedulerInfo.WaitingCause</a>
- </li>
-
- <li>
- <a href="#bytebase.store.TaskRun"><span class="badge">M</span>TaskRun</a>
- </li>
-
- <li>
- <a href="#bytebase.store.TaskRunResult"><span class="badge">M</span>TaskRunResult</a>
- </li>
-
-
- <li>
- <a href="#bytebase.store.TaskRun.Status"><span class="badge">E</span>TaskRun.Status</a>
- </li>
-
-
-
- </ul>
- </li>
-
-
<li>
<a href="#store%2ftask_run_log.proto">store/task_run_log.proto</a>
<ul>
@@ -1900,6 +1849,41 @@
</tbody>
</table>
+ <h3 id="bytebase.store.MigrationType">MigrationType</h3>
+ <p>MigrationType represents the type of database migration.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MIGRATION_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL</td>
+ <td>1</td>
+ <td><p>DDL changes (Data Definition Language) for schema modifications.</p></td>
+ </tr>
+
+ <tr>
+ <td>DML</td>
+ <td>2</td>
+ <td><p>DML changes (Data Manipulation Language) for data modifications.</p></td>
+ </tr>
+
+ <tr>
+ <td>GHOST</td>
+ <td>3</td>
+ <td><p>Online schema migration using gh-ost tool.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
<h3 id="bytebase.store.RiskLevel">RiskLevel</h3>
<p>RiskLevel represents the assessed risk level of a database operation.</p>
<table class="enum-table">
@@ -1935,6 +1919,35 @@
</tbody>
</table>
+ <h3 id="bytebase.store.SchemaChangeType">SchemaChangeType</h3>
+ <p>SchemaChangeType represents the strategy for schema changes.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SCHEMA_CHANGE_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>VERSIONED</td>
+ <td>1</td>
+ <td><p>Versioned migration with explicit migration scripts.</p></td>
+ </tr>
+
+ <tr>
+ <td>DECLARATIVE</td>
+ <td>2</td>
+ <td><p>Declarative schema definition (state-based).</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
<h3 id="bytebase.store.VCSType">VCSType</h3>
<p>VCSType represents the type of version control system.</p>
<table class="enum-table">
@@ -2051,7 +2064,7 @@ TODO: use range instead. </p></td>
<h3 id="bytebase.store.Advice.Status">Advice.Status</h3>
- <p></p>
+ <p>Status represents the result status of the advice.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -2061,7 +2074,7 @@ TODO: use range instead. </p></td>
<tr>
<td>STATUS_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified status.</p></td>
+ <td><p></p></td>
</tr>
<tr>
@@ -2897,7 +2910,7 @@ Format: projects/{project}/sheets/{sheet} </p></td>
<tr>
<td>migration_type</td>
- <td><a href="#bytebase.store.ChangelogPayload.MigrationType">ChangelogPayload.MigrationType</a></td>
+ <td><a href="#bytebase.store.MigrationType">MigrationType</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -2911,41 +2924,6 @@ Format: projects/{project}/sheets/{sheet} </p></td>
- <h3 id="bytebase.store.ChangelogPayload.MigrationType">ChangelogPayload.MigrationType</h3>
- <p>MigrationType is the type for imperative schema migration.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MIGRATION_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DDL</td>
- <td>1</td>
- <td><p>Used for DDL changes.</p></td>
- </tr>
-
- <tr>
- <td>DML</td>
- <td>2</td>
- <td><p>Used for DML changes.</p></td>
- </tr>
-
- <tr>
- <td>GHOST</td>
- <td>3</td>
- <td><p>Used for DDL changes using gh-ost.</p></td>
- </tr>
-
- </tbody>
- </table>
-
<h3 id="bytebase.store.ChangelogPayload.Type">ChangelogPayload.Type</h3>
<p></p>
<table class="enum-table">
@@ -6099,27 +6077,6 @@ Examples: GEOMETRY_GRID, GEOGRAPHY_GRID, GEOMETRY_AUTO_GRID, GEOGRAPHY_AUTO_GRID
- <div class="file-heading">
- <h2 id="store/db_group.proto">store/db_group.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.DatabaseGroupPayload">DatabaseGroupPayload</h3>
- <p></p>
-
-
-
-
-
-
-
-
-
-
-
-
-
<div class="file-heading">
<h2 id="store/export_archive.proto">store/export_archive.proto</h2><a href="#title">Top</a>
</div>
@@ -8128,13 +8085,13 @@ Format: users/{userUID}. </p></td>
<div class="file-heading">
- <h2 id="store/issue_comment.proto">store/issue_comment.proto</h2><a href="#title">Top</a>
+ <h2 id="store/task_run.proto">store/task_run.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.IssueCommentPayload">IssueCommentPayload</h3>
- <p></p>
+ <h3 id="bytebase.store.PriorBackupDetail">PriorBackupDetail</h3>
+ <p>PriorBackupDetail contains information about automatic backups created before migration.</p>
<table class="field-table">
@@ -8144,45 +8101,10 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>approval</td>
- <td><a href="#bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>issue_update</td>
- <td><a href="#bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>stage_end</td>
- <td><a href="#bytebase.store.IssueCommentPayload.StageEnd">IssueCommentPayload.StageEnd</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>task_update</td>
- <td><a href="#bytebase.store.IssueCommentPayload.TaskUpdate">IssueCommentPayload.TaskUpdate</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>task_prior_backup</td>
- <td><a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup">IssueCommentPayload.TaskPriorBackup</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>items</td>
+ <td><a href="#bytebase.store.PriorBackupDetail.Item">PriorBackupDetail.Item</a></td>
+ <td>repeated</td>
+ <td><p>List of backup operations performed. </p></td>
</tr>
</tbody>
@@ -8192,8 +8114,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</h3>
- <p></p>
+ <h3 id="bytebase.store.PriorBackupDetail.Item">PriorBackupDetail.Item</h3>
+ <p>Item represents a single backup operation for a table.</p>
<table class="field-table">
@@ -8203,10 +8125,31 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.store.IssueCommentPayload.Approval.Status">IssueCommentPayload.Approval.Status</a></td>
+ <td>source_table</td>
+ <td><a href="#bytebase.store.PriorBackupDetail.Item.Table">PriorBackupDetail.Item.Table</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The original table that was backed up. </p></td>
+ </tr>
+
+ <tr>
+ <td>target_table</td>
+ <td><a href="#bytebase.store.PriorBackupDetail.Item.Table">PriorBackupDetail.Item.Table</a></td>
+ <td></td>
+ <td><p>The backup table where data was copied. </p></td>
+ </tr>
+
+ <tr>
+ <td>start_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
+ <td></td>
+ <td><p>Starting position in SQL for this backup operation. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
+ <td></td>
+ <td><p>Ending position in SQL for this backup operation. </p></td>
</tr>
</tbody>
@@ -8216,8 +8159,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</h3>
- <p></p>
+ <h3 id="bytebase.store.PriorBackupDetail.Item.Table">PriorBackupDetail.Item.Table</h3>
+ <p>Table identifies a database table.</p>
<table class="field-table">
@@ -8227,59 +8170,25 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>from_title</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_title</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>from_description</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_description</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>from_status</td>
- <td><a href="#bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus">IssueCommentPayload.IssueUpdate.IssueStatus</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_status</td>
- <td><a href="#bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus">IssueCommentPayload.IssueUpdate.IssueStatus</a></td>
- <td>optional</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>The database containing the table.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>from_labels</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>Schema name (for databases that support schemas). </p></td>
</tr>
<tr>
- <td>to_labels</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>Table name. </p></td>
</tr>
</tbody>
@@ -8289,8 +8198,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IssueCommentPayload.StageEnd">IssueCommentPayload.StageEnd</h3>
- <p></p>
+ <h3 id="bytebase.store.SchedulerInfo">SchedulerInfo</h3>
+ <p>SchedulerInfo contains information about task scheduling and execution delays.</p>
<table class="field-table">
@@ -8300,10 +8209,17 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>stage</td>
- <td><a href="#string">string</a></td>
+ <td>report_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Timestamp when the scheduler reported this information. </p></td>
+ </tr>
+
+ <tr>
+ <td>waiting_cause</td>
+ <td><a href="#bytebase.store.SchedulerInfo.WaitingCause">SchedulerInfo.WaitingCause</a></td>
+ <td></td>
+ <td><p>Reason why the task run is currently waiting. </p></td>
</tr>
</tbody>
@@ -8313,8 +8229,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IssueCommentPayload.TaskPriorBackup">IssueCommentPayload.TaskPriorBackup</h3>
- <p></p>
+ <h3 id="bytebase.store.SchedulerInfo.WaitingCause">SchedulerInfo.WaitingCause</h3>
+ <p>WaitingCause indicates why a task run is waiting to execute.</p>
<table class="field-table">
@@ -8324,38 +8240,24 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>task</td>
- <td><a href="#string">string</a></td>
+ <td>connection_limit</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>tables</td>
- <td><a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup.Table">IssueCommentPayload.TaskPriorBackup.Table</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>Task is waiting due to database connection limit. </p></td>
</tr>
<tr>
- <td>original_line</td>
+ <td>task_uid</td>
<td><a href="#int32">int32</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Task is waiting for another task to complete. </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>parallel_tasks_limit</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Task is waiting due to parallel execution limit. </p></td>
</tr>
</tbody>
@@ -8365,8 +8267,15 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IssueCommentPayload.TaskPriorBackup.Table">IssueCommentPayload.TaskPriorBackup.Table</h3>
- <p></p>
+ <h3 id="bytebase.store.TaskRun">TaskRun</h3>
+ <p>TaskRun represents an execution attempt of a task.</p>
+
+
+
+
+
+ <h3 id="bytebase.store.TaskRunResult">TaskRunResult</h3>
+ <p>TaskRunResult contains the outcome and metadata from a task run execution.</p>
<table class="field-table">
@@ -8376,62 +8285,53 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>schema</td>
+ <td>detail</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Detailed execution information or error message. </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>changelog</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Resource name of the changelog entry created by this run.
+Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.IssueCommentPayload.TaskUpdate">IssueCommentPayload.TaskUpdate</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>tasks</td>
+ <td>version</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>Schema version after the migration was applied. </p></td>
</tr>
<tr>
- <td>from_sheet</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
+ <td></td>
+ <td><p>Starting position in the SQL statement where an error occurred. </p></td>
</tr>
<tr>
- <td>to_sheet</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
+ <td></td>
+ <td><p>Ending position in the SQL statement where an error occurred. </p></td>
</tr>
<tr>
- <td>to_status</td>
- <td><a href="#bytebase.store.IssueCommentPayload.TaskUpdate.Status">IssueCommentPayload.TaskUpdate.Status</a></td>
- <td>optional</td>
- <td><p> </p></td>
+ <td>export_archive_uid</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>UID of the export archive generated for export tasks. </p></td>
+ </tr>
+
+ <tr>
+ <td>prior_backup_detail</td>
+ <td><a href="#bytebase.store.PriorBackupDetail">PriorBackupDetail</a></td>
+ <td></td>
+ <td><p>Backup details that can be used to rollback changes. </p></td>
</tr>
</tbody>
@@ -8443,8 +8343,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IssueCommentPayload.Approval.Status">IssueCommentPayload.Approval.Status</h3>
- <p></p>
+ <h3 id="bytebase.store.TaskRun.Status">TaskRun.Status</h3>
+ <p>Status represents the current execution state of a task run.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -8460,107 +8360,43 @@ Format: users/{userUID}. </p></td>
<tr>
<td>PENDING</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Task run is queued and waiting to execute.</p></td>
</tr>
<tr>
- <td>APPROVED</td>
+ <td>RUNNING</td>
<td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REJECTED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.IssueCommentPayload.IssueUpdate.IssueStatus">IssueCommentPayload.IssueUpdate.IssueStatus</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ISSUE_STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OPEN</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CANCELED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.IssueCommentPayload.TaskUpdate.Status">IssueCommentPayload.TaskUpdate.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RUNNING</td>
- <td>2</td>
- <td><p></p></td>
+ <td><p>Task run is currently executing.</p></td>
</tr>
<tr>
<td>DONE</td>
<td>3</td>
- <td><p></p></td>
+ <td><p>Task run completed successfully.</p></td>
</tr>
<tr>
<td>FAILED</td>
<td>4</td>
- <td><p></p></td>
+ <td><p>Task run encountered an error and failed.</p></td>
</tr>
<tr>
- <td>SKIPPED</td>
+ <td>CANCELED</td>
<td>5</td>
- <td><p></p></td>
+ <td><p>Task run was canceled by user or system.</p></td>
</tr>
<tr>
- <td>CANCELED</td>
+ <td>NOT_STARTED</td>
<td>6</td>
- <td><p></p></td>
+ <td><p>Task run has not started yet.</p></td>
+ </tr>
+
+ <tr>
+ <td>SKIPPED</td>
+ <td>7</td>
+ <td><p>Task run was skipped and will not execute.</p></td>
</tr>
</tbody>
@@ -8573,43 +8409,12 @@ Format: users/{userUID}. </p></td>
<div class="file-heading">
- <h2 id="store/plan.proto">store/plan.proto</h2><a href="#title">Top</a>
+ <h2 id="store/issue_comment.proto">store/issue_comment.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.PlanConfig">PlanConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>specs</td>
- <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>deployment</td>
- <td><a href="#bytebase.store.PlanConfig.Deployment">PlanConfig.Deployment</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</h3>
+ <h3 id="bytebase.store.IssueCommentPayload">IssueCommentPayload</h3>
<p></p>
@@ -8620,56 +8425,45 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>release</td>
- <td><a href="#string">string</a></td>
+ <td>approval</td>
+ <td><a href="#bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</a></td>
<td></td>
- <td><p>The resource name of the release.
-Format: projects/{project}/releases/{release} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</a></td>
+ <td>issue_update</td>
+ <td><a href="#bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>migrate_type</td>
- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.MigrateType">PlanConfig.ChangeDatabaseConfig.MigrateType</a></td>
+ <td>stage_end</td>
+ <td><a href="#bytebase.store.IssueCommentPayload.StageEnd">IssueCommentPayload.StageEnd</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>ghost_flags</td>
- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</a></td>
- <td>repeated</td>
+ <td>task_update</td>
+ <td><a href="#bytebase.store.IssueCommentPayload.TaskUpdate">IssueCommentPayload.TaskUpdate</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>enable_prior_backup</td>
- <td><a href="#bool">bool</a></td>
+ <td>task_prior_backup</td>
+ <td><a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup">IssueCommentPayload.TaskPriorBackup</a></td>
<td></td>
- <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8679,7 +8473,7 @@ Format: projects/{project}/releases/{release} </p></td>
- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</h3>
+ <h3 id="bytebase.store.IssueCommentPayload.Approval">IssueCommentPayload.Approval</h3>
<p></p>
@@ -8690,15 +8484,8 @@ Format: projects/{project}/releases/{release} </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.store.IssuePayloadApproval.Approver.Status">IssuePayloadApproval.Approver.Status</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -8710,7 +8497,7 @@ Format: projects/{project}/releases/{release} </p></td>
- <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</h3>
+ <h3 id="bytebase.store.IssueCommentPayload.IssueUpdate">IssueCommentPayload.IssueUpdate</h3>
<p></p>
@@ -8721,62 +8508,59 @@ Format: projects/{project}/releases/{release} </p></td>
<tbody>
<tr>
- <td>target</td>
+ <td>from_title</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the instance on which the database is created.
-Format: instances/{instance} </p></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>database</td>
+ <td>to_title</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to create. </p></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>from_description</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
-For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>character_set</td>
+ <td>to_description</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>character_set is the character set of the database. </p></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>collation is the collation of the database. </p></td>
+ <td>from_status</td>
+ <td><a href="#bytebase.store.Issue.Status">Issue.Status</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>cluster</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
+ <td>to_status</td>
+ <td><a href="#bytebase.store.Issue.Status">Issue.Status</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>from_labels</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>environment</td>
+ <td>to_labels</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8786,7 +8570,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.store.PlanConfig.Deployment">PlanConfig.Deployment</h3>
+ <h3 id="bytebase.store.IssueCommentPayload.StageEnd">IssueCommentPayload.StageEnd</h3>
<p></p>
@@ -8797,17 +8581,10 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>environments</td>
+ <td>stage</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The environments deploy order. </p></td>
- </tr>
-
- <tr>
- <td>database_group_mappings</td>
- <td><a href="#bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping">PlanConfig.Deployment.DatabaseGroupMapping</a></td>
- <td>repeated</td>
- <td><p>The database group mapping. </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8817,7 +8594,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping">PlanConfig.Deployment.DatabaseGroupMapping</h3>
+ <h3 id="bytebase.store.IssueCommentPayload.TaskPriorBackup">IssueCommentPayload.TaskPriorBackup</h3>
<p></p>
@@ -8828,17 +8605,38 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>database_group</td>
+ <td>task</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>databases</td>
- <td><a href="#string">string</a></td>
+ <td>tables</td>
+ <td><a href="#bytebase.store.IssueCommentPayload.TaskPriorBackup.Table">IssueCommentPayload.TaskPriorBackup.Table</a></td>
<td>repeated</td>
- <td><p>Format: instances/{instance-id}/databases/{database-name}. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>original_line</td>
+ <td><a href="#int32">int32</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>database</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8848,7 +8646,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3>
+ <h3 id="bytebase.store.IssueCommentPayload.TaskPriorBackup.Table">IssueCommentPayload.TaskPriorBackup.Table</h3>
<p></p>
@@ -8859,35 +8657,17 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>format</td>
- <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>The format of the exported file. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The zip password provided by users.
-Leave it empty if there is no need to encrypt the zip file. </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8897,7 +8677,7 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
- <h3 id="bytebase.store.PlanConfig.Spec">PlanConfig.Spec</h3>
+ <h3 id="bytebase.store.IssueCommentPayload.TaskUpdate">IssueCommentPayload.TaskUpdate</h3>
<p></p>
@@ -8908,30 +8688,30 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>tasks</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>create_database_config</td>
- <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>from_sheet</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>change_database_config</td>
- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>to_sheet</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>export_data_config</td>
- <td><a href="#bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</a></td>
- <td></td>
+ <td>to_status</td>
+ <td><a href="#bytebase.store.TaskRun.Status">TaskRun.Status</a></td>
+ <td>optional</td>
<td><p> </p></td>
</tr>
@@ -8944,70 +8724,6 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.MigrateType">PlanConfig.ChangeDatabaseConfig.MigrateType</h3>
- <p>MigrateType is the migration type for imperative schema migration.</p><p>It is only set when type is MIGRATE.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MIGRATE_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DDL</td>
- <td>1</td>
- <td><p>Used for DDL changes.</p></td>
- </tr>
-
- <tr>
- <td>DML</td>
- <td>2</td>
- <td><p>Used for DML changes.</p></td>
- </tr>
-
- <tr>
- <td>GHOST</td>
- <td>3</td>
- <td><p>Used for DDL changes using gh-ost.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</h3>
- <p>Type is the database change type.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MIGRATE</td>
- <td>2</td>
- <td><p>Used for imperative schema migration including CREATE DATABASE.</p></td>
- </tr>
-
- <tr>
- <td>SDL</td>
- <td>3</td>
- <td><p>Used for state-based declarative schema migration including CREATE DATABASE.</p></td>
- </tr>
-
- </tbody>
- </table>
-
@@ -9015,12 +8731,12 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
<div class="file-heading">
- <h2 id="store/plan_check_run.proto">store/plan_check_run.proto</h2><a href="#title">Top</a>
+ <h2 id="store/plan.proto">store/plan.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.PlanCheckRunConfig">PlanCheckRunConfig</h3>
+ <h3 id="bytebase.store.PlanConfig">PlanConfig</h3>
<p></p>
@@ -9031,43 +8747,79 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>sheet_uid</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
+ <td>specs</td>
+ <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
<tr>
- <td>change_database_type</td>
- <td><a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</a></td>
+ <td>deployment</td>
+ <td><a href="#bytebase.store.PlanConfig.Deployment">PlanConfig.Deployment</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
<tr>
- <td>instance_id</td>
+ <td>sheet</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>database_name</td>
+ <td>release</td>
<td><a href="#string">string</a></td>
<td></td>
+ <td><p>The resource name of the release.
+Format: projects/{project}/releases/{release} </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>database_group_uid</td>
- <td><a href="#int64">int64</a></td>
- <td>optional</td>
- <td><p><strong>Deprecated.</strong> </p></td>
+ <td>migrate_type</td>
+ <td><a href="#bytebase.store.MigrationType">MigrationType</a></td>
+ <td></td>
+ <td><p>The migration type for imperative schema migration.
+It is only set when type is MIGRATE. </p></td>
</tr>
<tr>
<td>ghost_flags</td>
- <td><a href="#bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</a></td>
+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>
@@ -9083,31 +8835,10 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
</table>
-
-
- <h4>Fields with deprecated option</h4>
- <table>
- <thead>
- <tr>
- <td>Name</td>
- <td>Option</td>
- </tr>
- </thead>
- <tbody>
-
- <tr>
- <td>database_group_uid</td>
- <td><p>true</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h3 id="bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</h3>
+ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</h3>
<p></p>
@@ -9138,7 +8869,7 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
- <h3 id="bytebase.store.PlanCheckRunResult">PlanCheckRunResult</h3>
+ <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</h3>
<p></p>
@@ -9149,76 +8880,62 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>results</td>
- <td><a href="#bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>target</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the instance on which the database is created.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the database to create. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>status</td>
- <td><a href="#bytebase.store.PlanCheckRunResult.Result.Status">PlanCheckRunResult.Result.Status</a></td>
+ <td>table</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
+For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>character_set</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>character_set is the character set of the database. </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>collation is the collation of the database. </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
+ <td>cluster</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>sql_summary_report</td>
- <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</a></td>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>sql_review_report</td>
- <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</a></td>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
</tbody>
@@ -9228,7 +8945,7 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
- <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</h3>
+ <h3 id="bytebase.store.PlanConfig.Deployment">PlanConfig.Deployment</h3>
<p></p>
@@ -9239,32 +8956,97 @@ Leave it empty if there is no need to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>line</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>environments</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The environments deploy order. </p></td>
</tr>
<tr>
- <td>column</td>
- <td><a href="#int32">int32</a></td>
+ <td>database_group_mappings</td>
+ <td><a href="#bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping">PlanConfig.Deployment.DatabaseGroupMapping</a></td>
+ <td>repeated</td>
+ <td><p>The database group mapping. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping">PlanConfig.Deployment.DatabaseGroupMapping</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>database_group</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
</tr>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.store.Position">Position</a></td>
+ <td>databases</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Format: instances/{instance-id}/databases/{database-name}. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>1-based position of the SQL statement.
-To supersede `line` and `column` above. </p></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.store.Position">Position</a></td>
+ <td>format</td>
+ <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The format of the exported file. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The zip password provided by users.
+Leave it empty if there is no need to encrypt the zip file. </p></td>
</tr>
</tbody>
@@ -9274,7 +9056,7 @@ To supersede `line` and `column` above. </p></td>
- <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</h3>
+ <h3 id="bytebase.store.PlanConfig.Spec">PlanConfig.Spec</h3>
<p></p>
@@ -9285,22 +9067,29 @@ To supersede `line` and `column` above. </p></td>
<tbody>
<tr>
- <td>statement_types</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>statement_types are the types of statements found in the SQL. </p></td>
+ <td></td>
+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
</tr>
<tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
+ <td>create_database_config</td>
+ <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>changed_resources</td>
- <td><a href="#bytebase.store.ChangedResources">ChangedResources</a></td>
+ <td>change_database_config</td>
+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>export_data_config</td>
+ <td><a href="#bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -9314,8 +9103,8 @@ To supersede `line` and `column` above. </p></td>
- <h3 id="bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</h3>
- <p></p>
+ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</h3>
+ <p>Type is the database change type.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -9323,74 +9112,21 @@ To supersede `line` and `column` above. </p></td>
<tbody>
<tr>
- <td>CHANGE_DATABASE_TYPE_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>DDL</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DML</td>
+ <td>MIGRATE</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>Used for imperative schema migration including CREATE DATABASE.</p></td>
</tr>
<tr>
<td>SDL</td>
<td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DDL_GHOST</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SQL_EDITOR</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.PlanCheckRunResult.Result.Status">PlanCheckRunResult.Result.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SUCCESS</td>
- <td>3</td>
- <td><p></p></td>
+ <td><p>Used for state-based declarative schema migration including CREATE DATABASE.</p></td>
</tr>
</tbody>
@@ -9403,12 +9139,12 @@ To supersede `line` and `column` above. </p></td>
<div class="file-heading">
- <h2 id="store/policy.proto">store/policy.proto</h2><a href="#title">Top</a>
+ <h2 id="store/plan_check_run.proto">store/plan_check_run.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.Binding">Binding</h3>
+ <h3 id="bytebase.store.PlanCheckRunConfig">PlanCheckRunConfig</h3>
<p></p>
@@ -9419,78 +9155,84 @@ To supersede `line` and `column` above. </p></td>
<tbody>
<tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
+ <td>sheet_uid</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The role that is assigned to the members.
-Format: roles/{role} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>members</td>
+ <td>change_database_type</td>
+ <td><a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>instance_id</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Specifies the principals requesting access for a Bytebase resource.
-For users, the member should be: users/{userUID}
-For groups, the member should be: groups/{email} </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>database_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The condition that is associated with this binding.
-If the condition evaluates to true, then this binding applies to the current request.
-If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.DataSourceQueryPolicy">DataSourceQueryPolicy</h3>
- <p>DataSourceQueryPolicy is the policy configuration for running statements in the SQL editor.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>admin_data_source_restriction</td>
- <td><a href="#bytebase.store.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>database_group_uid</td>
+ <td><a href="#int64">int64</a></td>
+ <td>optional</td>
+ <td><p><strong>Deprecated.</strong> </p></td>
</tr>
<tr>
- <td>disallow_ddl</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Disallow running DDL statements in the SQL editor. </p></td>
+ <td>ghost_flags</td>
+ <td><a href="#bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>disallow_dml</td>
+ <td>enable_prior_backup</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Disallow running DML statements in the SQL editor. </p></td>
+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
</tr>
</tbody>
</table>
+
+
+ <h4>Fields with deprecated option</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Name</td>
+ <td>Option</td>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>database_group_uid</td>
+ <td><p>true</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
- <h3 id="bytebase.store.EnvironmentTierPolicy">EnvironmentTierPolicy</h3>
- <p>EnvironmentTierPolicy is the tier of an environment.</p>
+ <h3 id="bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -9500,14 +9242,14 @@ If the condition evaluates to false, then this binding does not apply to the cur
<tbody>
<tr>
- <td>environment_tier</td>
- <td><a href="#bytebase.store.EnvironmentTierPolicy.EnvironmentTier">EnvironmentTierPolicy.EnvironmentTier</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>color</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -9520,7 +9262,7 @@ If the condition evaluates to false, then this binding does not apply to the cur
- <h3 id="bytebase.store.IamPolicy">IamPolicy</h3>
+ <h3 id="bytebase.store.PlanCheckRunResult">PlanCheckRunResult</h3>
<p></p>
@@ -9531,34 +9273,16 @@ If the condition evaluates to false, then this binding does not apply to the cur
<tbody>
<tr>
- <td>bindings</td>
- <td><a href="#bytebase.store.Binding">Binding</a></td>
+ <td>results</td>
+ <td><a href="#bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</a></td>
<td>repeated</td>
- <td><p>Collection of binding.
-A binding binds one or more members or groups to a single role. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.MaskingExceptionPolicy">MaskingExceptionPolicy</h3>
- <p>MaskingExceptionPolicy is the allowlist of users who can access sensitive data.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>masking_exceptions</td>
- <td><a href="#bytebase.store.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</a></td>
- <td>repeated</td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -9569,7 +9293,7 @@ A binding binds one or more members or groups to a single role. </p></td>
- <h3 id="bytebase.store.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</h3>
+ <h3 id="bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</h3>
<p></p>
@@ -9580,86 +9304,43 @@ A binding binds one or more members or groups to a single role. </p></td>
<tbody>
<tr>
- <td>action</td>
- <td><a href="#bytebase.store.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.store.Advice.Status">Advice.Status</a></td>
<td></td>
- <td><p>action is the action by which the user can access sensitive data. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>member</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Member is the principal who binds to this exception policy instance.
-
-Format: users/{userUID} or groups/{group email} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The condition that is associated with this exception policy instance. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.MaskingRulePolicy">MaskingRulePolicy</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>rules</td>
- <td><a href="#bytebase.store.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</a></td>
- <td>repeated</td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>A unique identifier for a node in UUID format. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>sql_summary_report</td>
+ <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>semantic_type</td>
- <td><a href="#string">string</a></td>
+ <td>sql_review_report</td>
+ <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -9671,17 +9352,10 @@ Format: users/{userUID} or groups/{group email} </p></td>
- <h3 id="bytebase.store.Policy">Policy</h3>
+ <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</h3>
<p></p>
-
-
-
- <h3 id="bytebase.store.QueryDataPolicy">QueryDataPolicy</h3>
- <p>QueryDataPolicy is the policy configuration for querying data.</p>
-
-
<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
@@ -9689,40 +9363,32 @@ Format: users/{userUID} or groups/{group email} </p></td>
<tbody>
<tr>
- <td>timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The query timeout duration. </p></td>
- </tr>
-
- <tr>
- <td>disable_export</td>
- <td><a href="#bool">bool</a></td>
+ <td>line</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Disable exporting data in the SQL editor. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>maximum_result_size</td>
- <td><a href="#int64">int64</a></td>
+ <td>column</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The size limit in bytes.
-The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>maximum_result_rows</td>
- <td><a href="#int32">int32</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
<td></td>
- <td><p>The return rows limit.
-The default value is -1, means no limit. </p></td>
+ <td><p>1-based position of the SQL statement.
+To supersede `line` and `column` above. </p></td>
</tr>
<tr>
- <td>disable_copy_data</td>
- <td><a href="#bool">bool</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
<td></td>
- <td><p>Disable copying data. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -9732,7 +9398,7 @@ The default value is -1, means no limit. </p></td>
- <h3 id="bytebase.store.RolloutPolicy">RolloutPolicy</h3>
+ <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</h3>
<p></p>
@@ -9743,25 +9409,24 @@ The default value is -1, means no limit. </p></td>
<tbody>
<tr>
- <td>automatic</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>statement_types</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>statement_types are the types of statements found in the SQL. </p></td>
</tr>
<tr>
- <td>roles</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>checkers</td>
- <td><a href="#bytebase.store.RolloutPolicy.Checkers">RolloutPolicy.Checkers</a></td>
+ <td>changed_resources</td>
+ <td><a href="#bytebase.store.ChangedResources">ChangedResources</a></td>
<td></td>
- <td><p>Checkers that must pass before rollout execution.
-These checks are performed in UI workflows only. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -9771,38 +9436,68 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.store.RolloutPolicy.Checkers">RolloutPolicy.Checkers</h3>
- <p></p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>required_issue_approval</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether issue approval is required before proceeding with rollout. </p></td>
- </tr>
-
- <tr>
- <td>required_status_checks</td>
- <td><a href="#bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</a></td>
- <td></td>
- <td><p>Status checks that must pass before rollout can be executed. </p></td>
- </tr>
-
- </tbody>
- </table>
+
+ <h3 id="bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</h3>
+ <p>ChangeDatabaseType extends MigrationType with additional execution contexts.</p><p>Note: DDL, DML, and DDL_GHOST values align with MigrationType enum values.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CHANGE_DATABASE_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DML</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SDL</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL_GHOST</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SQL_EDITOR</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
-
+
-
- <h3 id="bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</h3>
+
+
+ <div class="file-heading">
+ <h2 id="store/policy.proto">store/policy.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.Binding">Binding</h3>
<p></p>
@@ -9813,10 +9508,29 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>plan_check_enforcement</td>
- <td><a href="#bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</a></td>
+ <td>role</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Enforcement level for plan check results during rollout validation. </p></td>
+ <td><p>The role that is assigned to the members.
+Format: roles/{role} </p></td>
+ </tr>
+
+ <tr>
+ <td>members</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Specifies the principals requesting access for a Bytebase resource.
+For users, the member should be: users/{userUID}
+For groups, the member should be: groups/{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with this binding.
+If the condition evaluates to true, then this binding applies to the current request.
+If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. </p></td>
</tr>
</tbody>
@@ -9826,8 +9540,8 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.store.SQLReviewRule">SQLReviewRule</h3>
- <p></p>
+ <h3 id="bytebase.store.DataSourceQueryPolicy">DataSourceQueryPolicy</h3>
+ <p>DataSourceQueryPolicy is the policy configuration for running statements in the SQL editor.</p>
<table class="field-table">
@@ -9837,38 +9551,144 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
+ <td>admin_data_source_restriction</td>
+ <td><a href="#bytebase.store.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>level</td>
- <td><a href="#bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>
+ <td>disallow_ddl</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disallow running DDL statements in the SQL editor. </p></td>
+ </tr>
+
+ <tr>
+ <td>disallow_dml</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disallow running DML statements in the SQL editor. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.EnvironmentTierPolicy">EnvironmentTierPolicy</h3>
+ <p>EnvironmentTierPolicy is the tier of an environment.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>environment_tier</td>
+ <td><a href="#bytebase.store.EnvironmentTierPolicy.EnvironmentTier">EnvironmentTierPolicy.EnvironmentTier</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>payload</td>
+ <td>color</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.IamPolicy">IamPolicy</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>engine</td>
- <td><a href="#bytebase.store.Engine">Engine</a></td>
- <td></td>
+ <td>bindings</td>
+ <td><a href="#bytebase.store.Binding">Binding</a></td>
+ <td>repeated</td>
+ <td><p>Collection of binding.
+A binding binds one or more members or groups to a single role. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.MaskingExceptionPolicy">MaskingExceptionPolicy</h3>
+ <p>MaskingExceptionPolicy is the allowlist of users who can access sensitive data.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>masking_exceptions</td>
+ <td><a href="#bytebase.store.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.MaskingExceptionPolicy.MaskingException">MaskingExceptionPolicy.MaskingException</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>action</td>
+ <td><a href="#bytebase.store.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</a></td>
+ <td></td>
+ <td><p>action is the action by which the user can access sensitive data. </p></td>
+ </tr>
+
<tr>
- <td>comment</td>
+ <td>member</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Member is the principal who binds to this exception policy instance.
+
+Format: users/{userUID} or groups/{group email} </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with this exception policy instance. </p></td>
</tr>
</tbody>
@@ -9878,7 +9698,7 @@ These checks are performed in UI workflows only. </p></td>
- <h3 id="bytebase.store.TagPolicy">TagPolicy</h3>
+ <h3 id="bytebase.store.MaskingRulePolicy">MaskingRulePolicy</h3>
<p></p>
@@ -9889,11 +9709,10 @@ These checks are performed in UI workflows only. </p></td>
<tbody>
<tr>
- <td>tags</td>
- <td><a href="#bytebase.store.TagPolicy.TagsEntry">TagPolicy.TagsEntry</a></td>
+ <td>rules</td>
+ <td><a href="#bytebase.store.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</a></td>
<td>repeated</td>
- <td><p>tags is the key-value map for resources.
-For example, the environment resource can have the SQL review config tag, such as &#34;bb.tag.review_config&#34;: &#34;reviewConfigs/{review config resource id}&#34;. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -9903,7 +9722,7 @@ For example, the environment resource can have the SQL review config tag, such a
- <h3 id="bytebase.store.TagPolicy.TagsEntry">TagPolicy.TagsEntry</h3>
+ <h3 id="bytebase.store.MaskingRulePolicy.MaskingRule">MaskingRulePolicy.MaskingRule</h3>
<p></p>
@@ -9914,14 +9733,21 @@ For example, the environment resource can have the SQL review config tag, such a
<tbody>
<tr>
- <td>key</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
+ <td><p>A unique identifier for a node in UUID format. </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>semantic_type</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -9934,267 +9760,15 @@ For example, the environment resource can have the SQL review config tag, such a
+ <h3 id="bytebase.store.Policy">Policy</h3>
+ <p></p>
+
+
+
- <h3 id="bytebase.store.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>RESTRICTION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FALLBACK</td>
- <td>1</td>
- <td><p>Allow to query admin data sources when there is no read-only data source.</p></td>
- </tr>
-
- <tr>
- <td>DISALLOW</td>
- <td>2</td>
- <td><p>Disallow to query admin data sources.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.EnvironmentTierPolicy.EnvironmentTier">EnvironmentTierPolicy.EnvironmentTier</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ENVIRONMENT_TIER_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PROTECTED</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>UNPROTECTED</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ACTION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>QUERY</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>EXPORT</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.Policy.Resource">Policy.Resource</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>RESOURCE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENVIRONMENT</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PROJECT</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.Policy.Type">Policy.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ROLLOUT</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MASKING_EXCEPTION</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>QUERY_DATA</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MASKING_RULE</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>IAM</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>TAG</td>
- <td>9</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DATA_SOURCE_QUERY</td>
- <td>10</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>PLAN_CHECK_ENFORCEMENT_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Allow rollout regardless of plan check results (no enforcement).</p></td>
- </tr>
-
- <tr>
- <td>ERROR_ONLY</td>
- <td>1</td>
- <td><p>Block rollout only when plan check finds errors.</p></td>
- </tr>
-
- <tr>
- <td>STRICT</td>
- <td>2</td>
- <td><p>Block rollout when plan check finds errors or warnings.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>LEVEL_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DISABLED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/project.proto">store/project.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.Label">Label</h3>
- <p>Label represents a categorization tag that can be applied to issues.</p>
+ <h3 id="bytebase.store.QueryDataPolicy">QueryDataPolicy</h3>
+ <p>QueryDataPolicy is the policy configuration for querying data.</p>
<table class="field-table">
@@ -10204,24 +9778,40 @@ For example, the environment resource can have the SQL review config tag, such a
<tbody>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The display text of the label. </p></td>
+ <td><p>The query timeout duration. </p></td>
</tr>
<tr>
- <td>color</td>
- <td><a href="#string">string</a></td>
+ <td>disable_export</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The color for the label in hex format (e.g., &#34;#FF0000&#34;). </p></td>
+ <td><p>Disable exporting data in the SQL editor. </p></td>
</tr>
<tr>
- <td>group</td>
- <td><a href="#string">string</a></td>
+ <td>maximum_result_size</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>Optional group name for organizing related labels. </p></td>
+ <td><p>The size limit in bytes.
+The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_result_rows</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The return rows limit.
+The default value is -1, means no limit. </p></td>
+ </tr>
+
+ <tr>
+ <td>disable_copy_data</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disable copying data. </p></td>
</tr>
</tbody>
@@ -10231,8 +9821,8 @@ For example, the environment resource can have the SQL review config tag, such a
- <h3 id="bytebase.store.Project">Project</h3>
- <p>Project contains settings and configuration for a Bytebase project.</p>
+ <h3 id="bytebase.store.RolloutPolicy">RolloutPolicy</h3>
+ <p></p>
<table class="field-table">
@@ -10242,105 +9832,56 @@ For example, the environment resource can have the SQL review config tag, such a
<tbody>
<tr>
- <td>issue_labels</td>
- <td><a href="#bytebase.store.Label">Label</a></td>
- <td>repeated</td>
- <td><p>Available labels that can be applied to issues in this project. </p></td>
- </tr>
-
- <tr>
- <td>force_issue_labels</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Force issue labels to be used when creating an issue. </p></td>
- </tr>
-
- <tr>
- <td>allow_modify_statement</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Allow modifying statement after issue is created. </p></td>
- </tr>
-
- <tr>
- <td>auto_resolve_issue</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Enable auto resolve issue. </p></td>
- </tr>
-
- <tr>
- <td>enforce_issue_title</td>
+ <td>automatic</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Enforce issue title created by user instead of generated by Bytebase. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>auto_enable_backup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to automatically enable backup. </p></td>
+ <td>roles</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>skip_backup_errors</td>
- <td><a href="#bool">bool</a></td>
+ <td>checkers</td>
+ <td><a href="#bytebase.store.RolloutPolicy.Checkers">RolloutPolicy.Checkers</a></td>
<td></td>
- <td><p>Whether to skip backup errors and continue the data migration. </p></td>
+ <td><p>Checkers that must pass before rollout execution.
+These checks are performed in UI workflows only. </p></td>
</tr>
- <tr>
- <td>postgres_database_tenant_mode</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to enable the database tenant mode for PostgreSQL.
-If enabled, the issue will be created with the prepend &#34;set role &lt;db_owner&gt;&#34; statement. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.RolloutPolicy.Checkers">RolloutPolicy.Checkers</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>allow_self_approval</td>
+ <td>required_issue_approval</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether to allow the issue creator to self-approve the issue. </p></td>
- </tr>
-
- <tr>
- <td>execution_retry_policy</td>
- <td><a href="#bytebase.store.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
- <td></td>
- <td><p>Configuration for automatic retry on task execution failures. </p></td>
- </tr>
-
- <tr>
- <td>ci_sampling_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of databases to sample during CI data validation.
-If not specified, sampling is disabled, resulting in a full validation. </p></td>
- </tr>
-
- <tr>
- <td>parallel_tasks_per_rollout</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of parallel tasks to run during the rollout. </p></td>
- </tr>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.store.Project.LabelsEntry">Project.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>Labels are key-value pairs that can be attached to the project.
-For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } </p></td>
+ <td><p>Whether issue approval is required before proceeding with rollout. </p></td>
</tr>
<tr>
- <td>enforce_sql_review</td>
- <td><a href="#bool">bool</a></td>
+ <td>required_status_checks</td>
+ <td><a href="#bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</a></td>
<td></td>
- <td><p>Whether to enforce SQL review checks to pass before issue creation.
-If enabled, issues cannot be created when SQL review finds errors. </p></td>
+ <td><p>Status checks that must pass before rollout can be executed. </p></td>
</tr>
</tbody>
@@ -10350,8 +9891,8 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
- <h3 id="bytebase.store.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
- <p>ExecutionRetryPolicy defines retry behavior for failed task executions.</p>
+ <h3 id="bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks">RolloutPolicy.Checkers.RequiredStatusChecks</h3>
+ <p></p>
<table class="field-table">
@@ -10361,10 +9902,10 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>maximum_retries</td>
- <td><a href="#int32">int32</a></td>
+ <td>plan_check_enforcement</td>
+ <td><a href="#bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</a></td>
<td></td>
- <td><p>The maximum number of retry attempts for lock timeout errors. </p></td>
+ <td><p>Enforcement level for plan check results during rollout validation. </p></td>
</tr>
</tbody>
@@ -10374,7 +9915,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
- <h3 id="bytebase.store.Project.LabelsEntry">Project.LabelsEntry</h3>
+ <h3 id="bytebase.store.SQLReviewRule">SQLReviewRule</h3>
<p></p>
@@ -10385,14 +9926,35 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>type</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>level</td>
+ <td><a href="#bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>payload</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -10405,21 +9967,7 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
-
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/project_webhook.proto">store/project_webhook.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.ProjectWebhookPayload">ProjectWebhookPayload</h3>
+ <h3 id="bytebase.store.TagPolicy">TagPolicy</h3>
<p></p>
@@ -10430,12 +9978,11 @@ If enabled, issues cannot be created when SQL review finds errors. </p></td>
<tbody>
<tr>
- <td>direct_message</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If direct_message is set, the notification is sent directly
-to the persons and url will be ignored.
-IM integration setting should be set for this function to work. </p></td>
+ <td>tags</td>
+ <td><a href="#bytebase.store.TagPolicy.TagsEntry">TagPolicy.TagsEntry</a></td>
+ <td>repeated</td>
+ <td><p>tags is the key-value map for resources.
+For example, the environment resource can have the SQL review config tag, such as &#34;bb.tag.review_config&#34;: &#34;reviewConfigs/{review config resource id}&#34;. </p></td>
</tr>
</tbody>
@@ -10445,21 +9992,7 @@ IM integration setting should be set for this function to work. </p></td>
-
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/query_history.proto">store/query_history.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.QueryHistoryPayload">QueryHistoryPayload</h3>
+ <h3 id="bytebase.store.TagPolicy.TagsEntry">TagPolicy.TagsEntry</h3>
<p></p>
@@ -10470,15 +10003,15 @@ IM integration setting should be set for this function to work. </p></td>
<tbody>
<tr>
- <td>error</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -10492,157 +10025,94 @@ IM integration setting should be set for this function to work. </p></td>
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/release.proto">store/release.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.ReleasePayload">ReleasePayload</h3>
+ <h3 id="bytebase.store.DataSourceQueryPolicy.Restriction">DataSourceQueryPolicy.Restriction</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>files</td>
- <td><a href="#bytebase.store.ReleasePayload.File">ReleasePayload.File</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>vcs_source</td>
- <td><a href="#bytebase.store.ReleasePayload.VCSSource">ReleasePayload.VCSSource</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>RESTRICTION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FALLBACK</td>
+ <td>1</td>
+ <td><p>Allow to query admin data sources when there is no read-only data source.</p></td>
+ </tr>
+
+ <tr>
+ <td>DISALLOW</td>
+ <td>2</td>
+ <td><p>Disallow to query admin data sources.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.store.ReleasePayload.File">ReleasePayload.File</h3>
+ <h3 id="bytebase.store.EnvironmentTierPolicy.EnvironmentTier">EnvironmentTierPolicy.EnvironmentTier</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The unique identifier for the file. </p></td>
- </tr>
-
- <tr>
- <td>path</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The path of the file, e.g., `2.2/V0001_create_table.sql`. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The sheet that holds the content.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>sheet_sha256</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SHA256 hash value of the sheet. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.store.ReleasePayload.File.Type">ReleasePayload.File.Type</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>migration_type</td>
- <td><a href="#bytebase.store.ReleasePayload.File.MigrationType">ReleasePayload.File.MigrationType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ENVIRONMENT_TIER_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PROTECTED</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>UNPROTECTED</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.store.ReleasePayload.VCSSource">ReleasePayload.VCSSource</h3>
+ <h3 id="bytebase.store.MaskingExceptionPolicy.MaskingException.Action">MaskingExceptionPolicy.MaskingException.Action</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>vcs_type</td>
- <td><a href="#bytebase.store.VCSType">VCSType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>url</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ACTION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>QUERY</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>EXPORT</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.store.ReleasePayload.File.MigrationType">ReleasePayload.File.MigrationType</h3>
+ <h3 id="bytebase.store.Policy.Resource">Policy.Resource</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -10651,25 +10121,25 @@ Format: projects/{project}/sheets/{sheet} </p></td>
<tbody>
<tr>
- <td>MIGRATION_TYPE_UNSPECIFIED</td>
+ <td>RESOURCE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>DDL</td>
+ <td>WORKSPACE</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>DDL_GHOST</td>
+ <td>ENVIRONMENT</td>
<td>2</td>
<td><p></p></td>
</tr>
<tr>
- <td>DML</td>
+ <td>PROJECT</td>
<td>3</td>
<td><p></p></td>
</tr>
@@ -10677,7 +10147,7 @@ Format: projects/{project}/sheets/{sheet} </p></td>
</tbody>
</table>
- <h3 id="bytebase.store.ReleasePayload.File.Type">ReleasePayload.File.Type</h3>
+ <h3 id="bytebase.store.Policy.Type">Policy.Type</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -10692,137 +10162,80 @@ Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>VERSIONED</td>
+ <td>ROLLOUT</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>DECLARATIVE</td>
+ <td>MASKING_EXCEPTION</td>
<td>2</td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>QUERY_DATA</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MASKING_RULE</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>IAM</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>TAG</td>
+ <td>9</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_SOURCE_QUERY</td>
+ <td>10</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/review_config.proto">store/review_config.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.ReviewConfigPayload">ReviewConfigPayload</h3>
+ <h3 id="bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement">RolloutPolicy.Checkers.PlanCheckEnforcement</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>sql_review_rules</td>
- <td><a href="#bytebase.store.SQLReviewRule">SQLReviewRule</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/revision.proto">store/revision.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.RevisionPayload">RevisionPayload</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>release</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/releases/{release}
-Can be empty. </p></td>
- </tr>
-
- <tr>
- <td>file</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/releases/{release}/files/{id}
-Can be empty. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The sheet that holds the content.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>sheet_sha256</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SHA256 hash value of the sheet. </p></td>
- </tr>
-
- <tr>
- <td>task_run</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The task run associated with the revision.
-Can be empty.
-Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.store.RevisionPayload.Type">RevisionPayload.Type</a></td>
- <td></td>
- <td><p>The type of the revision. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>PLAN_CHECK_ENFORCEMENT_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Allow rollout regardless of plan check results (no enforcement).</p></td>
+ </tr>
+
+ <tr>
+ <td>ERROR_ONLY</td>
+ <td>1</td>
+ <td><p>Block rollout only when plan check finds errors.</p></td>
+ </tr>
+
+ <tr>
+ <td>STRICT</td>
+ <td>2</td>
+ <td><p>Block rollout when plan check finds errors or warnings.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.store.RevisionPayload.Type">RevisionPayload.Type</h3>
+ <h3 id="bytebase.store.SQLReviewRuleLevel">SQLReviewRuleLevel</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -10831,23 +10244,29 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
<tbody>
<tr>
- <td>TYPE_UNSPECIFIED</td>
+ <td>LEVEL_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>VERSIONED</td>
+ <td>ERROR</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>DECLARATIVE</td>
+ <td>WARNING</td>
<td>2</td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>DISABLED</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
@@ -10858,13 +10277,13 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
<div class="file-heading">
- <h2 id="store/role.proto">store/role.proto</h2><a href="#title">Top</a>
+ <h2 id="store/project.proto">store/project.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.RolePermissions">RolePermissions</h3>
- <p></p>
+ <h3 id="bytebase.store.Label">Label</h3>
+ <p>Label represents a categorization tag that can be applied to issues.</p>
<table class="field-table">
@@ -10874,10 +10293,24 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
<tbody>
<tr>
- <td>permissions</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>The display text of the label. </p></td>
+ </tr>
+
+ <tr>
+ <td>color</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The color for the label in hex format (e.g., &#34;#FF0000&#34;). </p></td>
+ </tr>
+
+ <tr>
+ <td>group</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Optional group name for organizing related labels. </p></td>
</tr>
</tbody>
@@ -10887,22 +10320,8 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
-
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/setting.proto">store/setting.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.AISetting">AISetting</h3>
- <p></p>
+ <h3 id="bytebase.store.Project">Project</h3>
+ <p>Project contains settings and configuration for a Bytebase project.</p>
<table class="field-table">
@@ -10912,90 +10331,105 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>issue_labels</td>
+ <td><a href="#bytebase.store.Label">Label</a></td>
+ <td>repeated</td>
+ <td><p>Available labels that can be applied to issues in this project. </p></td>
</tr>
<tr>
- <td>provider</td>
- <td><a href="#bytebase.store.AISetting.Provider">AISetting.Provider</a></td>
+ <td>force_issue_labels</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Force issue labels to be used when creating an issue. </p></td>
</tr>
<tr>
- <td>endpoint</td>
- <td><a href="#string">string</a></td>
+ <td>allow_modify_statement</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Allow modifying statement after issue is created. </p></td>
</tr>
<tr>
- <td>api_key</td>
- <td><a href="#string">string</a></td>
+ <td>auto_resolve_issue</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Enable auto resolve issue. </p></td>
</tr>
<tr>
- <td>model</td>
- <td><a href="#string">string</a></td>
+ <td>enforce_issue_title</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Enforce issue title created by user instead of generated by Bytebase. </p></td>
</tr>
<tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
+ <td>auto_enable_backup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to automatically enable backup. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.Algorithm">Algorithm</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>full_mask</td>
- <td><a href="#bytebase.store.Algorithm.FullMask">Algorithm.FullMask</a></td>
+ <td>skip_backup_errors</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to skip backup errors and continue the data migration. </p></td>
</tr>
<tr>
- <td>range_mask</td>
- <td><a href="#bytebase.store.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
+ <td>postgres_database_tenant_mode</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to enable the database tenant mode for PostgreSQL.
+If enabled, the issue will be created with the prepend &#34;set role &lt;db_owner&gt;&#34; statement. </p></td>
</tr>
<tr>
- <td>md5_mask</td>
- <td><a href="#bytebase.store.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td>allow_self_approval</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether to allow the issue creator to self-approve the issue. </p></td>
</tr>
<tr>
- <td>inner_outer_mask</td>
- <td><a href="#bytebase.store.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
+ <td>execution_retry_policy</td>
+ <td><a href="#bytebase.store.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Configuration for automatic retry on task execution failures. </p></td>
+ </tr>
+
+ <tr>
+ <td>ci_sampling_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of databases to sample during CI data validation.
+If not specified, sampling is disabled, resulting in a full validation. </p></td>
+ </tr>
+
+ <tr>
+ <td>parallel_tasks_per_rollout</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of parallel tasks to run during the rollout. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#bytebase.store.Project.LabelsEntry">Project.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels are key-value pairs that can be attached to the project.
+For example, { &#34;environment&#34;: &#34;production&#34;, &#34;team&#34;: &#34;backend&#34; } </p></td>
+ </tr>
+
+ <tr>
+ <td>enforce_sql_review</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enforce SQL review checks to pass before issue creation.
+If enabled, issues cannot be created when SQL review finds errors. </p></td>
</tr>
</tbody>
@@ -11005,8 +10439,8 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
- <h3 id="bytebase.store.Algorithm.FullMask">Algorithm.FullMask</h3>
- <p></p>
+ <h3 id="bytebase.store.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>
+ <p>ExecutionRetryPolicy defines retry behavior for failed task executions.</p>
<table class="field-table">
@@ -11016,11 +10450,10 @@ Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRu
<tbody>
<tr>
- <td>substitution</td>
- <td><a href="#string">string</a></td>
+ <td>maximum_retries</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>substitution is the string used to replace the original value, the
-max length of the string is 16 bytes. </p></td>
+ <td><p>The maximum number of retry attempts for lock timeout errors. </p></td>
</tr>
</tbody>
@@ -11030,7 +10463,7 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.store.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
+ <h3 id="bytebase.store.Project.LabelsEntry">Project.LabelsEntry</h3>
<p></p>
@@ -11041,29 +10474,15 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>prefix_len</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>suffix_len</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>substitution</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.store.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -11075,7 +10494,21 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.store.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/project_webhook.proto">store/project_webhook.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.ProjectWebhookPayload">ProjectWebhookPayload</h3>
<p></p>
@@ -11086,10 +10519,12 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>salt</td>
- <td><a href="#string">string</a></td>
+ <td>direct_message</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
+ <td><p>If direct_message is set, the notification is sent directly
+to the persons and url will be ignored.
+IM integration setting should be set for this function to work. </p></td>
</tr>
</tbody>
@@ -11099,7 +10534,21 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.store.Algorithm.RangeMask">Algorithm.RangeMask</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/query_history.proto">store/query_history.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.QueryHistoryPayload">QueryHistoryPayload</h3>
<p></p>
@@ -11110,11 +10559,17 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>slices</td>
- <td><a href="#bytebase.store.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
- <td>repeated</td>
- <td><p>We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.
-But frontend can be started with a single rule easily. </p></td>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -11124,7 +10579,21 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/release.proto">store/release.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.ReleasePayload">ReleasePayload</h3>
<p></p>
@@ -11135,24 +10604,24 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>start</td>
- <td><a href="#int32">int32</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>start is the start index of the original value, start from 0 and should be less than stop. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>end</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>stop is the stop index of the original value, should be less than the length of the original value. </p></td>
+ <td>files</td>
+ <td><a href="#bytebase.store.ReleasePayload.File">ReleasePayload.File</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>substitution</td>
- <td><a href="#string">string</a></td>
+ <td>vcs_source</td>
+ <td><a href="#bytebase.store.ReleasePayload.VCSSource">ReleasePayload.VCSSource</a></td>
<td></td>
- <td><p>OriginalValue[start:end) would be replaced with replace_with. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -11162,7 +10631,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.Announcement">Announcement</h3>
+ <h3 id="bytebase.store.ReleasePayload.File">ReleasePayload.File</h3>
<p></p>
@@ -11173,74 +10642,51 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>level</td>
- <td><a href="#bytebase.store.Announcement.AlertLevel">Announcement.AlertLevel</a></td>
- <td></td>
- <td><p>The alert level of the announcement. </p></td>
- </tr>
-
- <tr>
- <td>text</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The text of the announcement. </p></td>
+ <td><p>The unique identifier for the file. </p></td>
</tr>
<tr>
- <td>link</td>
+ <td>path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The optional link, user can follow the link to check extra details </p></td>
+ <td><p>The path of the file, e.g., `2.2/V0001_create_table.sql`. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.AppIMSetting">AppIMSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>slack</td>
- <td><a href="#bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The sheet that holds the content.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>feishu</td>
- <td><a href="#bytebase.store.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
+ <td>sheet_sha256</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The SHA256 hash value of the sheet. </p></td>
</tr>
<tr>
- <td>wecom</td>
- <td><a href="#bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.store.SchemaChangeType">SchemaChangeType</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>lark</td>
- <td><a href="#bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>dingtalk</td>
- <td><a href="#bytebase.store.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
+ <td>migration_type</td>
+ <td><a href="#bytebase.store.MigrationType">MigrationType</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -11252,7 +10698,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
+ <h3 id="bytebase.store.ReleasePayload.VCSSource">ReleasePayload.VCSSource</h3>
<p></p>
@@ -11263,28 +10709,14 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>vcs_type</td>
+ <td><a href="#bytebase.store.VCSType">VCSType</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>robot_code</td>
+ <td>url</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -11297,7 +10729,21 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/review_config.proto">store/review_config.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.ReviewConfigPayload">ReviewConfigPayload</h3>
<p></p>
@@ -11308,23 +10754,9 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>app_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>app_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
+ <td>sql_review_rules</td>
+ <td><a href="#bytebase.store.SQLReviewRule">SQLReviewRule</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -11335,7 +10767,21 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/revision.proto">store/revision.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.RevisionPayload">RevisionPayload</h3>
<p></p>
@@ -11346,24 +10792,50 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>release</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: projects/{project}/releases/{release}
+Can be empty. </p></td>
</tr>
<tr>
- <td>app_id</td>
+ <td>file</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: projects/{project}/releases/{release}/files/{id}
+Can be empty. </p></td>
</tr>
<tr>
- <td>app_secret</td>
+ <td>sheet</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The sheet that holds the content.
+Format: projects/{project}/sheets/{sheet} </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet_sha256</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SHA256 hash value of the sheet. </p></td>
+ </tr>
+
+ <tr>
+ <td>task_run</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The task run associated with the revision.
+Can be empty.
+Format: projects/{project}/rollouts/{rollout}/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.store.SchemaChangeType">SchemaChangeType</a></td>
+ <td></td>
+ <td><p>The type of the revision. </p></td>
</tr>
</tbody>
@@ -11373,7 +10845,21 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/role.proto">store/role.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.RolePermissions">RolePermissions</h3>
<p></p>
@@ -11384,16 +10870,9 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>token</td>
+ <td>permissions</td>
<td><a href="#string">string</a></td>
- <td></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -11404,7 +10883,21 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/setting.proto">store/setting.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.AISetting">AISetting</h3>
<p></p>
@@ -11422,47 +10915,37 @@ But frontend can be started with a single rule easily. </p></td>
</tr>
<tr>
- <td>corp_id</td>
- <td><a href="#string">string</a></td>
+ <td>provider</td>
+ <td><a href="#bytebase.store.AISetting.Provider">AISetting.Provider</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>agent_id</td>
+ <td>endpoint</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>secret</td>
+ <td>api_key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.DataClassificationSetting">DataClassificationSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>model</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>configs</td>
- <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
- <td>repeated</td>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -11473,7 +10956,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
+ <h3 id="bytebase.store.Algorithm">Algorithm</h3>
<p></p>
@@ -11484,43 +10967,31 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>full_mask</td>
+ <td><a href="#bytebase.store.Algorithm.FullMask">Algorithm.FullMask</a></td>
<td></td>
- <td><p>id is the uuid for classification. Each project can chose one
-classification config. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>range_mask</td>
+ <td><a href="#bytebase.store.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>levels</td>
- <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
- <td>repeated</td>
- <td><p>levels is user defined level list for classification.
-The order for the level decides its priority. </p></td>
- </tr>
-
- <tr>
- <td>classification</td>
- <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>
- <td>repeated</td>
- <td><p>classification is the id - DataClassification map.
-The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td>md5_mask</td>
+ <td><a href="#bytebase.store.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
+ <td>inner_outer_mask</td>
+ <td><a href="#bytebase.store.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
<td></td>
- <td><p>If true, we will only store the classification in the config.
-Otherwise we will get the classification from table/column comment,
-and write back to the schema metadata. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -11530,7 +11001,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
+ <h3 id="bytebase.store.Algorithm.FullMask">Algorithm.FullMask</h3>
<p></p>
@@ -11541,17 +11012,11 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>substitution is the string used to replace the original value, the
+max length of the string is 16 bytes. </p></td>
</tr>
</tbody>
@@ -11561,7 +11026,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
+ <h3 id="bytebase.store.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
<p></p>
@@ -11572,30 +11037,30 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>prefix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>suffix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>level_id</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
+ <td>type</td>
+ <td><a href="#bytebase.store.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -11606,7 +11071,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
+ <h3 id="bytebase.store.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
<p></p>
@@ -11617,24 +11082,10 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>description</td>
+ <td>salt</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
</tr>
</tbody>
@@ -11644,7 +11095,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.EnvironmentSetting">EnvironmentSetting</h3>
+ <h3 id="bytebase.store.Algorithm.RangeMask">Algorithm.RangeMask</h3>
<p></p>
@@ -11655,10 +11106,11 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>environments</td>
- <td><a href="#bytebase.store.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
+ <td>slices</td>
+ <td><a href="#bytebase.store.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.
+But frontend can be started with a single rule easily. </p></td>
</tr>
</tbody>
@@ -11668,7 +11120,7 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
+ <h3 id="bytebase.store.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
<p></p>
@@ -11679,33 +11131,24 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>start</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The resource id of the environment.
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>start is the start index of the original value, start from 0 and should be less than stop. </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>end</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The display name of the environment. </p></td>
- </tr>
-
- <tr>
- <td>tags</td>
- <td><a href="#bytebase.store.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>stop is the stop index of the original value, should be less than the length of the original value. </p></td>
</tr>
<tr>
- <td>color</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>OriginalValue[start:end) would be replaced with replace_with. </p></td>
</tr>
</tbody>
@@ -11715,7 +11158,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
+ <h3 id="bytebase.store.Announcement">Announcement</h3>
<p></p>
@@ -11726,17 +11169,24 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>level</td>
+ <td><a href="#bytebase.store.Announcement.AlertLevel">Announcement.AlertLevel</a></td>
+ <td></td>
+ <td><p>The alert level of the announcement. </p></td>
+ </tr>
+
+ <tr>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The text of the announcement. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>link</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The optional link, user can follow the link to check extra details </p></td>
</tr>
</tbody>
@@ -11746,7 +11196,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.PasswordRestrictionSetting">PasswordRestrictionSetting</h3>
+ <h3 id="bytebase.store.AppIMSetting">AppIMSetting</h3>
<p></p>
@@ -11757,52 +11207,38 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>min_length</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>min_length is the minimum length for password, should be no less than 8. </p></td>
- </tr>
-
- <tr>
- <td>require_number</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>require_number requires the password must contain at least one number. </p></td>
- </tr>
-
- <tr>
- <td>require_letter</td>
- <td><a href="#bool">bool</a></td>
+ <td>slack</td>
+ <td><a href="#bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
<td></td>
- <td><p>require_letter requires the password must contain at least one letter, regardless of upper case or lower case </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>require_uppercase_letter</td>
- <td><a href="#bool">bool</a></td>
+ <td>feishu</td>
+ <td><a href="#bytebase.store.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
<td></td>
- <td><p>require_uppercase_letter requires the password must contain at least one upper case letter. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>require_special_character</td>
- <td><a href="#bool">bool</a></td>
+ <td>wecom</td>
+ <td><a href="#bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
<td></td>
- <td><p>require_special_character requires the password must contain at least one special character. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>require_reset_password_for_first_login</td>
- <td><a href="#bool">bool</a></td>
+ <td>lark</td>
+ <td><a href="#bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
<td></td>
- <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>password_rotation</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>dingtalk</td>
+ <td><a href="#bytebase.store.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
<td></td>
- <td><p>password_rotation requires users to reset their password after the duration. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -11812,7 +11248,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SCIMSetting">SCIMSetting</h3>
+ <h3 id="bytebase.store.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
<p></p>
@@ -11823,7 +11259,28 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>token</td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>robot_code</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -11836,7 +11293,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SchemaTemplateSetting">SchemaTemplateSetting</h3>
+ <h3 id="bytebase.store.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
<p></p>
@@ -11847,23 +11304,23 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>field_templates</td>
- <td><a href="#bytebase.store.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</a></td>
- <td>repeated</td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>column_types</td>
- <td><a href="#bytebase.store.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</a></td>
- <td>repeated</td>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>table_templates</td>
- <td><a href="#bytebase.store.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</a></td>
- <td>repeated</td>
+ <td>app_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -11874,7 +11331,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</h3>
+ <h3 id="bytebase.store.AppIMSetting.Lark">AppIMSetting.Lark</h3>
<p></p>
@@ -11885,23 +11342,23 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>types</td>
+ <td>app_secret</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -11912,7 +11369,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</h3>
+ <h3 id="bytebase.store.AppIMSetting.Slack">AppIMSetting.Slack</h3>
<p></p>
@@ -11923,40 +11380,19 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>category</td>
+ <td>token</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>column</td>
- <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>catalog</td>
- <td><a href="#bytebase.store.ColumnCatalog">ColumnCatalog</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
</tbody>
</table>
@@ -11964,7 +11400,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</h3>
+ <h3 id="bytebase.store.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
<p></p>
@@ -11975,36 +11411,29 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>category</td>
+ <td>corp_id</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>table</td>
- <td><a href="#bytebase.store.TableMetadata">TableMetadata</a></td>
+ <td>agent_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>catalog</td>
- <td><a href="#bytebase.store.TableCatalog">TableCatalog</a></td>
+ <td>secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -12016,7 +11445,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SemanticTypeSetting">SemanticTypeSetting</h3>
+ <h3 id="bytebase.store.DataClassificationSetting">DataClassificationSetting</h3>
<p></p>
@@ -12027,8 +11456,8 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>types</td>
- <td><a href="#bytebase.store.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
+ <td>configs</td>
+ <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>
@@ -12040,7 +11469,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
+ <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
<p></p>
@@ -12054,35 +11483,40 @@ are /[a-z][0-9]-/. </p></td>
<td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>id is the uuid for semantic type. </p></td>
+ <td><p>id is the uuid for classification. Each project can chose one
+classification config. </p></td>
</tr>
<tr>
<td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>the title of the semantic type, it should not be empty. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>the description of the semantic type, it can be empty. </p></td>
+ <td>levels</td>
+ <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
+ <td>repeated</td>
+ <td><p>levels is user defined level list for classification.
+The order for the level decides its priority. </p></td>
</tr>
<tr>
- <td>algorithm</td>
- <td><a href="#bytebase.store.Algorithm">Algorithm</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>classification</td>
+ <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>
+ <td>repeated</td>
+ <td><p>classification is the id - DataClassification map.
+The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
</tr>
<tr>
- <td>icon</td>
- <td><a href="#string">string</a></td>
+ <td>classification_from_config</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
+ <td><p>If true, we will only store the classification in the config.
+Otherwise we will get the classification from table/column comment,
+and write back to the schema metadata. </p></td>
</tr>
</tbody>
@@ -12092,7 +11526,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
+ <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
<p></p>
@@ -12103,9 +11537,16 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>rules</td>
- <td><a href="#bytebase.store.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
- <td>repeated</td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -12116,7 +11557,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
+ <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
<p></p>
@@ -12127,19 +11568,33 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>template</td>
- <td><a href="#bytebase.store.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>level_id</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -12147,7 +11602,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.store.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
+ <h3 id="bytebase.store.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
<p></p>
@@ -12158,80 +11613,192 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>external_url</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The external URL is used for sso authentication callback. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>disallow_signup</td>
- <td><a href="#bool">bool</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>require_2fa</td>
- <td><a href="#bool">bool</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Require 2FA for all users. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.EnvironmentSetting">EnvironmentSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>token_duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>environments</td>
+ <td><a href="#bytebase.store.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The duration for token. </p></td>
+ <td><p>The resource id of the environment.
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>announcement</td>
- <td><a href="#bytebase.store.Announcement">Announcement</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The setting of custom announcement </p></td>
+ <td><p>The display name of the environment. </p></td>
</tr>
<tr>
- <td>maximum_role_expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>tags</td>
+ <td><a href="#bytebase.store.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>color</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The max duration for role expired. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>domains</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The workspace domain, e.g., bytebase.com. </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>enforce_identity_domain</td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.PasswordRestrictionSetting">PasswordRestrictionSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>min_length</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>min_length is the minimum length for password, should be no less than 8. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_number</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Only user and group from the domains can be created and login. </p></td>
+ <td><p>require_number requires the password must contain at least one number. </p></td>
</tr>
<tr>
- <td>database_change_mode</td>
- <td><a href="#bytebase.store.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td>require_letter</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The workspace database change mode. </p></td>
+ <td><p>require_letter requires the password must contain at least one letter, regardless of upper case or lower case </p></td>
</tr>
<tr>
- <td>disallow_password_signin</td>
+ <td>require_uppercase_letter</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>
+ <td><p>require_uppercase_letter requires the password must contain at least one upper case letter. </p></td>
</tr>
<tr>
- <td>enable_metric_collection</td>
+ <td>require_special_character</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether to enable metric collection for the workspace. </p></td>
+ <td><p>require_special_character requires the password must contain at least one special character. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_reset_password_for_first_login</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>
+ </tr>
+
+ <tr>
+ <td>password_rotation</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>password_rotation requires users to reset their password after the duration. </p></td>
</tr>
</tbody>
@@ -12241,269 +11808,159 @@ are /[a-z][0-9]-/. </p></td>
+ <h3 id="bytebase.store.SCIMSetting">SCIMSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.store.AISetting.Provider">AISetting.Provider</h3>
+ <h3 id="bytebase.store.SchemaTemplateSetting">SchemaTemplateSetting</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>PROVIDER_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OPEN_AI</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CLAUDE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GEMINI</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AZURE_OPENAI</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MASK_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>INNER</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OUTER</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.Announcement.AlertLevel">Announcement.AlertLevel</h3>
- <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ALERT_LEVEL_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ALERT_LEVEL_INFO</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ALERT_LEVEL_WARNING</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ALERT_LEVEL_CRITICAL</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.DatabaseChangeMode">DatabaseChangeMode</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PIPELINE</td>
- <td>1</td>
- <td><p>A more advanced database change process, including custom approval workflows and other advanced features.
-Default to this mode.</p></td>
- </tr>
-
- <tr>
- <td>EDITOR</td>
- <td>2</td>
- <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>field_templates</td>
+ <td><a href="#bytebase.store.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>column_types</td>
+ <td><a href="#bytebase.store.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>table_templates</td>
+ <td><a href="#bytebase.store.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.store.SettingName">SettingName</h3>
+ <h3 id="bytebase.store.SchemaTemplateSetting.ColumnType">SchemaTemplateSetting.ColumnType</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SETTING_NAME_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AUTH_SECRET</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>BRANDING_LOGO</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_ID</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_PROFILE</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_APPROVAL</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_EXTERNAL_APPROVAL</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENTERPRISE_LICENSE</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>APP_IM</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WATERMARK</td>
- <td>9</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AI</td>
- <td>10</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SCHEMA_TEMPLATE</td>
- <td>13</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DATA_CLASSIFICATION</td>
- <td>14</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SEMANTIC_TYPES</td>
- <td>15</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SCIM</td>
- <td>17</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PASSWORD_RESTRICTION</td>
- <td>18</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENVIRONMENT</td>
- <td>19</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>types</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
-
-
- <div class="file-heading">
- <h2 id="store/sheet.proto">store/sheet.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+ <h3 id="bytebase.store.SchemaTemplateSetting.FieldTemplate">SchemaTemplateSetting.FieldTemplate</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>category</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>column</td>
+ <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>catalog</td>
+ <td><a href="#bytebase.store.ColumnCatalog">ColumnCatalog</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.store.SheetCommand">SheetCommand</h3>
+ <h3 id="bytebase.store.SchemaTemplateSetting.TableTemplate">SchemaTemplateSetting.TableTemplate</h3>
<p></p>
@@ -12514,15 +11971,36 @@ Default to this mode.</p></td>
<tbody>
<tr>
- <td>start</td>
- <td><a href="#int32">int32</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>end</td>
- <td><a href="#int32">int32</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>category</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>table</td>
+ <td><a href="#bytebase.store.TableMetadata">TableMetadata</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>catalog</td>
+ <td><a href="#bytebase.store.TableCatalog">TableCatalog</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -12534,7 +12012,7 @@ Default to this mode.</p></td>
- <h3 id="bytebase.store.SheetPayload">SheetPayload</h3>
+ <h3 id="bytebase.store.SemanticTypeSetting">SemanticTypeSetting</h3>
<p></p>
@@ -12545,17 +12023,10 @@ Default to this mode.</p></td>
<tbody>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.store.Engine">Engine</a></td>
- <td></td>
- <td><p>The SQL dialect. </p></td>
- </tr>
-
- <tr>
- <td>commands</td>
- <td><a href="#bytebase.store.SheetCommand">SheetCommand</a></td>
+ <td>types</td>
+ <td><a href="#bytebase.store.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
<td>repeated</td>
- <td><p>The start and end position of each command in the sheet statement. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12565,22 +12036,8 @@ Default to this mode.</p></td>
-
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/task.proto">store/task.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.Task">Task</h3>
- <p>Task is the metadata for database operation tasks.</p>
+ <h3 id="bytebase.store.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
+ <p></p>
<table class="field-table">
@@ -12590,115 +12047,62 @@ Default to this mode.</p></td>
<tbody>
<tr>
- <td>skipped</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the task was skipped during execution. </p></td>
- </tr>
-
- <tr>
- <td>skipped_reason</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Reason why the task was skipped. </p></td>
- </tr>
-
- <tr>
- <td>spec_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>UUID that identifies the spec this task implements. </p></td>
- </tr>
-
- <tr>
- <td>sheet_id</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The sheet ID containing SQL statements for this task. </p></td>
- </tr>
-
- <tr>
- <td>environment_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The environment where the database will be created. </p></td>
- </tr>
-
- <tr>
- <td>database_name</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Name of the database to create. </p></td>
+ <td><p>id is the uuid for semantic type. </p></td>
</tr>
<tr>
- <td>table_name</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Optional table name to create (required for some databases like MongoDB). </p></td>
+ <td><p>the title of the semantic type, it should not be empty. </p></td>
</tr>
<tr>
- <td>character_set</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Character set for the new database. </p></td>
+ <td><p>the description of the semantic type, it can be empty. </p></td>
</tr>
<tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
+ <td>algorithm</td>
+ <td><a href="#bytebase.store.Algorithm">Algorithm</a></td>
<td></td>
- <td><p>Collation for the new database. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>schema_version</td>
+ <td>icon</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Schema version after migration is applied. </p></td>
+ <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
</tr>
- <tr>
- <td>enable_prior_backup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to create an automatic backup before applying changes. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>flags</td>
- <td><a href="#bytebase.store.Task.FlagsEntry">Task.FlagsEntry</a></td>
+ <td>rules</td>
+ <td><a href="#bytebase.store.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
<td>repeated</td>
- <td><p>Configuration flags for gh-ost migration tool. </p></td>
- </tr>
-
- <tr>
- <td>task_release_source</td>
- <td><a href="#bytebase.store.TaskReleaseSource">TaskReleaseSource</a></td>
- <td></td>
- <td><p>Source information if task is created from a release. </p></td>
- </tr>
-
- <tr>
- <td>migrate_type</td>
- <td><a href="#bytebase.store.Task.MigrateType">Task.MigrateType</a></td>
- <td></td>
- <td><p>The type of migration (DDL, DML, or GHOST). </p></td>
- </tr>
-
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Password to encrypt the exported data archive. </p></td>
- </tr>
-
- <tr>
- <td>format</td>
- <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>Format of the exported data (SQL, CSV, JSON, etc). </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12708,7 +12112,7 @@ Default to this mode.</p></td>
- <h3 id="bytebase.store.Task.FlagsEntry">Task.FlagsEntry</h3>
+ <h3 id="bytebase.store.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
<p></p>
@@ -12719,15 +12123,15 @@ Default to this mode.</p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
+ <td>template</td>
+ <td><a href="#bytebase.store.ApprovalTemplate">ApprovalTemplate</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -12739,8 +12143,8 @@ Default to this mode.</p></td>
- <h3 id="bytebase.store.TaskReleaseSource">TaskReleaseSource</h3>
- <p>TaskReleaseSource contains information about the release file this task originated from.</p>
+ <h3 id="bytebase.store.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
+ <p></p>
<table class="field-table">
@@ -12750,11 +12154,80 @@ Default to this mode.</p></td>
<tbody>
<tr>
- <td>file</td>
- <td><a href="#string">string</a></td>
+ <td>external_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The external URL is used for sso authentication callback. </p></td>
+ </tr>
+
+ <tr>
+ <td>disallow_signup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_2fa</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Require 2FA for all users. </p></td>
+ </tr>
+
+ <tr>
+ <td>token_duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The duration for token. </p></td>
+ </tr>
+
+ <tr>
+ <td>announcement</td>
+ <td><a href="#bytebase.store.Announcement">Announcement</a></td>
+ <td></td>
+ <td><p>The setting of custom announcement </p></td>
+ </tr>
+
+ <tr>
+ <td>maximum_role_expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The max duration for role expired. </p></td>
+ </tr>
+
+ <tr>
+ <td>domains</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The workspace domain, e.g., bytebase.com. </p></td>
+ </tr>
+
+ <tr>
+ <td>enforce_identity_domain</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Only user and group from the domains can be created and login. </p></td>
+ </tr>
+
+ <tr>
+ <td>database_change_mode</td>
+ <td><a href="#bytebase.store.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td></td>
+ <td><p>The workspace database change mode. </p></td>
+ </tr>
+
+ <tr>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Resource name of the release file.
-Format: projects/{project}/releases/{release}/files/{id} </p></td>
+ <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_metric_collection</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enable metric collection for the workspace. </p></td>
</tr>
</tbody>
@@ -12766,8 +12239,8 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
- <h3 id="bytebase.store.Task.MigrateType">Task.MigrateType</h3>
- <p>MigrateType is the database migration type for imperative migrations.</p>
+ <h3 id="bytebase.store.AISetting.Provider">AISetting.Provider</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -12775,34 +12248,40 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
<tbody>
<tr>
- <td>MIGRATE_TYPE_UNSPECIFIED</td>
+ <td>PROVIDER_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>DDL</td>
+ <td>OPEN_AI</td>
<td>1</td>
- <td><p>DDL changes (Data Definition Language) for schema modifications.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DML</td>
+ <td>CLAUDE</td>
<td>2</td>
- <td><p>DML changes (Data Manipulation Language) for data modifications.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>GHOST</td>
+ <td>GEMINI</td>
<td>3</td>
- <td><p>Online schema migration using gh-ost tool.</p></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_OPENAI</td>
+ <td>4</td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.store.Task.Type">Task.Type</h3>
- <p>Type represents the type of database operation to perform.</p>
+ <h3 id="bytebase.store.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -12810,33 +12289,199 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
<tbody>
<tr>
- <td>TASK_TYPE_UNSPECIFIED</td>
+ <td>MASK_TYPE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>DATABASE_CREATE</td>
+ <td>INNER</td>
<td>1</td>
- <td><p>Create a new database.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_MIGRATE</td>
+ <td>OUTER</td>
<td>2</td>
- <td><p>Apply schema/data migrations to an existing database.</p></td>
+ <td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.Announcement.AlertLevel">Announcement.AlertLevel</h3>
+ <p>We support three levels of AlertLevel: INFO, WARNING, and ERROR.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>DATABASE_EXPORT</td>
+ <td>ALERT_LEVEL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ALERT_LEVEL_INFO</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ALERT_LEVEL_WARNING</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ALERT_LEVEL_CRITICAL</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.DatabaseChangeMode">DatabaseChangeMode</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PIPELINE</td>
+ <td>1</td>
+ <td><p>A more advanced database change process, including custom approval workflows and other advanced features.
+Default to this mode.</p></td>
+ </tr>
+
+ <tr>
+ <td>EDITOR</td>
+ <td>2</td>
+ <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.SettingName">SettingName</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SETTING_NAME_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AUTH_SECRET</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>BRANDING_LOGO</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_ID</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_PROFILE</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_APPROVAL</td>
<td>5</td>
- <td><p>Export data from a database.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_SDL</td>
+ <td>WORKSPACE_EXTERNAL_APPROVAL</td>
<td>6</td>
- <td><p>Apply declarative schema changes (state-based migration).</p></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENTERPRISE_LICENSE</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>APP_IM</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WATERMARK</td>
+ <td>9</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AI</td>
+ <td>10</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SCHEMA_TEMPLATE</td>
+ <td>13</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_CLASSIFICATION</td>
+ <td>14</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SEMANTIC_TYPES</td>
+ <td>15</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SCIM</td>
+ <td>17</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PASSWORD_RESTRICTION</td>
+ <td>18</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>19</td>
+ <td><p></p></td>
</tr>
</tbody>
@@ -12849,13 +12494,13 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
<div class="file-heading">
- <h2 id="store/task_run.proto">store/task_run.proto</h2><a href="#title">Top</a>
+ <h2 id="store/sheet.proto">store/sheet.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.PriorBackupDetail">PriorBackupDetail</h3>
- <p>PriorBackupDetail contains information about automatic backups created before migration.</p>
+ <h3 id="bytebase.store.SheetPayload">SheetPayload</h3>
+ <p></p>
<table class="field-table">
@@ -12865,10 +12510,17 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
<tbody>
<tr>
- <td>items</td>
- <td><a href="#bytebase.store.PriorBackupDetail.Item">PriorBackupDetail.Item</a></td>
+ <td>engine</td>
+ <td><a href="#bytebase.store.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The SQL dialect. </p></td>
+ </tr>
+
+ <tr>
+ <td>commands</td>
+ <td><a href="#bytebase.store.Range">Range</a></td>
<td>repeated</td>
- <td><p>List of backup operations performed. </p></td>
+ <td><p>The start and end position of each command in the sheet statement. </p></td>
</tr>
</tbody>
@@ -12876,10 +12528,24 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
-
+
+
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/task.proto">store/task.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
- <h3 id="bytebase.store.PriorBackupDetail.Item">PriorBackupDetail.Item</h3>
- <p>Item represents a single backup operation for a table.</p>
+ <h3 id="bytebase.store.Task">Task</h3>
+ <p>Task is the metadata for database operation tasks.</p>
<table class="field-table">
@@ -12889,139 +12555,115 @@ Format: projects/{project}/releases/{release}/files/{id} </p></td>
<tbody>
<tr>
- <td>source_table</td>
- <td><a href="#bytebase.store.PriorBackupDetail.Item.Table">PriorBackupDetail.Item.Table</a></td>
+ <td>skipped</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The original table that was backed up. </p></td>
+ <td><p>Whether the task was skipped during execution. </p></td>
</tr>
<tr>
- <td>target_table</td>
- <td><a href="#bytebase.store.PriorBackupDetail.Item.Table">PriorBackupDetail.Item.Table</a></td>
+ <td>skipped_reason</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The backup table where data was copied. </p></td>
+ <td><p>Reason why the task was skipped. </p></td>
</tr>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.store.Position">Position</a></td>
+ <td>spec_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Starting position in SQL for this backup operation. </p></td>
+ <td><p>UUID that identifies the spec this task implements. </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.store.Position">Position</a></td>
+ <td>sheet_id</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Ending position in SQL for this backup operation. </p></td>
+ <td><p>The sheet ID containing SQL statements for this task. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.PriorBackupDetail.Item.Table">PriorBackupDetail.Item.Table</h3>
- <p>Table identifies a database table.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>environment_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The environment where the database will be created. </p></td>
+ </tr>
<tr>
- <td>database</td>
+ <td>database_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The database containing the table.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>Name of the database to create. </p></td>
</tr>
<tr>
- <td>schema</td>
+ <td>table_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Schema name (for databases that support schemas). </p></td>
+ <td><p>Optional table name to create (required for some databases like MongoDB). </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>character_set</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Table name. </p></td>
+ <td><p>Character set for the new database. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.SchedulerInfo">SchedulerInfo</h3>
- <p>SchedulerInfo contains information about task scheduling and execution delays.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Collation for the new database. </p></td>
+ </tr>
<tr>
- <td>report_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>schema_version</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Timestamp when the scheduler reported this information. </p></td>
+ <td><p>Schema version after migration is applied. </p></td>
</tr>
<tr>
- <td>waiting_cause</td>
- <td><a href="#bytebase.store.SchedulerInfo.WaitingCause">SchedulerInfo.WaitingCause</a></td>
+ <td>enable_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Reason why the task run is currently waiting. </p></td>
+ <td><p>Whether to create an automatic backup before applying changes. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.SchedulerInfo.WaitingCause">SchedulerInfo.WaitingCause</h3>
- <p>WaitingCause indicates why a task run is waiting to execute.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>flags</td>
+ <td><a href="#bytebase.store.Task.FlagsEntry">Task.FlagsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Configuration flags for gh-ost migration tool. </p></td>
+ </tr>
<tr>
- <td>connection_limit</td>
- <td><a href="#bool">bool</a></td>
+ <td>task_release_source</td>
+ <td><a href="#bytebase.store.TaskReleaseSource">TaskReleaseSource</a></td>
<td></td>
- <td><p>Task is waiting due to database connection limit. </p></td>
+ <td><p>Source information if task is created from a release. </p></td>
</tr>
<tr>
- <td>task_uid</td>
- <td><a href="#int32">int32</a></td>
+ <td>migrate_type</td>
+ <td><a href="#bytebase.store.MigrationType">MigrationType</a></td>
<td></td>
- <td><p>Task is waiting for another task to complete. </p></td>
+ <td><p>The type of migration (DDL, DML, or GHOST). </p></td>
</tr>
<tr>
- <td>parallel_tasks_limit</td>
- <td><a href="#bool">bool</a></td>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Task is waiting due to parallel execution limit. </p></td>
+ <td><p>Password to encrypt the exported data archive. </p></td>
+ </tr>
+
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td>
+ <td></td>
+ <td><p>Format of the exported data (SQL, CSV, JSON, etc). </p></td>
</tr>
</tbody>
@@ -13031,15 +12673,8 @@ Format: instances/{instance}/databases/{database} </p></td>
- <h3 id="bytebase.store.TaskRun">TaskRun</h3>
- <p>TaskRun represents an execution attempt of a task.</p>
-
-
-
-
-
- <h3 id="bytebase.store.TaskRunResult">TaskRunResult</h3>
- <p>TaskRunResult contains the outcome and metadata from a task run execution.</p>
+ <h3 id="bytebase.store.Task.FlagsEntry">Task.FlagsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -13049,53 +12684,42 @@ Format: instances/{instance}/databases/{database} </p></td>
<tbody>
<tr>
- <td>detail</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Detailed execution information or error message. </p></td>
- </tr>
-
- <tr>
- <td>changelog</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Resource name of the changelog entry created by this run.
-Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>version</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Schema version after the migration was applied. </p></td>
- </tr>
-
- <tr>
- <td>start_position</td>
- <td><a href="#bytebase.store.Position">Position</a></td>
- <td></td>
- <td><p>Starting position in the SQL statement where an error occurred. </p></td>
- </tr>
-
- <tr>
- <td>end_position</td>
- <td><a href="#bytebase.store.Position">Position</a></td>
- <td></td>
- <td><p>Ending position in the SQL statement where an error occurred. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>export_archive_uid</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>UID of the export archive generated for export tasks. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.TaskReleaseSource">TaskReleaseSource</h3>
+ <p>TaskReleaseSource contains information about the release file this task originated from.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>prior_backup_detail</td>
- <td><a href="#bytebase.store.PriorBackupDetail">PriorBackupDetail</a></td>
+ <td>file</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Backup details that can be used to rollback changes. </p></td>
+ <td><p>Resource name of the release file.
+Format: projects/{project}/releases/{release}/files/{id} </p></td>
</tr>
</tbody>
@@ -13107,8 +12731,8 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t
- <h3 id="bytebase.store.TaskRun.Status">TaskRun.Status</h3>
- <p>Status represents the current execution state of a task run.</p>
+ <h3 id="bytebase.store.Task.Type">Task.Type</h3>
+ <p>Type represents the type of database operation to perform.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -13116,51 +12740,33 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t
<tbody>
<tr>
- <td>STATUS_UNSPECIFIED</td>
+ <td>TASK_TYPE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>PENDING</td>
+ <td>DATABASE_CREATE</td>
<td>1</td>
- <td><p>Task run is queued and waiting to execute.</p></td>
+ <td><p>Create a new database.</p></td>
</tr>
<tr>
- <td>RUNNING</td>
+ <td>DATABASE_MIGRATE</td>
<td>2</td>
- <td><p>Task run is currently executing.</p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>3</td>
- <td><p>Task run completed successfully.</p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>4</td>
- <td><p>Task run encountered an error and failed.</p></td>
+ <td><p>Apply schema/data migrations to an existing database.</p></td>
</tr>
<tr>
- <td>CANCELED</td>
+ <td>DATABASE_EXPORT</td>
<td>5</td>
- <td><p>Task run was canceled by user or system.</p></td>
+ <td><p>Export data from a database.</p></td>
</tr>
<tr>
- <td>NOT_STARTED</td>
+ <td>DATABASE_SDL</td>
<td>6</td>
- <td><p>Task run has not started yet.</p></td>
- </tr>
-
- <tr>
- <td>SKIPPED</td>
- <td>7</td>
- <td><p>Task run was skipped and will not execute.</p></td>
+ <td><p>Apply declarative schema changes (state-based migration).</p></td>
</tr>
</tbody>
diff --git a/proto/store/store/advice.proto b/proto/store/store/advice.proto
index f0fc5eeea8..0cc66b2539 100644
--- a/proto/store/store/advice.proto
+++ b/proto/store/store/advice.proto
@@ -9,13 +9,14 @@ option go_package = "generated-go/store";
message Advice {
reserved 5;
+ // Status represents the result status of the advice.
enum Status {
- // Unspecified status.
STATUS_UNSPECIFIED = 0;
SUCCESS = 1;
WARNING = 2;
ERROR = 3;
}
+
// The advice status.
Status status = 1;
diff --git a/proto/store/store/changelog.proto b/proto/store/store/changelog.proto
index d24c49aa4a..2c1b6630b9 100644
--- a/proto/store/store/changelog.proto
+++ b/proto/store/store/changelog.proto
@@ -34,16 +34,6 @@ message ChangelogPayload {
string git_commit = 8;
- // MigrationType is the type for imperative schema migration.
- enum MigrationType {
- MIGRATION_TYPE_UNSPECIFIED = 0;
- // Used for DDL changes.
- DDL = 1;
- // Used for DML changes.
- DML = 2;
- // Used for DDL changes using gh-ost.
- GHOST = 3;
- }
MigrationType migration_type = 9;
}
diff --git a/proto/store/store/common.proto b/proto/store/store/common.proto
index 35f5ccf35e..d30057ad3b 100644
--- a/proto/store/store/common.proto
+++ b/proto/store/store/common.proto
@@ -79,6 +79,26 @@ enum RiskLevel {
HIGH = 3;
}
+// MigrationType represents the type of database migration.
+enum MigrationType {
+ MIGRATION_TYPE_UNSPECIFIED = 0;
+ // DDL changes (Data Definition Language) for schema modifications.
+ DDL = 1;
+ // DML changes (Data Manipulation Language) for data modifications.
+ DML = 2;
+ // Online schema migration using gh-ost tool.
+ GHOST = 3;
+}
+
+// SchemaChangeType represents the strategy for schema changes.
+enum SchemaChangeType {
+ SCHEMA_CHANGE_TYPE_UNSPECIFIED = 0;
+ // Versioned migration with explicit migration scripts.
+ VERSIONED = 1;
+ // Declarative schema definition (state-based).
+ DECLARATIVE = 2;
+}
+
// Position in a text expressed as zero-based line and column byte offset.
message Position {
// Line position in a text (zero-based).
diff --git a/proto/store/store/db_group.proto b/proto/store/store/db_group.proto
deleted file mode 100644
index 768828510d..0000000000
--- a/proto/store/store/db_group.proto
+++ /dev/null
@@ -1,7 +0,0 @@
-syntax = "proto3";
-
-package bytebase.store;
-
-option go_package = "generated-go/store";
-
-message DatabaseGroupPayload {}
diff --git a/proto/store/store/issue_comment.proto b/proto/store/store/issue_comment.proto
index 4d53ca7889..4236e3b354 100644
--- a/proto/store/store/issue_comment.proto
+++ b/proto/store/store/issue_comment.proto
@@ -2,6 +2,10 @@ syntax = "proto3";
package bytebase.store;
+import "store/approval.proto";
+import "store/issue.proto";
+import "store/task_run.proto";
+
option go_package = "generated-go/store";
message IssueCommentPayload {
@@ -16,14 +20,7 @@ message IssueCommentPayload {
}
message Approval {
- Status status = 1;
-
- enum Status {
- STATUS_UNSPECIFIED = 0;
- PENDING = 1;
- APPROVED = 2;
- REJECTED = 3;
- }
+ IssuePayloadApproval.Approver.Status status = 1;
}
message IssueUpdate {
@@ -31,17 +28,10 @@ message IssueCommentPayload {
optional string to_title = 2;
optional string from_description = 3;
optional string to_description = 4;
- optional IssueStatus from_status = 5;
- optional IssueStatus to_status = 6;
+ optional Issue.Status from_status = 5;
+ optional Issue.Status to_status = 6;
repeated string from_labels = 7;
repeated string to_labels = 8;
-
- enum IssueStatus {
- ISSUE_STATUS_UNSPECIFIED = 0;
- OPEN = 1;
- DONE = 2;
- CANCELED = 3;
- }
}
message StageEnd {
@@ -54,17 +44,7 @@ message IssueCommentPayload {
optional string from_sheet = 2;
// Format: projects/{project}/sheets/{sheet}
optional string to_sheet = 3;
- optional Status to_status = 6;
-
- enum Status {
- STATUS_UNSPECIFIED = 0;
- PENDING = 1;
- RUNNING = 2;
- DONE = 3;
- FAILED = 4;
- SKIPPED = 5;
- CANCELED = 6;
- }
+ optional TaskRun.Status to_status = 6;
}
message TaskPriorBackup {
diff --git a/proto/store/store/plan.proto b/proto/store/store/plan.proto
index cca9e93499..5e45dd83a0 100644
--- a/proto/store/store/plan.proto
+++ b/proto/store/store/plan.proto
@@ -66,18 +66,9 @@ message PlanConfig {
}
Type type = 3;
- // MigrateType is the migration type for imperative schema migration.
+ // The migration type for imperative schema migration.
// It is only set when type is MIGRATE.
- enum MigrateType {
- MIGRATE_TYPE_UNSPECIFIED = 0;
- // Used for DDL changes.
- DDL = 1;
- // Used for DML changes.
- DML = 2;
- // Used for DDL changes using gh-ost.
- GHOST = 3;
- }
- MigrateType migrate_type = 11;
+ MigrationType migrate_type = 11;
map<string, string> ghost_flags = 7;
diff --git a/proto/store/store/plan_check_run.proto b/proto/store/store/plan_check_run.proto
index 86facccee5..07d3464eb1 100644
--- a/proto/store/store/plan_check_run.proto
+++ b/proto/store/store/plan_check_run.proto
@@ -2,6 +2,7 @@ syntax = "proto3";
package bytebase.store;
+import "store/advice.proto";
import "store/changelog.proto";
import "store/common.proto";
@@ -19,6 +20,8 @@ message PlanCheckRunConfig {
// If set, a backup of the modified data will be created automatically before any changes are applied.
bool enable_prior_backup = 7;
+ // ChangeDatabaseType extends MigrationType with additional execution contexts.
+ // Note: DDL, DML, and DDL_GHOST values align with MigrationType enum values.
enum ChangeDatabaseType {
CHANGE_DATABASE_TYPE_UNSPECIFIED = 0;
DDL = 1;
@@ -34,13 +37,7 @@ message PlanCheckRunResult {
string error = 2;
message Result {
- enum Status {
- STATUS_UNSPECIFIED = 0;
- ERROR = 1;
- WARNING = 2;
- SUCCESS = 3;
- }
- Status status = 1;
+ Advice.Status status = 1;
string title = 2;
string content = 3;
int32 code = 4;
diff --git a/proto/store/store/release.proto b/proto/store/store/release.proto
index a6946e2f4b..4a9db48761 100644
--- a/proto/store/store/release.proto
+++ b/proto/store/store/release.proto
@@ -24,22 +24,9 @@ message ReleasePayload {
string sheet = 3 [(google.api.resource_reference) = {type: "bytebase.com/Sheet"}];
// The SHA256 hash value of the sheet.
string sheet_sha256 = 4;
- Type type = 5;
+ SchemaChangeType type = 5;
string version = 6;
MigrationType migration_type = 7;
-
- enum Type {
- TYPE_UNSPECIFIED = 0;
- VERSIONED = 1;
- DECLARATIVE = 2;
- }
-
- enum MigrationType {
- MIGRATION_TYPE_UNSPECIFIED = 0;
- DDL = 1;
- DDL_GHOST = 2;
- DML = 3;
- }
}
message VCSSource {
diff --git a/proto/store/store/revision.proto b/proto/store/store/revision.proto
index d2258c09a8..8a732c452d 100644
--- a/proto/store/store/revision.proto
+++ b/proto/store/store/revision.proto
@@ -3,6 +3,7 @@ syntax = "proto3";
package bytebase.store;
import "google/api/resource.proto";
+import "store/common.proto";
option go_package = "generated-go/store";
@@ -27,11 +28,5 @@ message RevisionPayload {
string task_run = 5 [(google.api.resource_reference) = {type: "bytebase.com/TaskRun"}];
// The type of the revision.
- Type type = 6;
-
- enum Type {
- TYPE_UNSPECIFIED = 0;
- VERSIONED = 1;
- DECLARATIVE = 2;
- }
+ SchemaChangeType type = 6;
}
diff --git a/proto/store/store/sheet.proto b/proto/store/store/sheet.proto
index 26cfe84720..b426bcf4ef 100644
--- a/proto/store/store/sheet.proto
+++ b/proto/store/store/sheet.proto
@@ -11,10 +11,5 @@ message SheetPayload {
Engine engine = 3;
// The start and end position of each command in the sheet statement.
- repeated SheetCommand commands = 4;
-}
-
-message SheetCommand {
- int32 start = 1;
- int32 end = 2;
+ repeated Range commands = 4;
}
diff --git a/proto/store/store/task.proto b/proto/store/store/task.proto
index 137a14fa46..c010cfff60 100644
--- a/proto/store/store/task.proto
+++ b/proto/store/store/task.proto
@@ -21,17 +21,6 @@ message Task {
DATABASE_SDL = 6;
}
- // MigrateType is the database migration type for imperative migrations.
- enum MigrateType {
- MIGRATE_TYPE_UNSPECIFIED = 0;
- // DDL changes (Data Definition Language) for schema modifications.
- DDL = 1;
- // DML changes (Data Manipulation Language) for data modifications.
- DML = 2;
- // Online schema migration using gh-ost tool.
- GHOST = 3;
- }
-
// Whether the task was skipped during execution.
bool skipped = 1;
// Reason why the task was skipped.
@@ -61,7 +50,7 @@ message Task {
// Source information if task is created from a release.
TaskReleaseSource task_release_source = 13;
// The type of migration (DDL, DML, or GHOST).
- MigrateType migrate_type = 16;
+ MigrationType migrate_type = 16;
// Password to encrypt the exported data archive.
string password = 14;