Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(plan): enrich plan responses with approval and rollout status (#19797)
boojacka357b691830f
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 6837e52686..4f3ae22b29 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -14372,6 +14372,20 @@ components:type: booleantitle: has_rolloutdescription: Whether the plan has started the rollout.+ approvalStatus:+ title: approval_status+ description: |-+ The approval status of the linked issue.+ Unspecified when no linked issue exists.+ $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'+ rolloutStageSummaries:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.RolloutStageSummary'+ title: rollout_stage_summaries+ description: |-+ Per-stage rollout status summary.+ Ordered by environment deployment order. Empty when no rollout exists.title: PlanadditionalProperties: falsebytebase.v1.Plan.ChangeDatabaseConfig:@@ -14491,6 +14505,23 @@ components:format: int32title: PlanCheckRunStatusCountEntryadditionalProperties: false+ bytebase.v1.Plan.RolloutStageSummary:+ type: object+ properties:+ stage:+ type: string+ title: stage+ description: |-+ The stage resource name.+ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+ taskStatusCounts:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.TaskStatusCount'+ title: task_status_counts+ description: Task status counts for this stage.+ title: RolloutStageSummary+ additionalProperties: falsebytebase.v1.Plan.Spec:type: objectallOf:@@ -14526,6 +14557,20 @@ components:- exportDataConfigtitle: SpecadditionalProperties: false+ bytebase.v1.Plan.TaskStatusCount:+ type: object+ properties:+ status:+ title: status+ description: The task status.+ $ref: '#/components/schemas/bytebase.v1.Task.Status'+ count:+ type: integer+ title: count+ format: int32+ description: The number of tasks in the status.+ title: TaskStatusCount+ additionalProperties: falsebytebase.v1.PlanCheckRun:type: objectproperties:@@ -21121,6 +21166,8 @@ tags:description: IdentityProviderService manages external identity providers for SSO authentication.- name: bytebase.v1.OrgPolicyServicedescription: OrgPolicyService manages organizational policies at various resource levels.+ - name: bytebase.v1.RolloutService+ description: RolloutService manages the execution of deployment plans.- name: bytebase.v1.SQLServicedescription: SQLService executes SQL queries and manages query operations.- name: bytebase.v1.PlanService@@ -21135,8 +21182,6 @@ tags:description: RevisionService manages schema revision history.- name: bytebase.v1.RoleServicedescription: RoleService manages workspace roles and permissions.- - name: bytebase.v1.RolloutService- description: RolloutService manages the execution of deployment plans.- name: bytebase.v1.ServiceAccountServicedescription: ServiceAccountService manages service accounts for API integrations.- name: bytebase.v1.SheetServicediff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex a5c91c9fa9..ed429afdaf 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -765,77 +765,203 @@ func convertToPlans(ctx context.Context, s *store.Store, plans []*store.PlanMessreturn nil, nil}- // Batch-fetch issues and plan check runs to avoid N+1 queries.- planUIDs := make([]int64, len(plans))- for i, p := range plans {- planUIDs[i] = int64(p.UID)+ type planKey struct {+ projectID string+ planUID int64}- issues, err := s.ListIssues(ctx, &store.FindIssueMessage{Workspace: common.GetWorkspaceIDFromContext(ctx), ProjectIDs: []string{plans[0].ProjectID}, PlanUIDs: &planUIDs})+ workspaceID := common.GetWorkspaceIDFromContext(ctx)+ planUIDs := make([]int64, 0, len(plans))+ rolloutPlanUIDs := make([]int64, 0, len(plans))+ projectIDSet := make(map[string]struct{}, len(plans))+ for _, plan := range plans {+ planUIDs = append(planUIDs, plan.UID)+ if plan.Config != nil && plan.Config.HasRollout {+ rolloutPlanUIDs = append(rolloutPlanUIDs, plan.UID)+ }+ projectIDSet[plan.ProjectID] = struct{}{}+ }+ projectIDs := make([]string, 0, len(projectIDSet))+ for projectID := range projectIDSet {+ projectIDs = append(projectIDs, projectID)+ }++ issues, err := s.ListIssues(ctx, &store.FindIssueMessage{+ Workspace: workspaceID,+ ProjectIDs: projectIDs,+ PlanUIDs: &planUIDs,+ })if err != nil {return nil, errors.Wrap(err, "failed to batch list issues")}- issueByPlanUID := make(map[int64]*store.IssueMessage, len(issues))+ issueByPlanKey := make(map[planKey]*store.IssueMessage, len(issues))for _, issue := range issues {if issue.PlanUID != nil {- issueByPlanUID[*issue.PlanUID] = issue+ issueByPlanKey[planKey{projectID: issue.ProjectID, planUID: *issue.PlanUID}] = issue}}- planCheckRuns, err := s.ListPlanCheckRuns(ctx, &store.FindPlanCheckRunMessage{ProjectID: plans[0].ProjectID, PlanUIDs: &planUIDs})+ planCheckRuns, err := s.ListPlanCheckRuns(ctx, &store.FindPlanCheckRunMessage{+ ProjectIDs: &projectIDs,+ PlanUIDs: &planUIDs,+ })if err != nil {return nil, errors.Wrap(err, "failed to batch list plan check runs")}- planCheckRunByPlanUID := make(map[int64]*store.PlanCheckRunMessage, len(planCheckRuns))+ planCheckRunByPlanKey := make(map[planKey]*store.PlanCheckRunMessage, len(planCheckRuns))for _, run := range planCheckRuns {- planCheckRunByPlanUID[run.PlanUID] = run+ planCheckRunByPlanKey[planKey{projectID: run.ProjectID, planUID: run.PlanUID}] = run+ }++ taskStatusCountByPlanKey := make(map[planKey][]*store.TaskStatusCount)+ environmentOrderMap := map[string]int{}+ if len(rolloutPlanUIDs) > 0 {+ environmentSetting, err := s.GetEnvironment(ctx, workspaceID)+ if err != nil {+ return nil, errors.Wrap(err, "failed to get environments")+ }+ for i, env := range environmentSetting.GetEnvironments() {+ environmentOrderMap[env.Id] = i+ }++ taskStatusCounts, err := s.ListTaskStatusCountByPlanIDs(ctx, projectIDs, rolloutPlanUIDs)+ if err != nil {+ return nil, errors.Wrap(err, "failed to batch list task status counts")+ }+ for _, count := range taskStatusCounts {+ key := planKey{projectID: count.ProjectID, planUID: count.PlanID}+ taskStatusCountByPlanKey[key] = append(taskStatusCountByPlanKey[key], count)+ }}v1Plans := make([]*v1pb.Plan, len(plans))for i, plan := range plans {- planUID := int64(plan.UID)- v1Plans[i] = buildV1Plan(plan, issueByPlanUID[planUID], planCheckRunByPlanUID[planUID])+ key := planKey{projectID: plan.ProjectID, planUID: plan.UID}+ v1Plan := buildV1PlanFields(plan)++ if issue := issueByPlanKey[key]; issue != nil {+ v1Plan.Issue = common.FormatIssue(issue.ProjectID, issue.UID)+ v1Plan.ApprovalStatus = computeApprovalStatus(issue.Payload.GetApproval())+ }++ if planCheckRun := planCheckRunByPlanKey[key]; planCheckRun != nil {+ v1Plan.PlanCheckRunStatusCount[string(planCheckRun.Status)]+++ for _, result := range planCheckRun.Result.Results {+ v1Plan.PlanCheckRunStatusCount[storepb.Advice_Status_name[int32(result.Status)]]+++ }+ }++ if counts := taskStatusCountByPlanKey[key]; len(counts) > 0 {+ v1Plan.RolloutStageSummaries = buildRolloutStageSummaries(plan.ProjectID, plan.UID, counts, environmentOrderMap)+ }++ v1Plans[i] = v1Plan}return v1Plans, nil}func convertToPlan(ctx context.Context, s *store.Store, plan *store.PlanMessage) (*v1pb.Plan, error) {- issue, err := s.GetIssue(ctx, &store.FindIssueMessage{Workspace: common.GetWorkspaceIDFromContext(ctx), ProjectIDs: []string{plan.ProjectID}, PlanUID: &plan.UID})- if err != nil {- return nil, errors.Wrapf(err, "failed to get issue by plan uid %d", plan.UID)- }- planCheckRun, err := s.GetPlanCheckRun(ctx, plan.ProjectID, int64(plan.UID))+ plans, err := convertToPlans(ctx, s, []*store.PlanMessage{plan})if err != nil {- return nil, errors.Wrapf(err, "failed to get plan check run for plan uid %d", plan.UID)+ return nil, err}- return buildV1Plan(plan, issue, planCheckRun), nil+ return plans[0], nil}-func buildV1Plan(plan *store.PlanMessage, issue *store.IssueMessage, planCheckRun *store.PlanCheckRunMessage) *v1pb.Plan {+func buildV1PlanFields(plan *store.PlanMessage) *v1pb.Plan {+ var specs []*v1pb.Plan_Spec+ if plan.Config != nil {+ specs = convertToPlanSpecs(plan.ProjectID, plan.Config.Specs)+ }+p := &v1pb.Plan{Name: common.FormatPlan(plan.ProjectID, plan.UID),Title: plan.Name,Description: plan.Description,Creator: common.FormatUserEmail(plan.Creator),- Specs: convertToPlanSpecs(plan.ProjectID, plan.Config.Specs),+ Specs: specs,CreateTime: timestamppb.New(plan.CreatedAt),UpdateTime: timestamppb.New(plan.UpdatedAt),State: convertDeletedToState(plan.Deleted),PlanCheckRunStatusCount: map[string]int32{},}- if issue != nil {- p.Issue = common.FormatIssue(issue.ProjectID, issue.UID)- }if plan.Config != nil {p.HasRollout = plan.Config.HasRollout}- if planCheckRun != nil {- p.PlanCheckRunStatusCount[string(planCheckRun.Status)]++- for _, result := range planCheckRun.Result.Results {- p.PlanCheckRunStatusCount[storepb.Advice_Status_name[int32(result.Status)]]+++ return p+}++func buildRolloutStageSummaries(projectID string, planUID int64, counts []*store.TaskStatusCount, environmentOrderMap map[string]int) []*v1pb.Plan_RolloutStageSummary {+ summariesByEnvironment := make(map[string]map[v1pb.Task_Status]int32)+ for _, count := range counts {+ if _, exists := environmentOrderMap[count.Environment]; !exists {+ continue+ }+ status, ok := convertTaskRunStatusStringToAPITaskStatus(count.Status)+ if !ok {+ continue}+ if _, exists := summariesByEnvironment[count.Environment]; !exists {+ summariesByEnvironment[count.Environment] = make(map[v1pb.Task_Status]int32)+ }+ summariesByEnvironment[count.Environment][status] += count.Count+ }++ environments := make([]string, 0, len(summariesByEnvironment))+ for environment := range summariesByEnvironment {+ environments = append(environments, environment)+ }+ slices.SortFunc(environments, func(a, b string) int {+ return environmentOrderMap[a] - environmentOrderMap[b]+ })++ summaries := make([]*v1pb.Plan_RolloutStageSummary, 0, len(environments))+ for _, environment := range environments {+ stageID := common.FormatStageID(environment)+ statusCounts := make([]*v1pb.Plan_TaskStatusCount, 0, len(summariesByEnvironment[environment]))+ for _, status := range []v1pb.Task_Status{+ v1pb.Task_NOT_STARTED,+ v1pb.Task_PENDING,+ v1pb.Task_RUNNING,+ v1pb.Task_DONE,+ v1pb.Task_FAILED,+ v1pb.Task_CANCELED,+ v1pb.Task_SKIPPED,+ } {+ if count, exists := summariesByEnvironment[environment][status]; exists {+ statusCounts = append(statusCounts, &v1pb.Plan_TaskStatusCount{+ Status: status,+ Count: count,+ })+ }+ }+ summaries = append(summaries, &v1pb.Plan_RolloutStageSummary{+ Stage: common.FormatStage(projectID, planUID, stageID),+ TaskStatusCounts: statusCounts,+ })+ }+ return summaries+}++func convertTaskRunStatusStringToAPITaskStatus(status string) (v1pb.Task_Status, bool) {+ switch status {+ case storepb.TaskRun_NOT_STARTED.String():+ return v1pb.Task_NOT_STARTED, true+ case storepb.TaskRun_PENDING.String():+ return v1pb.Task_PENDING, true+ case storepb.TaskRun_RUNNING.String():+ return v1pb.Task_RUNNING, true+ case storepb.TaskRun_DONE.String():+ return v1pb.Task_DONE, true+ case storepb.TaskRun_FAILED.String():+ return v1pb.Task_FAILED, true+ case storepb.TaskRun_CANCELED.String():+ return v1pb.Task_CANCELED, true+ case storepb.TaskRun_SKIPPED.String():+ return v1pb.Task_SKIPPED, true+ default:+ return v1pb.Task_STATUS_UNSPECIFIED, false}- return p}func convertPlan(plan *v1pb.Plan) *storepb.PlanConfig {diff --git a/backend/generated-go/v1/plan_service.pb.go b/backend/generated-go/v1/plan_service.pb.goindex e7a9c624bb..da8bd21c80 100644--- a/backend/generated-go/v1/plan_service.pb.go+++ b/backend/generated-go/v1/plan_service.pb.go@@ -484,9 +484,15 @@ type Plan struct {// - RUNNINGPlanCheckRunStatusCount map[string]int32 `protobuf:"bytes,11,rep,name=plan_check_run_status_count,json=planCheckRunStatusCount,proto3" json:"plan_check_run_status_count,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`// Whether the plan has started the rollout.- HasRollout bool `protobuf:"varint,12,opt,name=has_rollout,json=hasRollout,proto3" json:"has_rollout,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ HasRollout bool `protobuf:"varint,12,opt,name=has_rollout,json=hasRollout,proto3" json:"has_rollout,omitempty"`+ // The approval status of the linked issue.+ // Unspecified when no linked issue exists.+ ApprovalStatus Issue_ApprovalStatus `protobuf:"varint,13,opt,name=approval_status,json=approvalStatus,proto3,enum=bytebase.v1.Issue_ApprovalStatus" json:"approval_status,omitempty"`+ // Per-stage rollout status summary.+ // Ordered by environment deployment order. Empty when no rollout exists.+ RolloutStageSummaries []*Plan_RolloutStageSummary `protobuf:"bytes,14,rep,name=rollout_stage_summaries,json=rolloutStageSummaries,proto3" json:"rollout_stage_summaries,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *Plan) Reset() {@@ -596,6 +602,20 @@ func (x *Plan) GetHasRollout() bool {return false}+func (x *Plan) GetApprovalStatus() Issue_ApprovalStatus {+ if x != nil {+ return x.ApprovalStatus+ }+ return Issue_APPROVAL_STATUS_UNSPECIFIED+}++func (x *Plan) GetRolloutStageSummaries() []*Plan_RolloutStageSummary {+ if x != nil {+ return x.RolloutStageSummaries+ }+ return nil+}+type GetPlanCheckRunRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// The name of the plan check run to retrieve.@@ -1265,6 +1285,115 @@ func (x *Plan_ExportDataConfig) GetPassword() string {return ""}+type Plan_RolloutStageSummary struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The stage resource name.+ // Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+ Stage string `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"`+ // Task status counts for this stage.+ TaskStatusCounts []*Plan_TaskStatusCount `protobuf:"bytes,2,rep,name=task_status_counts,json=taskStatusCounts,proto3" json:"task_status_counts,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Plan_RolloutStageSummary) Reset() {+ *x = Plan_RolloutStageSummary{}+ mi := &file_v1_plan_service_proto_msgTypes[17]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Plan_RolloutStageSummary) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Plan_RolloutStageSummary) ProtoMessage() {}++func (x *Plan_RolloutStageSummary) ProtoReflect() protoreflect.Message {+ mi := &file_v1_plan_service_proto_msgTypes[17]+ 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 Plan_RolloutStageSummary.ProtoReflect.Descriptor instead.+func (*Plan_RolloutStageSummary) Descriptor() ([]byte, []int) {+ return file_v1_plan_service_proto_rawDescGZIP(), []int{5, 5}+}++func (x *Plan_RolloutStageSummary) GetStage() string {+ if x != nil {+ return x.Stage+ }+ return ""+}++func (x *Plan_RolloutStageSummary) GetTaskStatusCounts() []*Plan_TaskStatusCount {+ if x != nil {+ return x.TaskStatusCounts+ }+ return nil+}++type Plan_TaskStatusCount struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The task status.+ Status Task_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.Task_Status" json:"status,omitempty"`+ // The number of tasks in the status.+ Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *Plan_TaskStatusCount) Reset() {+ *x = Plan_TaskStatusCount{}+ mi := &file_v1_plan_service_proto_msgTypes[18]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *Plan_TaskStatusCount) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Plan_TaskStatusCount) ProtoMessage() {}++func (x *Plan_TaskStatusCount) ProtoReflect() protoreflect.Message {+ mi := &file_v1_plan_service_proto_msgTypes[18]+ 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 Plan_TaskStatusCount.ProtoReflect.Descriptor instead.+func (*Plan_TaskStatusCount) Descriptor() ([]byte, []int) {+ return file_v1_plan_service_proto_rawDescGZIP(), []int{5, 6}+}++func (x *Plan_TaskStatusCount) GetStatus() Task_Status {+ if x != nil {+ return x.Status+ }+ return Task_STATUS_UNSPECIFIED+}++func (x *Plan_TaskStatusCount) GetCount() int32 {+ if x != nil {+ return x.Count+ }+ return 0+}+type PlanCheckRun_Result struct {state protoimpl.MessageState `protogen:"open.v1"`Status Advice_Level `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.Advice_Level" json:"status,omitempty"`@@ -1286,7 +1415,7 @@ type PlanCheckRun_Result struct {func (x *PlanCheckRun_Result) Reset() {*x = PlanCheckRun_Result{}- mi := &file_v1_plan_service_proto_msgTypes[17]+ mi := &file_v1_plan_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1298,7 +1427,7 @@ func (x *PlanCheckRun_Result) String() string {func (*PlanCheckRun_Result) ProtoMessage() {}func (x *PlanCheckRun_Result) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[17]+ mi := &file_v1_plan_service_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1408,7 +1537,7 @@ type PlanCheckRun_Result_SqlSummaryReport struct {func (x *PlanCheckRun_Result_SqlSummaryReport) Reset() {*x = PlanCheckRun_Result_SqlSummaryReport{}- mi := &file_v1_plan_service_proto_msgTypes[18]+ mi := &file_v1_plan_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1420,7 +1549,7 @@ func (x *PlanCheckRun_Result_SqlSummaryReport) String() string {func (*PlanCheckRun_Result_SqlSummaryReport) ProtoMessage() {}func (x *PlanCheckRun_Result_SqlSummaryReport) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[18]+ mi := &file_v1_plan_service_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1461,7 +1590,7 @@ type PlanCheckRun_Result_SqlReviewReport struct {func (x *PlanCheckRun_Result_SqlReviewReport) Reset() {*x = PlanCheckRun_Result_SqlReviewReport{}- mi := &file_v1_plan_service_proto_msgTypes[19]+ mi := &file_v1_plan_service_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1473,7 +1602,7 @@ func (x *PlanCheckRun_Result_SqlReviewReport) String() string {func (*PlanCheckRun_Result_SqlReviewReport) ProtoMessage() {}func (x *PlanCheckRun_Result_SqlReviewReport) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[19]+ mi := &file_v1_plan_service_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1507,7 +1636,7 @@ var File_v1_plan_service_proto protoreflect.FileDescriptorconst file_v1_plan_service_proto_rawDesc = "" +"\n" +- "\x15v1/plan_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x14v1/sql_service.proto\"?\n" ++ "\x15v1/plan_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x16v1/issue_service.proto\x1a\x18v1/rollout_service.proto\x1a\x14v1/sql_service.proto\"?\n" +"\x0eGetPlanRequest\x12-\n" +"\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" +"\x11bytebase.com/PlanR\x04name\"\x9c\x01\n" +@@ -1529,7 +1658,7 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x04plan\x18\x01 \x01(\v2\x11.bytebase.v1.PlanB\x03\xe0A\x02R\x04plan\x12@\n" +"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" +"updateMask\x12#\n" +- "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"\xc5\f\n" ++ "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"\xd3\x0f\n" +"\x04Plan\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12(\n" +"\x05state\x18\x02 \x01(\x0e2\x12.bytebase.v1.StateR\x05state\x12\x19\n" +@@ -1545,7 +1674,9 @@ const file_v1_plan_service_proto_rawDesc = "" +"updateTime\x12q\n" +"\x1bplan_check_run_status_count\x18\v \x03(\v2..bytebase.v1.Plan.PlanCheckRunStatusCountEntryB\x03\xe0A\x03R\x17planCheckRunStatusCount\x12$\n" +"\vhas_rollout\x18\f \x01(\bB\x03\xe0A\x03R\n" +- "hasRollout\x1a\xb4\x02\n" ++ "hasRollout\x12O\n" ++ "\x0fapproval_status\x18\r \x01(\x0e2!.bytebase.v1.Issue.ApprovalStatusB\x03\xe0A\x03R\x0eapprovalStatus\x12b\n" ++ "\x17rollout_stage_summaries\x18\x0e \x03(\v2%.bytebase.v1.Plan.RolloutStageSummaryB\x03\xe0A\x03R\x15rolloutStageSummaries\x1a\xb4\x02\n" +"\x04Spec\x12\x0e\n" +"\x02id\x18\x01 \x01(\tR\x02id\x12^\n" +"\x16create_database_config\x18\x02 \x01(\v2&.bytebase.v1.Plan.CreateDatabaseConfigH\x00R\x14createDatabaseConfig\x12^\n" +@@ -1575,7 +1706,13 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x05sheet\x18\x02 \x01(\tR\x05sheet\x121\n" +"\x06format\x18\x03 \x01(\x0e2\x19.bytebase.v1.ExportFormatR\x06format\x12\x1f\n" +"\bpassword\x18\x04 \x01(\tH\x00R\bpassword\x88\x01\x01B\v\n" +- "\t_password:7\xeaA4\n" ++ "\t_password\x1a|\n" ++ "\x13RolloutStageSummary\x12\x14\n" ++ "\x05stage\x18\x01 \x01(\tR\x05stage\x12O\n" ++ "\x12task_status_counts\x18\x02 \x03(\v2!.bytebase.v1.Plan.TaskStatusCountR\x10taskStatusCounts\x1aY\n" ++ "\x0fTaskStatusCount\x120\n" ++ "\x06status\x18\x01 \x01(\x0e2\x18.bytebase.v1.Task.StatusR\x06status\x12\x14\n" ++ "\x05count\x18\x02 \x01(\x05R\x05count:7\xeaA4\n" +"\x11bytebase.com/Plan\x12\x1fprojects/{project}/plans/{plan}\"O\n" +"\x16GetPlanCheckRunRequest\x125\n" +"\x04name\x18\x01 \x01(\tB!\xe0A\x02\xfaA\x1b\n" +@@ -1653,7 +1790,7 @@ func file_v1_plan_service_proto_rawDescGZIP() []byte {}var file_v1_plan_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)-var file_v1_plan_service_proto_msgTypes = make([]protoimpl.MessageInfo, 20)+var file_v1_plan_service_proto_msgTypes = make([]protoimpl.MessageInfo, 22)var file_v1_plan_service_proto_goTypes = []any{(PlanCheckRun_Status)(0), // 0: bytebase.v1.PlanCheckRun.Status(PlanCheckRun_Result_Type)(0), // 1: bytebase.v1.PlanCheckRun.Result.Type@@ -1674,60 +1811,68 @@ var file_v1_plan_service_proto_goTypes = []any{(*Plan_CreateDatabaseConfig)(nil), // 16: bytebase.v1.Plan.CreateDatabaseConfig(*Plan_ChangeDatabaseConfig)(nil), // 17: bytebase.v1.Plan.ChangeDatabaseConfig(*Plan_ExportDataConfig)(nil), // 18: bytebase.v1.Plan.ExportDataConfig- (*PlanCheckRun_Result)(nil), // 19: bytebase.v1.PlanCheckRun.Result- (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 20: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- (*PlanCheckRun_Result_SqlReviewReport)(nil), // 21: bytebase.v1.PlanCheckRun.Result.SqlReviewReport- (*fieldmaskpb.FieldMask)(nil), // 22: google.protobuf.FieldMask- (State)(0), // 23: bytebase.v1.State- (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp- (ExportFormat)(0), // 25: bytebase.v1.ExportFormat- (Advice_Level)(0), // 26: bytebase.v1.Advice.Level- (StatementType)(0), // 27: bytebase.v1.StatementType- (*Position)(nil), // 28: bytebase.v1.Position+ (*Plan_RolloutStageSummary)(nil), // 19: bytebase.v1.Plan.RolloutStageSummary+ (*Plan_TaskStatusCount)(nil), // 20: bytebase.v1.Plan.TaskStatusCount+ (*PlanCheckRun_Result)(nil), // 21: bytebase.v1.PlanCheckRun.Result+ (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 22: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ (*PlanCheckRun_Result_SqlReviewReport)(nil), // 23: bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ (*fieldmaskpb.FieldMask)(nil), // 24: google.protobuf.FieldMask+ (State)(0), // 25: bytebase.v1.State+ (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp+ (Issue_ApprovalStatus)(0), // 27: bytebase.v1.Issue.ApprovalStatus+ (ExportFormat)(0), // 28: bytebase.v1.ExportFormat+ (Task_Status)(0), // 29: bytebase.v1.Task.Status+ (Advice_Level)(0), // 30: bytebase.v1.Advice.Level+ (StatementType)(0), // 31: bytebase.v1.StatementType+ (*Position)(nil), // 32: bytebase.v1.Position}var file_v1_plan_service_proto_depIdxs = []int32{7, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan7, // 1: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan7, // 2: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan- 22, // 3: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask- 23, // 4: bytebase.v1.Plan.state:type_name -> bytebase.v1.State+ 24, // 3: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask+ 25, // 4: bytebase.v1.Plan.state:type_name -> bytebase.v1.State14, // 5: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec- 24, // 6: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp- 24, // 7: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp+ 26, // 6: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp+ 26, // 7: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp15, // 8: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry- 0, // 9: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status- 19, // 10: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result- 24, // 11: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp- 16, // 12: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig- 17, // 13: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig- 18, // 14: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig- 25, // 15: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat- 26, // 16: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.Advice.Level- 1, // 17: bytebase.v1.PlanCheckRun.Result.type:type_name -> bytebase.v1.PlanCheckRun.Result.Type- 20, // 18: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- 21, // 19: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport- 27, // 20: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.statement_types:type_name -> bytebase.v1.StatementType- 28, // 21: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position- 28, // 22: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position- 2, // 23: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest- 3, // 24: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest- 5, // 25: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest- 6, // 26: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest- 8, // 27: bytebase.v1.PlanService.GetPlanCheckRun:input_type -> bytebase.v1.GetPlanCheckRunRequest- 9, // 28: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest- 11, // 29: bytebase.v1.PlanService.CancelPlanCheckRun:input_type -> bytebase.v1.CancelPlanCheckRunRequest- 7, // 30: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan- 4, // 31: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse- 7, // 32: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan- 7, // 33: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan- 13, // 34: bytebase.v1.PlanService.GetPlanCheckRun:output_type -> bytebase.v1.PlanCheckRun- 10, // 35: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse- 12, // 36: bytebase.v1.PlanService.CancelPlanCheckRun:output_type -> bytebase.v1.CancelPlanCheckRunResponse- 30, // [30:37] is the sub-list for method output_type- 23, // [23:30] is the sub-list for method input_type- 23, // [23:23] is the sub-list for extension type_name- 23, // [23:23] is the sub-list for extension extendee- 0, // [0:23] is the sub-list for field type_name+ 27, // 9: bytebase.v1.Plan.approval_status:type_name -> bytebase.v1.Issue.ApprovalStatus+ 19, // 10: bytebase.v1.Plan.rollout_stage_summaries:type_name -> bytebase.v1.Plan.RolloutStageSummary+ 0, // 11: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status+ 21, // 12: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result+ 26, // 13: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp+ 16, // 14: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig+ 17, // 15: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig+ 18, // 16: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig+ 28, // 17: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat+ 20, // 18: bytebase.v1.Plan.RolloutStageSummary.task_status_counts:type_name -> bytebase.v1.Plan.TaskStatusCount+ 29, // 19: bytebase.v1.Plan.TaskStatusCount.status:type_name -> bytebase.v1.Task.Status+ 30, // 20: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.Advice.Level+ 1, // 21: bytebase.v1.PlanCheckRun.Result.type:type_name -> bytebase.v1.PlanCheckRun.Result.Type+ 22, // 22: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ 23, // 23: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ 31, // 24: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.statement_types:type_name -> bytebase.v1.StatementType+ 32, // 25: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position+ 32, // 26: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position+ 2, // 27: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest+ 3, // 28: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest+ 5, // 29: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest+ 6, // 30: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest+ 8, // 31: bytebase.v1.PlanService.GetPlanCheckRun:input_type -> bytebase.v1.GetPlanCheckRunRequest+ 9, // 32: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest+ 11, // 33: bytebase.v1.PlanService.CancelPlanCheckRun:input_type -> bytebase.v1.CancelPlanCheckRunRequest+ 7, // 34: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan+ 4, // 35: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse+ 7, // 36: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan+ 7, // 37: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan+ 13, // 38: bytebase.v1.PlanService.GetPlanCheckRun:output_type -> bytebase.v1.PlanCheckRun+ 10, // 39: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse+ 12, // 40: bytebase.v1.PlanService.CancelPlanCheckRun:output_type -> bytebase.v1.CancelPlanCheckRunResponse+ 34, // [34:41] is the sub-list for method output_type+ 27, // [27:34] is the sub-list for method input_type+ 27, // [27:27] is the sub-list for extension type_name+ 27, // [27:27] is the sub-list for extension extendee+ 0, // [0:27] is the sub-list for field type_name}func init() { file_v1_plan_service_proto_init() }@@ -1737,6 +1882,8 @@ func file_v1_plan_service_proto_init() {}file_v1_annotation_proto_init()file_v1_common_proto_init()+ file_v1_issue_service_proto_init()+ file_v1_rollout_service_proto_init()file_v1_sql_service_proto_init()file_v1_plan_service_proto_msgTypes[7].OneofWrappers = []any{}file_v1_plan_service_proto_msgTypes[12].OneofWrappers = []any{@@ -1745,7 +1892,7 @@ func file_v1_plan_service_proto_init() {(*Plan_Spec_ExportDataConfig)(nil),}file_v1_plan_service_proto_msgTypes[16].OneofWrappers = []any{}- file_v1_plan_service_proto_msgTypes[17].OneofWrappers = []any{+ file_v1_plan_service_proto_msgTypes[19].OneofWrappers = []any{(*PlanCheckRun_Result_SqlSummaryReport_)(nil),(*PlanCheckRun_Result_SqlReviewReport_)(nil),}@@ -1755,7 +1902,7 @@ func file_v1_plan_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_plan_service_proto_rawDesc), len(file_v1_plan_service_proto_rawDesc)),NumEnums: 2,- NumMessages: 20,+ NumMessages: 22,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/plan_service_equal.pb.go b/backend/generated-go/v1/plan_service_equal.pb.goindex 4bc51291a8..2226c8726f 100644--- a/backend/generated-go/v1/plan_service_equal.pb.go+++ b/backend/generated-go/v1/plan_service_equal.pb.go@@ -213,6 +213,43 @@ func (x *Plan_ExportDataConfig) Equal(y *Plan_ExportDataConfig) bool {return true}+func (x *Plan_RolloutStageSummary) Equal(y *Plan_RolloutStageSummary) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Stage != y.Stage {+ return false+ }+ if len(x.TaskStatusCounts) != len(y.TaskStatusCounts) {+ return false+ }+ for i := 0; i < len(x.TaskStatusCounts); i++ {+ if !x.TaskStatusCounts[i].Equal(y.TaskStatusCounts[i]) {+ return false+ }+ }+ return true+}++func (x *Plan_TaskStatusCount) Equal(y *Plan_TaskStatusCount) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Status != y.Status {+ return false+ }+ if x.Count != y.Count {+ return false+ }+ return true+}+func (x *Plan) Equal(y *Plan) bool {if x == y {return true@@ -267,6 +304,17 @@ func (x *Plan) Equal(y *Plan) bool {if x.HasRollout != y.HasRollout {return false}+ if x.ApprovalStatus != y.ApprovalStatus {+ return false+ }+ if len(x.RolloutStageSummaries) != len(y.RolloutStageSummaries) {+ return false+ }+ for i := 0; i < len(x.RolloutStageSummaries); i++ {+ if !x.RolloutStageSummaries[i].Equal(y.RolloutStageSummaries[i]) {+ return false+ }+ }return true}diff --git a/backend/store/plan_check_run.go b/backend/store/plan_check_run.goindex 72b1a66fdd..575f48714d 100644--- a/backend/store/plan_check_run.go+++ b/backend/store/plan_check_run.go@@ -44,6 +44,7 @@ type PlanCheckRunMessage struct {// FindPlanCheckRunMessage is the message for finding plan check runs.type FindPlanCheckRunMessage struct {ProjectID string+ ProjectIDs *[]stringPlanUID *int64PlanUIDs *[]int64UIDs *[]int64@@ -100,7 +101,17 @@ func (s *Store) ListPlanCheckRuns(ctx context.Context, find *FindPlanCheckRunMesplan_check_run.status,plan_check_run.resultFROM plan_check_run- WHERE plan_check_run.project = ?`, find.ProjectID)+ WHERE TRUE`)+ if v := find.ProjectID; v != "" {+ q.Space("AND plan_check_run.project = ?", v)+ }+ if v := find.ProjectIDs; v != nil {+ if len(*v) == 1 {+ q.Space("AND plan_check_run.project = ?", (*v)[0])+ } else if len(*v) > 1 {+ q.Space("AND plan_check_run.project = ANY(?)", *v)+ }+ }if v := find.PlanUID; v != nil {q.Space("AND plan_check_run.plan_id = ?", *v)}diff --git a/backend/store/task.go b/backend/store/task.goindex d3c3d35c5e..018f2434a5 100644--- a/backend/store/task.go+++ b/backend/store/task.go@@ -69,6 +69,15 @@ type TaskFind struct {LatestTaskRunStatusList *[]storepb.TaskRun_Status}+// TaskStatusCount holds aggregated task counts grouped by plan, environment and API-visible status.+type TaskStatusCount struct {+ ProjectID string+ PlanID int64+ Environment string+ Status string+ Count int32+}+// GetTaskByID gets a task by ID.func (s *Store) GetTaskByID(ctx context.Context, projectID string, id int64) (*TaskMessage, error) {tasks, err := s.ListTasks(ctx, &TaskFind{ProjectID: projectID, ID: &id})@@ -397,6 +406,77 @@ func (s *Store) ListTasks(ctx context.Context, find *TaskFind) ([]*TaskMessage,return tasks, nil}+// ListTaskStatusCountByPlanIDs returns aggregated task counts by project, plan, environment and API-visible status.+func (s *Store) ListTaskStatusCountByPlanIDs(ctx context.Context, projectIDs []string, planIDs []int64) ([]*TaskStatusCount, error) {+ if len(projectIDs) == 0 || len(planIDs) == 0 {+ return nil, nil+ }++ q := qb.Q().Space(`+ SELECT+ t.project,+ t.plan_id,+ t.environment,+ t.status,+ COUNT(*)::INT+ FROM (+ SELECT+ task.project,+ task.plan_id,+ COALESCE(task.environment, '') AS environment,+ CASE+ WHEN COALESCE((task.payload->>'skipped')::BOOLEAN, FALSE) THEN ?+ WHEN latest_task_run.status IS NULL THEN ?+ WHEN latest_task_run.status = ? THEN ?+ ELSE latest_task_run.status+ END AS status+ FROM task+ LEFT JOIN LATERAL (+ SELECT task_run.status+ FROM task_run+ WHERE task_run.project = task.project+ AND task_run.task_id = task.id+ ORDER BY task_run.id DESC+ LIMIT 1+ ) AS latest_task_run ON TRUE+ WHERE task.project = ANY(?)+ AND task.plan_id = ANY(?)+ ) AS t+ GROUP BY t.project, t.plan_id, t.environment, t.status+ ORDER BY t.project, t.plan_id, t.environment+ `,+ storepb.TaskRun_SKIPPED.String(),+ storepb.TaskRun_NOT_STARTED.String(),+ storepb.TaskRun_AVAILABLE.String(),+ storepb.TaskRun_PENDING.String(),+ projectIDs,+ planIDs,+ )+ query, args, err := q.ToSQL()+ if err != nil {+ return nil, errors.Wrapf(err, "failed to build sql")+ }++ rows, err := s.GetDB().QueryContext(ctx, query, args...)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to list task status counts")+ }+ defer rows.Close()++ var results []*TaskStatusCount+ for rows.Next() {+ var result TaskStatusCount+ if err := rows.Scan(&result.ProjectID, &result.PlanID, &result.Environment, &result.Status, &result.Count); err != nil {+ return nil, errors.Wrapf(err, "failed to scan task status count")+ }+ results = append(results, &result)+ }+ if err := rows.Err(); err != nil {+ return nil, err+ }+ return results, nil+}+// BatchSkipTasks batch skip tasks.func (s *Store) BatchSkipTasks(ctx context.Context, projectID string, taskUIDs []int64, comment string) error {q := qb.Q().Space(`diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.d.ts b/frontend/src/types/proto-es/v1/plan_service_pb.d.tsindex 007e6eb665..eadb5021ea 100644--- a/frontend/src/types/proto-es/v1/plan_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/plan_service_pb.d.ts@@ -6,6 +6,8 @@ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuimport type { Message } from "@bufbuild/protobuf";import type { FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";import type { ExportFormat, Position, State, StatementType } from "./common_pb";+import type { Issue_ApprovalStatus } from "./issue_service_pb";+import type { Task_Status } from "./rollout_service_pb";import type { Advice_Level } from "./sql_service_pb";/**@@ -271,6 +273,22 @@ export declare type Plan = Message<"bytebase.v1.Plan"> & {* @generated from field: bool has_rollout = 12;*/hasRollout: boolean;++ /**+ * The approval status of the linked issue.+ * Unspecified when no linked issue exists.+ *+ * @generated from field: bytebase.v1.Issue.ApprovalStatus approval_status = 13;+ */+ approvalStatus: Issue_ApprovalStatus;++ /**+ * Per-stage rollout status summary.+ * Ordered by environment deployment order. Empty when no rollout exists.+ *+ * @generated from field: repeated bytebase.v1.Plan.RolloutStageSummary rollout_stage_summaries = 14;+ */+ rolloutStageSummaries: Plan_RolloutStageSummary[];};/**@@ -476,6 +494,57 @@ export declare type Plan_ExportDataConfig = Message<"bytebase.v1.Plan.ExportData*/export declare const Plan_ExportDataConfigSchema: GenMessage<Plan_ExportDataConfig>;+/**+ * @generated from message bytebase.v1.Plan.RolloutStageSummary+ */+export declare type Plan_RolloutStageSummary = Message<"bytebase.v1.Plan.RolloutStageSummary"> & {+ /**+ * The stage resource name.+ * Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+ *+ * @generated from field: string stage = 1;+ */+ stage: string;++ /**+ * Task status counts for this stage.+ *+ * @generated from field: repeated bytebase.v1.Plan.TaskStatusCount task_status_counts = 2;+ */+ taskStatusCounts: Plan_TaskStatusCount[];+};++/**+ * Describes the message bytebase.v1.Plan.RolloutStageSummary.+ * Use `create(Plan_RolloutStageSummarySchema)` to create a new message.+ */+export declare const Plan_RolloutStageSummarySchema: GenMessage<Plan_RolloutStageSummary>;++/**+ * @generated from message bytebase.v1.Plan.TaskStatusCount+ */+export declare type Plan_TaskStatusCount = Message<"bytebase.v1.Plan.TaskStatusCount"> & {+ /**+ * The task status.+ *+ * @generated from field: bytebase.v1.Task.Status status = 1;+ */+ status: Task_Status;++ /**+ * The number of tasks in the status.+ *+ * @generated from field: int32 count = 2;+ */+ count: number;+};++/**+ * Describes the message bytebase.v1.Plan.TaskStatusCount.+ * Use `create(Plan_TaskStatusCountSchema)` to create a new message.+ */+export declare const Plan_TaskStatusCountSchema: GenMessage<Plan_TaskStatusCount>;+/*** @generated from message bytebase.v1.GetPlanCheckRunRequest*/diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.js b/frontend/src/types/proto-es/v1/plan_service_pb.jsindex 96e304f1e9..93bd992f1c 100644--- a/frontend/src/types/proto-es/v1/plan_service_pb.js+++ b/frontend/src/types/proto-es/v1/plan_service_pb.js@@ -11,13 +11,15 @@ import { file_google_api_resource } from "../google/api/resource_pb";import { file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";import { file_v1_annotation } from "./annotation_pb";import { file_v1_common } from "./common_pb";+import { file_v1_issue_service } from "./issue_service_pb";+import { file_v1_rollout_service } from "./rollout_service_pb";import { file_v1_sql_service } from "./sql_service_pb";/*** Describes the file v1/plan_service.proto.*/export const file_v1_plan_service = /*@__PURE__*/- fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4idwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJIk4KEUxpc3RQbGFuc1Jlc3BvbnNlEiAKBXBsYW5zGAEgAygLMhEuYnl0ZWJhc2UudjEuUGxhbhIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkiZwoRQ3JlYXRlUGxhblJlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiQKBHBsYW4YAiABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQIihgEKEVVwZGF0ZVBsYW5SZXF1ZXN0EiQKBHBsYW4YASABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQISNAoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISFQoNYWxsb3dfbWlzc2luZxgDIAEoCCLkCQoEUGxhbhIMCgRuYW1lGAEgASgJEiEKBXN0YXRlGAIgASgOMhIuYnl0ZWJhc2UudjEuU3RhdGUSEgoFaXNzdWUYAyABKAlCA+BBAxIXCgV0aXRsZRgFIAEoCUIIukgFcgMYyAESHQoLZGVzY3JpcHRpb24YBiABKAlCCLpIBXIDGJBOEiUKBXNwZWNzGAcgAygLMhYuYnl0ZWJhc2UudjEuUGxhbi5TcGVjEhQKB2NyZWF0b3IYCCABKAlCA+BBAxI0CgtjcmVhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJYChtwbGFuX2NoZWNrX3J1bl9zdGF0dXNfY291bnQYCyADKAsyLi5ieXRlYmFzZS52MS5QbGFuLlBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnlCA+BBAxIYCgtoYXNfcm9sbG91dBgMIAEoCEID4EEDGvIBCgRTcGVjEgoKAmlkGAEgASgJEkgKFmNyZWF0ZV9kYXRhYmFzZV9jb25maWcYAiABKAsyJi5ieXRlYmFzZS52MS5QbGFuLkNyZWF0ZURhdGFiYXNlQ29uZmlnSAASSAoWY2hhbmdlX2RhdGFiYXNlX2NvbmZpZxgDIAEoCzImLmJ5dGViYXNlLnYxLlBsYW4uQ2hhbmdlRGF0YWJhc2VDb25maWdIABJAChJleHBvcnRfZGF0YV9jb25maWcYBCABKAsyIi5ieXRlYmFzZS52MS5QbGFuLkV4cG9ydERhdGFDb25maWdIAEIICgZjb25maWcaPgocUGxhbkNoZWNrUnVuU3RhdHVzQ291bnRFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAU6AjgBGs4BChRDcmVhdGVEYXRhYmFzZUNvbmZpZxITCgZ0YXJnZXQYASABKAlCA+BBAhIVCghkYXRhYmFzZRgCIAEoCUID4EECEhIKBXRhYmxlGAMgASgJQgPgQQESGgoNY2hhcmFjdGVyX3NldBgEIAEoCUID4EEBEhYKCWNvbGxhdGlvbhgFIAEoCUID4EEBEhQKB2NsdXN0ZXIYBiABKAlCA+BBARISCgVvd25lchgHIAEoCUID4EEBEhgKC2Vudmlyb25tZW50GAkgASgJQgPgQQEafwoUQ2hhbmdlRGF0YWJhc2VDb25maWcSDwoHdGFyZ2V0cxgBIAMoCRINCgVzaGVldBgCIAEoCRIqCgdyZWxlYXNlGAMgASgJQhn6QRYKFGJ5dGViYXNlLmNvbS9SZWxlYXNlEhsKE2VuYWJsZV9wcmlvcl9iYWNrdXAYBiABKAgagQEKEEV4cG9ydERhdGFDb25maWcSDwoHdGFyZ2V0cxgBIAMoCRINCgVzaGVldBgCIAEoCRIpCgZmb3JtYXQYAyABKA4yGS5ieXRlYmFzZS52MS5FeHBvcnRGb3JtYXQSFQoIcGFzc3dvcmQYBCABKAlIAIgBAUILCglfcGFzc3dvcmQ6N+pBNAoRYnl0ZWJhc2UuY29tL1BsYW4SH3Byb2plY3RzL3twcm9qZWN0fS9wbGFucy97cGxhbn0iSQoWR2V0UGxhbkNoZWNrUnVuUmVxdWVzdBIvCgRuYW1lGAEgASgJQiHgQQL6QRsKGWJ5dGViYXNlLmNvbS9QbGFuQ2hlY2tSdW4iYQoUUnVuUGxhbkNoZWNrc1JlcXVlc3QSJwoEbmFtZRgBIAEoCUIZ4EEC+kETChFieXRlYmFzZS5jb20vUGxhbhIUCgdzcGVjX2lkGAIgASgJSACIAQFCCgoIX3NwZWNfaWQiFwoVUnVuUGxhbkNoZWNrc1Jlc3BvbnNlIkwKGUNhbmNlbFBsYW5DaGVja1J1blJlcXVlc3QSLwoEbmFtZRgBIAEoCUIh4EEC+kEbChlieXRlYmFzZS5jb20vUGxhbkNoZWNrUnVuIhwKGkNhbmNlbFBsYW5DaGVja1J1blJlc3BvbnNlIusHCgxQbGFuQ2hlY2tSdW4SDAoEbmFtZRgBIAEoCRIwCgZzdGF0dXMYAyABKA4yIC5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uU3RhdHVzEjEKB3Jlc3VsdHMYBiADKAsyIC5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0Eg0KBWVycm9yGAcgASgJEjQKC2NyZWF0ZV90aW1lGAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDGoEFCgZSZXN1bHQSKQoGc3RhdHVzGAEgASgOMhkuYnl0ZWJhc2UudjEuQWR2aWNlLkxldmVsEg0KBXRpdGxlGAIgASgJEg8KB2NvbnRlbnQYAyABKAkSDAoEY29kZRgEIAEoBRIOCgZ0YXJnZXQYByABKAkSMwoEdHlwZRgIIAEoDjIlLmJ5dGViYXNlLnYxLlBsYW5DaGVja1J1bi5SZXN1bHQuVHlwZRJPChJzcWxfc3VtbWFyeV9yZXBvcnQYBSABKAsyMS5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlNxbFN1bW1hcnlSZXBvcnRIABJNChFzcWxfcmV2aWV3X3JlcG9ydBgGIAEoCzIwLmJ5dGViYXNlLnYxLlBsYW5DaGVja1J1bi5SZXN1bHQuU3FsUmV2aWV3UmVwb3J0SAAaXgoQU3FsU3VtbWFyeVJlcG9ydBIzCg9zdGF0ZW1lbnRfdHlwZXMYAiADKA4yGi5ieXRlYmFzZS52MS5TdGF0ZW1lbnRUeXBlEhUKDWFmZmVjdGVkX3Jvd3MYAyABKAMabQoPU3FsUmV2aWV3UmVwb3J0Ei0KDnN0YXJ0X3Bvc2l0aW9uGAUgASgLMhUuYnl0ZWJhc2UudjEuUG9zaXRpb24SKwoMZW5kX3Bvc2l0aW9uGAYgASgLMhUuYnl0ZWJhc2UudjEuUG9zaXRpb24iYAoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASFAoQU1RBVEVNRU5UX0FEVklTRRABEhwKGFNUQVRFTUVOVF9TVU1NQVJZX1JFUE9SVBACEg4KCkdIT1NUX1NZTkMQA0IICgZyZXBvcnQiUQoGU3RhdHVzEhYKElNUQVRVU19VTlNQRUNJRklFRBAAEgsKB1JVTk5JTkcQARIICgRET05FEAISCgoGRkFJTEVEEAMSDAoIQ0FOQ0VMRUQQBDpM6kFJChlieXRlYmFzZS5jb20vUGxhbkNoZWNrUnVuEixwcm9qZWN0cy97cHJvamVjdH0vcGxhbnMve3BsYW59L3BsYW5DaGVja1J1bjL+CAoLUGxhblNlcnZpY2USewoHR2V0UGxhbhIbLmJ5dGViYXNlLnYxLkdldFBsYW5SZXF1ZXN0GhEuYnl0ZWJhc2UudjEuUGxhbiJA2kEEbmFtZYrqMAxiYi5wbGFucy5nZXSQ6jABgtPkkwIfEh0vdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qfRKPAQoJTGlzdFBsYW5zEh0uYnl0ZWJhc2UudjEuTGlzdFBsYW5zUmVxdWVzdBoeLmJ5dGViYXNlLnYxLkxpc3RQbGFuc1Jlc3BvbnNlIkPaQQZwYXJlbnSK6jANYmIucGxhbnMubGlzdJDqMAGC0+STAh8SHS92MS97cGFyZW50PXByb2plY3RzLyp9L3BsYW5zEpUBCgpDcmVhdGVQbGFuEh4uYnl0ZWJhc2UudjEuQ3JlYXRlUGxhblJlcXVlc3QaES5ieXRlYmFzZS52MS5QbGFuIlTaQQtwYXJlbnQscGxhborqMA9iYi5wbGFucy5jcmVhdGWQ6jABmOowAYLT5JMCJToEcGxhbiIdL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vcGxhbnMSnwEKClVwZGF0ZVBsYW4SHi5ieXRlYmFzZS52MS5VcGRhdGVQbGFuUmVxdWVzdBoRLmJ5dGViYXNlLnYxLlBsYW4iXtpBEHBsYW4sdXBkYXRlX21hc2uK6jAPYmIucGxhbnMudXBkYXRlkOowApjqMAGC0+STAio6BHBsYW4yIi92MS97cGxhbi5uYW1lPXByb2plY3RzLyovcGxhbnMvKn0SqAEKD0dldFBsYW5DaGVja1J1bhIjLmJ5dGViYXNlLnYxLkdldFBsYW5DaGVja1J1blJlcXVlc3QaGS5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4iVdpBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5nZXSQ6jABgtPkkwIsEiovdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qL3BsYW5DaGVja1J1bn0SsQEKDVJ1blBsYW5DaGVja3MSIS5ieXRlYmFzZS52MS5SdW5QbGFuQ2hlY2tzUmVxdWVzdBoiLmJ5dGViYXNlLnYxLlJ1blBsYW5DaGVja3NSZXNwb25zZSJZ2kEEbmFtZYrqMBRiYi5wbGFuQ2hlY2tSdW5zLnJ1bpDqMAGC0+STAjA6ASoiKy92MS97bmFtZT1wcm9qZWN0cy8qL3BsYW5zLyp9OnJ1blBsYW5DaGVja3MSxgEKEkNhbmNlbFBsYW5DaGVja1J1bhImLmJ5dGViYXNlLnYxLkNhbmNlbFBsYW5DaGVja1J1blJlcXVlc3QaJy5ieXRlYmFzZS52MS5DYW5jZWxQbGFuQ2hlY2tSdW5SZXNwb25zZSJf2kEEbmFtZYrqMBRiYi5wbGFuQ2hlY2tSdW5zLnJ1bpDqMAGC0+STAjY6ASoiMS92MS97bmFtZT1wcm9qZWN0cy8qL3BsYW5zLyovcGxhbkNoZWNrUnVufTpjYW5jZWxCpgEKD2NvbS5ieXRlYmFzZS52MUIQUGxhblNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_sql_service]);+ fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4idwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJIk4KEUxpc3RQbGFuc1Jlc3BvbnNlEiAKBXBsYW5zGAEgAygLMhEuYnl0ZWJhc2UudjEuUGxhbhIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkiZwoRQ3JlYXRlUGxhblJlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiQKBHBsYW4YAiABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQIihgEKEVVwZGF0ZVBsYW5SZXF1ZXN0EiQKBHBsYW4YASABKAsyES5ieXRlYmFzZS52MS5QbGFuQgPgQQISNAoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrQgPgQQISFQoNYWxsb3dfbWlzc2luZxgDIAEoCCKjDAoEUGxhbhIMCgRuYW1lGAEgASgJEiEKBXN0YXRlGAIgASgOMhIuYnl0ZWJhc2UudjEuU3RhdGUSEgoFaXNzdWUYAyABKAlCA+BBAxIXCgV0aXRsZRgFIAEoCUIIukgFcgMYyAESHQoLZGVzY3JpcHRpb24YBiABKAlCCLpIBXIDGJBOEiUKBXNwZWNzGAcgAygLMhYuYnl0ZWJhc2UudjEuUGxhbi5TcGVjEhQKB2NyZWF0b3IYCCABKAlCA+BBAxI0CgtjcmVhdGVfdGltZRgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxI0Cgt1cGRhdGVfdGltZRgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJYChtwbGFuX2NoZWNrX3J1bl9zdGF0dXNfY291bnQYCyADKAsyLi5ieXRlYmFzZS52MS5QbGFuLlBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnlCA+BBAxIYCgtoYXNfcm9sbG91dBgMIAEoCEID4EEDEj8KD2FwcHJvdmFsX3N0YXR1cxgNIAEoDjIhLmJ5dGViYXNlLnYxLklzc3VlLkFwcHJvdmFsU3RhdHVzQgPgQQMSSwoXcm9sbG91dF9zdGFnZV9zdW1tYXJpZXMYDiADKAsyJS5ieXRlYmFzZS52MS5QbGFuLlJvbGxvdXRTdGFnZVN1bW1hcnlCA+BBAxryAQoEU3BlYxIKCgJpZBgBIAEoCRJIChZjcmVhdGVfZGF0YWJhc2VfY29uZmlnGAIgASgLMiYuYnl0ZWJhc2UudjEuUGxhbi5DcmVhdGVEYXRhYmFzZUNvbmZpZ0gAEkgKFmNoYW5nZV9kYXRhYmFzZV9jb25maWcYAyABKAsyJi5ieXRlYmFzZS52MS5QbGFuLkNoYW5nZURhdGFiYXNlQ29uZmlnSAASQAoSZXhwb3J0X2RhdGFfY29uZmlnGAQgASgLMiIuYnl0ZWJhc2UudjEuUGxhbi5FeHBvcnREYXRhQ29uZmlnSABCCAoGY29uZmlnGj4KHFBsYW5DaGVja1J1blN0YXR1c0NvdW50RW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgFOgI4ARrOAQoUQ3JlYXRlRGF0YWJhc2VDb25maWcSEwoGdGFyZ2V0GAEgASgJQgPgQQISFQoIZGF0YWJhc2UYAiABKAlCA+BBAhISCgV0YWJsZRgDIAEoCUID4EEBEhoKDWNoYXJhY3Rlcl9zZXQYBCABKAlCA+BBARIWCgljb2xsYXRpb24YBSABKAlCA+BBARIUCgdjbHVzdGVyGAYgASgJQgPgQQESEgoFb3duZXIYByABKAlCA+BBARIYCgtlbnZpcm9ubWVudBgJIAEoCUID4EEBGn8KFENoYW5nZURhdGFiYXNlQ29uZmlnEg8KB3RhcmdldHMYASADKAkSDQoFc2hlZXQYAiABKAkSKgoHcmVsZWFzZRgDIAEoCUIZ+kEWChRieXRlYmFzZS5jb20vUmVsZWFzZRIbChNlbmFibGVfcHJpb3JfYmFja3VwGAYgASgIGoEBChBFeHBvcnREYXRhQ29uZmlnEg8KB3RhcmdldHMYASADKAkSDQoFc2hlZXQYAiABKAkSKQoGZm9ybWF0GAMgASgOMhkuYnl0ZWJhc2UudjEuRXhwb3J0Rm9ybWF0EhUKCHBhc3N3b3JkGAQgASgJSACIAQFCCwoJX3Bhc3N3b3JkGmMKE1JvbGxvdXRTdGFnZVN1bW1hcnkSDQoFc3RhZ2UYASABKAkSPQoSdGFza19zdGF0dXNfY291bnRzGAIgAygLMiEuYnl0ZWJhc2UudjEuUGxhbi5UYXNrU3RhdHVzQ291bnQaSgoPVGFza1N0YXR1c0NvdW50EigKBnN0YXR1cxgBIAEoDjIYLmJ5dGViYXNlLnYxLlRhc2suU3RhdHVzEg0KBWNvdW50GAIgASgFOjfqQTQKEWJ5dGViYXNlLmNvbS9QbGFuEh9wcm9qZWN0cy97cHJvamVjdH0vcGxhbnMve3BsYW59IkkKFkdldFBsYW5DaGVja1J1blJlcXVlc3QSLwoEbmFtZRgBIAEoCUIh4EEC+kEbChlieXRlYmFzZS5jb20vUGxhbkNoZWNrUnVuImEKFFJ1blBsYW5DaGVja3NSZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4SFAoHc3BlY19pZBgCIAEoCUgAiAEBQgoKCF9zcGVjX2lkIhcKFVJ1blBsYW5DaGVja3NSZXNwb25zZSJMChlDYW5jZWxQbGFuQ2hlY2tSdW5SZXF1ZXN0Ei8KBG5hbWUYASABKAlCIeBBAvpBGwoZYnl0ZWJhc2UuY29tL1BsYW5DaGVja1J1biIcChpDYW5jZWxQbGFuQ2hlY2tSdW5SZXNwb25zZSLrBwoMUGxhbkNoZWNrUnVuEgwKBG5hbWUYASABKAkSMAoGc3RhdHVzGAMgASgOMiAuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlN0YXR1cxIxCgdyZXN1bHRzGAYgAygLMiAuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlJlc3VsdBINCgVlcnJvchgHIAEoCRI0CgtjcmVhdGVfdGltZRgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxqBBQoGUmVzdWx0EikKBnN0YXR1cxgBIAEoDjIZLmJ5dGViYXNlLnYxLkFkdmljZS5MZXZlbBINCgV0aXRsZRgCIAEoCRIPCgdjb250ZW50GAMgASgJEgwKBGNvZGUYBCABKAUSDgoGdGFyZ2V0GAcgASgJEjMKBHR5cGUYCCABKA4yJS5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlR5cGUSTwoSc3FsX3N1bW1hcnlfcmVwb3J0GAUgASgLMjEuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuLlJlc3VsdC5TcWxTdW1tYXJ5UmVwb3J0SAASTQoRc3FsX3Jldmlld19yZXBvcnQYBiABKAsyMC5ieXRlYmFzZS52MS5QbGFuQ2hlY2tSdW4uUmVzdWx0LlNxbFJldmlld1JlcG9ydEgAGl4KEFNxbFN1bW1hcnlSZXBvcnQSMwoPc3RhdGVtZW50X3R5cGVzGAIgAygOMhouYnl0ZWJhc2UudjEuU3RhdGVtZW50VHlwZRIVCg1hZmZlY3RlZF9yb3dzGAMgASgDGm0KD1NxbFJldmlld1JlcG9ydBItCg5zdGFydF9wb3NpdGlvbhgFIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uEisKDGVuZF9wb3NpdGlvbhgGIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uImAKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEhQKEFNUQVRFTUVOVF9BRFZJU0UQARIcChhTVEFURU1FTlRfU1VNTUFSWV9SRVBPUlQQAhIOCgpHSE9TVF9TWU5DEANCCAoGcmVwb3J0IlEKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABILCgdSVU5OSU5HEAESCAoERE9ORRACEgoKBkZBSUxFRBADEgwKCENBTkNFTEVEEAQ6TOpBSQoZYnl0ZWJhc2UuY29tL1BsYW5DaGVja1J1bhIscHJvamVjdHMve3Byb2plY3R9L3BsYW5zL3twbGFufS9wbGFuQ2hlY2tSdW4y/ggKC1BsYW5TZXJ2aWNlEnsKB0dldFBsYW4SGy5ieXRlYmFzZS52MS5HZXRQbGFuUmVxdWVzdBoRLmJ5dGViYXNlLnYxLlBsYW4iQNpBBG5hbWWK6jAMYmIucGxhbnMuZ2V0kOowAYLT5JMCHxIdL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKn0SjwEKCUxpc3RQbGFucxIdLmJ5dGViYXNlLnYxLkxpc3RQbGFuc1JlcXVlc3QaHi5ieXRlYmFzZS52MS5MaXN0UGxhbnNSZXNwb25zZSJD2kEGcGFyZW50iuowDWJiLnBsYW5zLmxpc3SQ6jABgtPkkwIfEh0vdjEve3BhcmVudD1wcm9qZWN0cy8qfS9wbGFucxKVAQoKQ3JlYXRlUGxhbhIeLmJ5dGViYXNlLnYxLkNyZWF0ZVBsYW5SZXF1ZXN0GhEuYnl0ZWJhc2UudjEuUGxhbiJU2kELcGFyZW50LHBsYW6K6jAPYmIucGxhbnMuY3JlYXRlkOowAZjqMAGC0+STAiU6BHBsYW4iHS92MS97cGFyZW50PXByb2plY3RzLyp9L3BsYW5zEp8BCgpVcGRhdGVQbGFuEh4uYnl0ZWJhc2UudjEuVXBkYXRlUGxhblJlcXVlc3QaES5ieXRlYmFzZS52MS5QbGFuIl7aQRBwbGFuLHVwZGF0ZV9tYXNriuowD2JiLnBsYW5zLnVwZGF0ZZDqMAKY6jABgtPkkwIqOgRwbGFuMiIvdjEve3BsYW4ubmFtZT1wcm9qZWN0cy8qL3BsYW5zLyp9EqgBCg9HZXRQbGFuQ2hlY2tSdW4SIy5ieXRlYmFzZS52MS5HZXRQbGFuQ2hlY2tSdW5SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuUGxhbkNoZWNrUnVuIlXaQQRuYW1liuowFGJiLnBsYW5DaGVja1J1bnMuZ2V0kOowAYLT5JMCLBIqL3YxL3tuYW1lPXByb2plY3RzLyovcGxhbnMvKi9wbGFuQ2hlY2tSdW59ErEBCg1SdW5QbGFuQ2hlY2tzEiEuYnl0ZWJhc2UudjEuUnVuUGxhbkNoZWNrc1JlcXVlc3QaIi5ieXRlYmFzZS52MS5SdW5QbGFuQ2hlY2tzUmVzcG9uc2UiWdpBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwIwOgEqIisvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qfTpydW5QbGFuQ2hlY2tzEsYBChJDYW5jZWxQbGFuQ2hlY2tSdW4SJi5ieXRlYmFzZS52MS5DYW5jZWxQbGFuQ2hlY2tSdW5SZXF1ZXN0GicuYnl0ZWJhc2UudjEuQ2FuY2VsUGxhbkNoZWNrUnVuUmVzcG9uc2UiX9pBBG5hbWWK6jAUYmIucGxhbkNoZWNrUnVucy5ydW6Q6jABgtPkkwI2OgEqIjEvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qL3BsYW5DaGVja1J1bn06Y2FuY2VsQqYBCg9jb20uYnl0ZWJhc2UudjFCEFBsYW5TZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_issue_service, file_v1_rollout_service, file_v1_sql_service]);/*** Describes the message bytebase.v1.GetPlanRequest.@@ -89,6 +91,20 @@ export const Plan_ChangeDatabaseConfigSchema = /*@__PURE__*/export const Plan_ExportDataConfigSchema = /*@__PURE__*/messageDesc(file_v1_plan_service, 5, 3);+/**+ * Describes the message bytebase.v1.Plan.RolloutStageSummary.+ * Use `create(Plan_RolloutStageSummarySchema)` to create a new message.+ */+export const Plan_RolloutStageSummarySchema = /*@__PURE__*/+ messageDesc(file_v1_plan_service, 5, 4);++/**+ * Describes the message bytebase.v1.Plan.TaskStatusCount.+ * Use `create(Plan_TaskStatusCountSchema)` to create a new message.+ */+export const Plan_TaskStatusCountSchema = /*@__PURE__*/+ messageDesc(file_v1_plan_service, 5, 5);+/*** Describes the message bytebase.v1.GetPlanCheckRunRequest.* Use `create(GetPlanCheckRunRequestSchema)` to create a new message.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex a62a192fda..70a8953ad4 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -23617,6 +23617,22 @@ components:title: has_rolloutdescription: Whether the plan has started the rollout.readOnly: true+ approvalStatus:+ title: approval_status+ description: |-+ The approval status of the linked issue.+ Unspecified when no linked issue exists.+ readOnly: true+ $ref: '#/components/schemas/bytebase.v1.Issue.ApprovalStatus'+ rolloutStageSummaries:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.RolloutStageSummary'+ title: rollout_stage_summaries+ description: |-+ Per-stage rollout status summary.+ Ordered by environment deployment order. Empty when no rollout exists.+ readOnly: truetitle: PlanadditionalProperties: falsebytebase.v1.Plan.ChangeDatabaseConfig:@@ -23739,6 +23755,23 @@ components:format: int32title: PlanCheckRunStatusCountEntryadditionalProperties: false+ bytebase.v1.Plan.RolloutStageSummary:+ type: object+ properties:+ stage:+ type: string+ title: stage+ description: |-+ The stage resource name.+ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+ taskStatusCounts:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.Plan.TaskStatusCount'+ title: task_status_counts+ description: Task status counts for this stage.+ title: RolloutStageSummary+ additionalProperties: falsebytebase.v1.Plan.Spec:type: objectallOf:@@ -23774,6 +23807,20 @@ components:- exportDataConfigtitle: SpecadditionalProperties: false+ bytebase.v1.Plan.TaskStatusCount:+ type: object+ properties:+ status:+ title: status+ description: The task status.+ $ref: '#/components/schemas/bytebase.v1.Task.Status'+ count:+ type: integer+ title: count+ format: int32+ description: The number of tasks in the status.+ title: TaskStatusCount+ additionalProperties: falsebytebase.v1.PlanCheckRun:type: objectproperties:@@ -30482,6 +30529,8 @@ tags:description: IdentityProviderService manages external identity providers for SSO authentication.- name: OrgPolicyServicedescription: OrgPolicyService manages organizational policies at various resource levels.+ - name: RolloutService+ description: RolloutService manages the execution of deployment plans.- name: SQLServicedescription: SQLService executes SQL queries and manages query operations.- name: PlanService@@ -30496,8 +30545,6 @@ tags:description: RevisionService manages schema revision history.- name: RoleServicedescription: RoleService manages workspace roles and permissions.- - name: RolloutService- description: RolloutService manages the execution of deployment plans.- name: ServiceAccountServicedescription: ServiceAccountService manages service accounts for API integrations.- name: SheetServicediff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 6d7727f071..2cf3e1a435 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -426,6 +426,60 @@- [OrgPolicyService](#bytebase-v1-OrgPolicyService)+- [v1/rollout_service.proto](#v1_rollout_service-proto)+ - [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest)+ - [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse)+ - [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest)+ - [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse)+ - [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest)+ - [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse)+ - [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest)+ - [GetRolloutRequest](#bytebase-v1-GetRolloutRequest)+ - [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest)+ - [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest)+ - [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest)+ - [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest)+ - [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse)+ - [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest)+ - [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse)+ - [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest)+ - [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse)+ - [Rollout](#bytebase-v1-Rollout)+ - [Stage](#bytebase-v1-Stage)+ - [Task](#bytebase-v1-Task)+ - [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate)+ - [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport)+ - [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate)+ - [TaskRun](#bytebase-v1-TaskRun)+ - [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo)+ - [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause)+ - [TaskRunLog](#bytebase-v1-TaskRunLog)+ - [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry)+ - [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute)+ - [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse)+ - [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff)+ - [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync)+ - [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup)+ - [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail)+ - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item)+ - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table)+ - [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute)+ - [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo)+ - [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump)+ - [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl)+ - [TaskRunSession](#bytebase-v1-TaskRunSession)+ - [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres)+ - [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session)++ - [Task.Status](#bytebase-v1-Task-Status)+ - [Task.Type](#bytebase-v1-Task-Type)+ - [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus)+ - [TaskRun.Status](#bytebase-v1-TaskRun-Status)+ - [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type)+ - [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type)++ - [RolloutService](#bytebase-v1-RolloutService)+- [v1/sql_service.proto](#v1_sql_service-proto)- [AICompletionRequest](#bytebase-v1-AICompletionRequest)- [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message)@@ -480,7 +534,9 @@- [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig)- [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig)- [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry)+ - [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary)- [Plan.Spec](#bytebase-v1-Plan-Spec)+ - [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount)- [PlanCheckRun](#bytebase-v1-PlanCheckRun)- [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result)- [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport)@@ -592,60 +648,6 @@- [RoleService](#bytebase-v1-RoleService)-- [v1/rollout_service.proto](#v1_rollout_service-proto)- - [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest)- - [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse)- - [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest)- - [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse)- - [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest)- - [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse)- - [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest)- - [GetRolloutRequest](#bytebase-v1-GetRolloutRequest)- - [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest)- - [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest)- - [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest)- - [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest)- - [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse)- - [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest)- - [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse)- - [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest)- - [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse)- - [Rollout](#bytebase-v1-Rollout)- - [Stage](#bytebase-v1-Stage)- - [Task](#bytebase-v1-Task)- - [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate)- - [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport)- - [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate)- - [TaskRun](#bytebase-v1-TaskRun)- - [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo)- - [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause)- - [TaskRunLog](#bytebase-v1-TaskRunLog)- - [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry)- - [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute)- - [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse)- - [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff)- - [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync)- - [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup)- - [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail)- - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item)- - [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table)- - [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute)- - [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo)- - [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump)- - [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl)- - [TaskRunSession](#bytebase-v1-TaskRunSession)- - [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres)- - [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session)-- - [Task.Status](#bytebase-v1-Task-Status)- - [Task.Type](#bytebase-v1-Task-Type)- - [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus)- - [TaskRun.Status](#bytebase-v1-TaskRun-Status)- - [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type)- - [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type)-- - [RolloutService](#bytebase-v1-RolloutService)-- [v1/service_account_service.proto](#v1_service_account_service-proto)- [CreateServiceAccountRequest](#bytebase-v1-CreateServiceAccountRequest)- [DeleteServiceAccountRequest](#bytebase-v1-DeleteServiceAccountRequest)@@ -7130,1491 +7132,1498 @@ OrgPolicyService manages organizational policies at various resource levels.-<a name="v1_sql_service-proto"></a>+<a name="v1_rollout_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/sql_service.proto+## v1/rollout_service.proto-<a name="bytebase-v1-AICompletionRequest"></a>+<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>-### AICompletionRequest+### BatchCancelTaskRunsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |--+| parent | [string](#string) | | The task name for the taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. |+| task_runs | [string](#string) | repeated | The taskRuns to cancel. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-AICompletionRequest-Message"></a>-### AICompletionRequest.Message+<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>+### BatchCancelTaskRunsResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role | [string](#string) | | |-| content | [string](#string) | | |-<a name="bytebase-v1-AICompletionResponse"></a>+<a name="bytebase-v1-BatchRunTasksRequest"></a>-### AICompletionResponse+### BatchRunTasksRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |--+| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |+| skip_prior_backup | [bool](#bool) | | If true, skip prior backup for this run even if the task has prior backup enabled. |-<a name="bytebase-v1-AICompletionResponse-Candidate"></a>-### AICompletionResponse.Candidate+<a name="bytebase-v1-BatchRunTasksResponse"></a>+### BatchRunTasksResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |-<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>+<a name="bytebase-v1-BatchSkipTasksRequest"></a>-### AICompletionResponse.Candidate.Content+### BatchSkipTasksRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |--+| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| tasks | [string](#string) | repeated | The tasks to skip. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |+| reason | [string](#string) | | The reason for skipping the tasks. |-<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>-### AICompletionResponse.Candidate.Content.Part+<a name="bytebase-v1-BatchSkipTasksResponse"></a>+### BatchSkipTasksResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| text | [string](#string) | | |-<a name="bytebase-v1-AdminExecuteRequest"></a>+<a name="bytebase-v1-CreateRolloutRequest"></a>-### AdminExecuteRequest+### CreateRolloutRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |-| statement | [string](#string) | | The SQL statement to execute. |-| limit | [int32](#int32) | | The maximum number of rows to return. |-| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |+| parent | [string](#string) | | The parent plan for which this rollout will be created. Format: projects/{project}/plans/{plan} |+| target | [string](#string) | optional | Create the rollout only for the specified target. Format: environments/{environment} If unspecified, all stages are created. If set to "", no stages are created. |-<a name="bytebase-v1-AdminExecuteResponse"></a>+<a name="bytebase-v1-GetRolloutRequest"></a>-### AdminExecuteResponse+### GetRolloutRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |+| name | [string](#string) | | The name of the rollout to retrieve. This is the rollout resource name, which is the plan name plus /rollout suffix. Format: projects/{project}/plans/{plan}/rollout |-<a name="bytebase-v1-Advice"></a>+<a name="bytebase-v1-GetTaskRunLogRequest"></a>-### Advice+### GetTaskRunLogRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |-| code | [int32](#int32) | | The advice code. |-| title | [string](#string) | | The advice title. |-| content | [string](#string) | | The advice content. |-| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |-| end_position | [Position](#bytebase-v1-Position) | | |-| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-DiffMetadataRequest"></a>+<a name="bytebase-v1-GetTaskRunRequest"></a>-### DiffMetadataRequest+### GetTaskRunRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-DiffMetadataResponse"></a>+<a name="bytebase-v1-GetTaskRunSessionRequest"></a>-### DiffMetadataResponse+### GetTaskRunSessionRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| diff | [string](#string) | | The diff of the metadata. |+| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-ExportRequest"></a>+<a name="bytebase-v1-ListRolloutsRequest"></a>-### ExportRequest+### ListRolloutsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/plans/{plan}/rollout Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |-| statement | [string](#string) | | The SQL statement to execute. |-| limit | [int32](#int32) | | The maximum number of rows to return. |-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |-| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |-| password | [string](#string) | | The zip password provide by users. |-| data_source_id | [string](#string) | | The id of data source. If omitted, Export resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to export from the admin data source or a specific read-only data source. |-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |+| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use "projects/-" to list all rollouts from all projects. |+| page_size | [int32](#int32) | | The maximum number of rollouts to return. The service may return fewer than this value. If unspecified, at most 10 rollouts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListRollouts` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListRollouts` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter rollouts returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filters: - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - task_type: the task type, support "in" operator, check the Task.Type enum for the values.+For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] |-<a name="bytebase-v1-ExportResponse"></a>-### ExportResponse++<a name="bytebase-v1-ListRolloutsResponse"></a>++### ListRolloutsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| content | [bytes](#bytes) | | The export file content. |+| rollouts | [Rollout](#bytebase-v1-Rollout) | repeated | The rollouts from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-MaskingReason"></a>+<a name="bytebase-v1-ListTaskRunsRequest"></a>-### MaskingReason+### ListTaskRunsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "SSN", "email", "phone"). |-| semantic_type_title | [string](#string) | | Human-readable semantic type title. |-| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |-| algorithm | [string](#string) | | The masking algorithm used. |-| context | [string](#string) | | Additional context (e.g., "Matched global rule: PII Protection"). |-| classification_level | [int32](#int32) | | The classification level that triggered masking. |-| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |+| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. |-<a name="bytebase-v1-QueryHistory"></a>+<a name="bytebase-v1-ListTaskRunsResponse"></a>-### QueryHistory+### ListTaskRunsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |-| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |-| creator | [string](#string) | | |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| statement | [string](#string) | | |-| error | [string](#string) | optional | |-| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |-| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |+| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |-<a name="bytebase-v1-QueryOption"></a>+<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>-### QueryOption+### PreviewTaskRunRollbackRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-QueryRequest"></a>+<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>-### QueryRequest+### PreviewTaskRunRollbackResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |-| statement | [string](#string) | | The SQL statement to execute. |-| limit | [int32](#int32) | | The maximum number of rows to return. |-| data_source_id | [string](#string) | | The id of data source. If omitted, Query resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to query the admin data source or a specific read-only data source. |-| explain | [bool](#bool) | | Explain the statement. |-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |-| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |+| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |-<a name="bytebase-v1-QueryResponse"></a>+<a name="bytebase-v1-Rollout"></a>-### QueryResponse+### Rollout| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |+| name | [string](#string) | | The resource name of the rollout. Format: projects/{project}/plans/{plan}/rollout |+| title | [string](#string) | | The title of the rollout, inherited from the associated plan. This field is output only and cannot be directly set. |+| stages | [Stage](#bytebase-v1-Stage) | repeated | Stages and thus tasks of the rollout. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-<a name="bytebase-v1-QueryResult"></a>+<a name="bytebase-v1-Stage"></a>-### QueryResult+### Stage| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| column_names | [string](#string) | repeated | Column names of the query result. |-| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |-| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |-| rows_count | [int64](#int64) | | |-| error | [string](#string) | | The error message if the query failed. |-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |-| statement | [string](#string) | | The query statement for the result. |-| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |-| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |-| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |-| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |-| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. |-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use "-" for {stage} when the stage has no environment or deleted environment. |+| id | [string](#string) | | id is the environment id of the stage. e.g., "prod". Use "-" when the stage has no environment or deleted environment. |+| environment | [string](#string) | | environment is the environment of the stage. Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. |+| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |-<a name="bytebase-v1-QueryResult-CommandError"></a>+<a name="bytebase-v1-Task"></a>++### Task-### QueryResult.CommandError-Permission denied with resource information or disallowed command_type.-Either resources or command_type is available.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |-+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |+| spec_id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |+| status | [Task.Status](#bytebase-v1-Task-Status) | | Status is the status of the task. |+| skipped_reason | [string](#string) | | The reason why the task was skipped. |+| type | [Task.Type](#bytebase-v1-Task-Type) | | |+| target | [string](#string) | | Format: instances/{instance} if the task is DatabaseCreate. Format: instances/{instance}/databases/{database} |+| database_create | [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate) | | |+| database_update | [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate) | | |+| database_data_export | [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The update_time is the update time of latest task run. If there are no task runs, it will be empty. |+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The run_time is the scheduled run time of latest task run. If there are no task runs or the task run is not scheduled, it will be empty. |-<a name="bytebase-v1-QueryResult-Message"></a>-### QueryResult.Message+<a name="bytebase-v1-Task-DatabaseCreate"></a>+### Task.DatabaseCreate+Payload for creating a new database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |-| content | [string](#string) | | |+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-<a name="bytebase-v1-QueryResult-PostgresError"></a>+<a name="bytebase-v1-Task-DatabaseDataExport"></a>-### QueryResult.PostgresError-refer https://www.postgresql.org/docs/11/protocol-error-fields.html-for field description.+### Task.DatabaseDataExport+Payload for exporting database data.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| severity | [string](#string) | | |-| code | [string](#string) | | |-| message | [string](#string) | | |-| detail | [string](#string) | | |-| hint | [string](#string) | | |-| position | [int32](#int32) | | |-| internal_position | [int32](#int32) | | |-| internal_query | [string](#string) | | |-| where | [string](#string) | | |-| schema_name | [string](#string) | | |-| table_name | [string](#string) | | |-| column_name | [string](#string) | | |-| data_type_name | [string](#string) | | |-| constraint_name | [string](#string) | | |-| file | [string](#string) | | |-| line | [int32](#int32) | | |-| routine | [string](#string) | | |+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |-<a name="bytebase-v1-QueryResult-SyntaxError"></a>+<a name="bytebase-v1-Task-DatabaseUpdate"></a>-### QueryResult.SyntaxError-Syntax error with position information for editor highlighting+### Task.DatabaseUpdate+Payload for updating a database schema.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |+| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| release | [string](#string) | | Format: projects/{project}/releases/{release} |-<a name="bytebase-v1-QueryRow"></a>+<a name="bytebase-v1-TaskRun"></a>-### QueryRow+### TaskRun| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |-+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| creator | [string](#string) | | Format: users/[email protected] |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| status | [TaskRun.Status](#bytebase-v1-TaskRun-Status) | | The current execution status of the task run. |+| detail | [string](#string) | | Below are the results of a task run. Detailed information about the task run result. |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the task run started execution. |+| export_archive_status | [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus) | | The export archive status for data export tasks. |+| has_prior_backup | [bool](#bool) | | Indicates whether a prior backup was created for this task run. When true, rollback SQL can be generated via PreviewTaskRunRollback. Backup details are available in the task run logs. |+| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | Scheduling information about the task run. |+| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |-<a name="bytebase-v1-RowValue"></a>-### RowValue+<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>+### TaskRun.SchedulerInfo+Information about task run scheduling.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |-| bool_value | [bool](#bool) | | |-| bytes_value | [bytes](#bytes) | | |-| double_value | [double](#double) | | |-| float_value | [float](#float) | | |-| int32_value | [int32](#int32) | | |-| int64_value | [int64](#int64) | | |-| string_value | [string](#string) | | |-| uint32_value | [uint32](#uint32) | | |-| uint64_value | [uint64](#uint64) | | |-| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |-| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |-| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |-+| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the scheduling info was reported. |+| waiting_cause | [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause) | | The cause for the task run waiting. |-<a name="bytebase-v1-RowValue-Timestamp"></a>-### RowValue.Timestamp+<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+### TaskRun.SchedulerInfo.WaitingCause+Information about why a task run is waiting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |+| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |-<a name="bytebase-v1-RowValue-TimestampTZ"></a>+<a name="bytebase-v1-TaskRunLog"></a>-### RowValue.TimestampTZ+### TaskRunLog| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as "PDT", "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |-| offset | [int32](#int32) | | The offset is in seconds east of UTC |-| accuracy | [int32](#int32) | | |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log |+| entries | [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry) | repeated | The log entries for this task run. |-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>+<a name="bytebase-v1-TaskRunLogEntry"></a>-### SearchQueryHistoriesRequest+### TaskRunLogEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |-| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter: - project: the project full name in "projects/{id}" format, support "==" operator. - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator. - instance: the instance full name in "instances/{id}" format, support "==" operator. - type: the type, should be "QUERY" or "EXPORT", support "==" operator. - statement: the SQL statement, support ".matches()" operator.--For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement.matches("select") type == "QUERY" && statement.matches("select") |-+| type | [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type) | | The type of this log entry. |+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the log was recorded. |+| replica_id | [string](#string) | | The replica ID for this log entry. |+| schema_dump | [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump) | | Schema dump details (if type is SCHEMA_DUMP). |+| command_execute | [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute) | | Command execution details (if type is COMMAND_EXECUTE). |+| database_sync | [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync) | | Database sync details (if type is DATABASE_SYNC). |+| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | Transaction control details (if type is TRANSACTION_CONTROL). |+| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | Prior backup details (if type is PRIOR_BACKUP). |+| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | Retry information details (if type is RETRY_INFO). |+| compute_diff | [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff) | | Compute diff details (if type is COMPUTE_DIFF). |+| release_file_execute | [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute) | | Release file execution details (if type is RELEASE_FILE_EXECUTE). |-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>-### SearchQueryHistoriesResponse+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>+### TaskRunLogEntry.CommandExecute+Command execution details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |-| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method to retrieve the next page of history. |+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the command was logged. |+| range | [Range](#bytebase-v1-Range) | | The byte offset range of the executed command in the sheet. Uses byte offsets (not character indices) for efficient slicing of sheet content bytes. Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. |+| statement | [string](#string) | | The executed statement. |+| response | [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse) | | The response from executing the command. |-+<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>-<a name="bytebase-v1-Advice-Level"></a>+### TaskRunLogEntry.CommandExecute.CommandResponse+Command execution response.-### Advice.Level-Level represents the severity level of the advice.-| Name | Number | Description |-| ---- | ------ | ----------- |-| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |-| SUCCESS | 1 | Success status indicating the check passed without issues. |-| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |-| ERROR | 3 | Error status indicating critical issues that must be addressed. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the response was logged. |+| error | [string](#string) | | Error message if command execution failed. |+| affected_rows | [int64](#int64) | | Total affected rows. |+| all_affected_rows | [int64](#int64) | repeated | `all_affected_rows` is the affected rows of each command. `all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. |-<a name="bytebase-v1-Advice-RuleType"></a>-### Advice.RuleType-RuleType indicates the source of the linting rule.-| Name | Number | Description |-| ---- | ------ | ----------- |-| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |-| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |-| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |+<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>+### TaskRunLogEntry.ComputeDiff+Schema diff computation details.-<a name="bytebase-v1-QueryHistory-Type"></a>-### QueryHistory.Type+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation ended. |+| error | [string](#string) | | Error message if computation failed. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |-| QUERY | 1 | Query execution for data retrieval. |-| EXPORT | 2 | Data export operation to file. |-<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>-### QueryOption.MSSQLExplainFormat+<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+### TaskRunLogEntry.DatabaseSync+Database synchronization details.-| Name | Number | Description |-| ---- | ------ | ----------- |-| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |-| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |-| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync ended. |+| error | [string](#string) | | Error message if sync failed. |-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>-### QueryOption.RedisRunCommandsOn-| Name | Number | Description |-| ---- | ------ | ----------- |-| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |-| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |-| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+### TaskRunLogEntry.PriorBackup+Prior backup operation details.-<a name="bytebase-v1-QueryResult-CommandError-Type"></a>-### QueryResult.CommandError.Type+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup ended. |+| prior_backup_detail | [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail) | | The backup details. |+| error | [string](#string) | | Error message if the backup failed. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| DDL | 1 | |-| DML | 2 | |-| NON_READ_ONLY | 3 | |-<a name="bytebase-v1-QueryResult-Message-Level"></a>-### QueryResult.Message.Level+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail+Prior backup detail for rollback purposes.-| Name | Number | Description |-| ---- | ------ | ----------- |-| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |-| INFO | 1 | Informational message. |-| WARNING | 2 | Warning message indicating potential issues. |-| DEBUG | 3 | Debug message for development and troubleshooting. |-| LOG | 4 | General log message. |-| NOTICE | 5 | Notice message for important information. |-| EXCEPTION | 6 | Exception message indicating error conditions. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |---<a name="bytebase-v1-SQLService"></a>-### SQLService-SQLService executes SQL queries and manages query operations.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |-| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller's own query histories) |-| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |-| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>-+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item+A single backup table mapping.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| source_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The original table information. |+| target_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The target backup table information. |+| start_position | [Position](#bytebase-v1-Position) | | The start position in the SQL statement. |+| end_position | [Position](#bytebase-v1-Position) | | The end position in the SQL statement. |-<a name="v1_plan_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/plan_service.proto-<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### CancelPlanCheckRunRequest+<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>+### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table+Table information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |+| database | [string](#string) | | The database information. Format: instances/{instance}/databases/{database} |+| schema | [string](#string) | | The schema name. |+| table | [string](#string) | | The table name. |-<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>+<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>-### CancelPlanCheckRunResponse+### TaskRunLogEntry.ReleaseFileExecute+Release file execution details.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| version | [string](#string) | | The version of the file being executed (e.g., "0001"). |+| file_path | [string](#string) | | The file path within the release (e.g., "2.2/V0001_create_table.sql"). |-<a name="bytebase-v1-CreatePlanRequest"></a>-### CreatePlanRequest+<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>+### TaskRunLogEntry.RetryInfo+Retry information for failed operations.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |-| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |-+| error | [string](#string) | | The error that triggered the retry. |+| retry_count | [int32](#int32) | | Current retry attempt number. |+| maximum_retries | [int32](#int32) | | Maximum number of retries allowed. |-<a name="bytebase-v1-GetPlanCheckRunRequest"></a>-### GetPlanCheckRunRequest+<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>+### TaskRunLogEntry.SchemaDump+Schema dump operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |-+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump started. |+| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump ended. |+| error | [string](#string) | | Error message if the schema dump failed. |-<a name="bytebase-v1-GetPlanRequest"></a>-### GetPlanRequest+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+### TaskRunLogEntry.TransactionControl+Transaction control operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |+| type | [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type) | | The type of transaction control. |+| error | [string](#string) | | Error message if the operation failed. |-<a name="bytebase-v1-ListPlansRequest"></a>+<a name="bytebase-v1-TaskRunSession"></a>-### ListPlansRequest+### TaskRunSession| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" to list all plans from all projects. |-| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters: - creator: the plan creator full name in "users/{email or id}" format, support "==" operator. - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false". - has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false". - title: the plan title, support "==" operator for exact match and ".matches()" operator for case-insensitive substring match. - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config". - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".--For example: creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00" has_rollout == false && has_issue == true title == "My Plan" title.matches("database migration") spec_type == "change_database_config" state == "ACTIVE" |-+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session |+| postgres | [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres) | | PostgreSQL session information. |-<a name="bytebase-v1-ListPlansResponse"></a>-### ListPlansResponse+<a name="bytebase-v1-TaskRunSession-Postgres"></a>+### TaskRunSession.Postgres+PostgreSQL session information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-+| session | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | | `session` is the session of the task run executing commands. |+| blocking_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocking_sessions` block `session`. |+| blocked_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocked_sessions` are blocked by `session`. |-<a name="bytebase-v1-Plan"></a>-### Plan+<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+### TaskRunSession.Postgres.Session+PostgreSQL session information read from `pg_stat_activity`.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |-| state | [State](#bytebase-v1-State) | | The state of the plan. |-| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |-| title | [string](#string) | | The title of the plan. |-| description | [string](#string) | | The description of the plan. |-| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |-| creator | [string](#string) | | Format: users/[email protected] |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |-| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |---+| pid | [string](#string) | | Process ID of the session. |+| blocked_by_pids | [string](#string) | repeated | PIDs of sessions blocking this session. |+| query | [string](#string) | | Current query being executed. |+| state | [string](#string) | optional | Session state (active, idle, etc.). |+| wait_event_type | [string](#string) | optional | Wait event type if session is waiting. |+| wait_event | [string](#string) | optional | Specific wait event if session is waiting. |+| datname | [string](#string) | optional | Database name. |+| usename | [string](#string) | optional | User name. |+| application_name | [string](#string) | | Application name. |+| client_addr | [string](#string) | optional | Client IP address. |+| client_port | [string](#string) | optional | Client port number. |+| backend_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backend process started. |+| xact_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current transaction started. |+| query_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current query started. |-<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>-### Plan.ChangeDatabaseConfig+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |-| 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} |-| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |+<a name="bytebase-v1-Task-Status"></a>+### Task.Status+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | Unspecified status. |+| NOT_STARTED | 1 | Task has not started and is awaiting its turn in the deployment sequence. |+| PENDING | 2 | Task is ready to run and waiting for approval or scheduled time. |+| RUNNING | 3 | Task is currently executing. |+| DONE | 4 | Task completed successfully. |+| FAILED | 5 | Task execution failed with errors. |+| CANCELED | 6 | Task execution was canceled by a user. |+| SKIPPED | 7 | Task was skipped and will not be executed. |-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>+<a name="bytebase-v1-Task-Type"></a>-### Plan.CreateDatabaseConfig+### Task.Type+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified task type. |+| GENERAL | 1 | General task for miscellaneous operations. |+| DATABASE_CREATE | 2 | Database creation task that creates a new database. Use payload DatabaseCreate. |+| DATABASE_MIGRATE | 3 | Database migration task that applies versioned schema changes. Use payload DatabaseUpdate. |+| DATABASE_EXPORT | 4 | Database export task that exports query results or table data. Use payload DatabaseDataExport. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |-| database | [string](#string) | | The name of the database to create. |-| table | [string](#string) | | 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. |-| character_set | [string](#string) | | character_set is the character set of the database. |-| collation | [string](#string) | | collation is the collation of the database. |-| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". |-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |+<a name="bytebase-v1-TaskRun-ExportArchiveStatus"></a>+### TaskRun.ExportArchiveStatus+| Name | Number | Description |+| ---- | ------ | ----------- |+| EXPORT_ARCHIVE_STATUS_UNSPECIFIED | 0 | Unspecified export archive status. |+| READY | 1 | Export archive is ready for download. |+| EXPORTED | 2 | Export archive has been downloaded by the user. |-<a name="bytebase-v1-Plan-ExportDataConfig"></a>-### Plan.ExportDataConfig+<a name="bytebase-v1-TaskRun-Status"></a>+### TaskRun.Status-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |-| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | Unspecified status. |+| PENDING | 1 | Task run is queued and waiting to start execution. |+| RUNNING | 2 | Task run is currently executing. |+| DONE | 3 | Task run completed successfully. |+| FAILED | 4 | Task run execution failed with errors. |+| CANCELED | 5 | Task run execution was canceled by a user. |+| AVAILABLE | 6 | Task run is ready for immediate execution. |+<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>+### TaskRunLogEntry.TransactionControl.Type+Transaction control type.-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| BEGIN | 1 | Begin transaction. |+| COMMIT | 2 | Commit transaction. |+| ROLLBACK | 3 | Rollback transaction. |-### Plan.PlanCheckRunStatusCountEntry+<a name="bytebase-v1-TaskRunLogEntry-Type"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [int32](#int32) | | |+### TaskRunLogEntry.Type+The type of log entry.+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| SCHEMA_DUMP | 1 | Schema dump operation. |+| COMMAND_EXECUTE | 2 | Command execution. |+| DATABASE_SYNC | 3 | Database synchronization. |+| TRANSACTION_CONTROL | 5 | Transaction control (BEGIN, COMMIT, ROLLBACK). |+| PRIOR_BACKUP | 6 | Prior backup operation. |+| RETRY_INFO | 7 | Retry information. |+| COMPUTE_DIFF | 8 | Schema diff computation. |+| RELEASE_FILE_EXECUTE | 9 | Release file execution. |++-<a name="bytebase-v1-Plan-Spec"></a>+<a name="bytebase-v1-RolloutService"></a>-### Plan.Spec+### RolloutService+RolloutService manages the execution of deployment plans.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetRollout | [GetRolloutRequest](#bytebase-v1-GetRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Retrieves a rollout by its plan name. Permissions required: bb.rollouts.get |+| ListRollouts | [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest) | [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse) | Lists rollouts in a project. Permissions required: bb.rollouts.list |+| CreateRollout | [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Creates a new rollout for a plan. Permissions required: bb.rollouts.create (or issue creator for data export issues) |+| ListTaskRuns | [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest) | [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse) | Lists task run executions for a task. Permissions required: bb.taskRuns.list |+| GetTaskRun | [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest) | [TaskRun](#bytebase-v1-TaskRun) | Retrieves a task run by name. Permissions required: bb.taskRuns.list |+| GetTaskRunLog | [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest) | [TaskRunLog](#bytebase-v1-TaskRunLog) | Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list |+| GetTaskRunSession | [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest) | [TaskRunSession](#bytebase-v1-TaskRunSession) | Retrieves database session information for a running task. Permissions required: bb.taskRuns.list |+| BatchRunTasks | [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest) | [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse) | Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |+| BatchSkipTasks | [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest) | [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse) | Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |+| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | Cancels multiple running task executions. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |+| PreviewTaskRunRollback | [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest) | [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse) | Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |-| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |-| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |-| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |+<a name="v1_sql_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/sql_service.proto-<a name="bytebase-v1-PlanCheckRun"></a>+<a name="bytebase-v1-AICompletionRequest"></a>-### PlanCheckRun+### AICompletionRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |-| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |-| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |-| error | [string](#string) | | error is set if the Status is FAILED. |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |-<a name="bytebase-v1-PlanCheckRun-Result"></a>+<a name="bytebase-v1-AICompletionRequest-Message"></a>-### PlanCheckRun.Result+### AICompletionRequest.Message| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |-| title | [string](#string) | | |+| role | [string](#string) | | || content | [string](#string) | | |-| code | [int32](#int32) | | |-| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} |-| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |-| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |-| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |-<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>+<a name="bytebase-v1-AICompletionResponse"></a>-### PlanCheckRun.Result.SqlReviewReport+### AICompletionResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |-| end_position | [Position](#bytebase-v1-Position) | | |+| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>+<a name="bytebase-v1-AICompletionResponse-Candidate"></a>-### PlanCheckRun.Result.SqlSummaryReport+### AICompletionResponse.Candidate| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |-| affected_rows | [int64](#int64) | | |+| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |-<a name="bytebase-v1-RunPlanChecksRequest"></a>+<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>-### RunPlanChecksRequest+### AICompletionResponse.Candidate.Content| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |-| spec_id | [string](#string) | optional | The UUID of the specific spec to run plan checks for. This should match the spec.id field in Plan.Spec. If not set, all specs in the plan will be used. |-+| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |-<a name="bytebase-v1-RunPlanChecksResponse"></a>-### RunPlanChecksResponse+<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>+### AICompletionResponse.Candidate.Content.Part+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| text | [string](#string) | | |-<a name="bytebase-v1-UpdatePlanRequest"></a>-### UpdatePlanRequest+<a name="bytebase-v1-AdminExecuteRequest"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.+### AdminExecuteRequest-The plan's `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |+| statement | [string](#string) | | The SQL statement to execute. |+| limit | [int32](#int32) | | The maximum number of rows to return. |+| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |--<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>-### PlanCheckRun.Result.Type+<a name="bytebase-v1-AdminExecuteResponse"></a>+### AdminExecuteResponse-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| STATEMENT_ADVISE | 1 | |-| STATEMENT_SUMMARY_REPORT | 2 | |-| GHOST_SYNC | 3 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-<a name="bytebase-v1-PlanCheckRun-Status"></a>-### PlanCheckRun.Status-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | |-| RUNNING | 1 | |-| DONE | 2 | |-| FAILED | 3 | |-| CANCELED | 4 | |-+<a name="bytebase-v1-Advice"></a>-+### Advice-<a name="bytebase-v1-PlanService"></a>-### PlanService-PlanService manages deployment plans for database changes.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |+| code | [int32](#int32) | | The advice code. |+| title | [string](#string) | | The advice title. |+| content | [string](#string) | | The advice content. |+| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |+| end_position | [Position](#bytebase-v1-Position) | | |+| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |-| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |-| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |-| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |-| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |-| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |-| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |--<a name="v1_project_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/project_service.proto+<a name="bytebase-v1-DiffMetadataRequest"></a>+### DiffMetadataRequest-<a name="bytebase-v1-Activity"></a>-### Activity-Activity types for webhook notifications.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |-<a name="bytebase-v1-AddWebhookRequest"></a>+<a name="bytebase-v1-DiffMetadataResponse"></a>-### AddWebhookRequest+### DiffMetadataResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| project | [string](#string) | | The name of the project to add the webhook to. Format: projects/{project} |-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to add. |+| diff | [string](#string) | | The diff of the metadata. |-<a name="bytebase-v1-BatchDeleteProjectsRequest"></a>+<a name="bytebase-v1-ExportRequest"></a>-### BatchDeleteProjectsRequest+### ExportRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted projects and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. All projects must already be soft-deleted for this to work. When purge=true, all databases will be moved to the default project before deletion. When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged. |+| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/plans/{plan}/rollout Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| statement | [string](#string) | | The SQL statement to execute. |+| limit | [int32](#int32) | | The maximum number of rows to return. |+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |+| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |+| password | [string](#string) | | The zip password provide by users. |+| data_source_id | [string](#string) | | The id of data source. If omitted, Export resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to export from the admin data source or a specific read-only data source. |+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |-<a name="bytebase-v1-BatchGetProjectsRequest"></a>+<a name="bytebase-v1-ExportResponse"></a>-### BatchGetProjectsRequest+### ExportResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| names | [string](#string) | repeated | The names of projects to retrieve. Format: projects/{project} |+| content | [bytes](#bytes) | | The export file content. |-<a name="bytebase-v1-BatchGetProjectsResponse"></a>+<a name="bytebase-v1-MaskingReason"></a>-### BatchGetProjectsResponse+### MaskingReason| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., "SSN", "email", "phone"). |+| semantic_type_title | [string](#string) | | Human-readable semantic type title. |+| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |+| algorithm | [string](#string) | | The masking algorithm used. |+| context | [string](#string) | | Additional context (e.g., "Matched global rule: PII Protection"). |+| classification_level | [int32](#int32) | | The classification level that triggered masking. |+| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |-<a name="bytebase-v1-CreateProjectRequest"></a>+<a name="bytebase-v1-QueryHistory"></a>-### CreateProjectRequest+### QueryHistory| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| project | [Project](#bytebase-v1-Project) | | The project to create. |-| project_id | [string](#string) | | The ID to use for the project, which will become the final component of the project's resource name.--This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |+| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |+| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |+| creator | [string](#string) | | |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| statement | [string](#string) | | |+| error | [string](#string) | optional | |+| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |+| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |-<a name="bytebase-v1-DeleteProjectRequest"></a>+<a name="bytebase-v1-QueryOption"></a>-### DeleteProjectRequest+### QueryOption| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the project to delete. Format: projects/{project} |-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. When purge=true, all databases will be moved to the default project before deletion. When purge=false (soft delete/archive), the project and its databases/issues remain unchanged. |+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |+| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |-<a name="bytebase-v1-GetProjectRequest"></a>+<a name="bytebase-v1-QueryRequest"></a>-### GetProjectRequest+### QueryRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the project to retrieve. Format: projects/{project} |---+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |+| statement | [string](#string) | | The SQL statement to execute. |+| limit | [int32](#int32) | | The maximum number of rows to return. |+| data_source_id | [string](#string) | | The id of data source. If omitted, Query resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to query the admin data source or a specific read-only data source. |+| explain | [bool](#bool) | | Explain the statement. |+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |+| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |-<a name="bytebase-v1-Label"></a>-### Label-A label for categorizing and organizing issues.+++<a name="bytebase-v1-QueryResponse"></a>++### QueryResponse+| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| value | [string](#string) | | The label value/name. |-| color | [string](#string) | | The color code for the label (e.g., hex color). |-| group | [string](#string) | | The group this label belongs to. |+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |-<a name="bytebase-v1-ListProjectsRequest"></a>+<a name="bytebase-v1-QueryResult"></a>-### ListProjectsRequest+### QueryResult| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `ListProjects` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListProjects` must match the call that provided the page token. |-| show_deleted | [bool](#bool) | | Show deleted projects if specified. |-| filter | [string](#string) | | Filter the project. Check filter for SearchProjectsRequest for details. Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production"). |-| order_by | [string](#string) | | The order by of projects. Support title. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title asc" |-+| column_names | [string](#string) | repeated | Column names of the query result. |+| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |+| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |+| rows_count | [int64](#int64) | | |+| error | [string](#string) | | The error message if the query failed. |+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |+| statement | [string](#string) | | The query statement for the result. |+| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |+| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |+| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |+| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |+| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. |+| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |-<a name="bytebase-v1-ListProjectsResponse"></a>-### ListProjectsResponse+<a name="bytebase-v1-QueryResult-CommandError"></a>+### QueryResult.CommandError+Permission denied with resource information or disallowed command_type.+Either resources or command_type is available.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |-<a name="bytebase-v1-Project"></a>+<a name="bytebase-v1-QueryResult-Message"></a>-### Project+### QueryResult.Message| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the project. Format: projects/{project} |-| state | [State](#bytebase-v1-State) | | The lifecycle state of the project. |-| title | [string](#string) | | The title or name of a project. It's not unique within the workspace. |-| webhooks | [Webhook](#bytebase-v1-Webhook) | repeated | The list of webhooks configured for the project. |-| data_classification_config_id | [string](#string) | | The data classification configuration ID for the project. |-| issue_labels | [Label](#bytebase-v1-Label) | repeated | Labels available for tagging issues in this project. |-| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |-| enforce_issue_title | [bool](#bool) | | Enforce issue title to be created by user instead of generated by Bytebase. |-| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include "set role <db_owner>" statement. |-| allow_self_approval | [bool](#bool) | | Whether to allow issue creators to self-approve their own issues. |-| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for task runs. |-| ci_sampling_size | [int32](#int32) | | The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation. |-| parallel_tasks_per_rollout | [int32](#int32) | | The maximum number of parallel tasks allowed during rollout execution. |-| labels | [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the project. For example, { "environment": "production", "team": "backend" } |-| enforce_sql_review | [bool](#bool) | | Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors. |-| require_issue_approval | [bool](#bool) | | Whether to require issue approval before rollout. |-| require_plan_check_no_error | [bool](#bool) | | Whether to require plan check to have no error before rollout. |-| allow_request_role | [bool](#bool) | | |-| allow_just_in_time_access | [bool](#bool) | | Once enabled, users can request and use the just-in-time access in the SQL Editor. |+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |+| content | [string](#string) | | |-<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>+<a name="bytebase-v1-QueryResult-PostgresError"></a>-### Project.ExecutionRetryPolicy-Execution retry policy configuration.+### QueryResult.PostgresError+refer https://www.postgresql.org/docs/11/protocol-error-fields.html+for field description.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| maximum_retries | [int32](#int32) | | The maximum number of retries for lock timeout errors. |-+| severity | [string](#string) | | |+| code | [string](#string) | | |+| message | [string](#string) | | |+| detail | [string](#string) | | |+| hint | [string](#string) | | |+| position | [int32](#int32) | | |+| internal_position | [int32](#int32) | | |+| internal_query | [string](#string) | | |+| where | [string](#string) | | |+| schema_name | [string](#string) | | |+| table_name | [string](#string) | | |+| column_name | [string](#string) | | |+| data_type_name | [string](#string) | | |+| constraint_name | [string](#string) | | |+| file | [string](#string) | | |+| line | [int32](#int32) | | |+| routine | [string](#string) | | |-<a name="bytebase-v1-Project-LabelsEntry"></a>-### Project.LabelsEntry+<a name="bytebase-v1-QueryResult-SyntaxError"></a>+### QueryResult.SyntaxError+Syntax error with position information for editor highlighting| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |-<a name="bytebase-v1-RemoveWebhookRequest"></a>+<a name="bytebase-v1-QueryRow"></a>-### RemoveWebhookRequest+### QueryRow| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to remove. Identified by its url. |+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |-<a name="bytebase-v1-SearchProjectsRequest"></a>+<a name="bytebase-v1-RowValue"></a>-### SearchProjectsRequest+### RowValue| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| show_deleted | [bool](#bool) | | Show deleted projects if specified. |-| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters: - name: the project name, support "==" and ".matches()" operator. - resource_id: the project id, support "==" and ".matches()" operator. - exclude_default: if not include the default project, should be "true" or "false", support "==" operator. - state: check the State enum for the values, support "==" operator. - labels.{key}: the project label, support "==" and "in" operators.--For example: name == "project name" name.matches("project name") resource_id == "project id" resource_id.matches("project id") exclude_default == true state == "DELETED" labels.environment == "production" labels.tier == "critical" labels.environment in ["staging", "prod"] You can combine filter conditions like: name == "project name" && resource_id.matches("project id") name.matches("project name") || resource_id == "project id" labels.environment == "production" && labels.tier == "critical" |-| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `SearchProjects` must match the call that provided the page token. |-| order_by | [string](#string) | | The order by of projects. Support title. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title asc" |+| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |+| bool_value | [bool](#bool) | | |+| bytes_value | [bytes](#bytes) | | |+| double_value | [double](#double) | | |+| float_value | [float](#float) | | |+| int32_value | [int32](#int32) | | |+| int64_value | [int64](#int64) | | |+| string_value | [string](#string) | | |+| uint32_value | [uint32](#uint32) | | |+| uint64_value | [uint64](#uint64) | | |+| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |+| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |+| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |-<a name="bytebase-v1-SearchProjectsResponse"></a>+<a name="bytebase-v1-RowValue-Timestamp"></a>-### SearchProjectsResponse+### RowValue.Timestamp| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |-<a name="bytebase-v1-TestWebhookRequest"></a>+<a name="bytebase-v1-RowValue-TimestampTZ"></a>-### TestWebhookRequest+### RowValue.TimestampTZ| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as "PDT", "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |+| offset | [int32](#int32) | | The offset is in seconds east of UTC |+| accuracy | [int32](#int32) | | |-<a name="bytebase-v1-TestWebhookResponse"></a>+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>-### TestWebhookResponse+### SearchQueryHistoriesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| error | [string](#string) | | The result of the test, empty if the test is successful. |+| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |+| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter: - project: the project full name in "projects/{id}" format, support "==" operator. - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator. - instance: the instance full name in "instances/{id}" format, support "==" operator. - type: the type, should be "QUERY" or "EXPORT", support "==" operator. - statement: the SQL statement, support ".matches()" operator.+For example: project == "projects/{project}" database == "instances/{instance}/databases/{database}" instance == "instances/{instance}" type == "QUERY" type == "EXPORT" statement.matches("select") type == "QUERY" && statement.matches("select") |-<a name="bytebase-v1-UndeleteProjectRequest"></a>-### UndeleteProjectRequest+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>++### SearchQueryHistoriesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the deleted project. Format: projects/{project} |-+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |+| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method to retrieve the next page of history. |-<a name="bytebase-v1-UpdateProjectRequest"></a>+-### UpdateProjectRequest+<a name="bytebase-v1-Advice-Level"></a>+### Advice.Level+Level represents the severity level of the advice.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| project | [Project](#bytebase-v1-Project) | | The project to update.+| Name | Number | Description |+| ---- | ------ | ----------- |+| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |+| SUCCESS | 1 | Success status indicating the check passed without issues. |+| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |+| ERROR | 3 | Error status indicating critical issues that must be addressed. |-The project's `name` field is used to identify the project to update. Format: projects/{project} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the project is not found, a new project will be created. In this situation, `update_mask` is ignored. |+<a name="bytebase-v1-Advice-RuleType"></a>+### Advice.RuleType+RuleType indicates the source of the linting rule.+| Name | Number | Description |+| ---- | ------ | ----------- |+| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |+| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |+| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |-<a name="bytebase-v1-UpdateWebhookRequest"></a>-### UpdateWebhookRequest+<a name="bytebase-v1-QueryHistory-Type"></a>+### QueryHistory.Type-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to modify. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the webhook is not found, a new webhook will be created. In this situation, `update_mask` is ignored. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |+| QUERY | 1 | Query execution for data retrieval. |+| EXPORT | 2 | Data export operation to file. |+<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>+### QueryOption.MSSQLExplainFormat-<a name="bytebase-v1-Webhook"></a>+| Name | Number | Description |+| ---- | ------ | ----------- |+| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |+| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |+| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |-### Webhook+<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} |-| type | [WebhookType](#bytebase-v1-WebhookType) | | Webhook integration type. type is the type of the webhook. |-| title | [string](#string) | | title is the title of the webhook. |-| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |-| direct_message | [bool](#bool) | | 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. |-| notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - ISSUE_CREATED - ISSUE_APPROVAL_REQUESTED - ISSUE_SENT_BACK - ISSUE_APPROVED - PIPELINE_FAILED - PIPELINE_COMPLETED |+### QueryOption.RedisRunCommandsOn+| Name | Number | Description |+| ---- | ------ | ----------- |+| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |+| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |+| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |-+<a name="bytebase-v1-QueryResult-CommandError-Type"></a>+### QueryResult.CommandError.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| DDL | 1 | |+| DML | 2 | |+| NON_READ_ONLY | 3 | |-<a name="bytebase-v1-Activity-Type"></a>-### Activity.Type-Activity type enumeration.++<a name="bytebase-v1-QueryResult-Message-Level"></a>++### QueryResult.Message.Level+| Name | Number | Description || ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| ISSUE_CREATED | 10 | ISSUE_CREATED represents a new issue creation event. |-| ISSUE_APPROVAL_REQUESTED | 11 | ISSUE_APPROVAL_REQUESTED represents an approval request event. |-| ISSUE_SENT_BACK | 12 | ISSUE_SENT_BACK represents an issue being sent back by an approver. |-| PIPELINE_FAILED | 13 | PIPELINE_FAILED represents a pipeline failure event. |-| PIPELINE_COMPLETED | 14 | PIPELINE_COMPLETED represents a pipeline completion event. |-| ISSUE_APPROVED | 15 | ISSUE_APPROVED represents an issue being fully approved. |+| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |+| INFO | 1 | Informational message. |+| WARNING | 2 | Warning message indicating potential issues. |+| DEBUG | 3 | Debug message for development and troubleshooting. |+| LOG | 4 | General log message. |+| NOTICE | 5 | Notice message for important information. |+| EXCEPTION | 6 | Exception message indicating error conditions. |@@ -8622,397 +8631,385 @@ Activity type enumeration.-<a name="bytebase-v1-ProjectService"></a>+<a name="bytebase-v1-SQLService"></a>-### ProjectService-ProjectService manages projects that group databases and changes.+### SQLService+SQLService executes SQL queries and manages query operations.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|-| GetProject | [GetProjectRequest](#bytebase-v1-GetProjectRequest) | [Project](#bytebase-v1-Project) | GetProject retrieves a project by name. Users with "bb.projects.get" permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get |-| BatchGetProjects | [BatchGetProjectsRequest](#bytebase-v1-BatchGetProjectsRequest) | [BatchGetProjectsResponse](#bytebase-v1-BatchGetProjectsResponse) | BatchGetProjects retrieves multiple projects by their names. Permissions required: bb.projects.get |-| ListProjects | [ListProjectsRequest](#bytebase-v1-ListProjectsRequest) | [ListProjectsResponse](#bytebase-v1-ListProjectsResponse) | Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list |-| SearchProjects | [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest) | [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse) | Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects) |-| CreateProject | [CreateProjectRequest](#bytebase-v1-CreateProjectRequest) | [Project](#bytebase-v1-Project) | Creates a new project in the workspace. Permissions required: bb.projects.create |-| UpdateProject | [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest) | [Project](#bytebase-v1-Project) | Updates an existing project's properties. Permissions required: bb.projects.update |-| DeleteProject | [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete |-| UndeleteProject | [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest) | [Project](#bytebase-v1-Project) | Restores a soft-deleted project. Permissions required: bb.projects.undelete |-| BatchDeleteProjects | [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes multiple projects in a single operation. Permissions required: bb.projects.delete |-| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy |-| SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy |-| AddWebhook | [AddWebhookRequest](#bytebase-v1-AddWebhookRequest) | [Project](#bytebase-v1-Project) | Adds a webhook to a project for notifications. Permissions required: bb.projects.update |-| UpdateWebhook | [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest) | [Project](#bytebase-v1-Project) | Updates an existing webhook configuration. Permissions required: bb.projects.update |-| RemoveWebhook | [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest) | [Project](#bytebase-v1-Project) | Removes a webhook from a project. Permissions required: bb.projects.update |-| TestWebhook | [TestWebhookRequest](#bytebase-v1-TestWebhookRequest) | [TestWebhookResponse](#bytebase-v1-TestWebhookResponse) | Tests a webhook by sending a test notification. Permissions required: bb.projects.update |+| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |+| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller's own query histories) |+| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |+| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |-<a name="v1_release_service-proto"></a>+<a name="v1_plan_service-proto"></a><p align="right"><a href="#top">Top</a></p>-## v1/release_service.proto+## v1/plan_service.proto-<a name="bytebase-v1-CheckReleaseRequest"></a>+<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>-### CheckReleaseRequest+### CancelPlanCheckRunRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project} |-| release | [Release](#bytebase-v1-Release) | | The release to check. |-| targets | [string](#string) | repeated | The targets to dry-run the release. Can be database or databaseGroup. Format: projects/{project}/databaseGroups/{databaseGroup} instances/{instance}/databases/{database} |-| custom_rules | [string](#string) | | Custom linting rules in natural language for AI-powered validation. Each rule should be a clear statement describing the desired schema constraint. Example: "All tables must have a primary key" Example: "VARCHAR columns should specify a maximum length" |-+| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-CheckReleaseResponse"></a>-### CheckReleaseResponse+<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>+### CancelPlanCheckRunResponse-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| results | [CheckReleaseResponse.CheckResult](#bytebase-v1-CheckReleaseResponse-CheckResult) | repeated | The check results for each file and target combination. |-| affected_rows | [int64](#int64) | | The total affected rows across all checks. |-| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The aggregated risk level of the check. |+<a name="bytebase-v1-CreatePlanRequest"></a>-<a name="bytebase-v1-CheckReleaseResponse-CheckResult"></a>+### CreatePlanRequest-### CheckReleaseResponse.CheckResult-Check result for a single release file on a target database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| file | [string](#string) | | The file path that is being checked. |-| target | [string](#string) | | The target that the check is performed on. Should be a database. Format: instances/{instance}/databases/{database} |-| advices | [Advice](#bytebase-v1-Advice) | repeated | The list of advice for the file and the target. |-| affected_rows | [int64](#int64) | | The count of affected rows of the statement on the target. |-| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the statement on the target. |+| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |+| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |-<a name="bytebase-v1-CreateReleaseRequest"></a>+<a name="bytebase-v1-GetPlanCheckRunRequest"></a>-### CreateReleaseRequest+### GetPlanCheckRunRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project} |-| release | [Release](#bytebase-v1-Release) | | The release to create. |-| release_id_template | [string](#string) | | Template for release ID generation. Available variables: {date}, {time}, {timestamp}, {iteration}. Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00". Default: "release_{date}-RC{iteration}". |-| release_id_timezone | [string](#string) | | Timezone for {date} and {time} variables in the template. Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles"). Default: "UTC". |+| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |-<a name="bytebase-v1-DeleteReleaseRequest"></a>+<a name="bytebase-v1-GetPlanRequest"></a>-### DeleteReleaseRequest+### GetPlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the release to delete. Format: projects/{project}/releases/{release} |+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |-<a name="bytebase-v1-GetReleaseRequest"></a>+<a name="bytebase-v1-ListPlansRequest"></a>-### GetReleaseRequest+### ListPlansRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/releases/{release} |+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use "projects/-" to list all plans from all projects. |+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.+When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |+| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters: - creator: the plan creator full name in "users/{email or id}" format, support "==" operator. - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false". - has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false". - title: the plan title, support "==" operator for exact match and ".matches()" operator for case-insensitive substring match. - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config". - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".+For example: creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00" has_rollout == false && has_issue == true title == "My Plan" title.matches("database migration") spec_type == "change_database_config" state == "ACTIVE" |-<a name="bytebase-v1-ListReleaseCategoriesRequest"></a>-### ListReleaseCategoriesRequest++<a name="bytebase-v1-ListPlansResponse"></a>++### ListPlansResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project} |+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-ListReleaseCategoriesResponse"></a>+<a name="bytebase-v1-Plan"></a>-### ListReleaseCategoriesResponse+### Plan| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| categories | [string](#string) | repeated | The unique category values in the project. |+| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |+| state | [State](#bytebase-v1-State) | | The state of the plan. |+| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |+| title | [string](#string) | | The title of the plan. |+| description | [string](#string) | | The description of the plan. |+| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |+| creator | [string](#string) | | Format: users/[email protected] |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |+| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |+| approval_status | [Issue.ApprovalStatus](#bytebase-v1-Issue-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists. |+| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |-<a name="bytebase-v1-ListReleasesRequest"></a>+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>-### ListReleasesRequest+### Plan.ChangeDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project} |-| page_size | [int32](#int32) | | The maximum number of releases to return. The service may return fewer than this value. If unspecified, at most 10 releases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `ListReleases` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListReleases` must match the call that provided the page token. |-| show_deleted | [bool](#bool) | | Show deleted releases if specified. |-| filter | [string](#string) | | Filter is used to filter releases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters: - category: release category, support "==" operator.--For example: category == "webapp" |+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |+| 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} |+| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |-<a name="bytebase-v1-ListReleasesResponse"></a>+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>-### ListReleasesResponse+### Plan.CreateDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| releases | [Release](#bytebase-v1-Release) | repeated | The releases from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |+| database | [string](#string) | | The name of the database to create. |+| table | [string](#string) | | 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. |+| character_set | [string](#string) | | character_set is the character set of the database. |+| collation | [string](#string) | | collation is the collation of the database. |+| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>". |+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". |+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |-<a name="bytebase-v1-Release"></a>+<a name="bytebase-v1-Plan-ExportDataConfig"></a>-### Release+### Plan.ExportDataConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/releases/{release} |-| category | [string](#string) | | Category extracted from release name (e.g., "webapp", "analytics"). Set by Bytebase action during release creation. |-| files | [Release.File](#bytebase-v1-Release-File) | repeated | The SQL files included in the release. |-| vcs_source | [Release.VCSSource](#bytebase-v1-Release-VCSSource) | | The version control source of the release. |-| creator | [string](#string) | | Format: users/[email protected] |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| state | [State](#bytebase-v1-State) | | The lifecycle state of the release. |-| type | [Release.Type](#bytebase-v1-Release-Type) | | The type of schema change for all files in this release. |+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |+| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |-<a name="bytebase-v1-Release-File"></a>+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>++### Plan.PlanCheckRunStatusCountEntry-### Release.File-A SQL file in a release.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| path | [string](#string) | | The path of the file. e.g., `2.2/V0001_create_table.sql`. |-| version | [string](#string) | | The version identifier for the file. |-| sheet | [string](#string) | | For inputs, we must either use `sheet` or `statement`. For outputs, we always use `sheet`. `statement` is the preview of the sheet content.+| key | [string](#string) | | |+| value | [int32](#int32) | | |-The sheet that holds the content. Format: projects/{project}/sheets/{sheet} |-| statement | [bytes](#bytes) | | The raw SQL statement content. |-| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet content or the statement. |+<a name="bytebase-v1-Plan-RolloutStageSummary"></a>-<a name="bytebase-v1-Release-VCSSource"></a>+### Plan.RolloutStageSummary-### Release.VCSSource-Version control system source information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| vcs_type | [VCSType](#bytebase-v1-VCSType) | | The type of VCS. |-| url | [string](#string) | | The url link to the e.g., GitHub commit or pull request. |+| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |+| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |-<a name="bytebase-v1-UndeleteReleaseRequest"></a>+<a name="bytebase-v1-Plan-Spec"></a>-### UndeleteReleaseRequest+### Plan.Spec| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the deleted release. Format: projects/{project}/releases/{release} |+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |+| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |+| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |+| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |-<a name="bytebase-v1-UpdateReleaseRequest"></a>+<a name="bytebase-v1-Plan-TaskStatusCount"></a>-### UpdateReleaseRequest+### Plan.TaskStatusCount| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| release | [Release](#bytebase-v1-Release) | | The release to update. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |+| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |+| count | [int32](#int32) | | The number of tasks in the status. |-+<a name="bytebase-v1-PlanCheckRun"></a>-<a name="bytebase-v1-Release-Type"></a>+### PlanCheckRun-### Release.Type-The type of schema change.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| VERSIONED | 1 | Versioned schema migration. |-| DECLARATIVE | 2 | Declarative schema definition. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |+| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |+| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |+| error | [string](#string) | | error is set if the Status is FAILED. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |---<a name="bytebase-v1-ReleaseService"></a>-### ReleaseService-ReleaseService manages releases for coordinating deployments.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| GetRelease | [GetReleaseRequest](#bytebase-v1-GetReleaseRequest) | [Release](#bytebase-v1-Release) | Retrieves a release by name. Permissions required: bb.releases.get |-| ListReleases | [ListReleasesRequest](#bytebase-v1-ListReleasesRequest) | [ListReleasesResponse](#bytebase-v1-ListReleasesResponse) | Lists releases in a project. Permissions required: bb.releases.list |-| CreateRelease | [CreateReleaseRequest](#bytebase-v1-CreateReleaseRequest) | [Release](#bytebase-v1-Release) | Creates a new release with SQL files. Permissions required: bb.releases.create |-| UpdateRelease | [UpdateReleaseRequest](#bytebase-v1-UpdateReleaseRequest) | [Release](#bytebase-v1-Release) | Updates an existing release. Permissions required: bb.releases.update When allow_missing=true, also requires: bb.releases.create |-| DeleteRelease | [DeleteReleaseRequest](#bytebase-v1-DeleteReleaseRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a release. Permissions required: bb.releases.delete |-| UndeleteRelease | [UndeleteReleaseRequest](#bytebase-v1-UndeleteReleaseRequest) | [Release](#bytebase-v1-Release) | Restores a deleted release. Permissions required: bb.releases.undelete |-| CheckRelease | [CheckReleaseRequest](#bytebase-v1-CheckReleaseRequest) | [CheckReleaseResponse](#bytebase-v1-CheckReleaseResponse) | Validates a release by dry-running checks on target databases. Permissions required: bb.releases.check |-| ListReleaseCategories | [ListReleaseCategoriesRequest](#bytebase-v1-ListReleaseCategoriesRequest) | [ListReleaseCategoriesResponse](#bytebase-v1-ListReleaseCategoriesResponse) | Lists all unique categories in a project. Permissions required: bb.releases.list |+<a name="bytebase-v1-PlanCheckRun-Result"></a>-+### PlanCheckRun.Result-<a name="v1_review_config_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |+| title | [string](#string) | | |+| content | [string](#string) | | |+| code | [int32](#int32) | | |+| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} |+| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |+| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |+| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |-## v1/review_config_service.proto-<a name="bytebase-v1-CreateReviewConfigRequest"></a>-### CreateReviewConfigRequest++<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>++### PlanCheckRun.Result.SqlReviewReport| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| review_config | [ReviewConfig](#bytebase-v1-ReviewConfig) | | The SQL review config to create. |+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |+| end_position | [Position](#bytebase-v1-Position) | | |-<a name="bytebase-v1-DeleteReviewConfigRequest"></a>+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>-### DeleteReviewConfigRequest+### PlanCheckRun.Result.SqlSummaryReport| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the SQL review config to delete. Format: reviewConfigs/{reviewConfig} |+| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |+| affected_rows | [int64](#int64) | | |-<a name="bytebase-v1-GetReviewConfigRequest"></a>+<a name="bytebase-v1-RunPlanChecksRequest"></a>-### GetReviewConfigRequest+### RunPlanChecksRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the SQL review config to retrieve. Format: reviewConfigs/{reviewConfig} |+| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |+| spec_id | [string](#string) | optional | The UUID of the specific spec to run plan checks for. This should match the spec.id field in Plan.Spec. If not set, all specs in the plan will be used. |-<a name="bytebase-v1-ListReviewConfigsRequest"></a>+<a name="bytebase-v1-RunPlanChecksResponse"></a>-### ListReviewConfigsRequest+### RunPlanChecksResponse@@ -9020,1492 +9017,1537 @@ ReleaseService manages releases for coordinating deployments.-<a name="bytebase-v1-ListReviewConfigsResponse"></a>+<a name="bytebase-v1-UpdatePlanRequest"></a>-### ListReviewConfigsResponse+### UpdatePlanRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| review_configs | [ReviewConfig](#bytebase-v1-ReviewConfig) | repeated | The SQL review configs from the specified request. |+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.++The plan's `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |+-<a name="bytebase-v1-ReviewConfig"></a>-### ReviewConfig+<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>++### PlanCheckRun.Result.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| STATEMENT_ADVISE | 1 | |+| STATEMENT_SUMMARY_REPORT | 2 | |+| GHOST_SYNC | 3 | |++++<a name="bytebase-v1-PlanCheckRun-Status"></a>++### PlanCheckRun.Status+++| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| RUNNING | 1 | |+| DONE | 2 | |+| FAILED | 3 | |+| CANCELED | 4 | |++++++++<a name="bytebase-v1-PlanService"></a>++### PlanService+PlanService manages deployment plans for database changes.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |+| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |+| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |+| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |+| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |+| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |++++++<a name="v1_project_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## v1/project_service.proto++++<a name="bytebase-v1-Activity"></a>++### Activity+Activity types for webhook notifications.+++++++<a name="bytebase-v1-AddWebhookRequest"></a>++### AddWebhookRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the SQL review config. Format: reviewConfigs/{reviewConfig} |-| title | [string](#string) | | The title of the review configuration. |-| enabled | [bool](#bool) | | Whether the review configuration is enabled. |-| rules | [SQLReviewRule](#bytebase-v1-SQLReviewRule) | repeated | The SQL review rules to enforce. |-| resources | [string](#string) | repeated | Resources using the config. Format: {resource}/{resource id}, e.g., environments/test. |+| project | [string](#string) | | The name of the project to add the webhook to. Format: projects/{project} |+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to add. |-<a name="bytebase-v1-SQLReviewRule"></a>+<a name="bytebase-v1-BatchDeleteProjectsRequest"></a>++### BatchDeleteProjectsRequest-### SQLReviewRule-SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [SQLReviewRule.Type](#bytebase-v1-SQLReviewRule-Type) | | The type of SQL review rule. |-| level | [SQLReviewRule.Level](#bytebase-v1-SQLReviewRule-Level) | | The severity level of the rule. |-| naming_payload | [SQLReviewRule.NamingRulePayload](#bytebase-v1-SQLReviewRule-NamingRulePayload) | | |-| number_payload | [SQLReviewRule.NumberRulePayload](#bytebase-v1-SQLReviewRule-NumberRulePayload) | | |-| string_array_payload | [SQLReviewRule.StringArrayRulePayload](#bytebase-v1-SQLReviewRule-StringArrayRulePayload) | | |-| comment_convention_payload | [SQLReviewRule.CommentConventionRulePayload](#bytebase-v1-SQLReviewRule-CommentConventionRulePayload) | | |-| string_payload | [SQLReviewRule.StringRulePayload](#bytebase-v1-SQLReviewRule-StringRulePayload) | | |-| naming_case_payload | [SQLReviewRule.NamingCaseRulePayload](#bytebase-v1-SQLReviewRule-NamingCaseRulePayload) | | |-| engine | [Engine](#bytebase-v1-Engine) | | The database engine this rule applies to. |+| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted projects and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. All projects must already be soft-deleted for this to work. When purge=true, all databases will be moved to the default project before deletion. When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged. |-<a name="bytebase-v1-SQLReviewRule-CommentConventionRulePayload"></a>+<a name="bytebase-v1-BatchGetProjectsRequest"></a>-### SQLReviewRule.CommentConventionRulePayload+### BatchGetProjectsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| required | [bool](#bool) | | |-| max_length | [int32](#int32) | | |+| names | [string](#string) | repeated | The names of projects to retrieve. Format: projects/{project} |-<a name="bytebase-v1-SQLReviewRule-NamingCaseRulePayload"></a>+<a name="bytebase-v1-BatchGetProjectsResponse"></a>-### SQLReviewRule.NamingCaseRulePayload+### BatchGetProjectsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| upper | [bool](#bool) | | |+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |-<a name="bytebase-v1-SQLReviewRule-NamingRulePayload"></a>+<a name="bytebase-v1-CreateProjectRequest"></a>++### CreateProjectRequest-### SQLReviewRule.NamingRulePayload-Payload message types for SQL review rules| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| max_length | [int32](#int32) | | |-| format | [string](#string) | | |+| project | [Project](#bytebase-v1-Project) | | The project to create. |+| project_id | [string](#string) | | The ID to use for the project, which will become the final component of the project's resource name.++This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-<a name="bytebase-v1-SQLReviewRule-NumberRulePayload"></a>+<a name="bytebase-v1-DeleteProjectRequest"></a>-### SQLReviewRule.NumberRulePayload+### DeleteProjectRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| number | [int32](#int32) | | |+| name | [string](#string) | | The name of the project to delete. Format: projects/{project} |+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. When purge=true, all databases will be moved to the default project before deletion. When purge=false (soft delete/archive), the project and its databases/issues remain unchanged. |-<a name="bytebase-v1-SQLReviewRule-StringArrayRulePayload"></a>+<a name="bytebase-v1-GetProjectRequest"></a>-### SQLReviewRule.StringArrayRulePayload+### GetProjectRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| list | [string](#string) | repeated | |-+| name | [string](#string) | | The name of the project to retrieve. Format: projects/{project} |-<a name="bytebase-v1-SQLReviewRule-StringRulePayload"></a>-### SQLReviewRule.StringRulePayload+<a name="bytebase-v1-Label"></a>+### Label+A label for categorizing and organizing issues.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| value | [string](#string) | | |+| value | [string](#string) | | The label value/name. |+| color | [string](#string) | | The color code for the label (e.g., hex color). |+| group | [string](#string) | | The group this label belongs to. |-<a name="bytebase-v1-UpdateReviewConfigRequest"></a>+<a name="bytebase-v1-ListProjectsRequest"></a>-### UpdateReviewConfigRequest+### ListProjectsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| review_config | [ReviewConfig](#bytebase-v1-ReviewConfig) | | The SQL review config to update.+| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListProjects` call. Provide this to retrieve the subsequent page.-The name field is used to identify the SQL review config to update. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the config is not found, a new config will be created. In this situation, `update_mask` is ignored. |+When paginating, all other parameters provided to `ListProjects` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Show deleted projects if specified. |+| filter | [string](#string) | | Filter the project. Check filter for SearchProjectsRequest for details. Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production"). |+| order_by | [string](#string) | | The order by of projects. Support title. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title asc" |-+<a name="bytebase-v1-ListProjectsResponse"></a>-<a name="bytebase-v1-SQLReviewRule-Level"></a>+### ListProjectsResponse-### SQLReviewRule.Level-The severity level for SQL review rules.-| Name | Number | Description |-| ---- | ------ | ----------- |-| LEVEL_UNSPECIFIED | 0 | Unspecified level. |-| ERROR | 1 | Rule violation is an error. |-| WARNING | 2 | Rule violation is a warning. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-SQLReviewRule-Type"></a>-### SQLReviewRule.Type-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| ENGINE_MYSQL_USE_INNODB | 1 | |-| NAMING_FULLY_QUALIFIED | 2 | |-| NAMING_TABLE | 3 | |-| NAMING_COLUMN | 4 | |-| NAMING_INDEX_PK | 5 | |-| NAMING_INDEX_UK | 6 | |-| NAMING_INDEX_FK | 7 | |-| NAMING_INDEX_IDX | 8 | |-| NAMING_COLUMN_AUTO_INCREMENT | 9 | |-| NAMING_TABLE_NO_KEYWORD | 10 | |-| NAMING_IDENTIFIER_NO_KEYWORD | 11 | |-| NAMING_IDENTIFIER_CASE | 12 | |-| STATEMENT_SELECT_NO_SELECT_ALL | 13 | |-| STATEMENT_WHERE_REQUIRE_SELECT | 14 | |-| STATEMENT_WHERE_REQUIRE_UPDATE_DELETE | 15 | |-| STATEMENT_WHERE_NO_LEADING_WILDCARD_LIKE | 16 | |-| STATEMENT_DISALLOW_ON_DEL_CASCADE | 17 | |-| STATEMENT_DISALLOW_RM_TBL_CASCADE | 18 | |-| STATEMENT_DISALLOW_COMMIT | 19 | |-| STATEMENT_DISALLOW_LIMIT | 20 | |-| STATEMENT_DISALLOW_ORDER_BY | 21 | |-| STATEMENT_MERGE_ALTER_TABLE | 22 | |-| STATEMENT_INSERT_ROW_LIMIT | 23 | |-| STATEMENT_INSERT_MUST_SPECIFY_COLUMN | 24 | |-| STATEMENT_INSERT_DISALLOW_ORDER_BY_RAND | 25 | |-| STATEMENT_AFFECTED_ROW_LIMIT | 26 | |-| STATEMENT_DML_DRY_RUN | 27 | |-| STATEMENT_DISALLOW_ADD_COLUMN_WITH_DEFAULT | 28 | |-| STATEMENT_ADD_CHECK_NOT_VALID | 29 | |-| STATEMENT_ADD_FOREIGN_KEY_NOT_VALID | 30 | |-| STATEMENT_DISALLOW_ADD_NOT_NULL | 31 | |-| STATEMENT_SELECT_FULL_TABLE_SCAN | 32 | |-| STATEMENT_CREATE_SPECIFY_SCHEMA | 33 | |-| STATEMENT_CHECK_SET_ROLE_VARIABLE | 34 | |-| STATEMENT_DISALLOW_USING_FILESORT | 35 | |-| STATEMENT_DISALLOW_USING_TEMPORARY | 36 | |-| STATEMENT_WHERE_NO_EQUAL_NULL | 37 | |-| STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS | 38 | |-| STATEMENT_QUERY_MINIMUM_PLAN_LEVEL | 39 | |-| STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT | 40 | |-| STATEMENT_MAXIMUM_LIMIT_VALUE | 41 | |-| STATEMENT_MAXIMUM_JOIN_TABLE_COUNT | 42 | |-| STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION | 43 | |-| STATEMENT_JOIN_STRICT_COLUMN_ATTRS | 44 | |-| STATEMENT_NON_TRANSACTIONAL | 45 | |-| STATEMENT_ADD_COLUMN_WITHOUT_POSITION | 46 | |-| STATEMENT_DISALLOW_OFFLINE_DDL | 47 | |-| STATEMENT_DISALLOW_CROSS_DB_QUERIES | 48 | |-| STATEMENT_MAX_EXECUTION_TIME | 49 | |-| STATEMENT_REQUIRE_ALGORITHM_OPTION | 50 | |-| STATEMENT_REQUIRE_LOCK_OPTION | 51 | |-| STATEMENT_OBJECT_OWNER_CHECK | 52 | |-| TABLE_REQUIRE_PK | 53 | |-| TABLE_NO_FOREIGN_KEY | 54 | |-| TABLE_DROP_NAMING_CONVENTION | 55 | |-| TABLE_COMMENT | 56 | |-| TABLE_DISALLOW_PARTITION | 57 | |-| TABLE_DISALLOW_TRIGGER | 58 | |-| TABLE_NO_DUPLICATE_INDEX | 59 | |-| TABLE_TEXT_FIELDS_TOTAL_LENGTH | 60 | |-| TABLE_DISALLOW_SET_CHARSET | 61 | |-| TABLE_DISALLOW_DDL | 62 | |-| TABLE_DISALLOW_DML | 63 | |-| TABLE_LIMIT_SIZE | 64 | |-| TABLE_REQUIRE_CHARSET | 65 | |-| TABLE_REQUIRE_COLLATION | 66 | |-| COLUMN_REQUIRED | 67 | |-| COLUMN_NO_NULL | 68 | |-| COLUMN_DISALLOW_CHANGE_TYPE | 69 | |-| COLUMN_SET_DEFAULT_FOR_NOT_NULL | 70 | |-| COLUMN_DISALLOW_CHANGE | 71 | |-| COLUMN_DISALLOW_CHANGING_ORDER | 72 | |-| COLUMN_DISALLOW_DROP | 73 | |-| COLUMN_DISALLOW_DROP_IN_INDEX | 74 | |-| COLUMN_COMMENT | 75 | |-| COLUMN_AUTO_INCREMENT_MUST_INTEGER | 76 | |-| COLUMN_TYPE_DISALLOW_LIST | 77 | |-| COLUMN_DISALLOW_SET_CHARSET | 78 | |-| COLUMN_MAXIMUM_CHARACTER_LENGTH | 79 | |-| COLUMN_MAXIMUM_VARCHAR_LENGTH | 80 | |-| COLUMN_AUTO_INCREMENT_INITIAL_VALUE | 81 | |-| COLUMN_AUTO_INCREMENT_MUST_UNSIGNED | 82 | |-| COLUMN_CURRENT_TIME_COUNT_LIMIT | 83 | |-| COLUMN_REQUIRE_DEFAULT | 84 | |-| COLUMN_DEFAULT_DISALLOW_VOLATILE | 85 | |-| COLUMN_ADD_NOT_NULL_REQUIRE_DEFAULT | 86 | |-| COLUMN_REQUIRE_CHARSET | 87 | |-| COLUMN_REQUIRE_COLLATION | 88 | |-| SCHEMA_BACKWARD_COMPATIBILITY | 89 | |-| DATABASE_DROP_EMPTY_DATABASE | 90 | |-| INDEX_NO_DUPLICATE_COLUMN | 91 | |-| INDEX_KEY_NUMBER_LIMIT | 92 | |-| INDEX_PK_TYPE_LIMIT | 93 | |-| INDEX_TYPE_NO_BLOB | 94 | |-| INDEX_TOTAL_NUMBER_LIMIT | 95 | |-| INDEX_PRIMARY_KEY_TYPE_ALLOWLIST | 96 | |-| INDEX_CREATE_CONCURRENTLY | 97 | |-| INDEX_TYPE_ALLOW_LIST | 98 | |-| INDEX_NOT_REDUNDANT | 99 | |-| SYSTEM_CHARSET_ALLOWLIST | 100 | |-| SYSTEM_COLLATION_ALLOWLIST | 101 | |-| SYSTEM_COMMENT_LENGTH | 102 | |-| SYSTEM_PROCEDURE_DISALLOW_CREATE | 103 | |-| SYSTEM_EVENT_DISALLOW_CREATE | 104 | |-| SYSTEM_VIEW_DISALLOW_CREATE | 105 | |-| SYSTEM_FUNCTION_DISALLOW_CREATE | 106 | |-| SYSTEM_FUNCTION_DISALLOWED_LIST | 107 | |-| ADVICE_ONLINE_MIGRATION | 108 | |-| BUILTIN_PRIOR_BACKUP_CHECK | 109 | |-| BUILTIN_WALK_THROUGH_CHECK | 110 | |--------<a name="bytebase-v1-ReviewConfigService"></a>-### ReviewConfigService-ReviewConfigService manages approval flow configurations.+<a name="bytebase-v1-Project"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| CreateReviewConfig | [CreateReviewConfigRequest](#bytebase-v1-CreateReviewConfigRequest) | [ReviewConfig](#bytebase-v1-ReviewConfig) | Creates a new SQL review configuration. Permissions required: bb.reviewConfigs.create |-| ListReviewConfigs | [ListReviewConfigsRequest](#bytebase-v1-ListReviewConfigsRequest) | [ListReviewConfigsResponse](#bytebase-v1-ListReviewConfigsResponse) | Lists all SQL review configurations. Permissions required: bb.reviewConfigs.list |-| GetReviewConfig | [GetReviewConfigRequest](#bytebase-v1-GetReviewConfigRequest) | [ReviewConfig](#bytebase-v1-ReviewConfig) | Retrieves a SQL review configuration by name. Permissions required: bb.reviewConfigs.get |-| UpdateReviewConfig | [UpdateReviewConfigRequest](#bytebase-v1-UpdateReviewConfigRequest) | [ReviewConfig](#bytebase-v1-ReviewConfig) | Updates a SQL review configuration. Permissions required: bb.reviewConfigs.update When allow_missing=true, also requires: bb.reviewConfigs.create |-| DeleteReviewConfig | [DeleteReviewConfigRequest](#bytebase-v1-DeleteReviewConfigRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a SQL review configuration. Permissions required: bb.reviewConfigs.delete |+### Project-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the project. Format: projects/{project} |+| state | [State](#bytebase-v1-State) | | The lifecycle state of the project. |+| title | [string](#string) | | The title or name of a project. It's not unique within the workspace. |+| webhooks | [Webhook](#bytebase-v1-Webhook) | repeated | The list of webhooks configured for the project. |+| data_classification_config_id | [string](#string) | | The data classification configuration ID for the project. |+| issue_labels | [Label](#bytebase-v1-Label) | repeated | Labels available for tagging issues in this project. |+| force_issue_labels | [bool](#bool) | | Force issue labels to be used when creating an issue. |+| enforce_issue_title | [bool](#bool) | | Enforce issue title to be created by user instead of generated by Bytebase. |+| postgres_database_tenant_mode | [bool](#bool) | | Whether to enable database tenant mode for PostgreSQL. If enabled, issues will include "set role <db_owner>" statement. |+| allow_self_approval | [bool](#bool) | | Whether to allow issue creators to self-approve their own issues. |+| execution_retry_policy | [Project.ExecutionRetryPolicy](#bytebase-v1-Project-ExecutionRetryPolicy) | | Execution retry policy for task runs. |+| ci_sampling_size | [int32](#int32) | | The maximum number of database rows to sample during CI data validation. Without specification, sampling is disabled, resulting in full validation. |+| parallel_tasks_per_rollout | [int32](#int32) | | The maximum number of parallel tasks allowed during rollout execution. |+| labels | [Project.LabelsEntry](#bytebase-v1-Project-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the project. For example, { "environment": "production", "team": "backend" } |+| enforce_sql_review | [bool](#bool) | | Whether to enforce SQL review checks to pass before issue creation. If enabled, issues cannot be created when SQL review finds errors. |+| require_issue_approval | [bool](#bool) | | Whether to require issue approval before rollout. |+| require_plan_check_no_error | [bool](#bool) | | Whether to require plan check to have no error before rollout. |+| allow_request_role | [bool](#bool) | | |+| allow_just_in_time_access | [bool](#bool) | | Once enabled, users can request and use the just-in-time access in the SQL Editor. |-<a name="v1_revision_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/revision_service.proto-<a name="bytebase-v1-BatchCreateRevisionsRequest"></a>-### BatchCreateRevisionsRequest+<a name="bytebase-v1-Project-ExecutionRetryPolicy"></a>+### Project.ExecutionRetryPolicy+Execution retry policy configuration.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource shared by all revisions being created. Format: instances/{instance}/databases/{database} |-| requests | [CreateRevisionRequest](#bytebase-v1-CreateRevisionRequest) | repeated | The request message specifying the revisions to create. A maximum of 100 revisions can be created in a batch. |+| maximum_retries | [int32](#int32) | | The maximum number of retries for lock timeout errors. |-<a name="bytebase-v1-BatchCreateRevisionsResponse"></a>+<a name="bytebase-v1-Project-LabelsEntry"></a>-### BatchCreateRevisionsResponse+### Project.LabelsEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| revisions | [Revision](#bytebase-v1-Revision) | repeated | The created revisions. |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-v1-CreateRevisionRequest"></a>+<a name="bytebase-v1-RemoveWebhookRequest"></a>-### CreateRevisionRequest+### RemoveWebhookRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: instances/{instance}/databases/{database} |-| revision | [Revision](#bytebase-v1-Revision) | | The revision to create. |+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to remove. Identified by its url. |-<a name="bytebase-v1-DeleteRevisionRequest"></a>+<a name="bytebase-v1-SearchProjectsRequest"></a>-### DeleteRevisionRequest+### SearchProjectsRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the revision to delete. Format: instances/{instance}/databases/{database}/revisions/{revision} |+| show_deleted | [bool](#bool) | | Show deleted projects if specified. |+| filter | [string](#string) | | Filter the project. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+Supported filters: - name: the project name, support "==" and ".matches()" operator. - resource_id: the project id, support "==" and ".matches()" operator. - exclude_default: if not include the default project, should be "true" or "false", support "==" operator. - state: check the State enum for the values, support "==" operator. - labels.{key}: the project label, support "==" and "in" operators.+For example: name == "project name" name.matches("project name") resource_id == "project id" resource_id.matches("project id") exclude_default == true state == "DELETED" labels.environment == "production" labels.tier == "critical" labels.environment in ["staging", "prod"] You can combine filter conditions like: name == "project name" && resource_id.matches("project id") name.matches("project name") || resource_id == "project id" labels.environment == "production" && labels.tier == "critical" |+| page_size | [int32](#int32) | | The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `SearchProjects` call. Provide this to retrieve the subsequent page.+When paginating, all other parameters provided to `SearchProjects` must match the call that provided the page token. |+| order_by | [string](#string) | | The order by of projects. Support title. The default sorting order is ascending. For example: - order_by = "title" - order_by = "title desc" - order_by = "title asc" |-<a name="bytebase-v1-GetRevisionRequest"></a>-### GetRevisionRequest+++<a name="bytebase-v1-SearchProjectsResponse"></a>++### SearchProjectsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the revision. Format: instances/{instance}/databases/{database}/revisions/{revision} |+| projects | [Project](#bytebase-v1-Project) | repeated | The projects from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-ListRevisionsRequest"></a>+<a name="bytebase-v1-TestWebhookRequest"></a>-### ListRevisionsRequest+### TestWebhookRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent of the revisions. Format: instances/{instance}/databases/{database} |-| page_size | [int32](#int32) | | The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 10 revisions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `ListRevisions` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListRevisions` must match the call that provided the page token. |-| show_deleted | [bool](#bool) | | Whether to include deleted revisions in the results. |+| project | [string](#string) | | The name of the project which owns the webhook to test. Format: projects/{project} |+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to test. Identified by its url. |-<a name="bytebase-v1-ListRevisionsResponse"></a>+<a name="bytebase-v1-TestWebhookResponse"></a>-### ListRevisionsResponse+### TestWebhookResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| revisions | [Revision](#bytebase-v1-Revision) | repeated | The revisions from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+| error | [string](#string) | | The result of the test, empty if the test is successful. |-<a name="bytebase-v1-Revision"></a>+<a name="bytebase-v1-UndeleteProjectRequest"></a>-### Revision+### UndeleteProjectRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/revisions/{revision} |-| release | [string](#string) | | Format: projects/{project}/releases/{release} Can be empty. |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| deleter | [string](#string) | | Format: users/[email protected] Can be empty. |-| delete_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Can be empty. |-| file | [string](#string) | | Format: projects/{project}/releases/{release}/files/{id} Can be empty. |-| version | [string](#string) | | The schema version string for this revision. |-| 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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-| type | [Revision.Type](#bytebase-v1-Revision-Type) | | The type of the revision. |+| name | [string](#string) | | The name of the deleted project. Format: projects/{project} |-+<a name="bytebase-v1-UpdateProjectRequest"></a>-<a name="bytebase-v1-Revision-Type"></a>+### UpdateProjectRequest-### Revision.Type-The type of schema revision.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| VERSIONED | 1 | Versioned schema migration. |-| DECLARATIVE | 2 | Declarative schema definition. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| project | [Project](#bytebase-v1-Project) | | The project to update.-+The project's `name` field is used to identify the project to update. Format: projects/{project} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the project is not found, a new project will be created. In this situation, `update_mask` is ignored. |--<a name="bytebase-v1-RevisionService"></a>-### RevisionService-RevisionService manages schema revision history.-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| ListRevisions | [ListRevisionsRequest](#bytebase-v1-ListRevisionsRequest) | [ListRevisionsResponse](#bytebase-v1-ListRevisionsResponse) | Lists schema revisions for a database. Permissions required: bb.revisions.list |-| GetRevision | [GetRevisionRequest](#bytebase-v1-GetRevisionRequest) | [Revision](#bytebase-v1-Revision) | Retrieves a schema revision by name. Permissions required: bb.revisions.get |-| BatchCreateRevisions | [BatchCreateRevisionsRequest](#bytebase-v1-BatchCreateRevisionsRequest) | [BatchCreateRevisionsResponse](#bytebase-v1-BatchCreateRevisionsResponse) | Creates multiple schema revisions in a single operation. Permissions required: bb.revisions.create |-| DeleteRevision | [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a schema revision. Permissions required: bb.revisions.delete |-+<a name="bytebase-v1-UpdateWebhookRequest"></a>+### UpdateWebhookRequest-<a name="v1_role_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/role_service.proto+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| webhook | [Webhook](#bytebase-v1-Webhook) | | The webhook to modify. |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the webhook is not found, a new webhook will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-CreateRoleRequest"></a>-### CreateRoleRequest+<a name="bytebase-v1-Webhook"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role | [Role](#bytebase-v1-Role) | | The role to create. |-| role_id | [string](#string) | | The ID to use for the role, which will become the final component of the role's resource name.+### Webhook-This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]/. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | name is the name of the webhook, generated by the server. format: projects/{project}/webhooks/{webhook} |+| type | [WebhookType](#bytebase-v1-WebhookType) | | Webhook integration type. type is the type of the webhook. |+| title | [string](#string) | | title is the title of the webhook. |+| url | [string](#string) | | url is the url of the webhook, should be unique within the project. |+| direct_message | [bool](#bool) | | 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. |+| notification_types | [Activity.Type](#bytebase-v1-Activity-Type) | repeated | notification_types is the list of activities types that the webhook is interested in. Bytebase will only send notifications to the webhook if the activity type is in the list. It should not be empty, and should be a subset of the following: - ISSUE_CREATED - ISSUE_APPROVAL_REQUESTED - ISSUE_SENT_BACK - ISSUE_APPROVED - PIPELINE_FAILED - PIPELINE_COMPLETED |-<a name="bytebase-v1-DeleteRoleRequest"></a>-### DeleteRoleRequest++<a name="bytebase-v1-Activity-Type"></a>-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the role to delete. Format: roles/{role} |+### Activity.Type+Activity type enumeration.+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| ISSUE_CREATED | 10 | ISSUE_CREATED represents a new issue creation event. |+| ISSUE_APPROVAL_REQUESTED | 11 | ISSUE_APPROVAL_REQUESTED represents an approval request event. |+| ISSUE_SENT_BACK | 12 | ISSUE_SENT_BACK represents an issue being sent back by an approver. |+| PIPELINE_FAILED | 13 | PIPELINE_FAILED represents a pipeline failure event. |+| PIPELINE_COMPLETED | 14 | PIPELINE_COMPLETED represents a pipeline completion event. |+| ISSUE_APPROVED | 15 | ISSUE_APPROVED represents an issue being fully approved. |++-<a name="bytebase-v1-GetRoleRequest"></a>+<a name="bytebase-v1-ProjectService"></a>-### GetRoleRequest+### ProjectService+ProjectService manages projects that group databases and changes.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetProject | [GetProjectRequest](#bytebase-v1-GetProjectRequest) | [Project](#bytebase-v1-Project) | GetProject retrieves a project by name. Users with "bb.projects.get" permission on the workspace or the project owner can access this method. Permissions required: bb.projects.get |+| BatchGetProjects | [BatchGetProjectsRequest](#bytebase-v1-BatchGetProjectsRequest) | [BatchGetProjectsResponse](#bytebase-v1-BatchGetProjectsResponse) | BatchGetProjects retrieves multiple projects by their names. Permissions required: bb.projects.get |+| ListProjects | [ListProjectsRequest](#bytebase-v1-ListProjectsRequest) | [ListProjectsResponse](#bytebase-v1-ListProjectsResponse) | Lists all projects in the workspace with optional filtering. Permissions required: bb.projects.list |+| SearchProjects | [SearchProjectsRequest](#bytebase-v1-SearchProjectsRequest) | [SearchProjectsResponse](#bytebase-v1-SearchProjectsResponse) | Searches for projects with advanced filtering capabilities. Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects) |+| CreateProject | [CreateProjectRequest](#bytebase-v1-CreateProjectRequest) | [Project](#bytebase-v1-Project) | Creates a new project in the workspace. Permissions required: bb.projects.create |+| UpdateProject | [UpdateProjectRequest](#bytebase-v1-UpdateProjectRequest) | [Project](#bytebase-v1-Project) | Updates an existing project's properties. Permissions required: bb.projects.update |+| DeleteProject | [DeleteProjectRequest](#bytebase-v1-DeleteProjectRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes (soft-delete or purge) a project. Permissions required: bb.projects.delete |+| UndeleteProject | [UndeleteProjectRequest](#bytebase-v1-UndeleteProjectRequest) | [Project](#bytebase-v1-Project) | Restores a soft-deleted project. Permissions required: bb.projects.undelete |+| BatchDeleteProjects | [BatchDeleteProjectsRequest](#bytebase-v1-BatchDeleteProjectsRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes multiple projects in a single operation. Permissions required: bb.projects.delete |+| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves the IAM policy for a project. Permissions required: bb.projects.getIamPolicy |+| SetIamPolicy | [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Sets the IAM policy for a project. Permissions required: bb.projects.setIamPolicy |+| AddWebhook | [AddWebhookRequest](#bytebase-v1-AddWebhookRequest) | [Project](#bytebase-v1-Project) | Adds a webhook to a project for notifications. Permissions required: bb.projects.update |+| UpdateWebhook | [UpdateWebhookRequest](#bytebase-v1-UpdateWebhookRequest) | [Project](#bytebase-v1-Project) | Updates an existing webhook configuration. Permissions required: bb.projects.update |+| RemoveWebhook | [RemoveWebhookRequest](#bytebase-v1-RemoveWebhookRequest) | [Project](#bytebase-v1-Project) | Removes a webhook from a project. Permissions required: bb.projects.update |+| TestWebhook | [TestWebhookRequest](#bytebase-v1-TestWebhookRequest) | [TestWebhookResponse](#bytebase-v1-TestWebhookResponse) | Tests a webhook by sending a test notification. Permissions required: bb.projects.update |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the role to retrieve. Format: roles/{role} |+<a name="v1_release_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/release_service.proto-<a name="bytebase-v1-ListRolesRequest"></a>+<a name="bytebase-v1-CheckReleaseRequest"></a>-### ListRolesRequest+### CheckReleaseRequest+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | Format: projects/{project} |+| release | [Release](#bytebase-v1-Release) | | The release to check. |+| targets | [string](#string) | repeated | The targets to dry-run the release. Can be database or databaseGroup. Format: projects/{project}/databaseGroups/{databaseGroup} instances/{instance}/databases/{database} |+| custom_rules | [string](#string) | | Custom linting rules in natural language for AI-powered validation. Each rule should be a clear statement describing the desired schema constraint. Example: "All tables must have a primary key" Example: "VARCHAR columns should specify a maximum length" |-<a name="bytebase-v1-ListRolesResponse"></a>-### ListRolesResponse++<a name="bytebase-v1-CheckReleaseResponse"></a>++### CheckReleaseResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| roles | [Role](#bytebase-v1-Role) | repeated | The roles from the specified request. |+| results | [CheckReleaseResponse.CheckResult](#bytebase-v1-CheckReleaseResponse-CheckResult) | repeated | The check results for each file and target combination. |+| affected_rows | [int64](#int64) | | The total affected rows across all checks. |+| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The aggregated risk level of the check. |-<a name="bytebase-v1-Role"></a>+<a name="bytebase-v1-CheckReleaseResponse-CheckResult"></a>-### Role-Role defines a set of permissions that can be assigned to users.+### CheckReleaseResponse.CheckResult+Check result for a single release file on a target database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Resource name. Format: roles/{role} |-| title | [string](#string) | | Human-readable title. |-| description | [string](#string) | | Optional description of the role. |-| permissions | [string](#string) | repeated | List of permission identifiers granted by this role. |-| type | [Role.Type](#bytebase-v1-Role-Type) | | Role type indicating if it's built-in or custom. |+| file | [string](#string) | | The file path that is being checked. |+| target | [string](#string) | | The target that the check is performed on. Should be a database. Format: instances/{instance}/databases/{database} |+| advices | [Advice](#bytebase-v1-Advice) | repeated | The list of advice for the file and the target. |+| affected_rows | [int64](#int64) | | The count of affected rows of the statement on the target. |+| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the statement on the target. |-<a name="bytebase-v1-UpdateRoleRequest"></a>+<a name="bytebase-v1-CreateReleaseRequest"></a>-### UpdateRoleRequest+### CreateReleaseRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| role | [Role](#bytebase-v1-Role) | | The role to update. |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |-| allow_missing | [bool](#bool) | | If set to true, and the role is not found, a new role will be created. In this situation, `update_mask` is ignored. |+| parent | [string](#string) | | Format: projects/{project} |+| release | [Release](#bytebase-v1-Release) | | The release to create. |+| release_id_template | [string](#string) | | Template for release ID generation. Available variables: {date}, {time}, {timestamp}, {iteration}. Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00". Default: "release_{date}-RC{iteration}". |+| release_id_timezone | [string](#string) | | Timezone for {date} and {time} variables in the template. Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles"). Default: "UTC". |-+<a name="bytebase-v1-DeleteReleaseRequest"></a>-<a name="bytebase-v1-Role-Type"></a>+### DeleteReleaseRequest-### Role.Type-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| BUILT_IN | 1 | System-defined role that cannot be modified. |-| CUSTOM | 2 | User-defined role that can be modified. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the release to delete. Format: projects/{project}/releases/{release} |---<a name="bytebase-v1-RoleService"></a>-### RoleService-RoleService manages workspace roles and permissions.+<a name="bytebase-v1-GetReleaseRequest"></a>-| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| ListRoles | [ListRolesRequest](#bytebase-v1-ListRolesRequest) | [ListRolesResponse](#bytebase-v1-ListRolesResponse) | Lists roles in the workspace. Permissions required: bb.roles.list |-| GetRole | [GetRoleRequest](#bytebase-v1-GetRoleRequest) | [Role](#bytebase-v1-Role) | Retrieves a role by name. Permissions required: bb.roles.get |-| CreateRole | [CreateRoleRequest](#bytebase-v1-CreateRoleRequest) | [Role](#bytebase-v1-Role) | Creates a new custom role. Permissions required: bb.roles.create |-| UpdateRole | [UpdateRoleRequest](#bytebase-v1-UpdateRoleRequest) | [Role](#bytebase-v1-Role) | Updates a role's properties. Permissions required: bb.roles.update When allow_missing=true, also requires: bb.roles.create |-| DeleteRole | [DeleteRoleRequest](#bytebase-v1-DeleteRoleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a custom role. Permissions required: bb.roles.delete |+### GetReleaseRequest-+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Format: projects/{project}/releases/{release} |-<a name="v1_rollout_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## v1/rollout_service.proto-<a name="bytebase-v1-BatchCancelTaskRunsRequest"></a>-### BatchCancelTaskRunsRequest+<a name="bytebase-v1-ListReleaseCategoriesRequest"></a>++### ListReleaseCategoriesRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The task name for the taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. |-| task_runs | [string](#string) | repeated | The taskRuns to cancel. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |---+| parent | [string](#string) | | Format: projects/{project} |-<a name="bytebase-v1-BatchCancelTaskRunsResponse"></a>-### BatchCancelTaskRunsResponse+<a name="bytebase-v1-ListReleaseCategoriesResponse"></a>+### ListReleaseCategoriesResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| categories | [string](#string) | repeated | The unique category values in the project. |-<a name="bytebase-v1-BatchRunTasksRequest"></a>-### BatchRunTasksRequest-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |-| tasks | [string](#string) | repeated | The tasks to run. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. |-| skip_prior_backup | [bool](#bool) | | If true, skip prior backup for this run even if the task has prior backup enabled. |+<a name="bytebase-v1-ListReleasesRequest"></a>+### ListReleasesRequest+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | Format: projects/{project} |+| page_size | [int32](#int32) | | The maximum number of releases to return. The service may return fewer than this value. If unspecified, at most 10 releases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListReleases` call. Provide this to retrieve the subsequent page.-<a name="bytebase-v1-BatchRunTasksResponse"></a>+When paginating, all other parameters provided to `ListReleases` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Show deleted releases if specified. |+| filter | [string](#string) | | Filter is used to filter releases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec-### BatchRunTasksResponse+Supported filters: - category: release category, support "==" operator.+For example: category == "webapp" |-<a name="bytebase-v1-BatchSkipTasksRequest"></a>+<a name="bytebase-v1-ListReleasesResponse"></a>-### BatchSkipTasksRequest+### ListReleasesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The stage name for the tasks. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |-| tasks | [string](#string) | repeated | The tasks to skip. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |-| reason | [string](#string) | | The reason for skipping the tasks. |+| releases | [Release](#bytebase-v1-Release) | repeated | The releases from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-BatchSkipTasksResponse"></a>+<a name="bytebase-v1-Release"></a>++### Release-### BatchSkipTasksResponse+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Format: projects/{project}/releases/{release} |+| category | [string](#string) | | Category extracted from release name (e.g., "webapp", "analytics"). Set by Bytebase action during release creation. |+| files | [Release.File](#bytebase-v1-Release-File) | repeated | The SQL files included in the release. |+| vcs_source | [Release.VCSSource](#bytebase-v1-Release-VCSSource) | | The version control source of the release. |+| creator | [string](#string) | | Format: users/[email protected] |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| state | [State](#bytebase-v1-State) | | The lifecycle state of the release. |+| type | [Release.Type](#bytebase-v1-Release-Type) | | The type of schema change for all files in this release. |-<a name="bytebase-v1-CreateRolloutRequest"></a>-### CreateRolloutRequest+<a name="bytebase-v1-Release-File"></a>+### Release.File+A SQL file in a release.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent plan for which this rollout will be created. Format: projects/{project}/plans/{plan} |-| target | [string](#string) | optional | Create the rollout only for the specified target. Format: environments/{environment} If unspecified, all stages are created. If set to "", no stages are created. |+| path | [string](#string) | | The path of the file. e.g., `2.2/V0001_create_table.sql`. |+| version | [string](#string) | | The version identifier for the file. |+| sheet | [string](#string) | | For inputs, we must either use `sheet` or `statement`. For outputs, we always use `sheet`. `statement` is the preview of the sheet content.+The sheet that holds the content. Format: projects/{project}/sheets/{sheet} |+| statement | [bytes](#bytes) | | The raw SQL statement content. |+| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet content or the statement. |-<a name="bytebase-v1-GetRolloutRequest"></a>-### GetRolloutRequest+<a name="bytebase-v1-Release-VCSSource"></a>+### Release.VCSSource+Version control system source information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the rollout to retrieve. This is the rollout resource name, which is the plan name plus /rollout suffix. Format: projects/{project}/plans/{plan}/rollout |+| vcs_type | [VCSType](#bytebase-v1-VCSType) | | The type of VCS. |+| url | [string](#string) | | The url link to the e.g., GitHub commit or pull request. |-<a name="bytebase-v1-GetTaskRunLogRequest"></a>+<a name="bytebase-v1-UndeleteReleaseRequest"></a>-### GetTaskRunLogRequest+### UndeleteReleaseRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| name | [string](#string) | | The name of the deleted release. Format: projects/{project}/releases/{release} |-<a name="bytebase-v1-GetTaskRunRequest"></a>+<a name="bytebase-v1-UpdateReleaseRequest"></a>-### GetTaskRunRequest+### UpdateReleaseRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| release | [Release](#bytebase-v1-Release) | | The release to update. |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |+-<a name="bytebase-v1-GetTaskRunSessionRequest"></a>-### GetTaskRunSessionRequest+<a name="bytebase-v1-Release-Type"></a>+### Release.Type+The type of schema change.+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| VERSIONED | 1 | Versioned schema migration. |+| DECLARATIVE | 2 | Declarative schema definition. |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+++<a name="bytebase-v1-ReleaseService"></a>+### ReleaseService+ReleaseService manages releases for coordinating deployments.-<a name="bytebase-v1-ListRolloutsRequest"></a>--### ListRolloutsRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of rollouts. Format: projects/{project} Use "projects/-" to list all rollouts from all projects. |-| page_size | [int32](#int32) | | The maximum number of rollouts to return. The service may return fewer than this value. If unspecified, at most 10 rollouts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |-| page_token | [string](#string) | | A page token, received from a previous `ListRollouts` call. Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListRollouts` must match the call that provided the page token. |-| filter | [string](#string) | | Filter is used to filter rollouts returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| GetRelease | [GetReleaseRequest](#bytebase-v1-GetReleaseRequest) | [Release](#bytebase-v1-Release) | Retrieves a release by name. Permissions required: bb.releases.get |+| ListReleases | [ListReleasesRequest](#bytebase-v1-ListReleasesRequest) | [ListReleasesResponse](#bytebase-v1-ListReleasesResponse) | Lists releases in a project. Permissions required: bb.releases.list |+| CreateRelease | [CreateReleaseRequest](#bytebase-v1-CreateReleaseRequest) | [Release](#bytebase-v1-Release) | Creates a new release with SQL files. Permissions required: bb.releases.create |+| UpdateRelease | [UpdateReleaseRequest](#bytebase-v1-UpdateReleaseRequest) | [Release](#bytebase-v1-Release) | Updates an existing release. Permissions required: bb.releases.update When allow_missing=true, also requires: bb.releases.create |+| DeleteRelease | [DeleteReleaseRequest](#bytebase-v1-DeleteReleaseRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a release. Permissions required: bb.releases.delete |+| UndeleteRelease | [UndeleteReleaseRequest](#bytebase-v1-UndeleteReleaseRequest) | [Release](#bytebase-v1-Release) | Restores a deleted release. Permissions required: bb.releases.undelete |+| CheckRelease | [CheckReleaseRequest](#bytebase-v1-CheckReleaseRequest) | [CheckReleaseResponse](#bytebase-v1-CheckReleaseResponse) | Validates a release by dry-running checks on target databases. Permissions required: bb.releases.check |+| ListReleaseCategories | [ListReleaseCategoriesRequest](#bytebase-v1-ListReleaseCategoriesRequest) | [ListReleaseCategoriesResponse](#bytebase-v1-ListReleaseCategoriesResponse) | Lists all unique categories in a project. Permissions required: bb.releases.list |-Supported filters: - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator. - task_type: the task type, support "in" operator, check the Task.Type enum for the values.+-For example: update_time >= "2025-01-02T15:04:05Z07:00" task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] |+<a name="v1_review_config_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/review_config_service.proto-<a name="bytebase-v1-ListRolloutsResponse"></a>+<a name="bytebase-v1-CreateReviewConfigRequest"></a>-### ListRolloutsResponse+### CreateReviewConfigRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| rollouts | [Rollout](#bytebase-v1-Rollout) | repeated | The rollouts from the specified request. |-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+| review_config | [ReviewConfig](#bytebase-v1-ReviewConfig) | | The SQL review config to create. |-<a name="bytebase-v1-ListTaskRunsRequest"></a>+<a name="bytebase-v1-DeleteReviewConfigRequest"></a>-### ListTaskRunsRequest+### DeleteReviewConfigRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of taskRuns. Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. |+| name | [string](#string) | | The name of the SQL review config to delete. Format: reviewConfigs/{reviewConfig} |-<a name="bytebase-v1-ListTaskRunsResponse"></a>+<a name="bytebase-v1-GetReviewConfigRequest"></a>-### ListTaskRunsResponse+### GetReviewConfigRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| task_runs | [TaskRun](#bytebase-v1-TaskRun) | repeated | The taskRuns from the specified request. |-+| name | [string](#string) | | The name of the SQL review config to retrieve. Format: reviewConfigs/{reviewConfig} |-<a name="bytebase-v1-PreviewTaskRunRollbackRequest"></a>--### PreviewTaskRunRollbackRequest+<a name="bytebase-v1-ListReviewConfigsRequest"></a>+### ListReviewConfigsRequest-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-<a name="bytebase-v1-PreviewTaskRunRollbackResponse"></a>+<a name="bytebase-v1-ListReviewConfigsResponse"></a>-### PreviewTaskRunRollbackResponse+### ListReviewConfigsResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| statement | [string](#string) | | The rollback SQL statement that would undo the task run. |+| review_configs | [ReviewConfig](#bytebase-v1-ReviewConfig) | repeated | The SQL review configs from the specified request. |-<a name="bytebase-v1-Rollout"></a>+<a name="bytebase-v1-ReviewConfig"></a>-### Rollout+### ReviewConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The resource name of the rollout. Format: projects/{project}/plans/{plan}/rollout |-| title | [string](#string) | | The title of the rollout, inherited from the associated plan. This field is output only and cannot be directly set. |-| stages | [Stage](#bytebase-v1-Stage) | repeated | Stages and thus tasks of the rollout. |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-+| name | [string](#string) | | The name of the SQL review config. Format: reviewConfigs/{reviewConfig} |+| title | [string](#string) | | The title of the review configuration. |+| enabled | [bool](#bool) | | Whether the review configuration is enabled. |+| rules | [SQLReviewRule](#bytebase-v1-SQLReviewRule) | repeated | The SQL review rules to enforce. |+| resources | [string](#string) | repeated | Resources using the config. Format: {resource}/{resource id}, e.g., environments/test. |-<a name="bytebase-v1-Stage"></a>-### Stage+<a name="bytebase-v1-SQLReviewRule"></a>+### SQLReviewRule+SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage} Use "-" for {stage} when the stage has no environment or deleted environment. |-| id | [string](#string) | | id is the environment id of the stage. e.g., "prod". Use "-" when the stage has no environment or deleted environment. |-| environment | [string](#string) | | environment is the environment of the stage. Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. |-| tasks | [Task](#bytebase-v1-Task) | repeated | The tasks within this stage. |+| type | [SQLReviewRule.Type](#bytebase-v1-SQLReviewRule-Type) | | The type of SQL review rule. |+| level | [SQLReviewRule.Level](#bytebase-v1-SQLReviewRule-Level) | | The severity level of the rule. |+| naming_payload | [SQLReviewRule.NamingRulePayload](#bytebase-v1-SQLReviewRule-NamingRulePayload) | | |+| number_payload | [SQLReviewRule.NumberRulePayload](#bytebase-v1-SQLReviewRule-NumberRulePayload) | | |+| string_array_payload | [SQLReviewRule.StringArrayRulePayload](#bytebase-v1-SQLReviewRule-StringArrayRulePayload) | | |+| comment_convention_payload | [SQLReviewRule.CommentConventionRulePayload](#bytebase-v1-SQLReviewRule-CommentConventionRulePayload) | | |+| string_payload | [SQLReviewRule.StringRulePayload](#bytebase-v1-SQLReviewRule-StringRulePayload) | | |+| naming_case_payload | [SQLReviewRule.NamingCaseRulePayload](#bytebase-v1-SQLReviewRule-NamingCaseRulePayload) | | |+| engine | [Engine](#bytebase-v1-Engine) | | The database engine this rule applies to. |-<a name="bytebase-v1-Task"></a>+<a name="bytebase-v1-SQLReviewRule-CommentConventionRulePayload"></a>-### Task+### SQLReviewRule.CommentConventionRulePayload| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} |-| spec_id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |-| status | [Task.Status](#bytebase-v1-Task-Status) | | Status is the status of the task. |-| skipped_reason | [string](#string) | | The reason why the task was skipped. |-| type | [Task.Type](#bytebase-v1-Task-Type) | | |-| target | [string](#string) | | Format: instances/{instance} if the task is DatabaseCreate. Format: instances/{instance}/databases/{database} |-| database_create | [Task.DatabaseCreate](#bytebase-v1-Task-DatabaseCreate) | | |-| database_update | [Task.DatabaseUpdate](#bytebase-v1-Task-DatabaseUpdate) | | |-| database_data_export | [Task.DatabaseDataExport](#bytebase-v1-Task-DatabaseDataExport) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The update_time is the update time of latest task run. If there are no task runs, it will be empty. |-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The run_time is the scheduled run time of latest task run. If there are no task runs or the task run is not scheduled, it will be empty. |+| required | [bool](#bool) | | |+| max_length | [int32](#int32) | | |-<a name="bytebase-v1-Task-DatabaseCreate"></a>+<a name="bytebase-v1-SQLReviewRule-NamingCaseRulePayload"></a>++### SQLReviewRule.NamingCaseRulePayload-### Task.DatabaseCreate-Payload for creating a new database.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |+| upper | [bool](#bool) | | |-<a name="bytebase-v1-Task-DatabaseDataExport"></a>+<a name="bytebase-v1-SQLReviewRule-NamingRulePayload"></a>-### Task.DatabaseDataExport-Payload for exporting database data.+### SQLReviewRule.NamingRulePayload+Payload message types for SQL review rules| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |+| max_length | [int32](#int32) | | |+| format | [string](#string) | | |-<a name="bytebase-v1-Task-DatabaseUpdate"></a>+<a name="bytebase-v1-SQLReviewRule-NumberRulePayload"></a>++### SQLReviewRule.NumberRulePayload-### Task.DatabaseUpdate-Payload for updating a database schema.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Format: projects/{project}/sheets/{sheet} |-| release | [string](#string) | | Format: projects/{project}/releases/{release} |+| number | [int32](#int32) | | |-<a name="bytebase-v1-TaskRun"></a>+<a name="bytebase-v1-SQLReviewRule-StringArrayRulePayload"></a>-### TaskRun+### SQLReviewRule.StringArrayRulePayload| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |-| creator | [string](#string) | | Format: users/[email protected] |-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |-| status | [TaskRun.Status](#bytebase-v1-TaskRun-Status) | | The current execution status of the task run. |-| detail | [string](#string) | | Below are the results of a task run. Detailed information about the task run result. |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the task run started execution. |-| export_archive_status | [TaskRun.ExportArchiveStatus](#bytebase-v1-TaskRun-ExportArchiveStatus) | | The export archive status for data export tasks. |-| has_prior_backup | [bool](#bool) | | Indicates whether a prior backup was created for this task run. When true, rollback SQL can be generated via PreviewTaskRunRollback. Backup details are available in the task run logs. |-| scheduler_info | [TaskRun.SchedulerInfo](#bytebase-v1-TaskRun-SchedulerInfo) | | Scheduling information about the task run. |-| run_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | The task run should run after run_time. This can only be set when creating the task run calling BatchRunTasks. |+| list | [string](#string) | repeated | |-<a name="bytebase-v1-TaskRun-SchedulerInfo"></a>+<a name="bytebase-v1-SQLReviewRule-StringRulePayload"></a>++### SQLReviewRule.StringRulePayload-### TaskRun.SchedulerInfo-Information about task run scheduling.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| report_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the scheduling info was reported. |-| waiting_cause | [TaskRun.SchedulerInfo.WaitingCause](#bytebase-v1-TaskRun-SchedulerInfo-WaitingCause) | | The cause for the task run waiting. |+| value | [string](#string) | | |-<a name="bytebase-v1-TaskRun-SchedulerInfo-WaitingCause"></a>+<a name="bytebase-v1-UpdateReviewConfigRequest"></a>++### UpdateReviewConfigRequest-### TaskRun.SchedulerInfo.WaitingCause-Information about why a task run is waiting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| parallel_tasks_limit | [bool](#bool) | | Waiting due to parallel tasks limit. |---+| review_config | [ReviewConfig](#bytebase-v1-ReviewConfig) | | The SQL review config to update.+The name field is used to identify the SQL review config to update. |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the config is not found, a new config will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-TaskRunLog"></a>-### TaskRunLog+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log |-| entries | [TaskRunLogEntry](#bytebase-v1-TaskRunLogEntry) | repeated | The log entries for this task run. |+<a name="bytebase-v1-SQLReviewRule-Level"></a>+### SQLReviewRule.Level+The severity level for SQL review rules.+| Name | Number | Description |+| ---- | ------ | ----------- |+| LEVEL_UNSPECIFIED | 0 | Unspecified level. |+| ERROR | 1 | Rule violation is an error. |+| WARNING | 2 | Rule violation is a warning. |-<a name="bytebase-v1-TaskRunLogEntry"></a>+<a name="bytebase-v1-SQLReviewRule-Type"></a>-### TaskRunLogEntry+### SQLReviewRule.Type+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| ENGINE_MYSQL_USE_INNODB | 1 | |+| NAMING_FULLY_QUALIFIED | 2 | |+| NAMING_TABLE | 3 | |+| NAMING_COLUMN | 4 | |+| NAMING_INDEX_PK | 5 | |+| NAMING_INDEX_UK | 6 | |+| NAMING_INDEX_FK | 7 | |+| NAMING_INDEX_IDX | 8 | |+| NAMING_COLUMN_AUTO_INCREMENT | 9 | |+| NAMING_TABLE_NO_KEYWORD | 10 | |+| NAMING_IDENTIFIER_NO_KEYWORD | 11 | |+| NAMING_IDENTIFIER_CASE | 12 | |+| STATEMENT_SELECT_NO_SELECT_ALL | 13 | |+| STATEMENT_WHERE_REQUIRE_SELECT | 14 | |+| STATEMENT_WHERE_REQUIRE_UPDATE_DELETE | 15 | |+| STATEMENT_WHERE_NO_LEADING_WILDCARD_LIKE | 16 | |+| STATEMENT_DISALLOW_ON_DEL_CASCADE | 17 | |+| STATEMENT_DISALLOW_RM_TBL_CASCADE | 18 | |+| STATEMENT_DISALLOW_COMMIT | 19 | |+| STATEMENT_DISALLOW_LIMIT | 20 | |+| STATEMENT_DISALLOW_ORDER_BY | 21 | |+| STATEMENT_MERGE_ALTER_TABLE | 22 | |+| STATEMENT_INSERT_ROW_LIMIT | 23 | |+| STATEMENT_INSERT_MUST_SPECIFY_COLUMN | 24 | |+| STATEMENT_INSERT_DISALLOW_ORDER_BY_RAND | 25 | |+| STATEMENT_AFFECTED_ROW_LIMIT | 26 | |+| STATEMENT_DML_DRY_RUN | 27 | |+| STATEMENT_DISALLOW_ADD_COLUMN_WITH_DEFAULT | 28 | |+| STATEMENT_ADD_CHECK_NOT_VALID | 29 | |+| STATEMENT_ADD_FOREIGN_KEY_NOT_VALID | 30 | |+| STATEMENT_DISALLOW_ADD_NOT_NULL | 31 | |+| STATEMENT_SELECT_FULL_TABLE_SCAN | 32 | |+| STATEMENT_CREATE_SPECIFY_SCHEMA | 33 | |+| STATEMENT_CHECK_SET_ROLE_VARIABLE | 34 | |+| STATEMENT_DISALLOW_USING_FILESORT | 35 | |+| STATEMENT_DISALLOW_USING_TEMPORARY | 36 | |+| STATEMENT_WHERE_NO_EQUAL_NULL | 37 | |+| STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS | 38 | |+| STATEMENT_QUERY_MINIMUM_PLAN_LEVEL | 39 | |+| STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT | 40 | |+| STATEMENT_MAXIMUM_LIMIT_VALUE | 41 | |+| STATEMENT_MAXIMUM_JOIN_TABLE_COUNT | 42 | |+| STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION | 43 | |+| STATEMENT_JOIN_STRICT_COLUMN_ATTRS | 44 | |+| STATEMENT_NON_TRANSACTIONAL | 45 | |+| STATEMENT_ADD_COLUMN_WITHOUT_POSITION | 46 | |+| STATEMENT_DISALLOW_OFFLINE_DDL | 47 | |+| STATEMENT_DISALLOW_CROSS_DB_QUERIES | 48 | |+| STATEMENT_MAX_EXECUTION_TIME | 49 | |+| STATEMENT_REQUIRE_ALGORITHM_OPTION | 50 | |+| STATEMENT_REQUIRE_LOCK_OPTION | 51 | |+| STATEMENT_OBJECT_OWNER_CHECK | 52 | |+| TABLE_REQUIRE_PK | 53 | |+| TABLE_NO_FOREIGN_KEY | 54 | |+| TABLE_DROP_NAMING_CONVENTION | 55 | |+| TABLE_COMMENT | 56 | |+| TABLE_DISALLOW_PARTITION | 57 | |+| TABLE_DISALLOW_TRIGGER | 58 | |+| TABLE_NO_DUPLICATE_INDEX | 59 | |+| TABLE_TEXT_FIELDS_TOTAL_LENGTH | 60 | |+| TABLE_DISALLOW_SET_CHARSET | 61 | |+| TABLE_DISALLOW_DDL | 62 | |+| TABLE_DISALLOW_DML | 63 | |+| TABLE_LIMIT_SIZE | 64 | |+| TABLE_REQUIRE_CHARSET | 65 | |+| TABLE_REQUIRE_COLLATION | 66 | |+| COLUMN_REQUIRED | 67 | |+| COLUMN_NO_NULL | 68 | |+| COLUMN_DISALLOW_CHANGE_TYPE | 69 | |+| COLUMN_SET_DEFAULT_FOR_NOT_NULL | 70 | |+| COLUMN_DISALLOW_CHANGE | 71 | |+| COLUMN_DISALLOW_CHANGING_ORDER | 72 | |+| COLUMN_DISALLOW_DROP | 73 | |+| COLUMN_DISALLOW_DROP_IN_INDEX | 74 | |+| COLUMN_COMMENT | 75 | |+| COLUMN_AUTO_INCREMENT_MUST_INTEGER | 76 | |+| COLUMN_TYPE_DISALLOW_LIST | 77 | |+| COLUMN_DISALLOW_SET_CHARSET | 78 | |+| COLUMN_MAXIMUM_CHARACTER_LENGTH | 79 | |+| COLUMN_MAXIMUM_VARCHAR_LENGTH | 80 | |+| COLUMN_AUTO_INCREMENT_INITIAL_VALUE | 81 | |+| COLUMN_AUTO_INCREMENT_MUST_UNSIGNED | 82 | |+| COLUMN_CURRENT_TIME_COUNT_LIMIT | 83 | |+| COLUMN_REQUIRE_DEFAULT | 84 | |+| COLUMN_DEFAULT_DISALLOW_VOLATILE | 85 | |+| COLUMN_ADD_NOT_NULL_REQUIRE_DEFAULT | 86 | |+| COLUMN_REQUIRE_CHARSET | 87 | |+| COLUMN_REQUIRE_COLLATION | 88 | |+| SCHEMA_BACKWARD_COMPATIBILITY | 89 | |+| DATABASE_DROP_EMPTY_DATABASE | 90 | |+| INDEX_NO_DUPLICATE_COLUMN | 91 | |+| INDEX_KEY_NUMBER_LIMIT | 92 | |+| INDEX_PK_TYPE_LIMIT | 93 | |+| INDEX_TYPE_NO_BLOB | 94 | |+| INDEX_TOTAL_NUMBER_LIMIT | 95 | |+| INDEX_PRIMARY_KEY_TYPE_ALLOWLIST | 96 | |+| INDEX_CREATE_CONCURRENTLY | 97 | |+| INDEX_TYPE_ALLOW_LIST | 98 | |+| INDEX_NOT_REDUNDANT | 99 | |+| SYSTEM_CHARSET_ALLOWLIST | 100 | |+| SYSTEM_COLLATION_ALLOWLIST | 101 | |+| SYSTEM_COMMENT_LENGTH | 102 | |+| SYSTEM_PROCEDURE_DISALLOW_CREATE | 103 | |+| SYSTEM_EVENT_DISALLOW_CREATE | 104 | |+| SYSTEM_VIEW_DISALLOW_CREATE | 105 | |+| SYSTEM_FUNCTION_DISALLOW_CREATE | 106 | |+| SYSTEM_FUNCTION_DISALLOWED_LIST | 107 | |+| ADVICE_ONLINE_MIGRATION | 108 | |+| BUILTIN_PRIOR_BACKUP_CHECK | 109 | |+| BUILTIN_WALK_THROUGH_CHECK | 110 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| type | [TaskRunLogEntry.Type](#bytebase-v1-TaskRunLogEntry-Type) | | The type of this log entry. |-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the log was recorded. |-| replica_id | [string](#string) | | The replica ID for this log entry. |-| schema_dump | [TaskRunLogEntry.SchemaDump](#bytebase-v1-TaskRunLogEntry-SchemaDump) | | Schema dump details (if type is SCHEMA_DUMP). |-| command_execute | [TaskRunLogEntry.CommandExecute](#bytebase-v1-TaskRunLogEntry-CommandExecute) | | Command execution details (if type is COMMAND_EXECUTE). |-| database_sync | [TaskRunLogEntry.DatabaseSync](#bytebase-v1-TaskRunLogEntry-DatabaseSync) | | Database sync details (if type is DATABASE_SYNC). |-| transaction_control | [TaskRunLogEntry.TransactionControl](#bytebase-v1-TaskRunLogEntry-TransactionControl) | | Transaction control details (if type is TRANSACTION_CONTROL). |-| prior_backup | [TaskRunLogEntry.PriorBackup](#bytebase-v1-TaskRunLogEntry-PriorBackup) | | Prior backup details (if type is PRIOR_BACKUP). |-| retry_info | [TaskRunLogEntry.RetryInfo](#bytebase-v1-TaskRunLogEntry-RetryInfo) | | Retry information details (if type is RETRY_INFO). |-| compute_diff | [TaskRunLogEntry.ComputeDiff](#bytebase-v1-TaskRunLogEntry-ComputeDiff) | | Compute diff details (if type is COMPUTE_DIFF). |-| release_file_execute | [TaskRunLogEntry.ReleaseFileExecute](#bytebase-v1-TaskRunLogEntry-ReleaseFileExecute) | | Release file execution details (if type is RELEASE_FILE_EXECUTE). |+++<a name="bytebase-v1-ReviewConfigService"></a>+### ReviewConfigService+ReviewConfigService manages approval flow configurations.-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute"></a>+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| CreateReviewConfig | [CreateReviewConfigRequest](#bytebase-v1-CreateReviewConfigRequest) | [ReviewConfig](#bytebase-v1-ReviewConfig) | Creates a new SQL review configuration. Permissions required: bb.reviewConfigs.create |+| ListReviewConfigs | [ListReviewConfigsRequest](#bytebase-v1-ListReviewConfigsRequest) | [ListReviewConfigsResponse](#bytebase-v1-ListReviewConfigsResponse) | Lists all SQL review configurations. Permissions required: bb.reviewConfigs.list |+| GetReviewConfig | [GetReviewConfigRequest](#bytebase-v1-GetReviewConfigRequest) | [ReviewConfig](#bytebase-v1-ReviewConfig) | Retrieves a SQL review configuration by name. Permissions required: bb.reviewConfigs.get |+| UpdateReviewConfig | [UpdateReviewConfigRequest](#bytebase-v1-UpdateReviewConfigRequest) | [ReviewConfig](#bytebase-v1-ReviewConfig) | Updates a SQL review configuration. Permissions required: bb.reviewConfigs.update When allow_missing=true, also requires: bb.reviewConfigs.create |+| DeleteReviewConfig | [DeleteReviewConfigRequest](#bytebase-v1-DeleteReviewConfigRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a SQL review configuration. Permissions required: bb.reviewConfigs.delete |-### TaskRunLogEntry.CommandExecute-Command execution details.+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the command was logged. |-| range | [Range](#bytebase-v1-Range) | | The byte offset range of the executed command in the sheet. Uses byte offsets (not character indices) for efficient slicing of sheet content bytes. Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. |-| statement | [string](#string) | | The executed statement. |-| response | [TaskRunLogEntry.CommandExecute.CommandResponse](#bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse) | | The response from executing the command. |+<a name="v1_revision_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/revision_service.proto+<a name="bytebase-v1-BatchCreateRevisionsRequest"></a>-<a name="bytebase-v1-TaskRunLogEntry-CommandExecute-CommandResponse"></a>+### BatchCreateRevisionsRequest-### TaskRunLogEntry.CommandExecute.CommandResponse-Command execution response.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the response was logged. |-| error | [string](#string) | | Error message if command execution failed. |-| affected_rows | [int64](#int64) | | Total affected rows. |-| all_affected_rows | [int64](#int64) | repeated | `all_affected_rows` is the affected rows of each command. `all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. |+| parent | [string](#string) | | The parent resource shared by all revisions being created. Format: instances/{instance}/databases/{database} |+| requests | [CreateRevisionRequest](#bytebase-v1-CreateRevisionRequest) | repeated | The request message specifying the revisions to create. A maximum of 100 revisions can be created in a batch. |-<a name="bytebase-v1-TaskRunLogEntry-ComputeDiff"></a>+<a name="bytebase-v1-BatchCreateRevisionsResponse"></a>++### BatchCreateRevisionsResponse-### TaskRunLogEntry.ComputeDiff-Schema diff computation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When diff computation ended. |-| error | [string](#string) | | Error message if computation failed. |+| revisions | [Revision](#bytebase-v1-Revision) | repeated | The created revisions. |-<a name="bytebase-v1-TaskRunLogEntry-DatabaseSync"></a>+<a name="bytebase-v1-CreateRevisionRequest"></a>++### CreateRevisionRequest-### TaskRunLogEntry.DatabaseSync-Database synchronization details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the database sync ended. |-| error | [string](#string) | | Error message if sync failed. |+| parent | [string](#string) | | Format: instances/{instance}/databases/{database} |+| revision | [Revision](#bytebase-v1-Revision) | | The revision to create. |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup"></a>+<a name="bytebase-v1-DeleteRevisionRequest"></a>++### DeleteRevisionRequest-### TaskRunLogEntry.PriorBackup-Prior backup operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backup ended. |-| prior_backup_detail | [TaskRunLogEntry.PriorBackup.PriorBackupDetail](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail) | | The backup details. |-| error | [string](#string) | | Error message if the backup failed. |+| name | [string](#string) | | The name of the revision to delete. Format: instances/{instance}/databases/{database}/revisions/{revision} |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail"></a>+<a name="bytebase-v1-GetRevisionRequest"></a>++### GetRevisionRequest-### TaskRunLogEntry.PriorBackup.PriorBackupDetail-Prior backup detail for rollback purposes.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| items | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item) | repeated | The list of backed up tables. |+| name | [string](#string) | | The name of the revision. Format: instances/{instance}/databases/{database}/revisions/{revision} |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item"></a>+<a name="bytebase-v1-ListRevisionsRequest"></a>++### ListRevisionsRequest-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item-A single backup table mapping.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| source_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The original table information. |-| target_table | [TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table](#bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table) | | The target backup table information. |-| start_position | [Position](#bytebase-v1-Position) | | The start position in the SQL statement. |-| end_position | [Position](#bytebase-v1-Position) | | The end position in the SQL statement. |+| parent | [string](#string) | | The parent of the revisions. Format: instances/{instance}/databases/{database} |+| page_size | [int32](#int32) | | The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 10 revisions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListRevisions` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListRevisions` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Whether to include deleted revisions in the results. |-<a name="bytebase-v1-TaskRunLogEntry-PriorBackup-PriorBackupDetail-Item-Table"></a>+<a name="bytebase-v1-ListRevisionsResponse"></a>++### ListRevisionsResponse-### TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table-Table information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database | [string](#string) | | The database information. Format: instances/{instance}/databases/{database} |-| schema | [string](#string) | | The schema name. |-| table | [string](#string) | | The table name. |+| revisions | [Revision](#bytebase-v1-Revision) | repeated | The revisions from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |-<a name="bytebase-v1-TaskRunLogEntry-ReleaseFileExecute"></a>+<a name="bytebase-v1-Revision"></a>++### Revision-### TaskRunLogEntry.ReleaseFileExecute-Release file execution details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| version | [string](#string) | | The version of the file being executed (e.g., "0001"). |-| file_path | [string](#string) | | The file path within the release (e.g., "2.2/V0001_create_table.sql"). |+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/revisions/{revision} |+| release | [string](#string) | | Format: projects/{project}/releases/{release} Can be empty. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |+| deleter | [string](#string) | | Format: users/[email protected] Can be empty. |+| delete_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Can be empty. |+| file | [string](#string) | | Format: projects/{project}/releases/{release}/files/{id} Can be empty. |+| version | [string](#string) | | The schema version string for this revision. |+| 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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |+| type | [Revision.Type](#bytebase-v1-Revision-Type) | | The type of the revision. |+-<a name="bytebase-v1-TaskRunLogEntry-RetryInfo"></a>-### TaskRunLogEntry.RetryInfo-Retry information for failed operations.+<a name="bytebase-v1-Revision-Type"></a>+### Revision.Type+The type of schema revision.-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| error | [string](#string) | | The error that triggered the retry. |-| retry_count | [int32](#int32) | | Current retry attempt number. |-| maximum_retries | [int32](#int32) | | Maximum number of retries allowed. |+| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | Unspecified type. |+| VERSIONED | 1 | Versioned schema migration. |+| DECLARATIVE | 2 | Declarative schema definition. |+++<a name="bytebase-v1-RevisionService"></a>-<a name="bytebase-v1-TaskRunLogEntry-SchemaDump"></a>+### RevisionService+RevisionService manages schema revision history.-### TaskRunLogEntry.SchemaDump-Schema dump operation details.+| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| ListRevisions | [ListRevisionsRequest](#bytebase-v1-ListRevisionsRequest) | [ListRevisionsResponse](#bytebase-v1-ListRevisionsResponse) | Lists schema revisions for a database. Permissions required: bb.revisions.list |+| GetRevision | [GetRevisionRequest](#bytebase-v1-GetRevisionRequest) | [Revision](#bytebase-v1-Revision) | Retrieves a schema revision by name. Permissions required: bb.revisions.get |+| BatchCreateRevisions | [BatchCreateRevisionsRequest](#bytebase-v1-BatchCreateRevisionsRequest) | [BatchCreateRevisionsResponse](#bytebase-v1-BatchCreateRevisionsResponse) | Creates multiple schema revisions in a single operation. Permissions required: bb.revisions.create |+| DeleteRevision | [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a schema revision. Permissions required: bb.revisions.delete |+-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump started. |-| end_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the schema dump ended. |-| error | [string](#string) | | Error message if the schema dump failed. |+<a name="v1_role_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>+## v1/role_service.proto-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl"></a>+<a name="bytebase-v1-CreateRoleRequest"></a>++### CreateRoleRequest-### TaskRunLogEntry.TransactionControl-Transaction control operation details.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| type | [TaskRunLogEntry.TransactionControl.Type](#bytebase-v1-TaskRunLogEntry-TransactionControl-Type) | | The type of transaction control. |-| error | [string](#string) | | Error message if the operation failed. |+| role | [Role](#bytebase-v1-Role) | | The role to create. |+| role_id | [string](#string) | | The ID to use for the role, which will become the final component of the role's resource name.+This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]/. |-<a name="bytebase-v1-TaskRunSession"></a>-### TaskRunSession+<a name="bytebase-v1-DeleteRoleRequest"></a>++### DeleteRoleRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session |-| postgres | [TaskRunSession.Postgres](#bytebase-v1-TaskRunSession-Postgres) | | PostgreSQL session information. |+| name | [string](#string) | | The name of the role to delete. Format: roles/{role} |-<a name="bytebase-v1-TaskRunSession-Postgres"></a>+<a name="bytebase-v1-GetRoleRequest"></a>++### GetRoleRequest-### TaskRunSession.Postgres-PostgreSQL session information.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| session | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | | `session` is the session of the task run executing commands. |-| blocking_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocking_sessions` block `session`. |-| blocked_sessions | [TaskRunSession.Postgres.Session](#bytebase-v1-TaskRunSession-Postgres-Session) | repeated | `blocked_sessions` are blocked by `session`. |+| name | [string](#string) | | The name of the role to retrieve. Format: roles/{role} |-<a name="bytebase-v1-TaskRunSession-Postgres-Session"></a>+<a name="bytebase-v1-ListRolesRequest"></a>-### TaskRunSession.Postgres.Session-PostgreSQL session information read from `pg_stat_activity`.+### ListRolesRequest-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| pid | [string](#string) | | Process ID of the session. |-| blocked_by_pids | [string](#string) | repeated | PIDs of sessions blocking this session. |-| query | [string](#string) | | Current query being executed. |-| state | [string](#string) | optional | Session state (active, idle, etc.). |-| wait_event_type | [string](#string) | optional | Wait event type if session is waiting. |-| wait_event | [string](#string) | optional | Specific wait event if session is waiting. |-| datname | [string](#string) | optional | Database name. |-| usename | [string](#string) | optional | User name. |-| application_name | [string](#string) | | Application name. |-| client_addr | [string](#string) | optional | Client IP address. |-| client_port | [string](#string) | optional | Client port number. |-| backend_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the backend process started. |-| xact_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current transaction started. |-| query_start | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | When the current query started. |-+<a name="bytebase-v1-ListRolesResponse"></a>+### ListRolesResponse-<a name="bytebase-v1-Task-Status"></a>-### Task.Status+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| roles | [Role](#bytebase-v1-Role) | repeated | The roles from the specified request. |-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| NOT_STARTED | 1 | Task has not started and is awaiting its turn in the deployment sequence. |-| PENDING | 2 | Task is ready to run and waiting for approval or scheduled time. |-| RUNNING | 3 | Task is currently executing. |-| DONE | 4 | Task completed successfully. |-| FAILED | 5 | Task execution failed with errors. |-| CANCELED | 6 | Task execution was canceled by a user. |-| SKIPPED | 7 | Task was skipped and will not be executed. |-<a name="bytebase-v1-Task-Type"></a>-### Task.Type+<a name="bytebase-v1-Role"></a>-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified task type. |-| GENERAL | 1 | General task for miscellaneous operations. |-| DATABASE_CREATE | 2 | Database creation task that creates a new database. Use payload DatabaseCreate. |-| DATABASE_MIGRATE | 3 | Database migration task that applies versioned schema changes. Use payload DatabaseUpdate. |-| DATABASE_EXPORT | 4 | Database export task that exports query results or table data. Use payload DatabaseDataExport. |+### Role+Role defines a set of permissions that can be assigned to users.+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | Resource name. Format: roles/{role} |+| title | [string](#string) | | Human-readable title. |+| description | [string](#string) | | Optional description of the role. |+| permissions | [string](#string) | repeated | List of permission identifiers granted by this role. |+| type | [Role.Type](#bytebase-v1-Role-Type) | | Role type indicating if it's built-in or custom. |-<a name="bytebase-v1-TaskRun-ExportArchiveStatus"></a>-### TaskRun.ExportArchiveStatus-| Name | Number | Description |-| ---- | ------ | ----------- |-| EXPORT_ARCHIVE_STATUS_UNSPECIFIED | 0 | Unspecified export archive status. |-| READY | 1 | Export archive is ready for download. |-| EXPORTED | 2 | Export archive has been downloaded by the user. |+<a name="bytebase-v1-UpdateRoleRequest"></a>-<a name="bytebase-v1-TaskRun-Status"></a>+### UpdateRoleRequest-### TaskRun.Status-| Name | Number | Description |-| ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | Unspecified status. |-| PENDING | 1 | Task run is queued and waiting to start execution. |-| RUNNING | 2 | Task run is currently executing. |-| DONE | 3 | Task run completed successfully. |-| FAILED | 4 | Task run execution failed with errors. |-| CANCELED | 5 | Task run execution was canceled by a user. |-| AVAILABLE | 6 | Task run is ready for immediate execution. |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| role | [Role](#bytebase-v1-Role) | | The role to update. |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |+| allow_missing | [bool](#bool) | | If set to true, and the role is not found, a new role will be created. In this situation, `update_mask` is ignored. |-<a name="bytebase-v1-TaskRunLogEntry-TransactionControl-Type"></a>-### TaskRunLogEntry.TransactionControl.Type-Transaction control type.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| BEGIN | 1 | Begin transaction. |-| COMMIT | 2 | Commit transaction. |-| ROLLBACK | 3 | Rollback transaction. |++<a name="bytebase-v1-Role-Type"></a>-<a name="bytebase-v1-TaskRunLogEntry-Type"></a>+### Role.Type-### TaskRunLogEntry.Type-The type of log entry.| Name | Number | Description || ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | Unspecified type. |-| SCHEMA_DUMP | 1 | Schema dump operation. |-| COMMAND_EXECUTE | 2 | Command execution. |-| DATABASE_SYNC | 3 | Database synchronization. |-| TRANSACTION_CONTROL | 5 | Transaction control (BEGIN, COMMIT, ROLLBACK). |-| PRIOR_BACKUP | 6 | Prior backup operation. |-| RETRY_INFO | 7 | Retry information. |-| COMPUTE_DIFF | 8 | Schema diff computation. |-| RELEASE_FILE_EXECUTE | 9 | Release file execution. |+| TYPE_UNSPECIFIED | 0 | |+| BUILT_IN | 1 | System-defined role that cannot be modified. |+| CUSTOM | 2 | User-defined role that can be modified. |@@ -10513,24 +10555,18 @@ The type of log entry.-<a name="bytebase-v1-RolloutService"></a>+<a name="bytebase-v1-RoleService"></a>-### RolloutService-RolloutService manages the execution of deployment plans.+### RoleService+RoleService manages workspace roles and permissions.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|-| GetRollout | [GetRolloutRequest](#bytebase-v1-GetRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Retrieves a rollout by its plan name. Permissions required: bb.rollouts.get |-| ListRollouts | [ListRolloutsRequest](#bytebase-v1-ListRolloutsRequest) | [ListRolloutsResponse](#bytebase-v1-ListRolloutsResponse) | Lists rollouts in a project. Permissions required: bb.rollouts.list |-| CreateRollout | [CreateRolloutRequest](#bytebase-v1-CreateRolloutRequest) | [Rollout](#bytebase-v1-Rollout) | Creates a new rollout for a plan. Permissions required: bb.rollouts.create (or issue creator for data export issues) |-| ListTaskRuns | [ListTaskRunsRequest](#bytebase-v1-ListTaskRunsRequest) | [ListTaskRunsResponse](#bytebase-v1-ListTaskRunsResponse) | Lists task run executions for a task. Permissions required: bb.taskRuns.list |-| GetTaskRun | [GetTaskRunRequest](#bytebase-v1-GetTaskRunRequest) | [TaskRun](#bytebase-v1-TaskRun) | Retrieves a task run by name. Permissions required: bb.taskRuns.list |-| GetTaskRunLog | [GetTaskRunLogRequest](#bytebase-v1-GetTaskRunLogRequest) | [TaskRunLog](#bytebase-v1-TaskRunLog) | Retrieves execution logs for a task run. Permissions required: bb.taskRuns.list |-| GetTaskRunSession | [GetTaskRunSessionRequest](#bytebase-v1-GetTaskRunSessionRequest) | [TaskRunSession](#bytebase-v1-TaskRunSession) | Retrieves database session information for a running task. Permissions required: bb.taskRuns.list |-| BatchRunTasks | [BatchRunTasksRequest](#bytebase-v1-BatchRunTasksRequest) | [BatchRunTasksResponse](#bytebase-v1-BatchRunTasksResponse) | Executes multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |-| BatchSkipTasks | [BatchSkipTasksRequest](#bytebase-v1-BatchSkipTasksRequest) | [BatchSkipTasksResponse](#bytebase-v1-BatchSkipTasksResponse) | Skips multiple tasks in a rollout stage. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |-| BatchCancelTaskRuns | [BatchCancelTaskRunsRequest](#bytebase-v1-BatchCancelTaskRunsRequest) | [BatchCancelTaskRunsResponse](#bytebase-v1-BatchCancelTaskRunsResponse) | Cancels multiple running task executions. Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment) |-| PreviewTaskRunRollback | [PreviewTaskRunRollbackRequest](#bytebase-v1-PreviewTaskRunRollbackRequest) | [PreviewTaskRunRollbackResponse](#bytebase-v1-PreviewTaskRunRollbackResponse) | Generates rollback SQL for a completed task run. Permissions required: bb.taskRuns.list |+| ListRoles | [ListRolesRequest](#bytebase-v1-ListRolesRequest) | [ListRolesResponse](#bytebase-v1-ListRolesResponse) | Lists roles in the workspace. Permissions required: bb.roles.list |+| GetRole | [GetRoleRequest](#bytebase-v1-GetRoleRequest) | [Role](#bytebase-v1-Role) | Retrieves a role by name. Permissions required: bb.roles.get |+| CreateRole | [CreateRoleRequest](#bytebase-v1-CreateRoleRequest) | [Role](#bytebase-v1-Role) | Creates a new custom role. Permissions required: bb.roles.create |+| UpdateRole | [UpdateRoleRequest](#bytebase-v1-UpdateRoleRequest) | [Role](#bytebase-v1-Role) | Updates a role's properties. Permissions required: bb.roles.update When allow_missing=true, also requires: bb.roles.create |+| DeleteRole | [DeleteRoleRequest](#bytebase-v1-DeleteRoleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a custom role. Permissions required: bb.roles.delete |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 7fe45a92bd..b466ec7527 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1798,6 +1798,217 @@</li>+ <li>+ <a href="#v1%2frollout_service.proto">v1/rollout_service.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.BatchCancelTaskRunsRequest"><span class="badge">M</span>BatchCancelTaskRunsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.BatchCancelTaskRunsResponse"><span class="badge">M</span>BatchCancelTaskRunsResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.BatchRunTasksRequest"><span class="badge">M</span>BatchRunTasksRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.BatchRunTasksResponse"><span class="badge">M</span>BatchRunTasksResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.BatchSkipTasksRequest"><span class="badge">M</span>BatchSkipTasksRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.BatchSkipTasksResponse"><span class="badge">M</span>BatchSkipTasksResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.CreateRolloutRequest"><span class="badge">M</span>CreateRolloutRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetRolloutRequest"><span class="badge">M</span>GetRolloutRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetTaskRunLogRequest"><span class="badge">M</span>GetTaskRunLogRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetTaskRunRequest"><span class="badge">M</span>GetTaskRunRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetTaskRunSessionRequest"><span class="badge">M</span>GetTaskRunSessionRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListRolloutsRequest"><span class="badge">M</span>ListRolloutsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListRolloutsResponse"><span class="badge">M</span>ListRolloutsResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListTaskRunsRequest"><span class="badge">M</span>ListTaskRunsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListTaskRunsResponse"><span class="badge">M</span>ListTaskRunsResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.PreviewTaskRunRollbackRequest"><span class="badge">M</span>PreviewTaskRunRollbackRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.PreviewTaskRunRollbackResponse"><span class="badge">M</span>PreviewTaskRunRollbackResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.Rollout"><span class="badge">M</span>Rollout</a>+ </li>++ <li>+ <a href="#bytebase.v1.Stage"><span class="badge">M</span>Stage</a>+ </li>++ <li>+ <a href="#bytebase.v1.Task"><span class="badge">M</span>Task</a>+ </li>++ <li>+ <a href="#bytebase.v1.Task.DatabaseCreate"><span class="badge">M</span>Task.DatabaseCreate</a>+ </li>++ <li>+ <a href="#bytebase.v1.Task.DatabaseDataExport"><span class="badge">M</span>Task.DatabaseDataExport</a>+ </li>++ <li>+ <a href="#bytebase.v1.Task.DatabaseUpdate"><span class="badge">M</span>Task.DatabaseUpdate</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRun"><span class="badge">M</span>TaskRun</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRun.SchedulerInfo"><span class="badge">M</span>TaskRun.SchedulerInfo</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause"><span class="badge">M</span>TaskRun.SchedulerInfo.WaitingCause</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLog"><span class="badge">M</span>TaskRunLog</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry"><span class="badge">M</span>TaskRunLogEntry</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute"><span class="badge">M</span>TaskRunLogEntry.CommandExecute</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse"><span class="badge">M</span>TaskRunLogEntry.CommandExecute.CommandResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff"><span class="badge">M</span>TaskRunLogEntry.ComputeDiff</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync"><span class="badge">M</span>TaskRunLogEntry.DatabaseSync</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup"><span class="badge">M</span>TaskRunLogEntry.PriorBackup</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute"><span class="badge">M</span>TaskRunLogEntry.ReleaseFileExecute</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.RetryInfo"><span class="badge">M</span>TaskRunLogEntry.RetryInfo</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.SchemaDump"><span class="badge">M</span>TaskRunLogEntry.SchemaDump</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl"><span class="badge">M</span>TaskRunLogEntry.TransactionControl</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunSession"><span class="badge">M</span>TaskRunSession</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunSession.Postgres"><span class="badge">M</span>TaskRunSession.Postgres</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunSession.Postgres.Session"><span class="badge">M</span>TaskRunSession.Postgres.Session</a>+ </li>+++ <li>+ <a href="#bytebase.v1.Task.Status"><span class="badge">E</span>Task.Status</a>+ </li>++ <li>+ <a href="#bytebase.v1.Task.Type"><span class="badge">E</span>Task.Type</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRun.ExportArchiveStatus"><span class="badge">E</span>TaskRun.ExportArchiveStatus</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRun.Status"><span class="badge">E</span>TaskRun.Status</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type"><span class="badge">E</span>TaskRunLogEntry.TransactionControl.Type</a>+ </li>++ <li>+ <a href="#bytebase.v1.TaskRunLogEntry.Type"><span class="badge">E</span>TaskRunLogEntry.Type</a>+ </li>++++ <li>+ <a href="#bytebase.v1.RolloutService"><span class="badge">S</span>RolloutService</a>+ </li>++ </ul>+ </li>++<li><a href="#v1%2fsql_service.proto">v1/sql_service.proto</a><ul>@@ -2009,10 +2220,18 @@<a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a></li>+ <li>+ <a href="#bytebase.v1.Plan.RolloutStageSummary"><span class="badge">M</span>Plan.RolloutStageSummary</a>+ </li>+<li><a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a></li>+ <li>+ <a href="#bytebase.v1.Plan.TaskStatusCount"><span class="badge">M</span>Plan.TaskStatusCount</a>+ </li>+<li><a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a></li>@@ -2428,281 +2647,70 @@<li>- <a href="#v1%2frollout_service.proto">v1/rollout_service.proto</a>+ <a href="#v1%2fservice_account_service.proto">v1/service_account_service.proto</a><ul><li>- <a href="#bytebase.v1.BatchCancelTaskRunsRequest"><span class="badge">M</span>BatchCancelTaskRunsRequest</a>+ <a href="#bytebase.v1.CreateServiceAccountRequest"><span class="badge">M</span>CreateServiceAccountRequest</a></li><li>- <a href="#bytebase.v1.BatchCancelTaskRunsResponse"><span class="badge">M</span>BatchCancelTaskRunsResponse</a>+ <a href="#bytebase.v1.DeleteServiceAccountRequest"><span class="badge">M</span>DeleteServiceAccountRequest</a></li><li>- <a href="#bytebase.v1.BatchRunTasksRequest"><span class="badge">M</span>BatchRunTasksRequest</a>+ <a href="#bytebase.v1.GetServiceAccountRequest"><span class="badge">M</span>GetServiceAccountRequest</a></li><li>- <a href="#bytebase.v1.BatchRunTasksResponse"><span class="badge">M</span>BatchRunTasksResponse</a>+ <a href="#bytebase.v1.ListServiceAccountsRequest"><span class="badge">M</span>ListServiceAccountsRequest</a></li><li>- <a href="#bytebase.v1.BatchSkipTasksRequest"><span class="badge">M</span>BatchSkipTasksRequest</a>+ <a href="#bytebase.v1.ListServiceAccountsResponse"><span class="badge">M</span>ListServiceAccountsResponse</a></li><li>- <a href="#bytebase.v1.BatchSkipTasksResponse"><span class="badge">M</span>BatchSkipTasksResponse</a>+ <a href="#bytebase.v1.ServiceAccount"><span class="badge">M</span>ServiceAccount</a></li><li>- <a href="#bytebase.v1.CreateRolloutRequest"><span class="badge">M</span>CreateRolloutRequest</a>+ <a href="#bytebase.v1.UndeleteServiceAccountRequest"><span class="badge">M</span>UndeleteServiceAccountRequest</a></li><li>- <a href="#bytebase.v1.GetRolloutRequest"><span class="badge">M</span>GetRolloutRequest</a>+ <a href="#bytebase.v1.UpdateServiceAccountRequest"><span class="badge">M</span>UpdateServiceAccountRequest</a></li>+++<li>- <a href="#bytebase.v1.GetTaskRunLogRequest"><span class="badge">M</span>GetTaskRunLogRequest</a>+ <a href="#bytebase.v1.ServiceAccountService"><span class="badge">S</span>ServiceAccountService</a></li>+ </ul>+ </li>+++ <li>+ <a href="#v1%2fsheet_service.proto">v1/sheet_service.proto</a>+ <ul>+<li>- <a href="#bytebase.v1.GetTaskRunRequest"><span class="badge">M</span>GetTaskRunRequest</a>+ <a href="#bytebase.v1.BatchCreateSheetsRequest"><span class="badge">M</span>BatchCreateSheetsRequest</a></li><li>- <a href="#bytebase.v1.GetTaskRunSessionRequest"><span class="badge">M</span>GetTaskRunSessionRequest</a>+ <a href="#bytebase.v1.BatchCreateSheetsResponse"><span class="badge">M</span>BatchCreateSheetsResponse</a></li><li>- <a href="#bytebase.v1.ListRolloutsRequest"><span class="badge">M</span>ListRolloutsRequest</a>+ <a href="#bytebase.v1.CreateSheetRequest"><span class="badge">M</span>CreateSheetRequest</a></li><li>- <a href="#bytebase.v1.ListRolloutsResponse"><span class="badge">M</span>ListRolloutsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.ListTaskRunsRequest"><span class="badge">M</span>ListTaskRunsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListTaskRunsResponse"><span class="badge">M</span>ListTaskRunsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.PreviewTaskRunRollbackRequest"><span class="badge">M</span>PreviewTaskRunRollbackRequest</a>- </li>-- <li>- <a href="#bytebase.v1.PreviewTaskRunRollbackResponse"><span class="badge">M</span>PreviewTaskRunRollbackResponse</a>- </li>-- <li>- <a href="#bytebase.v1.Rollout"><span class="badge">M</span>Rollout</a>- </li>-- <li>- <a href="#bytebase.v1.Stage"><span class="badge">M</span>Stage</a>- </li>-- <li>- <a href="#bytebase.v1.Task"><span class="badge">M</span>Task</a>- </li>-- <li>- <a href="#bytebase.v1.Task.DatabaseCreate"><span class="badge">M</span>Task.DatabaseCreate</a>- </li>-- <li>- <a href="#bytebase.v1.Task.DatabaseDataExport"><span class="badge">M</span>Task.DatabaseDataExport</a>- </li>-- <li>- <a href="#bytebase.v1.Task.DatabaseUpdate"><span class="badge">M</span>Task.DatabaseUpdate</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRun"><span class="badge">M</span>TaskRun</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRun.SchedulerInfo"><span class="badge">M</span>TaskRun.SchedulerInfo</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause"><span class="badge">M</span>TaskRun.SchedulerInfo.WaitingCause</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLog"><span class="badge">M</span>TaskRunLog</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry"><span class="badge">M</span>TaskRunLogEntry</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute"><span class="badge">M</span>TaskRunLogEntry.CommandExecute</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse"><span class="badge">M</span>TaskRunLogEntry.CommandExecute.CommandResponse</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff"><span class="badge">M</span>TaskRunLogEntry.ComputeDiff</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync"><span class="badge">M</span>TaskRunLogEntry.DatabaseSync</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup"><span class="badge">M</span>TaskRunLogEntry.PriorBackup</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table"><span class="badge">M</span>TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute"><span class="badge">M</span>TaskRunLogEntry.ReleaseFileExecute</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.RetryInfo"><span class="badge">M</span>TaskRunLogEntry.RetryInfo</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.SchemaDump"><span class="badge">M</span>TaskRunLogEntry.SchemaDump</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl"><span class="badge">M</span>TaskRunLogEntry.TransactionControl</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunSession"><span class="badge">M</span>TaskRunSession</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunSession.Postgres"><span class="badge">M</span>TaskRunSession.Postgres</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunSession.Postgres.Session"><span class="badge">M</span>TaskRunSession.Postgres.Session</a>- </li>--- <li>- <a href="#bytebase.v1.Task.Status"><span class="badge">E</span>Task.Status</a>- </li>-- <li>- <a href="#bytebase.v1.Task.Type"><span class="badge">E</span>Task.Type</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRun.ExportArchiveStatus"><span class="badge">E</span>TaskRun.ExportArchiveStatus</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRun.Status"><span class="badge">E</span>TaskRun.Status</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type"><span class="badge">E</span>TaskRunLogEntry.TransactionControl.Type</a>- </li>-- <li>- <a href="#bytebase.v1.TaskRunLogEntry.Type"><span class="badge">E</span>TaskRunLogEntry.Type</a>- </li>---- <li>- <a href="#bytebase.v1.RolloutService"><span class="badge">S</span>RolloutService</a>- </li>-- </ul>- </li>--- <li>- <a href="#v1%2fservice_account_service.proto">v1/service_account_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.CreateServiceAccountRequest"><span class="badge">M</span>CreateServiceAccountRequest</a>- </li>-- <li>- <a href="#bytebase.v1.DeleteServiceAccountRequest"><span class="badge">M</span>DeleteServiceAccountRequest</a>- </li>-- <li>- <a href="#bytebase.v1.GetServiceAccountRequest"><span class="badge">M</span>GetServiceAccountRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListServiceAccountsRequest"><span class="badge">M</span>ListServiceAccountsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListServiceAccountsResponse"><span class="badge">M</span>ListServiceAccountsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.ServiceAccount"><span class="badge">M</span>ServiceAccount</a>- </li>-- <li>- <a href="#bytebase.v1.UndeleteServiceAccountRequest"><span class="badge">M</span>UndeleteServiceAccountRequest</a>- </li>-- <li>- <a href="#bytebase.v1.UpdateServiceAccountRequest"><span class="badge">M</span>UpdateServiceAccountRequest</a>- </li>----- <li>- <a href="#bytebase.v1.ServiceAccountService"><span class="badge">S</span>ServiceAccountService</a>- </li>-- </ul>- </li>--- <li>- <a href="#v1%2fsheet_service.proto">v1/sheet_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.BatchCreateSheetsRequest"><span class="badge">M</span>BatchCreateSheetsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.BatchCreateSheetsResponse"><span class="badge">M</span>BatchCreateSheetsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.CreateSheetRequest"><span class="badge">M</span>CreateSheetRequest</a>- </li>-- <li>- <a href="#bytebase.v1.GetSheetRequest"><span class="badge">M</span>GetSheetRequest</a>+ <a href="#bytebase.v1.GetSheetRequest"><span class="badge">M</span>GetSheetRequest</a></li><li>@@ -20442,12 +20450,12 @@ Permissions required: bb.policies.delete</p></td><div class="file-heading">- <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>+ <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3><p></p>@@ -20458,10 +20466,20 @@ Permissions required: bb.policies.delete</p></td><tbody><tr>- <td>messages</td>- <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The task name for the taskRuns.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}+Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. </p></td>+ </tr>++ <tr>+ <td>task_runs</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>The taskRuns to cancel.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -20471,7 +20489,14 @@ Permissions required: bb.policies.delete</p></td>- <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>+ <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3><p></p>@@ -20482,17 +20507,33 @@ Permissions required: bb.policies.delete</p></td><tbody><tr>- <td>role</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>content</td>+ <td>tasks</td><td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The tasks to run.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ </tr>++ <tr>+ <td>run_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The task run should run after run_time. </p></td>+ </tr>++ <tr>+ <td>skip_prior_backup</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td></tr></tbody>@@ -20502,7 +20543,14 @@ Permissions required: bb.policies.delete</p></td>- <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>+ <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3><p></p>@@ -20513,11 +20561,26 @@ Permissions required: bb.policies.delete</p></td><tbody><tr>- <td>candidates</td>- <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The stage name for the tasks.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ </tr>++ <tr>+ <td>tasks</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p>candidates is used for results with multiple choices and candidates. Used-for OpenAI and Gemini. </p></td>+ <td><p>The tasks to skip.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ </tr>++ <tr>+ <td>reason</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The reason for skipping the tasks. </p></td></tr></tbody>@@ -20527,7 +20590,14 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>+ <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3><p></p>@@ -20538,10 +20608,21 @@ for OpenAI and Gemini. </p></td><tbody><tr>- <td>content</td>- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The parent plan for which this rollout will be created.+Format: projects/{project}/plans/{plan} </p></td>+ </tr>++ <tr>+ <td>target</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Create the rollout only for the specified target.+Format: environments/{environment}+If unspecified, all stages are created.+If set to "", no stages are created. </p></td></tr></tbody>@@ -20551,7 +20632,7 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>+ <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3><p></p>@@ -20562,10 +20643,12 @@ for OpenAI and Gemini. </p></td><tbody><tr>- <td>parts</td>- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>- <td>repeated</td>- <td><p>parts is used for a result content with multiple parts. </p></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the rollout to retrieve.+This is the rollout resource name, which is the plan name plus /rollout suffix.+Format: projects/{project}/plans/{plan}/rollout </p></td></tr></tbody>@@ -20575,7 +20658,7 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>+ <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3><p></p>@@ -20586,10 +20669,10 @@ for OpenAI and Gemini. </p></td><tbody><tr>- <td>text</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -20599,7 +20682,7 @@ for OpenAI and Gemini. </p></td>- <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>+ <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3><p></p>@@ -20613,38 +20696,7 @@ for OpenAI and Gemini. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the instance name to execute the query against.-Format: instances/{instance}/databases/{databaseName} </p></td>- </tr>-- <tr>- <td>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SQL statement to execute. </p></td>- </tr>-- <tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of rows to return. </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The default schema to execute the statement. Equals to the current schema-in Oracle and search path in Postgres. </p></td>- </tr>-- <tr>- <td>container</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Container is the container name to execute the query against, used for-CosmosDB only. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -20654,7 +20706,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>+ <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3><p></p>@@ -20665,10 +20717,10 @@ CosmosDB only. </p></td><tbody><tr>- <td>results</td>- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>- <td>repeated</td>- <td><p>The query results. </p></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -20678,7 +20730,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.Advice">Advice</h3>+ <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3><p></p>@@ -20689,53 +20741,81 @@ CosmosDB only. </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The advice level. </p></td>+ <td><p>The parent, which owns this collection of rollouts.+Format: projects/{project}+Use "projects/-" to list all rollouts from all projects. </p></td></tr><tr>- <td>code</td>+ <td>page_size</td><td><a href="#int32">int32</a></td><td></td>- <td><p>The advice code. </p></td>+ <td><p>The maximum number of rollouts to return. The service may return fewer than+this value.+If unspecified, at most 10 rollouts will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>title</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>The advice title. </p></td>+ <td><p>A page token, received from a previous `ListRollouts` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListRollouts` must match+the call that provided the page token. </p></td></tr><tr>- <td>content</td>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>The advice content. </p></td>+ <td><p>Filter is used to filter rollouts returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- task_type: the task type, support "in" operator, check the Task.Type enum for the values.++For example:+update_time >= "2025-01-02T15:04:05Z07:00"+task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td></tr>- <tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>The start_position is inclusive and the end_position is exclusive.-TODO: use range instead </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</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>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p> </p></td>+ <td>rollouts</td>+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td>repeated</td>+ <td><p>The rollouts from the specified request. </p></td></tr><tr>- <td>rule_type</td>- <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The type of linting rule that generated this advice. </p></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody>@@ -20745,7 +20825,7 @@ TODO: use range instead </p></td>- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>+ <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</h3><p></p>@@ -20756,24 +20836,12 @@ TODO: use range instead </p></td><tbody><tr>- <td>source_metadata</td>- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>- <td></td>- <td><p>The metadata of the source schema. </p></td>- </tr>-- <tr>- <td>target_metadata</td>- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>- <td></td>- <td><p>The metadata of the target schema. </p></td>- </tr>-- <tr>- <td>engine</td>- <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The database engine of the schema. </p></td>+ <td><p>The parent, which owns this collection of taskRuns.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}+Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. </p></td></tr></tbody>@@ -20783,7 +20851,7 @@ TODO: use range instead </p></td>- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>+ <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</h3><p></p>@@ -20794,10 +20862,10 @@ TODO: use range instead </p></td><tbody><tr>- <td>diff</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The diff of the metadata. </p></td>+ <td>task_runs</td>+ <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>+ <td>repeated</td>+ <td><p>The taskRuns from the specified request. </p></td></tr></tbody>@@ -20807,7 +20875,7 @@ TODO: use range instead </p></td>- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>+ <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</h3><p></p>@@ -20821,66 +20889,7 @@ TODO: use range instead </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the resource name to execute the export against.-Format: instances/{instance}/databases/{database}-Format: instances/{instance}-Format: projects/{project}/plans/{plan}/rollout-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>- </tr>-- <tr>- <td>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The SQL statement to execute. </p></td>- </tr>-- <tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of rows to return. </p></td>- </tr>-- <tr>- <td>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>- <td></td>- <td><p>The export format. </p></td>- </tr>-- <tr>- <td>admin</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The admin is used for workspace owner and DBA for exporting data from SQL-Editor Admin mode. The exported data is not masked. </p></td>- </tr>-- <tr>- <td>password</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The zip password provide by users. </p></td>- </tr>-- <tr>- <td>data_source_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The id of data source.-If omitted, Export resolves the data source server-side by using the-single read-only data source when exactly one exists, or the admin data-source otherwise. It can also be set explicitly to export from the admin-data source or a specific read-only data source. </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The default schema to search objects. Equals to the current schema in-Oracle and search path in Postgres. </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr></tbody>@@ -20890,7 +20899,7 @@ Oracle and search path in Postgres. </p></td>- <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>+ <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</h3><p></p>@@ -20901,10 +20910,10 @@ Oracle and search path in Postgres. </p></td><tbody><tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>+ <td>statement</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The export file content. </p></td>+ <td><p>The rollback SQL statement that would undo the task run. </p></td></tr></tbody>@@ -20914,7 +20923,7 @@ Oracle and search path in Postgres. </p></td>- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>+ <h3 id="bytebase.v1.Rollout">Rollout</h3><p></p>@@ -20925,52 +20934,89 @@ Oracle and search path in Postgres. </p></td><tbody><tr>- <td>semantic_type_id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The semantic type that triggered masking (e.g., "SSN", "email", "phone"). </p></td>+ <td><p>The resource name of the rollout.+Format: projects/{project}/plans/{plan}/rollout </p></td></tr><tr>- <td>semantic_type_title</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>Human-readable semantic type title. </p></td>+ <td><p>The title of the rollout, inherited from the associated plan.+This field is output only and cannot be directly set. </p></td></tr><tr>- <td>masking_rule_id</td>- <td><a href="#string">string</a></td>+ <td>stages</td>+ <td><a href="#bytebase.v1.Stage">Stage</a></td>+ <td>repeated</td>+ <td><p>Stages and thus tasks of the rollout. </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The masking rule ID that matched (if applicable). </p></td>+ <td><p> </p></td></tr><tr>- <td>algorithm</td>- <td><a href="#string">string</a></td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The masking algorithm used. </p></td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Stage">Stage</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>context</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+Use "-" for {stage} when the stage has no environment or deleted environment. </p></td></tr><tr>- <td>classification_level</td>- <td><a href="#int32">int32</a></td>+ <td>id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The classification level that triggered masking. </p></td>+ <td><p>id is the environment id of the stage.+e.g., "prod".+Use "-" when the stage has no environment or deleted environment. </p></td></tr><tr>- <td>semantic_type_icon</td>+ <td>environment</td><td><a href="#string">string</a></td><td></td>- <td><p>Icon associated with the semantic type (if any). </p></td>+ <td><p>environment is the environment of the stage.+Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. </p></td>+ </tr>++ <tr>+ <td>tasks</td>+ <td><a href="#bytebase.v1.Task">Task</a></td>+ <td>repeated</td>+ <td><p>The tasks within this stage. </p></td></tr></tbody>@@ -20980,7 +21026,7 @@ Oracle and search path in Postgres. </p></td>- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>+ <h3 id="bytebase.v1.Task">Task</h3><p></p>@@ -20994,60 +21040,82 @@ Oracle and search path in Postgres. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name for the query history.-Format: projects/{project}/queryHistories/{id} </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td></tr><tr>- <td>database</td>+ <td>spec_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The database name to execute the query.-Format: instances/{instance}/databases/{databaseName} </p></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>creator</td>+ <td>status</td>+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>+ <td></td>+ <td><p>Status is the status of the task. </p></td>+ </tr>++ <tr>+ <td>skipped_reason</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The reason why the task was skipped. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td><td></td><td><p> </p></td></tr><tr>- <td>statement</td>+ <td>target</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: instances/{instance} if the task is DatabaseCreate.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td>optional</td>+ <td>database_create</td>+ <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>duration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>database_update</td>+ <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td><td></td><td><p> </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>+ <td>database_data_export</td>+ <td><a href="#bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The update_time is the update time of latest task run.+If there are no task runs, it will be empty. </p></td>+ </tr>++ <tr>+ <td>run_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The run_time is the scheduled run time of latest task run.+If there are no task runs or the task run is not scheduled, it will be empty. </p></td>+ </tr>+</tbody></table>@@ -21055,8 +21123,8 @@ Format: instances/{instance}/databases/{databaseName} </p></td>- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>- <p></p>+ <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>+ <p>Payload for creating a new database.</p><table class="field-table">@@ -21066,17 +21134,10 @@ Format: instances/{instance}/databases/{databaseName} </p></td><tbody><tr>- <td>redis_run_commands_on</td>- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>mssql_explain_format</td>- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>+ <td>sheet</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td></tr></tbody>@@ -21086,8 +21147,8 @@ Format: instances/{instance}/databases/{databaseName} </p></td>- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>- <p></p>+ <h3 id="bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</h3>+ <p>Payload for exporting database data.</p><table class="field-table">@@ -21097,90 +21158,42 @@ Format: instances/{instance}/databases/{databaseName} </p></td><tbody><tr>- <td>name</td>+ <td>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the instance name to execute the query against.-Format: instances/{instance}/databases/{databaseName} </p></td>+ <td><p>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>+ <p>Payload for updating a database schema.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>statement</td>+ <td>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>The SQL statement to execute. </p></td>+ <td><p>Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>limit</td>- <td><a href="#int32">int32</a></td>+ <td>release</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of rows to return. </p></td>- </tr>-- <tr>- <td>data_source_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The id of data source.-If omitted, Query resolves the data source server-side by using the single-read-only data source when exactly one exists, or the admin data source-otherwise. It can also be set explicitly to query the admin data source or-a specific read-only data source. </p></td>- </tr>-- <tr>- <td>explain</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Explain the statement. </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The default schema to search objects. Equals to the current schema in-Oracle and search path in Postgres. </p></td>- </tr>-- <tr>- <td>query_option</td>- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>container</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Container is the container name to execute the query against, used for-CosmosDB only. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.QueryResponse">QueryResponse</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>results</td>- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>- <td>repeated</td>- <td><p>The query results. </p></td>+ <td><p>Format: projects/{project}/releases/{release} </p></td></tr></tbody>@@ -21190,7 +21203,7 @@ CosmosDB only. </p></td>- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>+ <h3 id="bytebase.v1.TaskRun">TaskRun</h3><p></p>@@ -21201,96 +21214,115 @@ CosmosDB only. </p></td><tbody><tr>- <td>column_names</td>+ <td>name</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Column names of the query result. </p></td>+ <td></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr><tr>- <td>column_type_names</td>+ <td>creator</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Column types of the query result.-The types come from the Golang SQL driver. </p></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td></tr><tr>- <td>rows</td>- <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>- <td>repeated</td>- <td><p>Rows of the query result. </p></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>rows_count</td>- <td><a href="#int64">int64</a></td>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td><td><p> </p></td></tr><tr>- <td>error</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td><td></td>- <td><p>The error message if the query failed. </p></td>+ <td><p>The current execution status of the task run. </p></td></tr><tr>- <td>latency</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>detail</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The time it takes to execute the query. </p></td>+ <td><p>Below are the results of a task run.+Detailed information about the task run result. </p></td></tr><tr>- <td>statement</td>- <td><a href="#string">string</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The query statement for the result. </p></td>+ <td><p>The time when the task run started execution. </p></td></tr><tr>- <td>postgres_error</td>- <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>+ <td>export_archive_status</td>+ <td><a href="#bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</a></td><td></td>- <td><p> </p></td>+ <td><p>The export archive status for data export tasks. </p></td></tr><tr>- <td>syntax_error</td>- <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>+ <td>has_prior_backup</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Indicates whether a prior backup was created for this task run.+When true, rollback SQL can be generated via PreviewTaskRunRollback.+Backup details are available in the task run logs. </p></td></tr><tr>- <td>permission_denied</td>- <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>+ <td>scheduler_info</td>+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td><td></td>- <td><p> </p></td>+ <td><p>Scheduling information about the task run. </p></td></tr><tr>- <td>command_error</td>- <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>- <td></td>- <td><p> </p></td>+ <td>run_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>The task run should run after run_time.+This can only be set when creating the task run calling BatchRunTasks. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>+ <p>Information about task run scheduling.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>messages</td>- <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>- <td>repeated</td>- <td><p>Informational or debug messages returned by the database engine during query execution.-Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. </p></td>+ <td>report_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The time when the scheduling info was reported. </p></td></tr><tr>- <td>masked</td>- <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>- <td>repeated</td>- <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>+ <td>waiting_cause</td>+ <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td>+ <td></td>+ <td><p>The cause for the task run waiting. </p></td></tr></tbody>@@ -21300,8 +21332,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>- <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>+ <h3 id="bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</h3>+ <p>Information about why a task run is waiting.</p><table class="field-table">@@ -21311,10 +21343,10 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>command_type</td>- <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>+ <td>parallel_tasks_limit</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Disallowed command_type. </p></td>+ <td><p>Waiting due to parallel tasks limit. </p></td></tr></tbody>@@ -21324,7 +21356,7 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>+ <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3><p></p>@@ -21335,17 +21367,17 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>level</td>- <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td></tr><tr>- <td>content</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>entries</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td>+ <td>repeated</td>+ <td><p>The log entries for this task run. </p></td></tr></tbody>@@ -21355,8 +21387,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>- <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>+ <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3>+ <p></p><table class="field-table">@@ -21366,122 +21398,127 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>severity</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td><td></td>- <td><p> </p></td>+ <td><p>The type of this log entry. </p></td></tr><tr>- <td>code</td>- <td><a href="#string">string</a></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>The time when the log was recorded. </p></td></tr><tr>- <td>message</td>+ <td>replica_id</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The replica ID for this log entry. </p></td></tr><tr>- <td>detail</td>- <td><a href="#string">string</a></td>+ <td>schema_dump</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td><td></td>- <td><p> </p></td>+ <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td></tr><tr>- <td>hint</td>- <td><a href="#string">string</a></td>+ <td>command_execute</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td><td></td>- <td><p> </p></td>+ <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td></tr><tr>- <td>position</td>- <td><a href="#int32">int32</a></td>+ <td>database_sync</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td><td></td>- <td><p> </p></td>+ <td><p>Database sync details (if type is DATABASE_SYNC). </p></td></tr><tr>- <td>internal_position</td>- <td><a href="#int32">int32</a></td>+ <td>transaction_control</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td><td></td>- <td><p> </p></td>+ <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td></tr><tr>- <td>internal_query</td>- <td><a href="#string">string</a></td>+ <td>prior_backup</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td><td></td>- <td><p> </p></td>+ <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td></tr><tr>- <td>where</td>- <td><a href="#string">string</a></td>+ <td>retry_info</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td><td></td>- <td><p> </p></td>+ <td><p>Retry information details (if type is RETRY_INFO). </p></td></tr><tr>- <td>schema_name</td>- <td><a href="#string">string</a></td>+ <td>compute_diff</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td><td></td>- <td><p> </p></td>+ <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td></tr><tr>- <td>table_name</td>- <td><a href="#string">string</a></td>+ <td>release_file_execute</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td><td></td>- <td><p> </p></td>+ <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td></tr>- <tr>- <td>column_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>+ <p>Command execution details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>data_type_name</td>- <td><a href="#string">string</a></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the command was logged. </p></td></tr><tr>- <td>constraint_name</td>- <td><a href="#string">string</a></td>+ <td>range</td>+ <td><a href="#bytebase.v1.Range">Range</a></td><td></td>- <td><p> </p></td>+ <td><p>The byte offset range of the executed command in the sheet.+Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.+Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. </p></td></tr><tr>- <td>file</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>line</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The executed statement. </p></td></tr><tr>- <td>routine</td>- <td><a href="#string">string</a></td>+ <td>response</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</a></td><td></td>- <td><p> </p></td>+ <td><p>The response from executing the command. </p></td></tr></tbody>@@ -21491,8 +21528,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>- <p>Syntax error with position information for editor highlighting</p>+ <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>+ <p>Command execution response.</p><table class="field-table">@@ -21502,34 +21539,32 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>log_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>Position information for highlighting in editor </p></td>+ <td><p>When the response was logged. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.QueryRow">QueryRow</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>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Error message if command execution failed. </p></td>+ </tr><tr>- <td>values</td>- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>Total affected rows. </p></td>+ </tr>++ <tr>+ <td>all_affected_rows</td>+ <td><a href="#int64">int64</a></td><td>repeated</td>- <td><p>Row values of the query result. </p></td>+ <td><p>`all_affected_rows` is the affected rows of each command.+`all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. </p></td></tr></tbody>@@ -21539,8 +21574,8 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'- <h3 id="bytebase.v1.RowValue">RowValue</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>+ <p>Schema diff computation details.</p><table class="field-table">@@ -21550,98 +21585,107 @@ Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle'<tbody><tr>- <td>null_value</td>- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>bool_value</td>- <td><a href="#bool">bool</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When diff computation started. </p></td></tr><tr>- <td>bytes_value</td>- <td><a href="#bytes">bytes</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When diff computation ended. </p></td></tr><tr>- <td>double_value</td>- <td><a href="#double">double</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Error message if computation failed. </p></td></tr>- <tr>- <td>float_value</td>- <td><a href="#float">float</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>+ <p>Database synchronization details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>int32_value</td>- <td><a href="#int32">int32</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the database sync started. </p></td></tr><tr>- <td>int64_value</td>- <td><a href="#int64">int64</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the database sync ended. </p></td></tr><tr>- <td>string_value</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Error message if sync failed. </p></td></tr>- <tr>- <td>uint32_value</td>- <td><a href="#uint32">uint32</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>+ <p>Prior backup operation details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>uint64_value</td>- <td><a href="#uint64">uint64</a></td>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>When the backup started. </p></td></tr><tr>- <td>value_value</td>- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>+ <td><p>When the backup ended. </p></td></tr><tr>- <td>timestamp_value</td>- <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>+ <td>prior_backup_detail</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td><td></td>- <td><p>timestamp_value is used for the timestamp without time zone data type,-meaning it only includes the timestamp without any time zone or location-info. Although it may be expressed as a UTC value, it should be seen as a-timestamp missing location context. </p></td>+ <td><p>The backup details. </p></td></tr><tr>- <td>timestamp_tz_value</td>- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>timestamp_tz_value is used for the timestamptz data type, which-accurately represents the timestamp with location information. </p></td>+ <td><p>Error message if the backup failed. </p></td></tr></tbody>@@ -21651,8 +21695,8 @@ accurately represents the timestamp with location information. </p></td>- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>+ <p>Prior backup detail for rollback purposes.</p><table class="field-table">@@ -21662,17 +21706,10 @@ accurately represents the timestamp with location information. </p></td><tbody><tr>- <td>google_timestamp</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>accuracy</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The accuracy is the number of digits after the decimal point. </p></td>+ <td>items</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></td>+ <td>repeated</td>+ <td><p>The list of backed up tables. </p></td></tr></tbody>@@ -21682,8 +21719,8 @@ accurately represents the timestamp with location information. </p></td>- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>+ <p>A single backup table mapping.</p><table class="field-table">@@ -21693,36 +21730,31 @@ accurately represents the timestamp with location information. </p></td><tbody><tr>- <td>google_timestamp</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>source_table</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td><td></td>- <td><p> </p></td>+ <td><p>The original table information. </p></td></tr><tr>- <td>zone</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Zone is the time zone abbreviations in timezone database such as "PDT",-"PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We-retrieve the time zone information from the timestamptz field in the-database. A timestamp is in UTC or epoch time, and with zone info, we can-convert it to a local time string. Zone and offset are returned by-time.Time.Zone() </p></td>+ <td>target_table</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>+ <td></td>+ <td><p>The target backup table information. </p></td></tr><tr>- <td>offset</td>- <td><a href="#int32">int32</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>The offset is in seconds east of UTC </p></td>+ <td><p>The start position in the SQL statement. </p></td></tr><tr>- <td>accuracy</td>- <td><a href="#int32">int32</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p> </p></td>+ <td><p>The end position in the SQL statement. </p></td></tr></tbody>@@ -21732,8 +21764,8 @@ time.Time.Zone() </p></td>- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>+ <p>Table information.</p><table class="field-table">@@ -21743,45 +21775,25 @@ time.Time.Zone() </p></td><tbody><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>database</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of histories to return.-The service may return fewer than this value.-If unspecified, at most 10 history entries will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>The database information.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>page_token</td>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ListQueryHistory` call.-Provide this to retrieve the subsequent page. </p></td>+ <td><p>The schema name. </p></td></tr><tr>- <td>filter</td>+ <td>table</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is the filter to apply on the search query history-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filter:-- project: the project full name in "projects/{id}" format, support "==" operator.-- database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.-- instance: the instance full name in "instances/{id}" format, support "==" operator.-- type: the type, should be "QUERY" or "EXPORT", support "==" operator.-- statement: the SQL statement, support ".matches()" operator.--For example:-project == "projects/{project}"-database == "instances/{instance}/databases/{database}"-instance == "instances/{instance}"-type == "QUERY"-type == "EXPORT"-statement.matches("select")-type == "QUERY" && statement.matches("select") </p></td>+ <td><p>The table name. </p></td></tr></tbody>@@ -21791,8 +21803,8 @@ type == "QUERY" && statement.matches("select") </p></td>- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>- <p></p>+ <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>+ <p>Release file execution details.</p><table class="field-table">@@ -21802,19 +21814,17 @@ type == "QUERY" && statement.matches("select") </p></td><tbody><tr>- <td>query_histories</td>- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>- <td>repeated</td>- <td><p>The list of history. </p></td>+ <td>version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The version of the file being executed (e.g., "0001"). </p></td></tr><tr>- <td>next_page_token</td>+ <td>file_path</td><td><a href="#string">string</a></td><td></td>- <td><p>A token to retrieve next page of history.-Pass this value in the page_token field in the subsequent call to-`ListQueryHistory` method to retrieve the next page of history. </p></td>+ <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td></tr></tbody>@@ -21824,133 +21834,359 @@ Pass this value in the page_token field in the subsequent call to+ <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>+ <p>Retry information for failed operations.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The error that triggered the retry. </p></td>+ </tr>++ <tr>+ <td>retry_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Current retry attempt number. </p></td>+ </tr>++ <tr>+ <td>maximum_retries</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>Maximum number of retries allowed. </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>- <p>Level represents the severity level of the advice.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ADVICE_LEVEL_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified advice level.</p></td>- </tr>-- <tr>- <td>SUCCESS</td>- <td>1</td>- <td><p>Success status indicating the check passed without issues.</p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p>Warning status indicating potential issues that should be reviewed.</p></td>- </tr>-- <tr>- <td>ERROR</td>- <td>3</td>- <td><p>Error status indicating critical issues that must be addressed.</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>+ <p>Schema dump operation details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>start_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>When the schema dump started. </p></td>+ </tr>++ <tr>+ <td>end_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>When the schema dump ended. </p></td>+ </tr>++ <tr>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Error message if the schema dump failed. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>- <p>RuleType indicates the source of the linting rule.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>RULE_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified rule type.</p></td>- </tr>-- <tr>- <td>PARSER_BASED</td>- <td>1</td>- <td><p>Parser-based rule enforced by the built-in SQL parser.-These are non-configurable, mandatory checks for schema health.</p></td>- </tr>-- <tr>- <td>AI_POWERED</td>- <td>2</td>- <td><p>AI-powered rule defined by user in natural language.-These are custom, flexible checks powered by AI models.</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>+ <p>Transaction control operation details.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>+ <td></td>+ <td><p>The type of transaction control. </p></td>+ </tr>++ <tr>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Error message if the operation failed. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>+ <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</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>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td>+ </tr>++ <tr>+ <td>postgres</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>+ <td></td>+ <td><p>PostgreSQL session information. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>+ <p>PostgreSQL session information.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>session</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td></td>+ <td><p>`session` is the session of the task run executing commands. </p></td>+ </tr>++ <tr>+ <td>blocking_sessions</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>repeated</td>+ <td><p>`blocking_sessions` block `session`. </p></td>+ </tr>++ <tr>+ <td>blocked_sessions</td>+ <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>repeated</td>+ <td><p>`blocked_sessions` are blocked by `session`. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>+ <p>PostgreSQL session information read from `pg_stat_activity`.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>pid</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Process ID of the session. </p></td>+ </tr>++ <tr>+ <td>blocked_by_pids</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>PIDs of sessions blocking this session. </p></td>+ </tr>++ <tr>+ <td>query</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Current query being executed. </p></td>+ </tr>++ <tr>+ <td>state</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Session state (active, idle, etc.). </p></td>+ </tr>++ <tr>+ <td>wait_event_type</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Wait event type if session is waiting. </p></td>+ </tr>++ <tr>+ <td>wait_event</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Specific wait event if session is waiting. </p></td>+ </tr>++ <tr>+ <td>datname</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Database name. </p></td>+ </tr>++ <tr>+ <td>usename</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>User name. </p></td>+ </tr>++ <tr>+ <td>application_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Application name. </p></td>+ </tr>++ <tr>+ <td>client_addr</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client IP address. </p></td>+ </tr>++ <tr>+ <td>client_port</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Client port number. </p></td>+ </tr>++ <tr>+ <td>backend_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>When the backend process started. </p></td>+ </tr>++ <tr>+ <td>xact_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>When the current transaction started. </p></td>+ </tr>++ <tr>+ <td>query_start</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>optional</td>+ <td><p>When the current query started. </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.Task.Status">Task.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>Unspecified query history type.</p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>QUERY</td>+ <td>NOT_STARTED</td><td>1</td>- <td><p>Query execution for data retrieval.</p></td>+ <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td></tr><tr>- <td>EXPORT</td>+ <td>PENDING</td><td>2</td>- <td><p>Data export operation to file.</p></td>+ <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td></tr>- </tbody>- </table>-- <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>RUNNING</td>+ <td>3</td>+ <td><p>Task is currently executing.</p></td>+ </tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>- <td>0</td>- <td><p>defaults to SHOWPLAN_ALL</p></td>+ <td>DONE</td>+ <td>4</td>+ <td><p>Task completed successfully.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>- <td>1</td>- <td><p>SHOWPLAN_ALL</p></td>+ <td>FAILED</td>+ <td>5</td>+ <td><p>Task execution failed with errors.</p></td></tr><tr>- <td>MSSQL_EXPLAIN_FORMAT_XML</td>- <td>2</td>- <td><p>SHOWPLAN_XML</p></td>+ <td>CANCELED</td>+ <td>6</td>+ <td><p>Task execution was canceled by a user.</p></td>+ </tr>++ <tr>+ <td>SKIPPED</td>+ <td>7</td>+ <td><p>Task was skipped and will not be executed.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>+ <h3 id="bytebase.v1.Task.Type">Task.Type</h3><p></p><table class="enum-table"><thead>@@ -21959,27 +22195,42 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>+ <td><p>Unspecified task type.</p></td></tr><tr>- <td>SINGLE_NODE</td>+ <td>GENERAL</td><td>1</td>- <td><p>Execute Redis commands on a single node in the cluster.</p></td>+ <td><p>General task for miscellaneous operations.</p></td></tr><tr>- <td>ALL_NODES</td>+ <td>DATABASE_CREATE</td><td>2</td>- <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>+ <td><p>Database creation task that creates a new database.+Use payload DatabaseCreate.</p></td>+ </tr>++ <tr>+ <td>DATABASE_MIGRATE</td>+ <td>3</td>+ <td><p>Database migration task that applies versioned schema changes.+Use payload DatabaseUpdate.</p></td>+ </tr>++ <tr>+ <td>DATABASE_EXPORT</td>+ <td>4</td>+ <td><p>Database export task that exports query results or table data.+Use payload DatabaseDataExport.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>+ <h3 id="bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</h3><p></p><table class="enum-table"><thead>@@ -21988,33 +22239,27 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>EXPORT_ARCHIVE_STATUS_UNSPECIFIED</td><td>0</td>- <td><p></p></td>+ <td><p>Unspecified export archive status.</p></td></tr><tr>- <td>DDL</td>+ <td>READY</td><td>1</td>- <td><p></p></td>+ <td><p>Export archive is ready for download.</p></td></tr><tr>- <td>DML</td>+ <td>EXPORTED</td><td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>NON_READ_ONLY</td>- <td>3</td>- <td><p></p></td>+ <td><p>Export archive has been downloaded by the user.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>+ <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3><p></p><table class="enum-table"><thead>@@ -22023,247 +22268,391 @@ These are custom, flexible checks powered by AI models.</p></td><tbody><tr>- <td>LEVEL_UNSPECIFIED</td>+ <td>STATUS_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified message level.</p></td>+ <td><p>Unspecified status.</p></td></tr><tr>- <td>INFO</td>+ <td>PENDING</td><td>1</td>- <td><p>Informational message.</p></td>+ <td><p>Task run is queued and waiting to start execution.</p></td></tr><tr>- <td>WARNING</td>+ <td>RUNNING</td><td>2</td>- <td><p>Warning message indicating potential issues.</p></td>+ <td><p>Task run is currently executing.</p></td></tr><tr>- <td>DEBUG</td>+ <td>DONE</td><td>3</td>- <td><p>Debug message for development and troubleshooting.</p></td>+ <td><p>Task run completed successfully.</p></td></tr><tr>- <td>LOG</td>+ <td>FAILED</td><td>4</td>- <td><p>General log message.</p></td>+ <td><p>Task run execution failed with errors.</p></td></tr><tr>- <td>NOTICE</td>+ <td>CANCELED</td><td>5</td>- <td><p>Notice message for important information.</p></td>+ <td><p>Task run execution was canceled by a user.</p></td></tr><tr>- <td>EXCEPTION</td>+ <td>AVAILABLE</td><td>6</td>- <td><p>Exception message indicating error conditions.</p></td>+ <td><p>Task run is ready for immediate execution.</p></td></tr></tbody></table>----- <h3 id="bytebase.v1.SQLService">SQLService</h3>- <p>SQLService executes SQL queries and manages query operations.</p>+ <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>+ <p>Transaction control type.</p><table class="enum-table"><thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr></thead><tbody><tr>- <td>Query</td>- <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>- <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>- <td><p>Executes a read-only SQL query against a database.-Permissions required: bb.databases.get</p></td>- </tr>-- <tr>- <td>AdminExecute</td>- <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>- <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>- <td><p>Executes SQL with admin privileges via streaming connection.-Permissions required: bb.sql.admin</p></td>- </tr>-- <tr>- <td>SearchQueryHistories</td>- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>- <td><p>SearchQueryHistories searches query histories for the caller.-Permissions required: None (only returns caller's own query histories)</p></td>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified type.</p></td></tr><tr>- <td>Export</td>- <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>- <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>- <td><p>Exports query results to a file format.-Permissions required: bb.databases.get</p></td>+ <td>BEGIN</td>+ <td>1</td>+ <td><p>Begin transaction.</p></td></tr><tr>- <td>DiffMetadata</td>- <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>- <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>- <td><p>Computes schema differences between two database metadata.-Permissions required: None</p></td>+ <td>COMMIT</td>+ <td>2</td>+ <td><p>Commit transaction.</p></td></tr><tr>- <td>AICompletion</td>- <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>- <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>- <td><p>Provides AI-powered SQL completion and generation.-Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>+ <td>ROLLBACK</td>+ <td>3</td>+ <td><p>Rollback transaction.</p></td></tr></tbody></table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>++ <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>+ <p>The type of log entry.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified type.</p></td></tr>- </thead>- <tbody>--<tr>- <td>Query</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:query</td>- <td>*</td>+ <td>SCHEMA_DUMP</td>+ <td>1</td>+ <td><p>Schema dump operation.</p></td></tr>---<tr>- <td>AdminExecute</td>- <td>GET</td>- <td>/v1:adminExecute</td>- <td></td>+ <td>COMMAND_EXECUTE</td>+ <td>2</td>+ <td><p>Command execution.</p></td></tr>---<tr>- <td>SearchQueryHistories</td>- <td>POST</td>- <td>/v1/queryHistories:search</td>- <td>*</td>+ <td>DATABASE_SYNC</td>+ <td>3</td>+ <td><p>Database synchronization.</p></td></tr>---<tr>- <td>Export</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:export</td>- <td>*</td>+ <td>TRANSACTION_CONTROL</td>+ <td>5</td>+ <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td></tr>-+<tr>- <td>Export</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout}:export</td>- <td>*</td>+ <td>PRIOR_BACKUP</td>+ <td>6</td>+ <td><p>Prior backup operation.</p></td></tr>-+<tr>- <td>Export</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*}:export</td>- <td>*</td>+ <td>RETRY_INFO</td>+ <td>7</td>+ <td><p>Retry information.</p></td></tr>---<tr>- <td>DiffMetadata</td>- <td>POST</td>- <td>/v1/schemaDesign:diffMetadata</td>- <td>*</td>+ <td>COMPUTE_DIFF</td>+ <td>8</td>+ <td><p>Schema diff computation.</p></td></tr>---<tr>- <td>AICompletion</td>- <td>POST</td>- <td>/v1/sql/aiCompletion</td>- <td>*</td>+ <td>RELEASE_FILE_EXECUTE</td>+ <td>9</td>+ <td><p>Release file execution.</p></td></tr>-- </tbody>- </table>---+ </tbody>+ </table>- <div class="file-heading">- <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>- <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the plan check run to cancel.-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>- </tr>-++ <h3 id="bytebase.v1.RolloutService">RolloutService</h3>+ <p>RolloutService manages the execution of deployment plans.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>GetRollout</td>+ <td><a href="#bytebase.v1.GetRolloutRequest">GetRolloutRequest</a></td>+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td><p>Retrieves a rollout by its plan name.+Permissions required: bb.rollouts.get</p></td>+ </tr>++ <tr>+ <td>ListRollouts</td>+ <td><a href="#bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</a></td>+ <td><a href="#bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</a></td>+ <td><p>Lists rollouts in a project.+Permissions required: bb.rollouts.list</p></td>+ </tr>++ <tr>+ <td>CreateRollout</td>+ <td><a href="#bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</a></td>+ <td><a href="#bytebase.v1.Rollout">Rollout</a></td>+ <td><p>Creates a new rollout for a plan.+Permissions required: bb.rollouts.create (or issue creator for data export issues)</p></td>+ </tr>++ <tr>+ <td>ListTaskRuns</td>+ <td><a href="#bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</a></td>+ <td><a href="#bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</a></td>+ <td><p>Lists task run executions for a task.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>GetTaskRun</td>+ <td><a href="#bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</a></td>+ <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>+ <td><p>Retrieves a task run by name.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>GetTaskRunLog</td>+ <td><a href="#bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</a></td>+ <td><a href="#bytebase.v1.TaskRunLog">TaskRunLog</a></td>+ <td><p>Retrieves execution logs for a task run.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>GetTaskRunSession</td>+ <td><a href="#bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</a></td>+ <td><a href="#bytebase.v1.TaskRunSession">TaskRunSession</a></td>+ <td><p>Retrieves database session information for a running task.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ <tr>+ <td>BatchRunTasks</td>+ <td><a href="#bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</a></td>+ <td><a href="#bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</a></td>+ <td><p>Executes multiple tasks in a rollout stage.+Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ </tr>++ <tr>+ <td>BatchSkipTasks</td>+ <td><a href="#bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</a></td>+ <td><a href="#bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</a></td>+ <td><p>Skips multiple tasks in a rollout stage.+Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ </tr>++ <tr>+ <td>BatchCancelTaskRuns</td>+ <td><a href="#bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</a></td>+ <td><a href="#bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</a></td>+ <td><p>Cancels multiple running task executions.+Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ </tr>++ <tr>+ <td>PreviewTaskRunRollback</td>+ <td><a href="#bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</a></td>+ <td><a href="#bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</a></td>+ <td><p>Generates rollback SQL for a completed task run.+Permissions required: bb.taskRuns.list</p></td>+ </tr>++ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr>+ </thead>+ <tbody>++++ <tr>+ <td>GetRollout</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>ListRollouts</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/rollouts</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreateRollout</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*}/rollout</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>ListTaskRuns</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetTaskRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetTaskRunLog</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>+ <td></td>+ </tr>+++++ <tr>+ <td>GetTaskRunSession</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>+ <td></td>+ </tr>+++++ <tr>+ <td>BatchRunTasks</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>BatchSkipTasks</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>BatchCancelTaskRuns</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>PreviewTaskRunRollback</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>+ <td>*</td>+ </tr>++</tbody></table>--+- <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>- <p></p>--+ <div class="file-heading">+ <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>-- <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>+ <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3><p></p>@@ -22274,18 +22663,10 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent project where this plan will be created.-Format: projects/{project} </p></td>- </tr>-- <tr>- <td>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td></td>- <td><p>The plan to create. </p></td>+ <td>messages</td>+ <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -22295,7 +22676,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>+ <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3><p></p>@@ -22306,11 +22687,17 @@ Format: projects/{project} </p></td><tbody><tr>- <td>name</td>+ <td>role</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the plan check run to retrieve.-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>content</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -22320,7 +22707,7 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>+ <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3><p></p>@@ -22331,11 +22718,11 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the plan to retrieve.-Format: projects/{project}/plans/{plan} </p></td>+ <td>candidates</td>+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>+ <td>repeated</td>+ <td><p>candidates is used for results with multiple choices and candidates. Used+for OpenAI and Gemini. </p></td></tr></tbody>@@ -22345,7 +22732,7 @@ Format: projects/{project}/plans/{plan} </p></td>- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>+ <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3><p></p>@@ -22356,58 +22743,34 @@ Format: projects/{project}/plans/{plan} </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent, which owns this collection of plans.-Format: projects/{project}-Use "projects/-" to list all plans from all projects. </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>content</td>+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td><td></td>- <td><p>The maximum number of plans to return. The service may return fewer than-this value.-If unspecified, at most 10 plans will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p> </p></td></tr>- <tr>- <td>page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A page token, received from a previous `ListPlans` call.-Provide this to retrieve the subsequent page.+ </tbody>+ </table>-When paginating, all other parameters provided to `ListPlans` must match-the call that provided the page token. </p></td>- </tr>-- <tr>- <td>filter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Filter is used to filter plans returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+-Supported filters:-- creator: the plan creator full name in "users/{email or id}" format, support "==" operator.-- create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".-- has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".-- title: the plan title, support "==" operator for exact match and ".matches()" operator for case-insensitive substring match.-- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".-- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".+++ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>+ <p></p>-For example:-creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"-has_rollout == false && has_issue == true-title == "My Plan"-title.matches("database migration")-spec_type == "change_database_config"-state == "ACTIVE" </p></td>++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>parts</td>+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>+ <td>repeated</td>+ <td><p>parts is used for a result content with multiple parts. </p></td></tr></tbody>@@ -22417,7 +22780,7 @@ state == "ACTIVE" </p></td>- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3><p></p>@@ -22428,18 +22791,10 @@ state == "ACTIVE" </p></td><tbody><tr>- <td>plans</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td>repeated</td>- <td><p>The plans from the specified request. </p></td>- </tr>-- <tr>- <td>next_page_token</td>+ <td>text</td><td><a href="#string">string</a></td><td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>+ <td><p> </p></td></tr></tbody>@@ -22449,7 +22804,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.Plan">Plan</h3>+ <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3><p></p>@@ -22463,86 +22818,38 @@ If this field is omitted, there are no subsequent pages. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the plan.-`plan` is a system generated ID.-Format: projects/{project}/plans/{plan} </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#bytebase.v1.State">State</a></td>- <td></td>- <td><p>The state of the plan. </p></td>+ <td><p>The name is the instance name to execute the query against.+Format: instances/{instance}/databases/{databaseName} </p></td></tr><tr>- <td>issue</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>The issue associated with the plan.-Can be empty.-Format: projects/{project}/issues/{issue} </p></td>+ <td><p>The SQL statement to execute. </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>limit</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The title of the plan. </p></td>+ <td><p>The maximum number of rows to return. </p></td></tr><tr>- <td>description</td>+ <td>schema</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The description of the plan. </p></td>- </tr>-- <tr>- <td>specs</td>- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>- <td>repeated</td>- <td><p>The deployment specs for the plan. </p></td>+ <td>optional</td>+ <td><p>The default schema to execute the statement. Equals to the current schema+in Oracle and search path in Postgres. </p></td></tr><tr>- <td>creator</td>+ <td>container</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/[email protected] </p></td>- </tr>-- <tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>plan_check_run_status_count</td>- <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>- <td>repeated</td>- <td><p>The status count of the latest plan check runs.-Keys are:-- SUCCESS-- WARNING-- ERROR-- RUNNING </p></td>- </tr>-- <tr>- <td>has_rollout</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether the plan has started the rollout. </p></td>+ <td>optional</td>+ <td><p>Container is the container name to execute the query against, used for+CosmosDB only. </p></td></tr></tbody>@@ -22552,7 +22859,7 @@ Keys are:- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>+ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3><p></p>@@ -22563,35 +22870,10 @@ Keys are:<tbody><tr>- <td>targets</td>- <td><a href="#string">string</a></td>+ <td>results</td>+ <td><a href="#bytebase.v1.QueryResult">QueryResult</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>The resource name of the sheet.-Format: projects/{project}/sheets/{sheet} </p></td>- </tr>-- <tr>- <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>enable_prior_backup</td>- <td><a href="#bool">bool</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>The query results. </p></td></tr></tbody>@@ -22601,7 +22883,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>+ <h3 id="bytebase.v1.Advice">Advice</h3><p></p>@@ -22612,62 +22894,53 @@ Format: projects/{project}/releases/{release} </p></td><tbody><tr>- <td>target</td>- <td><a href="#string">string</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td><td></td>- <td><p>The resource name of the instance on which the database is created.-Format: instances/{instance} </p></td>+ <td><p>The advice level. </p></td></tr><tr>- <td>database</td>- <td><a href="#string">string</a></td>+ <td>code</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The name of the database to create. </p></td>+ <td><p>The advice code. </p></td></tr><tr>- <td>table</td>+ <td>title</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><p>The advice title. </p></td></tr><tr>- <td>character_set</td>+ <td>content</td><td><a href="#string">string</a></td><td></td>- <td><p>character_set is the character set of the database. </p></td>+ <td><p>The advice content. </p></td></tr><tr>- <td>collation</td>- <td><a href="#string">string</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>collation is the collation of the database. </p></td>+ <td><p>The start_position is inclusive and the end_position is exclusive.+TODO: use range instead </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 "ON CLUSTER <<cluster>>". </p></td>- </tr>-- <tr>- <td>owner</td>- <td><a href="#string">string</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>". </p></td>+ <td><p> </p></td></tr><tr>- <td>environment</td>- <td><a href="#string">string</a></td>+ <td>rule_type</td>+ <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td><td></td>- <td><p>The environment resource.-Format: environments/prod where prod is the environment resource ID. </p></td>+ <td><p>The type of linting rule that generated this advice. </p></td></tr></tbody>@@ -22677,7 +22950,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>+ <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3><p></p>@@ -22688,35 +22961,24 @@ 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><a href="#string">string</a></td>+ <td>source_metadata</td>+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td><td></td>- <td><p>The resource name of the sheet.-Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The metadata of the source schema. </p></td></tr><tr>- <td>format</td>- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>+ <td>target_metadata</td>+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td><td></td>- <td><p>The format of the exported file. </p></td>+ <td><p>The metadata of the target schema. </p></td></tr><tr>- <td>password</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The zip password provide by users.-Leave it empty if no needs to encrypt the zip file. </p></td>+ <td>engine</td>+ <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td></td>+ <td><p>The database engine of the schema. </p></td></tr></tbody>@@ -22726,7 +22988,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>+ <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3><p></p>@@ -22737,17 +22999,10 @@ Leave it empty if no needs to encrypt the zip file. </p></td><tbody><tr>- <td>key</td>+ <td>diff</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>value</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The diff of the metadata. </p></td></tr></tbody>@@ -22757,7 +23012,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3><p></p>@@ -22768,31 +23023,69 @@ Leave it empty if no needs to encrypt the zip file. </p></td><tbody><tr>- <td>id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td><p>The name is the resource name to execute the export against.+Format: instances/{instance}/databases/{database}+Format: instances/{instance}+Format: projects/{project}/plans/{plan}/rollout+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td></tr><tr>- <td>create_database_config</td>- <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>+ <td>statement</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The SQL statement to execute. </p></td></tr><tr>- <td>change_database_config</td>- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>+ <td>limit</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of rows to return. </p></td></tr><tr>- <td>export_data_config</td>- <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td><td></td>- <td><p> </p></td>+ <td><p>The export format. </p></td>+ </tr>++ <tr>+ <td>admin</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>The admin is used for workspace owner and DBA for exporting data from SQL+Editor Admin mode. The exported data is not masked. </p></td>+ </tr>++ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The zip password provide by users. </p></td>+ </tr>++ <tr>+ <td>data_source_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The id of data source.+If omitted, Export resolves the data source server-side by using the+single read-only data source when exactly one exists, or the admin data+source otherwise. It can also be set explicitly to export from the admin+data source or a specific read-only data source. </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The default schema to search objects. Equals to the current schema in+Oracle and search path in Postgres. </p></td></tr></tbody>@@ -22802,7 +23095,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3><p></p>@@ -22813,38 +23106,76 @@ Leave it empty if no needs to encrypt the zip file. </p></td><tbody><tr>- <td>name</td>+ <td>content</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p>The export file content. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.MaskingReason">MaskingReason</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>semantic_type_id</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ <td><p>The semantic type that triggered masking (e.g., "SSN", "email", "phone"). </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>+ <td>semantic_type_title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Human-readable semantic type title. </p></td></tr><tr>- <td>results</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>masking_rule_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The masking rule ID that matched (if applicable). </p></td></tr><tr>- <td>error</td>+ <td>algorithm</td><td><a href="#string">string</a></td><td></td>- <td><p>error is set if the Status is FAILED. </p></td>+ <td><p>The masking algorithm used. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>context</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Additional context (e.g., "Matched global rule: PII Protection"). </p></td>+ </tr>++ <tr>+ <td>classification_level</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The classification level that triggered masking. </p></td>+ </tr>++ <tr>+ <td>semantic_type_icon</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Icon associated with the semantic type (if any). </p></td></tr></tbody>@@ -22854,7 +23185,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3><p></p>@@ -22865,58 +23196,59 @@ Leave it empty if no needs to encrypt the zip file. </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name for the query history.+Format: projects/{project}/queryHistories/{id} </p></td></tr><tr>- <td>title</td>+ <td>database</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The database name to execute the query.+Format: instances/{instance}/databases/{databaseName} </p></td></tr><tr>- <td>content</td>+ <td>creator</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>code</td>- <td><a href="#int32">int32</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td><td><p> </p></td></tr><tr>- <td>target</td>+ <td>statement</td><td><a href="#string">string</a></td><td></td>- <td><p>Target identification for consolidated results.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p> </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>- <td></td>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td>optional</td><td><p> </p></td></tr><tr>- <td>sql_summary_report</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>+ <td>duration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td><td><p> </p></td></tr><tr>- <td>sql_review_report</td>- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td><td></td><td><p> </p></td></tr>@@ -22928,7 +23260,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>+ <h3 id="bytebase.v1.QueryOption">QueryOption</h3><p></p>@@ -22939,15 +23271,15 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>redis_run_commands_on</td>+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td><td></td>- <td><p>Position of the SQL statement. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>mssql_explain_format</td>+ <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td><td></td><td><p> </p></td></tr>@@ -22959,7 +23291,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>+ <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3><p></p>@@ -22970,19 +23302,68 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>statement_types</td>- <td><a href="#bytebase.v1.StatementType">StatementType</a></td>- <td>repeated</td>- <td><p>statement_types are the types of statements that are found in the sql. </p></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the instance name to execute the query against.+Format: instances/{instance}/databases/{databaseName} </p></td></tr><tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>+ <td>statement</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The SQL statement to execute. </p></td>+ </tr>++ <tr>+ <td>limit</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of rows to return. </p></td>+ </tr>++ <tr>+ <td>data_source_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The id of data source.+If omitted, Query resolves the data source server-side by using the single+read-only data source when exactly one exists, or the admin data source+otherwise. It can also be set explicitly to query the admin data source or+a specific read-only data source. </p></td>+ </tr>++ <tr>+ <td>explain</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Explain the statement. </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The default schema to search objects. Equals to the current schema in+Oracle and search path in Postgres. </p></td>+ </tr>++ <tr>+ <td>query_option</td>+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>container</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>Container is the container name to execute the query against, used for+CosmosDB only. </p></td>+ </tr>+</tbody></table>@@ -22990,7 +23371,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3><p></p>@@ -23001,20 +23382,120 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>name</td>+ <td>results</td>+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>+ <td>repeated</td>+ <td><p>The query results. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.QueryResult">QueryResult</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>column_names</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Column names of the query result. </p></td>+ </tr>++ <tr>+ <td>column_type_names</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Column types of the query result.+The types come from the Golang SQL driver. </p></td>+ </tr>++ <tr>+ <td>rows</td>+ <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>+ <td>repeated</td>+ <td><p>Rows of the query result. </p></td>+ </tr>++ <tr>+ <td>rows_count</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The plan to run plan checks.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>The error message if the query failed. </p></td></tr><tr>- <td>spec_id</td>+ <td>latency</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The time it takes to execute the query. </p></td>+ </tr>++ <tr>+ <td>statement</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The UUID of the specific spec to run plan checks for.-This should match the spec.id field in Plan.Spec.-If not set, all specs in the plan will be used. </p></td>+ <td></td>+ <td><p>The query statement for the result. </p></td>+ </tr>++ <tr>+ <td>postgres_error</td>+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>syntax_error</td>+ <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>permission_denied</td>+ <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>command_error</td>+ <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>messages</td>+ <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>+ <td>repeated</td>+ <td><p>Informational or debug messages returned by the database engine during query execution.+Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE. </p></td>+ </tr>++ <tr>+ <td>masked</td>+ <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>+ <td>repeated</td>+ <td><p>Masking reasons for each column (empty for non-masked columns). </p></td></tr></tbody>@@ -23024,14 +23505,31 @@ If not set, all specs in the plan will be used. </p></td>- <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>- <p></p>+ <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>+ <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>+ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>command_type</td>+ <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>+ <td></td>+ <td><p>Disallowed command_type. </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3><p></p>@@ -23042,28 +23540,17 @@ If not set, all specs in the plan will be used. </p></td><tbody><tr>- <td>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td></td>- <td><p>The plan to update.--The plan's `name` field is used to identify the plan to update.-Format: projects/{project}/plans/{plan} </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>level</td>+ <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p> </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>content</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the plan is not found, a new plan will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p> </p></td></tr></tbody>@@ -23073,262 +23560,8 @@ In this situation, `update_mask` is ignored. </p></td>--- <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.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>STATEMENT_ADVISE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_SUMMARY_REPORT</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>GHOST_SYNC</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.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>RUNNING</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>DONE</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>FAILED</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>CANCELED</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.PlanService">PlanService</h3>- <p>PlanService manages deployment plans for database changes.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>GetPlan</td>- <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td><p>Retrieves a deployment plan by name.-Permissions required: bb.plans.get</p></td>- </tr>-- <tr>- <td>ListPlans</td>- <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>- <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>- <td><p>Lists deployment plans in a project.-Permissions required: bb.plans.list</p></td>- </tr>-- <tr>- <td>CreatePlan</td>- <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td><p>Creates a new deployment plan.-Permissions required: bb.plans.create</p></td>- </tr>-- <tr>- <td>UpdatePlan</td>- <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td><p>UpdatePlan updates the plan.-The plan creator and the user with bb.plans.update permission on the project can update the plan.-Permissions required: bb.plans.update (or creator)</p></td>- </tr>-- <tr>- <td>GetPlanCheckRun</td>- <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>- <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>- <td><p>Gets the plan check run for a deployment plan.-Permissions required: bb.planCheckRuns.get</p></td>- </tr>-- <tr>- <td>RunPlanChecks</td>- <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>- <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>- <td><p>Executes validation checks on a deployment plan.-Permissions required: bb.planCheckRuns.run</p></td>- </tr>-- <tr>- <td>CancelPlanCheckRun</td>- <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>- <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>- <td><p>Cancels the plan check run for a deployment plan.-Permissions required: bb.planCheckRuns.run</p></td>- </tr>-- </tbody>- </table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>- </thead>- <tbody>---- <tr>- <td>GetPlan</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*}</td>- <td></td>- </tr>----- <tr>- <td>ListPlans</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/plans</td>- <td></td>- </tr>----- <tr>- <td>CreatePlan</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/plans</td>- <td>plan</td>- </tr>----- <tr>- <td>UpdatePlan</td>- <td>PATCH</td>- <td>/v1/{plan.name=projects/*/plans/*}</td>- <td>plan</td>- </tr>----- <tr>- <td>GetPlanCheckRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>- <td></td>- </tr>----- <tr>- <td>RunPlanChecks</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>- <td>*</td>- </tr>----- <tr>- <td>CancelPlanCheckRun</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>- <td>*</td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/project_service.proto">v1/project_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.Activity">Activity</h3>- <p>Activity types for webhook notifications.</p>------ <h3 id="bytebase.v1.AddWebhookRequest">AddWebhookRequest</h3>- <p></p>+ <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>+ <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p><table class="field-table">@@ -23338,55 +23571,122 @@ Permissions required: bb.planCheckRuns.run</p></td><tbody><tr>- <td>project</td>+ <td>severity</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the project to add the webhook to.-Format: projects/{project} </p></td>+ <td><p> </p></td></tr><tr>- <td>webhook</td>- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>+ <td>code</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The webhook to add. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</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>names</td>+ <td>message</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The names of the projects to delete.-Format: projects/{project} </p></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>purge</td>- <td><a href="#bool">bool</a></td>+ <td>detail</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, permanently purge the soft-deleted projects and all related resources.-This operation is irreversible. Following AIP-165, this should only be used for-administrative cleanup of old soft-deleted projects.-All projects must already be soft-deleted for this to work.-When purge=true, all databases will be moved to the default project before deletion.-When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>hint</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>position</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>internal_position</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>internal_query</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>where</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>schema_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>table_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>column_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>data_type_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>constraint_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>file</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>line</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>routine</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -23396,8 +23696,8 @@ When purge=false (soft delete/archive), the projects and their databases/issues- <h3 id="bytebase.v1.BatchGetProjectsRequest">BatchGetProjectsRequest</h3>- <p></p>+ <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>+ <p>Syntax error with position information for editor highlighting</p><table class="field-table">@@ -23407,11 +23707,10 @@ When purge=false (soft delete/archive), the projects and their databases/issues<tbody><tr>- <td>names</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The names of projects to retrieve.-Format: projects/{project} </p></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td>+ <td></td>+ <td><p>Position information for highlighting in editor </p></td></tr></tbody>@@ -23421,7 +23720,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.BatchGetProjectsResponse">BatchGetProjectsResponse</h3>+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3><p></p>@@ -23432,10 +23731,10 @@ Format: projects/{project} </p></td><tbody><tr>- <td>projects</td>- <td><a href="#bytebase.v1.Project">Project</a></td>+ <td>values</td>+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td><td>repeated</td>- <td><p>The projects from the specified request. </p></td>+ <td><p>Row values of the query result. </p></td></tr></tbody>@@ -23445,7 +23744,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.CreateProjectRequest">CreateProjectRequest</h3>+ <h3 id="bytebase.v1.RowValue">RowValue</h3><p></p>@@ -23456,58 +23755,98 @@ Format: projects/{project} </p></td><tbody><tr>- <td>project</td>- <td><a href="#bytebase.v1.Project">Project</a></td>+ <td>null_value</td>+ <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td><td></td>- <td><p>The project to create. </p></td>+ <td><p> </p></td></tr><tr>- <td>project_id</td>- <td><a href="#string">string</a></td>+ <td>bool_value</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The ID to use for the project, which will become the final component of-the project's resource name.--This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</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>bytes_value</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>name</td>+ <td>double_value</td>+ <td><a href="#double">double</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>float_value</td>+ <td><a href="#float">float</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>int32_value</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>int64_value</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>string_value</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the project to delete.-Format: projects/{project} </p></td>+ <td><p> </p></td></tr><tr>- <td>purge</td>- <td><a href="#bool">bool</a></td>+ <td>uint32_value</td>+ <td><a href="#uint32">uint32</a></td><td></td>- <td><p>If set to true, permanently purge the soft-deleted project and all related resources.-This operation is irreversible. Following AIP-165, this should only be used for-administrative cleanup of old soft-deleted projects.-The project must already be soft-deleted for this to work.-When purge=true, all databases will be moved to the default project before deletion.-When purge=false (soft delete/archive), the project and its databases/issues remain unchanged. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>uint64_value</td>+ <td><a href="#uint64">uint64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>value_value</td>+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>+ <td></td>+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>+ </tr>++ <tr>+ <td>timestamp_value</td>+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>+ <td></td>+ <td><p>timestamp_value is used for the timestamp without time zone data type,+meaning it only includes the timestamp without any time zone or location+info. Although it may be expressed as a UTC value, it should be seen as a+timestamp missing location context. </p></td>+ </tr>++ <tr>+ <td>timestamp_tz_value</td>+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>+ <td></td>+ <td><p>timestamp_tz_value is used for the timestamptz data type, which+accurately represents the timestamp with location information. </p></td></tr></tbody>@@ -23517,7 +23856,7 @@ When purge=false (soft delete/archive), the project and its databases/issues rem- <h3 id="bytebase.v1.GetProjectRequest">GetProjectRequest</h3>+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3><p></p>@@ -23528,11 +23867,17 @@ When purge=false (soft delete/archive), the project and its databases/issues rem<tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>google_timestamp</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The name of the project to retrieve.-Format: projects/{project} </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The accuracy is the number of digits after the decimal point. </p></td></tr></tbody>@@ -23542,8 +23887,8 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.Label">Label</h3>- <p>A label for categorizing and organizing issues.</p>+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>+ <p></p><table class="field-table">@@ -23553,24 +23898,36 @@ Format: projects/{project} </p></td><tbody><tr>- <td>value</td>- <td><a href="#string">string</a></td>+ <td>google_timestamp</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The label value/name. </p></td>+ <td><p> </p></td></tr><tr>- <td>color</td>+ <td>zone</td><td><a href="#string">string</a></td><td></td>- <td><p>The color code for the label (e.g., hex color). </p></td>+ <td><p>Zone is the time zone abbreviations in timezone database such as "PDT",+"PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We+retrieve the time zone information from the timestamptz field in the+database. A timestamp is in UTC or epoch time, and with zone info, we can+convert it to a local time string. Zone and offset are returned by+time.Time.Zone() </p></td></tr><tr>- <td>group</td>- <td><a href="#string">string</a></td>+ <td>offset</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The group this label belongs to. </p></td>+ <td><p>The offset is in seconds east of UTC </p></td>+ </tr>++ <tr>+ <td>accuracy</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -23580,7 +23937,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.ListProjectsRequest">ListProjectsRequest</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3><p></p>@@ -23594,9 +23951,9 @@ Format: projects/{project} </p></td><td>page_size</td><td><a href="#int32">int32</a></td><td></td>- <td><p>The maximum number of projects to return. The service may return fewer than-this value.-If unspecified, at most 10 projects will be returned.+ <td><p>The maximum number of histories to return.+The service may return fewer than this value.+If unspecified, at most 10 history entries will be returned.The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr>@@ -23604,39 +23961,32 @@ The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td><td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ListProjects` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListProjects` must match-the call that provided the page token. </p></td>- </tr>-- <tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Show deleted projects if specified. </p></td>+ <td><p>A page token, received from a previous `ListQueryHistory` call.+Provide this to retrieve the subsequent page. </p></td></tr><tr><td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter the project.-Check filter for SearchProjectsRequest for details.-Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production"). </p></td>- </tr>-- <tr>- <td>order_by</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The order by of projects.-Support title. The default sorting order is ascending.+ <td><p>Filter is the filter to apply on the search query history+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- project: the project full name in "projects/{id}" format, support "==" operator.+- database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.+- instance: the instance full name in "instances/{id}" format, support "==" operator.+- type: the type, should be "QUERY" or "EXPORT", support "==" operator.+- statement: the SQL statement, support ".matches()" operator.+For example:-- order_by = "title"-- order_by = "title desc"-- order_by = "title asc" </p></td>+project == "projects/{project}"+database == "instances/{instance}/databases/{database}"+instance == "instances/{instance}"+type == "QUERY"+type == "EXPORT"+statement.matches("select")+type == "QUERY" && statement.matches("select") </p></td></tr></tbody>@@ -23646,7 +23996,7 @@ For example:- <h3 id="bytebase.v1.ListProjectsResponse">ListProjectsResponse</h3>+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3><p></p>@@ -23657,18 +24007,19 @@ For example:<tbody><tr>- <td>projects</td>- <td><a href="#bytebase.v1.Project">Project</a></td>+ <td>query_histories</td>+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td><td>repeated</td>- <td><p>The projects from the specified request. </p></td>+ <td><p>The list of history. </p></td></tr><tr><td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>+ <td><p>A token to retrieve next page of history.+Pass this value in the page_token field in the subsequent call to+`ListQueryHistory` method to retrieve the next page of history. </p></td></tr></tbody>@@ -23678,392 +24029,446 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.Project">Project</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the project.-Format: projects/{project} </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#bytebase.v1.State">State</a></td>- <td></td>- <td><p>The lifecycle state of the project. </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The title or name of a project. It's not unique within the workspace. </p></td>- </tr>-- <tr>- <td>webhooks</td>- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>- <td>repeated</td>- <td><p>The list of webhooks configured for the project. </p></td>- </tr>-- <tr>- <td>data_classification_config_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The data classification configuration ID for the project. </p></td>- </tr>-- <tr>- <td>issue_labels</td>- <td><a href="#bytebase.v1.Label">Label</a></td>- <td>repeated</td>- <td><p>Labels available for tagging 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>enforce_issue_title</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Enforce issue title to be created by user instead of generated by Bytebase. </p></td>- </tr>-- <tr>- <td>postgres_database_tenant_mode</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to enable database tenant mode for PostgreSQL.-If enabled, issues will include "set role <db_owner>" statement. </p></td>- </tr>-- <tr>- <td>allow_self_approval</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to allow issue creators to self-approve their own issues. </p></td>- </tr>-- <tr>- <td>execution_retry_policy</td>- <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td>- <td></td>- <td><p>Execution retry policy for task runs. </p></td>- </tr>-- <tr>- <td>ci_sampling_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of database rows to sample during CI data validation.-Without specification, sampling is disabled, resulting in 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 allowed during rollout execution. </p></td>- </tr>-- <tr>- <td>labels</td>- <td><a href="#bytebase.v1.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, { "environment": "production", "team": "backend" } </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>-- <tr>- <td>require_issue_approval</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to require issue approval before rollout. </p></td>- </tr>-- <tr>- <td>require_plan_check_no_error</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to require plan check to have no error before rollout. </p></td>- </tr>-- <tr>- <td>allow_request_role</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>allow_just_in_time_access</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Once enabled, users can request and use the just-in-time access in the SQL Editor. </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>- <p>Execution retry policy configuration.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>maximum_retries</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of retries for lock timeout errors. </p></td>- </tr>-- </tbody>- </table>----+ <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>+ <p>Level represents the severity level of the advice.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ADVICE_LEVEL_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified advice level.</p></td>+ </tr>++ <tr>+ <td>SUCCESS</td>+ <td>1</td>+ <td><p>Success status indicating the check passed without issues.</p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</td>+ <td><p>Warning status indicating potential issues that should be reviewed.</p></td>+ </tr>++ <tr>+ <td>ERROR</td>+ <td>3</td>+ <td><p>Error status indicating critical issues that must be addressed.</p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</h3>+ <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>+ <p>RuleType indicates the source of the linting rule.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>RULE_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified rule type.</p></td>+ </tr>++ <tr>+ <td>PARSER_BASED</td>+ <td>1</td>+ <td><p>Parser-based rule enforced by the built-in SQL parser.+These are non-configurable, mandatory checks for schema health.</p></td>+ </tr>++ <tr>+ <td>AI_POWERED</td>+ <td>2</td>+ <td><p>AI-powered rule defined by user in natural language.+These are custom, flexible checks powered by AI models.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</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>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></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>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified query history type.</p></td>+ </tr>++ <tr>+ <td>QUERY</td>+ <td>1</td>+ <td><p>Query execution for data retrieval.</p></td>+ </tr>++ <tr>+ <td>EXPORT</td>+ <td>2</td>+ <td><p>Data export operation to file.</p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</h3>+ <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</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>webhook</td>- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>- <td></td>- <td><p>The webhook to remove. Identified by its url. </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>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>+ <td>0</td>+ <td><p>defaults to SHOWPLAN_ALL</p></td>+ </tr>++ <tr>+ <td>MSSQL_EXPLAIN_FORMAT_ALL</td>+ <td>1</td>+ <td><p>SHOWPLAN_ALL</p></td>+ </tr>++ <tr>+ <td>MSSQL_EXPLAIN_FORMAT_XML</td>+ <td>2</td>+ <td><p>SHOWPLAN_XML</p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</h3>+ <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3><p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>+ <td>0</td>+ <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>+ </tr>++ <tr>+ <td>SINGLE_NODE</td>+ <td>1</td>+ <td><p>Execute Redis commands on a single node in the cluster.</p></td>+ </tr>++ <tr>+ <td>ALL_NODES</td>+ <td>2</td>+ <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.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>DDL</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DML</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NON_READ_ONLY</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</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>Unspecified message level.</p></td>+ </tr>++ <tr>+ <td>INFO</td>+ <td>1</td>+ <td><p>Informational message.</p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</td>+ <td><p>Warning message indicating potential issues.</p></td>+ </tr>++ <tr>+ <td>DEBUG</td>+ <td>3</td>+ <td><p>Debug message for development and troubleshooting.</p></td>+ </tr>++ <tr>+ <td>LOG</td>+ <td>4</td>+ <td><p>General log message.</p></td>+ </tr>++ <tr>+ <td>NOTICE</td>+ <td>5</td>+ <td><p>Notice message for important information.</p></td>+ </tr>++ <tr>+ <td>EXCEPTION</td>+ <td>6</td>+ <td><p>Exception message indicating error conditions.</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>show_deleted</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Show deleted projects if specified. </p></td>- </tr>-- <tr>- <td>filter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Filter the project.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- name: the project name, support "==" and ".matches()" operator.-- resource_id: the project id, support "==" and ".matches()" operator.-- exclude_default: if not include the default project, should be "true" or "false", support "==" operator.-- state: check the State enum for the values, support "==" operator.-- labels.{key}: the project label, support "==" and "in" operators.--For example:-name == "project name"-name.matches("project name")-resource_id == "project id"-resource_id.matches("project id")-exclude_default == true-state == "DELETED"-labels.environment == "production"-labels.tier == "critical"-labels.environment in ["staging", "prod"]-You can combine filter conditions like:-name == "project name" && resource_id.matches("project id")-name.matches("project name") || resource_id == "project id"-labels.environment == "production" && labels.tier == "critical" </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of projects to return. The service may return fewer than-this value.-If unspecified, at most 10 projects will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>- </tr>-- <tr>- <td>page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A page token, received from a previous `SearchProjects` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `SearchProjects` must match-the call that provided the page token. </p></td>- </tr>-- <tr>- <td>order_by</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The order by of projects.-Support title. The default sorting order is ascending.-For example:-- order_by = "title"-- order_by = "title desc"-- order_by = "title asc" </p></td>- </tr>-- </tbody>- </table>--+-- <h3 id="bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.SQLService">SQLService</h3>+ <p>SQLService executes SQL queries and manages query operations.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>Query</td>+ <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>+ <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>+ <td><p>Executes a read-only SQL query against a database.+Permissions required: bb.databases.get</p></td>+ </tr>++ <tr>+ <td>AdminExecute</td>+ <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>+ <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>+ <td><p>Executes SQL with admin privileges via streaming connection.+Permissions required: bb.sql.admin</p></td>+ </tr>++ <tr>+ <td>SearchQueryHistories</td>+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>+ <td><p>SearchQueryHistories searches query histories for the caller.+Permissions required: None (only returns caller's own query histories)</p></td>+ </tr>++ <tr>+ <td>Export</td>+ <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>+ <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>+ <td><p>Exports query results to a file format.+Permissions required: bb.databases.get</p></td>+ </tr>++ <tr>+ <td>DiffMetadata</td>+ <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>+ <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>+ <td><p>Computes schema differences between two database metadata.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>AICompletion</td>+ <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>+ <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>+ <td><p>Provides AI-powered SQL completion and generation.+Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>+ </tr>++ </tbody>+ </table>- <table class="field-table">+++ <h4>Methods with HTTP bindings</h4>+ <table><thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr></thead><tbody>+- <tr>- <td>projects</td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td>repeated</td>- <td><p>The projects from the specified request. </p></td>- </tr>- <tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>- </tr>+ <tr>+ <td>Query</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:query</td>+ <td>*</td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TestWebhookRequest">TestWebhookRequest</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>project</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the project which owns the webhook to test.-Format: projects/{project} </p></td>- </tr>- <tr>- <td>webhook</td>- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>- <td></td>- <td><p>The webhook to test. Identified by its url. </p></td>- </tr>+ <tr>+ <td>AdminExecute</td>+ <td>GET</td>+ <td>/v1:adminExecute</td>+ <td></td>+ </tr>- </tbody>++++ <tr>+ <td>SearchQueryHistories</td>+ <td>POST</td>+ <td>/v1/queryHistories:search</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>Export</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:export</td>+ <td>*</td>+ </tr>++ <tr>+ <td>Export</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/rollout}:export</td>+ <td>*</td>+ </tr>++ <tr>+ <td>Export</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*}:export</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>DiffMetadata</td>+ <td>POST</td>+ <td>/v1/schemaDesign:diffMetadata</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>AICompletion</td>+ <td>POST</td>+ <td>/v1/sql/aiCompletion</td>+ <td>*</td>+ </tr>+++ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the plan check run to cancel.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ </tr>++ </tbody></table>- <h3 id="bytebase.v1.TestWebhookResponse">TestWebhookResponse</h3>+ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>+ <p></p>++++++ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3><p></p>@@ -24074,10 +24479,18 @@ Format: projects/{project} </p></td><tbody><tr>- <td>error</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The result of the test, empty if the test is successful. </p></td>+ <td><p>The parent project where this plan will be created.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td></td>+ <td><p>The plan to create. </p></td></tr></tbody>@@ -24087,7 +24500,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</h3>+ <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3><p></p>@@ -24101,8 +24514,8 @@ Format: projects/{project} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the deleted project.-Format: projects/{project} </p></td>+ <td><p>The name of the plan check run to retrieve.+Format: projects/{project}/plans/{plan}/planCheckRun </p></td></tr></tbody>@@ -24112,7 +24525,7 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</h3>+ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3><p></p>@@ -24123,28 +24536,83 @@ Format: projects/{project} </p></td><tbody><tr>- <td>project</td>- <td><a href="#bytebase.v1.Project">Project</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The project to update.+ <td><p>The name of the plan to retrieve.+Format: projects/{project}/plans/{plan} </p></td>+ </tr>++ </tbody>+ </table>-The project's `name` field is used to identify the project to update.-Format: projects/{project} </p></td>+++++ <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</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>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The parent, which owns this collection of plans.+Format: projects/{project}+Use "projects/-" to list all plans from all projects. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>The maximum number of plans to return. The service may return fewer than+this value.+If unspecified, at most 10 plans will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the project is not found, a new project will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>A page token, received from a previous `ListPlans` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListPlans` must match+the call that provided the page token. </p></td>+ </tr>++ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter plans returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- creator: the plan creator full name in "users/{email or id}" format, support "==" operator.+- create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.+- has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".+- has_issue: the plan has issue or not, support "==" operator, the value should be "true" or "false".+- title: the plan title, support "==" operator for exact match and ".matches()" operator for case-insensitive substring match.+- spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".+- state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".++For example:+creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"+has_rollout == false && has_issue == true+title == "My Plan"+title.matches("database migration")+spec_type == "change_database_config"+state == "ACTIVE" </p></td></tr></tbody>@@ -24154,7 +24622,7 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</h3>+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3><p></p>@@ -24165,25 +24633,18 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>webhook</td>- <td><a href="#bytebase.v1.Webhook">Webhook</a></td>- <td></td>- <td><p>The webhook to modify. </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to update. </p></td>+ <td>plans</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td>repeated</td>+ <td><p>The plans from the specified request. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the webhook is not found, a new webhook will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody>@@ -24193,7 +24654,7 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.Webhook">Webhook</h3>+ <h3 id="bytebase.v1.Plan">Plan</h3><p></p>@@ -24207,54 +24668,102 @@ In this situation, `update_mask` is ignored. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>name is the name of the webhook, generated by the server.-format: projects/{project}/webhooks/{webhook} </p></td>+ <td><p>The name of the plan.+`plan` is a system generated ID.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td><td></td>- <td><p>Webhook integration type.-type is the type of the webhook. </p></td>+ <td><p>The state of the plan. </p></td></tr><tr>- <td>title</td>+ <td>issue</td><td><a href="#string">string</a></td><td></td>- <td><p>title is the title of the webhook. </p></td>+ <td><p>The issue associated with the plan.+Can be empty.+Format: projects/{project}/issues/{issue} </p></td></tr><tr>- <td>url</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>url is the url of the webhook, should be unique within the project. </p></td>+ <td><p>The title of the plan. </p></td></tr><tr>- <td>direct_message</td>- <td><a href="#bool">bool</a></td>+ <td>description</td>+ <td><a href="#string">string</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><p>The description of the plan. </p></td></tr><tr>- <td>notification_types</td>- <td><a href="#bytebase.v1.Activity.Type">Activity.Type</a></td>+ <td>specs</td>+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td><td>repeated</td>- <td><p>notification_types is the list of activities types that the webhook is interested in.-Bytebase will only send notifications to the webhook if the activity type is in the list.-It should not be empty, and should be a subset of the following:-- ISSUE_CREATED-- ISSUE_APPROVAL_REQUESTED-- ISSUE_SENT_BACK-- ISSUE_APPROVED-- PIPELINE_FAILED-- PIPELINE_COMPLETED </p></td>+ <td><p>The deployment specs for the plan. </p></td>+ </tr>++ <tr>+ <td>creator</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>update_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>plan_check_run_status_count</td>+ <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>+ <td>repeated</td>+ <td><p>The status count of the latest plan check runs.+Keys are:+- SUCCESS+- WARNING+- ERROR+- RUNNING </p></td>+ </tr>++ <tr>+ <td>has_rollout</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the plan has started the rollout. </p></td>+ </tr>++ <tr>+ <td>approval_status</td>+ <td><a href="#bytebase.v1.Issue.ApprovalStatus">Issue.ApprovalStatus</a></td>+ <td></td>+ <td><p>The approval status of the linked issue.+Unspecified when no linked issue exists. </p></td>+ </tr>++ <tr>+ <td>rollout_stage_summaries</td>+ <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>+ <td>repeated</td>+ <td><p>Per-stage rollout status summary.+Ordered by environment deployment order. Empty when no rollout exists. </p></td></tr></tbody>@@ -24264,375 +24773,289 @@ It should not be empty, and should be a subset of the following:+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>+ <p></p>-- <h3 id="bytebase.v1.Activity.Type">Activity.Type</h3>- <p>Activity type enumeration.</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>Unspecified type.</p></td>- </tr>-- <tr>- <td>ISSUE_CREATED</td>- <td>10</td>- <td><p>ISSUE_CREATED represents a new issue creation event.</p></td>- </tr>-- <tr>- <td>ISSUE_APPROVAL_REQUESTED</td>- <td>11</td>- <td><p>ISSUE_APPROVAL_REQUESTED represents an approval request event.</p></td>- </tr>-- <tr>- <td>ISSUE_SENT_BACK</td>- <td>12</td>- <td><p>ISSUE_SENT_BACK represents an issue being sent back by an approver.</p></td>- </tr>-- <tr>- <td>PIPELINE_FAILED</td>- <td>13</td>- <td><p>PIPELINE_FAILED represents a pipeline failure event.</p></td>- </tr>-- <tr>- <td>PIPELINE_COMPLETED</td>- <td>14</td>- <td><p>PIPELINE_COMPLETED represents a pipeline completion event.</p></td>- </tr>-- <tr>- <td>ISSUE_APPROVED</td>- <td>15</td>- <td><p>ISSUE_APPROVED represents an issue being fully approved.</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>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>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td>+ </tr>++ <tr>+ <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>enable_prior_backup</td>+ <td><a href="#bool">bool</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>+ </tr>++ </tbody>+ </table>++++ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</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>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>database</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the database to create. </p></td>+ </tr>++ <tr>+ <td>table</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>+ </tr>++ <tr>+ <td>character_set</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>character_set is the character set of the database. </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>+ </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 "ON CLUSTER <<cluster>>". </p></td>+ </tr>++ <tr>+ <td>owner</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 "WITH OWNER <<owner>>". </p></td>+ </tr>++ <tr>+ <td>environment</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>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.ProjectService">ProjectService</h3>- <p>ProjectService manages projects that group databases and changes.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>GetProject</td>- <td><a href="#bytebase.v1.GetProjectRequest">GetProjectRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>GetProject retrieves a project by name.-Users with "bb.projects.get" permission on the workspace or the project owner can access this method.-Permissions required: bb.projects.get</p></td>- </tr>-- <tr>- <td>BatchGetProjects</td>- <td><a href="#bytebase.v1.BatchGetProjectsRequest">BatchGetProjectsRequest</a></td>- <td><a href="#bytebase.v1.BatchGetProjectsResponse">BatchGetProjectsResponse</a></td>- <td><p>BatchGetProjects retrieves multiple projects by their names.-Permissions required: bb.projects.get</p></td>- </tr>-- <tr>- <td>ListProjects</td>- <td><a href="#bytebase.v1.ListProjectsRequest">ListProjectsRequest</a></td>- <td><a href="#bytebase.v1.ListProjectsResponse">ListProjectsResponse</a></td>- <td><p>Lists all projects in the workspace with optional filtering.-Permissions required: bb.projects.list</p></td>- </tr>-- <tr>- <td>SearchProjects</td>- <td><a href="#bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</a></td>- <td><a href="#bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</a></td>- <td><p>Searches for projects with advanced filtering capabilities.-Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)</p></td>- </tr>-- <tr>- <td>CreateProject</td>- <td><a href="#bytebase.v1.CreateProjectRequest">CreateProjectRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>Creates a new project in the workspace.-Permissions required: bb.projects.create</p></td>- </tr>-- <tr>- <td>UpdateProject</td>- <td><a href="#bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>Updates an existing project's properties.-Permissions required: bb.projects.update</p></td>- </tr>-- <tr>- <td>DeleteProject</td>- <td><a href="#bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes (soft-delete or purge) a project.-Permissions required: bb.projects.delete</p></td>- </tr>-- <tr>- <td>UndeleteProject</td>- <td><a href="#bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>Restores a soft-deleted project.-Permissions required: bb.projects.undelete</p></td>- </tr>-- <tr>- <td>BatchDeleteProjects</td>- <td><a href="#bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes multiple projects in a single operation.-Permissions required: bb.projects.delete</p></td>- </tr>-- <tr>- <td>GetIamPolicy</td>- <td><a href="#bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</a></td>- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>- <td><p>Retrieves the IAM policy for a project.-Permissions required: bb.projects.getIamPolicy</p></td>- </tr>-- <tr>- <td>SetIamPolicy</td>- <td><a href="#bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</a></td>- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>- <td><p>Sets the IAM policy for a project.-Permissions required: bb.projects.setIamPolicy</p></td>- </tr>-- <tr>- <td>AddWebhook</td>- <td><a href="#bytebase.v1.AddWebhookRequest">AddWebhookRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>Adds a webhook to a project for notifications.-Permissions required: bb.projects.update</p></td>- </tr>-- <tr>- <td>UpdateWebhook</td>- <td><a href="#bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>Updates an existing webhook configuration.-Permissions required: bb.projects.update</p></td>- </tr>-- <tr>- <td>RemoveWebhook</td>- <td><a href="#bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</a></td>- <td><a href="#bytebase.v1.Project">Project</a></td>- <td><p>Removes a webhook from a project.-Permissions required: bb.projects.update</p></td>- </tr>-- <tr>- <td>TestWebhook</td>- <td><a href="#bytebase.v1.TestWebhookRequest">TestWebhookRequest</a></td>- <td><a href="#bytebase.v1.TestWebhookResponse">TestWebhookResponse</a></td>- <td><p>Tests a webhook by sending a test notification.-Permissions required: bb.projects.update</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>+ <p></p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <table class="field-table"><thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>--- <tr>- <td>GetProject</td>- <td>GET</td>- <td>/v1/{name=projects/*}</td>- <td></td>- </tr>+ <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>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td>+ </tr>+ <tr>+ <td>format</td>+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>+ <td></td>+ <td><p>The format of the exported file. </p></td>+ </tr>- <tr>- <td>BatchGetProjects</td>- <td>GET</td>- <td>/v1/projects:batchGet</td>- <td></td>- </tr>+ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td>optional</td>+ <td><p>The zip password provide by users.+Leave it empty if no needs to encrypt the zip file. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</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>key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>ListProjects</td>- <td>GET</td>- <td>/v1/projects</td>- <td></td>- </tr>+ <tr>+ <td>value</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</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>stage</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The stage resource name.+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ </tr>- <tr>- <td>SearchProjects</td>- <td>POST</td>- <td>/v1/projects:search</td>- <td>*</td>- </tr>+ <tr>+ <td>task_status_counts</td>+ <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>+ <td>repeated</td>+ <td><p>Task status counts for this stage. </p></td>+ </tr>-+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</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>A UUID4 string that uniquely identifies the Spec. </p></td>+ </tr>- <tr>- <td>CreateProject</td>- <td>POST</td>- <td>/v1/projects</td>- <td>project</td>- </tr>----- <tr>- <td>UpdateProject</td>- <td>PATCH</td>- <td>/v1/{project.name=projects/*}</td>- <td>project</td>- </tr>----- <tr>- <td>DeleteProject</td>- <td>DELETE</td>- <td>/v1/{name=projects/*}</td>- <td></td>- </tr>----- <tr>- <td>UndeleteProject</td>- <td>POST</td>- <td>/v1/{name=projects/*}:undelete</td>- <td>*</td>- </tr>----- <tr>- <td>BatchDeleteProjects</td>- <td>POST</td>- <td>/v1/projects:batchDelete</td>- <td>*</td>- </tr>----- <tr>- <td>GetIamPolicy</td>- <td>GET</td>- <td>/v1/{resource=projects/*}:getIamPolicy</td>- <td></td>- </tr>----- <tr>- <td>SetIamPolicy</td>- <td>POST</td>- <td>/v1/{resource=projects/*}:setIamPolicy</td>- <td>*</td>- </tr>----- <tr>- <td>AddWebhook</td>- <td>POST</td>- <td>/v1/{project=projects/*}:addWebhook</td>- <td>*</td>- </tr>----- <tr>- <td>UpdateWebhook</td>- <td>PATCH</td>- <td>/v1/{webhook.name=projects/*/webhooks/*}:updateWebhook</td>- <td>webhook</td>- </tr>----- <tr>- <td>RemoveWebhook</td>- <td>POST</td>- <td>/v1/{webhook.name=projects/*/webhooks/*}:removeWebhook</td>- <td>*</td>- </tr>--+ <tr>+ <td>create_database_config</td>+ <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+ <tr>+ <td>change_database_config</td>+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>- <tr>- <td>TestWebhook</td>- <td>POST</td>- <td>/v1/{project=projects/*}:testWebhook</td>- <td>*</td>- </tr>+ <tr>+ <td>export_data_config</td>+ <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>-</tbody></table>+---- <div class="file-heading">- <h2 id="v1/release_service.proto">v1/release_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>+- <h3 id="bytebase.v1.CheckReleaseRequest">CheckReleaseRequest</h3>+ <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3><p></p>@@ -24643,38 +25066,17 @@ Permissions required: bb.projects.update</p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project} </p></td>- </tr>-- <tr>- <td>release</td>- <td><a href="#bytebase.v1.Release">Release</a></td>+ <td>status</td>+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td><td></td>- <td><p>The release to check. </p></td>- </tr>-- <tr>- <td>targets</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The targets to dry-run the release.-Can be database or databaseGroup.-Format:-projects/{project}/databaseGroups/{databaseGroup}-instances/{instance}/databases/{database} </p></td>+ <td><p>The task status. </p></td></tr><tr>- <td>custom_rules</td>- <td><a href="#string">string</a></td>+ <td>count</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Custom linting rules in natural language for AI-powered validation.-Each rule should be a clear statement describing the desired schema constraint.-Example: "All tables must have a primary key"-Example: "VARCHAR columns should specify a maximum length" </p></td>+ <td><p>The number of tasks in the status. </p></td></tr></tbody>@@ -24684,7 +25086,7 @@ Example: "VARCHAR columns should specify a maximum length" </p></td>- <h3 id="bytebase.v1.CheckReleaseResponse">CheckReleaseResponse</h3>+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3><p></p>@@ -24694,25 +25096,39 @@ Example: "VARCHAR columns should specify a maximum length" </p></td></thead><tbody>+ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>+ </tr>++ <tr>+ <td>status</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+<tr><td>results</td>- <td><a href="#bytebase.v1.CheckReleaseResponse.CheckResult">CheckReleaseResponse.CheckResult</a></td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td><td>repeated</td>- <td><p>The check results for each file and target combination. </p></td>+ <td><p> </p></td></tr><tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>+ <td>error</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The total affected rows across all checks. </p></td>+ <td><p>error is set if the Status is FAILED. </p></td></tr><tr>- <td>risk_level</td>- <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>The aggregated risk level of the check. </p></td>+ <td><p> </p></td></tr></tbody>@@ -24722,8 +25138,8 @@ Example: "VARCHAR columns should specify a maximum length" </p></td>- <h3 id="bytebase.v1.CheckReleaseResponse.CheckResult">CheckReleaseResponse.CheckResult</h3>- <p>Check result for a single release file on a target database.</p>+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>+ <p></p><table class="field-table">@@ -24733,39 +25149,60 @@ Example: "VARCHAR columns should specify a maximum length" </p></td><tbody><tr>- <td>file</td>+ <td>status</td>+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The file path that is being checked. </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>content</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>code</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td></tr><tr><td>target</td><td><a href="#string">string</a></td><td></td>- <td><p>The target that the check is performed on.-Should be a database. Format: instances/{instance}/databases/{database} </p></td>+ <td><p>Target identification for consolidated results.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>advices</td>- <td><a href="#bytebase.v1.Advice">Advice</a></td>- <td>repeated</td>- <td><p>The list of advice for the file and the target. </p></td>+ <td>type</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>+ <td>sql_summary_report</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td><td></td>- <td><p>The count of affected rows of the statement on the target. </p></td>+ <td><p> </p></td></tr><tr>- <td>risk_level</td>- <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>+ <td>sql_review_report</td>+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td><td></td>- <td><p>The risk level of the statement on the target. </p></td>+ <td><p> </p></td></tr></tbody>@@ -24775,7 +25212,7 @@ Should be a database. Format: instances/{instance}/databases/{database} </p></td- <h3 id="bytebase.v1.CreateReleaseRequest">CreateReleaseRequest</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3><p></p>@@ -24786,36 +25223,17 @@ Should be a database. Format: instances/{instance}/databases/{database} </p></td<tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>+ <td>start_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>Format: projects/{project} </p></td>+ <td><p>Position of the SQL statement. </p></td></tr><tr>- <td>release</td>- <td><a href="#bytebase.v1.Release">Release</a></td>- <td></td>- <td><p>The release to create. </p></td>- </tr>-- <tr>- <td>release_id_template</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Template for release ID generation.-Available variables: {date}, {time}, {timestamp}, {iteration}.-Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00".-Default: "release_{date}-RC{iteration}". </p></td>- </tr>-- <tr>- <td>release_id_timezone</td>- <td><a href="#string">string</a></td>+ <td>end_position</td>+ <td><a href="#bytebase.v1.Position">Position</a></td><td></td>- <td><p>Timezone for {date} and {time} variables in the template.-Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles").-Default: "UTC". </p></td>+ <td><p> </p></td></tr></tbody>@@ -24825,7 +25243,7 @@ Default: "UTC". </p></td>- <h3 id="bytebase.v1.DeleteReleaseRequest">DeleteReleaseRequest</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3><p></p>@@ -24836,11 +25254,17 @@ Default: "UTC". </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>statement_types</td>+ <td><a href="#bytebase.v1.StatementType">StatementType</a></td>+ <td>repeated</td>+ <td><p>statement_types are the types of statements that are found in the sql. </p></td>+ </tr>++ <tr>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The name of the release to delete.-Format: projects/{project}/releases/{release} </p></td>+ <td><p> </p></td></tr></tbody>@@ -24850,7 +25274,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.GetReleaseRequest">GetReleaseRequest</h3>+ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3><p></p>@@ -24864,31 +25288,17 @@ Format: projects/{project}/releases/{release} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/releases/{release} </p></td>+ <td><p>The plan to run plan checks.+Format: projects/{project}/plans/{plan} </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.ListReleaseCategoriesRequest">ListReleaseCategoriesRequest</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>parent</td>+ <td>spec_id</td><td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project} </p></td>+ <td>optional</td>+ <td><p>The UUID of the specific spec to run plan checks for.+This should match the spec.id field in Plan.Spec.+If not set, all specs in the plan will be used. </p></td></tr></tbody>@@ -24898,31 +25308,14 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.ListReleaseCategoriesResponse">ListReleaseCategoriesResponse</h3>+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</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>categories</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The unique category values in the project. </p></td>- </tr>-- </tbody>- </table>--- <h3 id="bytebase.v1.ListReleasesRequest">ListReleasesRequest</h3>+ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3><p></p>@@ -24933,51 +25326,28 @@ Format: projects/{project}/releases/{release} </p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project} </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of releases to return. The service may return fewer than this value.-If unspecified, at most 10 releases will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>- </tr>-- <tr>- <td>page_token</td>- <td><a href="#string">string</a></td>+ <td>plan</td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td><td></td>- <td><p>A page token, received from a previous `ListReleases` call.-Provide this to retrieve the subsequent page.+ <td><p>The plan to update.-When paginating, all other parameters provided to `ListReleases` must match-the call that provided the page token. </p></td>+The plan's `name` field is used to identify the plan to update.+Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>Show deleted releases if specified. </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>filter</td>- <td><a href="#string">string</a></td>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Filter is used to filter releases returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- category: release category, support "==" operator.--For example:-category == "webapp" </p></td>+ <td><p>If set to true, and the plan is not found, a new plan will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -24987,114 +25357,262 @@ category == "webapp" </p></td>- <h3 id="bytebase.v1.ListReleasesResponse">ListReleasesResponse</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>releases</td>- <td><a href="#bytebase.v1.Release">Release</a></td>- <td>repeated</td>- <td><p>The releases from the specified request. </p></td>- </tr>-- <tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>- </tr>-- </tbody>- </table>---- <h3 id="bytebase.v1.Release">Release</h3>+ <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.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>STATEMENT_ADVISE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_SUMMARY_REPORT</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GHOST_SYNC</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.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>RUNNING</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DONE</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FAILED</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CANCELED</td>+ <td>4</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/releases/{release} </p></td>- </tr>-- <tr>- <td>category</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Category extracted from release name (e.g., "webapp", "analytics").-Set by Bytebase action during release creation. </p></td>- </tr>++++ <h3 id="bytebase.v1.PlanService">PlanService</h3>+ <p>PlanService manages deployment plans for database changes.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>GetPlan</td>+ <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td><p>Retrieves a deployment plan by name.+Permissions required: bb.plans.get</p></td>+ </tr>++ <tr>+ <td>ListPlans</td>+ <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>+ <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>+ <td><p>Lists deployment plans in a project.+Permissions required: bb.plans.list</p></td>+ </tr>++ <tr>+ <td>CreatePlan</td>+ <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td><p>Creates a new deployment plan.+Permissions required: bb.plans.create</p></td>+ </tr>++ <tr>+ <td>UpdatePlan</td>+ <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>+ <td><a href="#bytebase.v1.Plan">Plan</a></td>+ <td><p>UpdatePlan updates the plan.+The plan creator and the user with bb.plans.update permission on the project can update the plan.+Permissions required: bb.plans.update (or creator)</p></td>+ </tr>++ <tr>+ <td>GetPlanCheckRun</td>+ <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>+ <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>+ <td><p>Gets the plan check run for a deployment plan.+Permissions required: bb.planCheckRuns.get</p></td>+ </tr>++ <tr>+ <td>RunPlanChecks</td>+ <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>+ <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>+ <td><p>Executes validation checks on a deployment plan.+Permissions required: bb.planCheckRuns.run</p></td>+ </tr>++ <tr>+ <td>CancelPlanCheckRun</td>+ <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>+ <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>+ <td><p>Cancels the plan check run for a deployment plan.+Permissions required: bb.planCheckRuns.run</p></td>+ </tr>++ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr>+ </thead>+ <tbody>+- <tr>- <td>files</td>- <td><a href="#bytebase.v1.Release.File">Release.File</a></td>- <td>repeated</td>- <td><p>The SQL files included in the release. </p></td>- </tr>- <tr>- <td>vcs_source</td>- <td><a href="#bytebase.v1.Release.VCSSource">Release.VCSSource</a></td>- <td></td>- <td><p>The version control source of the release. </p></td>- </tr>+ <tr>+ <td>GetPlan</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*}</td>+ <td></td>+ </tr>- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/[email protected] </p></td>- </tr>+- <tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>- <tr>- <td>state</td>- <td><a href="#bytebase.v1.State">State</a></td>- <td></td>- <td><p>The lifecycle state of the release. </p></td>- </tr>+ <tr>+ <td>ListPlans</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/plans</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreatePlan</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/plans</td>+ <td>plan</td>+ </tr>+++++ <tr>+ <td>UpdatePlan</td>+ <td>PATCH</td>+ <td>/v1/{plan.name=projects/*/plans/*}</td>+ <td>plan</td>+ </tr>+++++ <tr>+ <td>GetPlanCheckRun</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>RunPlanChecks</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>+ <td>*</td>+ </tr>++- <tr>- <td>type</td>- <td><a href="#bytebase.v1.Release.Type">Release.Type</a></td>- <td></td>- <td><p>The type of schema change for all files in this release. </p></td>- </tr>+ <tr>+ <td>CancelPlanCheckRun</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>+ <td>*</td>+ </tr>++</tbody></table>-++++ <div class="file-heading">+ <h2 id="v1/project_service.proto">v1/project_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.Activity">Activity</h3>+ <p>Activity types for webhook notifications.</p>++- <h3 id="bytebase.v1.Release.File">Release.File</h3>- <p>A SQL file in a release.</p>+ <h3 id="bytebase.v1.AddWebhookRequest">AddWebhookRequest</h3>+ <p></p><table class="field-table">@@ -25104,42 +25622,18 @@ Set by Bytebase action during release creation. </p></td><tbody><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>version</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The version identifier for the file. </p></td>- </tr>-- <tr>- <td>sheet</td>+ <td>project</td><td><a href="#string">string</a></td><td></td>- <td><p>For inputs, we must either use `sheet` or `statement`.-For outputs, we always use `sheet`. `statement` is the preview of the sheet content.--The sheet that holds the content.-Format: projects/{project}/sheets/{sheet} </p></td>- </tr>-- <tr>- <td>statement</td>- <td><a href="#bytes">bytes</a></td>- <td></td>- <td><p>The raw SQL statement content. </p></td>+ <td><p>The name of the project to add the webhook to.+Format: projects/{project} </p></td></tr><tr>- <td>sheet_sha256</td>- <td><a href="#string">string</a></td>+ <td>webhook</td>+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td><td></td>- <td><p>The SHA256 hash value of the sheet content or the statement. </p></td>+ <td><p>The webhook to add. </p></td></tr></tbody>@@ -25149,8 +25643,8 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.Release.VCSSource">Release.VCSSource</h3>- <p>Version control system source information.</p>+ <h3 id="bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</h3>+ <p></p><table class="field-table">@@ -25160,17 +25654,23 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>vcs_type</td>- <td><a href="#bytebase.v1.VCSType">VCSType</a></td>- <td></td>- <td><p>The type of VCS. </p></td>- </tr>-- <tr>- <td>url</td>+ <td>names</td><td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The names of the projects to delete.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>purge</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The url link to the e.g., GitHub commit or pull request. </p></td>+ <td><p>If set to true, permanently purge the soft-deleted projects and all related resources.+This operation is irreversible. Following AIP-165, this should only be used for+administrative cleanup of old soft-deleted projects.+All projects must already be soft-deleted for this to work.+When purge=true, all databases will be moved to the default project before deletion.+When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged. </p></td></tr></tbody>@@ -25180,7 +25680,7 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.UndeleteReleaseRequest">UndeleteReleaseRequest</h3>+ <h3 id="bytebase.v1.BatchGetProjectsRequest">BatchGetProjectsRequest</h3><p></p>@@ -25191,11 +25691,11 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>name</td>+ <td>names</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the deleted release.-Format: projects/{project}/releases/{release} </p></td>+ <td>repeated</td>+ <td><p>The names of projects to retrieve.+Format: projects/{project} </p></td></tr></tbody>@@ -25205,7 +25705,7 @@ Format: projects/{project}/releases/{release} </p></td>- <h3 id="bytebase.v1.UpdateReleaseRequest">UpdateReleaseRequest</h3>+ <h3 id="bytebase.v1.BatchGetProjectsResponse">BatchGetProjectsResponse</h3><p></p>@@ -25216,17 +25716,45 @@ Format: projects/{project}/releases/{release} </p></td><tbody><tr>- <td>release</td>- <td><a href="#bytebase.v1.Release">Release</a></td>+ <td>projects</td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td>repeated</td>+ <td><p>The projects from the specified request. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.CreateProjectRequest">CreateProjectRequest</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>project</td>+ <td><a href="#bytebase.v1.Project">Project</a></td><td></td>- <td><p>The release to update. </p></td>+ <td><p>The project to create. </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>project_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The list of fields to be updated. </p></td>+ <td><p>The ID to use for the project, which will become the final component of+the project's resource name.++This value should be 4-63 characters, and valid characters+are /[a-z][0-9]-/. </p></td></tr></tbody>@@ -25236,239 +25764,97 @@ Format: projects/{project}/releases/{release} </p></td>+ <h3 id="bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</h3>+ <p></p>-- <h3 id="bytebase.v1.Release.Type">Release.Type</h3>- <p>The type of schema change.</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>Unspecified type.</p></td>- </tr>-- <tr>- <td>VERSIONED</td>- <td>1</td>- <td><p>Versioned schema migration.</p></td>- </tr>-- <tr>- <td>DECLARATIVE</td>- <td>2</td>- <td><p>Declarative schema definition.</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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the project to delete.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>purge</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, permanently purge the soft-deleted project and all related resources.+This operation is irreversible. Following AIP-165, this should only be used for+administrative cleanup of old soft-deleted projects.+The project must already be soft-deleted for this to work.+When purge=true, all databases will be moved to the default project before deletion.+When purge=false (soft delete/archive), the project and its databases/issues remain unchanged. </p></td>+ </tr>++ </tbody>+ </table>-++- <h3 id="bytebase.v1.ReleaseService">ReleaseService</h3>- <p>ReleaseService manages releases for coordinating deployments.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>GetRelease</td>- <td><a href="#bytebase.v1.GetReleaseRequest">GetReleaseRequest</a></td>- <td><a href="#bytebase.v1.Release">Release</a></td>- <td><p>Retrieves a release by name.-Permissions required: bb.releases.get</p></td>- </tr>-- <tr>- <td>ListReleases</td>- <td><a href="#bytebase.v1.ListReleasesRequest">ListReleasesRequest</a></td>- <td><a href="#bytebase.v1.ListReleasesResponse">ListReleasesResponse</a></td>- <td><p>Lists releases in a project.-Permissions required: bb.releases.list</p></td>- </tr>-- <tr>- <td>CreateRelease</td>- <td><a href="#bytebase.v1.CreateReleaseRequest">CreateReleaseRequest</a></td>- <td><a href="#bytebase.v1.Release">Release</a></td>- <td><p>Creates a new release with SQL files.-Permissions required: bb.releases.create</p></td>- </tr>-- <tr>- <td>UpdateRelease</td>- <td><a href="#bytebase.v1.UpdateReleaseRequest">UpdateReleaseRequest</a></td>- <td><a href="#bytebase.v1.Release">Release</a></td>- <td><p>Updates an existing release.-Permissions required: bb.releases.update-When allow_missing=true, also requires: bb.releases.create</p></td>- </tr>-- <tr>- <td>DeleteRelease</td>- <td><a href="#bytebase.v1.DeleteReleaseRequest">DeleteReleaseRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a release.-Permissions required: bb.releases.delete</p></td>- </tr>-- <tr>- <td>UndeleteRelease</td>- <td><a href="#bytebase.v1.UndeleteReleaseRequest">UndeleteReleaseRequest</a></td>- <td><a href="#bytebase.v1.Release">Release</a></td>- <td><p>Restores a deleted release.-Permissions required: bb.releases.undelete</p></td>- </tr>-- <tr>- <td>CheckRelease</td>- <td><a href="#bytebase.v1.CheckReleaseRequest">CheckReleaseRequest</a></td>- <td><a href="#bytebase.v1.CheckReleaseResponse">CheckReleaseResponse</a></td>- <td><p>Validates a release by dry-running checks on target databases.-Permissions required: bb.releases.check</p></td>- </tr>-- <tr>- <td>ListReleaseCategories</td>- <td><a href="#bytebase.v1.ListReleaseCategoriesRequest">ListReleaseCategoriesRequest</a></td>- <td><a href="#bytebase.v1.ListReleaseCategoriesResponse">ListReleaseCategoriesResponse</a></td>- <td><p>Lists all unique categories in a project.-Permissions required: bb.releases.list</p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.v1.GetProjectRequest">GetProjectRequest</h3>+ <p></p>--- <h4>Methods with HTTP bindings</h4>- <table>+ <table class="field-table"><thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-+ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the project to retrieve.+Format: projects/{project} </p></td>+ </tr>- <tr>- <td>GetRelease</td>- <td>GET</td>- <td>/v1/{name=projects/*/releases/*}</td>- <td></td>- </tr>---+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Label">Label</h3>+ <p>A label for categorizing and organizing issues.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>- <tr>- <td>ListReleases</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/releases</td>- <td></td>- </tr>----- <tr>- <td>CreateRelease</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/releases</td>- <td>release</td>- </tr>----- <tr>- <td>UpdateRelease</td>- <td>PATCH</td>- <td>/v1/{release.name=projects/*/releases/*}</td>- <td>release</td>- </tr>----- <tr>- <td>DeleteRelease</td>- <td>DELETE</td>- <td>/v1/{name=projects/*/releases/*}</td>- <td></td>- </tr>----- <tr>- <td>UndeleteRelease</td>- <td>POST</td>- <td>/v1/{name=projects/*/releases/*}:undelete</td>- <td></td>- </tr>----- <tr>- <td>CheckRelease</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/releases:check</td>- <td>*</td>- </tr>----- <tr>- <td>ListReleaseCategories</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/releases:listCategories</td>- <td></td>- </tr>+ <tr>+ <td>value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The label value/name. </p></td>+ </tr>-- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/review_config_service.proto">v1/review_config_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.CreateReviewConfigRequest">CreateReviewConfigRequest</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>color</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The color code for the label (e.g., hex color). </p></td>+ </tr><tr>- <td>review_config</td>- <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td>group</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The SQL review config to create. </p></td>+ <td><p>The group this label belongs to. </p></td></tr></tbody>@@ -25478,7 +25864,7 @@ Permissions required: bb.releases.list</p></td>- <h3 id="bytebase.v1.DeleteReviewConfigRequest">DeleteReviewConfigRequest</h3>+ <h3 id="bytebase.v1.ListProjectsRequest">ListProjectsRequest</h3><p></p>@@ -25489,36 +25875,52 @@ Permissions required: bb.releases.list</p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The name of the SQL review config to delete.-Format: reviewConfigs/{reviewConfig} </p></td>+ <td><p>The maximum number of projects to return. The service may return fewer than+this value.+If unspecified, at most 10 projects will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.GetReviewConfigRequest">GetReviewConfigRequest</h3>- <p></p>+ <tr>+ <td>page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A page token, received from a previous `ListProjects` call.+Provide this to retrieve the subsequent page.-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+When paginating, all other parameters provided to `ListProjects` must match+the call that provided the page token. </p></td>+ </tr><tr>- <td>name</td>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Show deleted projects if specified. </p></td>+ </tr>++ <tr>+ <td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the SQL review config to retrieve.-Format: reviewConfigs/{reviewConfig} </p></td>+ <td><p>Filter the project.+Check filter for SearchProjectsRequest for details.+Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production"). </p></td>+ </tr>++ <tr>+ <td>order_by</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The order by of projects.+Support title. The default sorting order is ascending.+For example:+- order_by = "title"+- order_by = "title desc"+- order_by = "title asc" </p></td></tr></tbody>@@ -25528,14 +25930,7 @@ Format: reviewConfigs/{reviewConfig} </p></td>- <h3 id="bytebase.v1.ListReviewConfigsRequest">ListReviewConfigsRequest</h3>- <p></p>------ <h3 id="bytebase.v1.ListReviewConfigsResponse">ListReviewConfigsResponse</h3>+ <h3 id="bytebase.v1.ListProjectsResponse">ListProjectsResponse</h3><p></p>@@ -25546,10 +25941,18 @@ Format: reviewConfigs/{reviewConfig} </p></td><tbody><tr>- <td>review_configs</td>- <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td>projects</td>+ <td><a href="#bytebase.v1.Project">Project</a></td><td>repeated</td>- <td><p>The SQL review configs from the specified request. </p></td>+ <td><p>The projects from the specified request. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody>@@ -25559,7 +25962,7 @@ Format: reviewConfigs/{reviewConfig} </p></td>- <h3 id="bytebase.v1.ReviewConfig">ReviewConfig</h3>+ <h3 id="bytebase.v1.Project">Project</h3><p></p>@@ -25573,117 +25976,138 @@ Format: reviewConfigs/{reviewConfig} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the SQL review config.-Format: reviewConfigs/{reviewConfig} </p></td>+ <td><p>The name of the project.+Format: projects/{project} </p></td></tr><tr>- <td>title</td>- <td><a href="#string">string</a></td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td><td></td>- <td><p>The title of the review configuration. </p></td>+ <td><p>The lifecycle state of the project. </p></td></tr><tr>- <td>enabled</td>- <td><a href="#bool">bool</a></td>+ <td>title</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Whether the review configuration is enabled. </p></td>+ <td><p>The title or name of a project. It's not unique within the workspace. </p></td></tr><tr>- <td>rules</td>- <td><a href="#bytebase.v1.SQLReviewRule">SQLReviewRule</a></td>+ <td>webhooks</td>+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td><td>repeated</td>- <td><p>The SQL review rules to enforce. </p></td>+ <td><p>The list of webhooks configured for the project. </p></td></tr><tr>- <td>resources</td>+ <td>data_classification_config_id</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Resources using the config.-Format: {resource}/{resource id}, e.g., environments/test. </p></td>+ <td></td>+ <td><p>The data classification configuration ID for the project. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SQLReviewRule">SQLReviewRule</h3>- <p>SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>issue_labels</td>+ <td><a href="#bytebase.v1.Label">Label</a></td>+ <td>repeated</td>+ <td><p>Labels available for tagging issues in this project. </p></td>+ </tr><tr>- <td>type</td>- <td><a href="#bytebase.v1.SQLReviewRule.Type">SQLReviewRule.Type</a></td>+ <td>force_issue_labels</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The type of SQL review rule. </p></td>+ <td><p>Force issue labels to be used when creating an issue. </p></td></tr><tr>- <td>level</td>- <td><a href="#bytebase.v1.SQLReviewRule.Level">SQLReviewRule.Level</a></td>+ <td>enforce_issue_title</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The severity level of the rule. </p></td>+ <td><p>Enforce issue title to be created by user instead of generated by Bytebase. </p></td></tr><tr>- <td>naming_payload</td>- <td><a href="#bytebase.v1.SQLReviewRule.NamingRulePayload">SQLReviewRule.NamingRulePayload</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 database tenant mode for PostgreSQL.+If enabled, issues will include "set role <db_owner>" statement. </p></td></tr><tr>- <td>number_payload</td>- <td><a href="#bytebase.v1.SQLReviewRule.NumberRulePayload">SQLReviewRule.NumberRulePayload</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 issue creators to self-approve their own issues. </p></td></tr><tr>- <td>string_array_payload</td>- <td><a href="#bytebase.v1.SQLReviewRule.StringArrayRulePayload">SQLReviewRule.StringArrayRulePayload</a></td>+ <td>execution_retry_policy</td>+ <td><a href="#bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</a></td><td></td>- <td><p> </p></td>+ <td><p>Execution retry policy for task runs. </p></td></tr><tr>- <td>comment_convention_payload</td>- <td><a href="#bytebase.v1.SQLReviewRule.CommentConventionRulePayload">SQLReviewRule.CommentConventionRulePayload</a></td>+ <td>ci_sampling_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of database rows to sample during CI data validation.+Without specification, sampling is disabled, resulting in full validation. </p></td></tr><tr>- <td>string_payload</td>- <td><a href="#bytebase.v1.SQLReviewRule.StringRulePayload">SQLReviewRule.StringRulePayload</a></td>+ <td>parallel_tasks_per_rollout</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of parallel tasks allowed during rollout execution. </p></td></tr><tr>- <td>naming_case_payload</td>- <td><a href="#bytebase.v1.SQLReviewRule.NamingCaseRulePayload">SQLReviewRule.NamingCaseRulePayload</a></td>+ <td>labels</td>+ <td><a href="#bytebase.v1.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, { "environment": "production", "team": "backend" } </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>++ <tr>+ <td>require_issue_approval</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to require issue approval before rollout. </p></td>+ </tr>++ <tr>+ <td>require_plan_check_no_error</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether to require plan check to have no error before rollout. </p></td>+ </tr>++ <tr>+ <td>allow_request_role</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr><tr>- <td>engine</td>- <td><a href="#bytebase.v1.Engine">Engine</a></td>+ <td>allow_just_in_time_access</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The database engine this rule applies to. </p></td>+ <td><p>Once enabled, users can request and use the just-in-time access in the SQL Editor. </p></td></tr></tbody>@@ -25693,7 +26117,31 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.SQLReviewRule.CommentConventionRulePayload">SQLReviewRule.CommentConventionRulePayload</h3>+ <h3 id="bytebase.v1.Project.ExecutionRetryPolicy">Project.ExecutionRetryPolicy</h3>+ <p>Execution retry policy configuration.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>maximum_retries</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of retries for lock timeout errors. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Project.LabelsEntry">Project.LabelsEntry</h3><p></p>@@ -25704,15 +26152,15 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>required</td>- <td><a href="#bool">bool</a></td>+ <td>key</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>max_length</td>- <td><a href="#int32">int32</a></td>+ <td>value</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -25724,7 +26172,7 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.SQLReviewRule.NamingCaseRulePayload">SQLReviewRule.NamingCaseRulePayload</h3>+ <h3 id="bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</h3><p></p>@@ -25735,10 +26183,10 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>upper</td>- <td><a href="#bool">bool</a></td>+ <td>webhook</td>+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td><td></td>- <td><p> </p></td>+ <td><p>The webhook to remove. Identified by its url. </p></td></tr></tbody>@@ -25748,8 +26196,8 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.SQLReviewRule.NamingRulePayload">SQLReviewRule.NamingRulePayload</h3>- <p>Payload message types for SQL review rules</p>+ <h3 id="bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</h3>+ <p></p><table class="field-table">@@ -25759,17 +26207,73 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>max_length</td>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Show deleted projects if specified. </p></td>+ </tr>++ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter the project.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- name: the project name, support "==" and ".matches()" operator.+- resource_id: the project id, support "==" and ".matches()" operator.+- exclude_default: if not include the default project, should be "true" or "false", support "==" operator.+- state: check the State enum for the values, support "==" operator.+- labels.{key}: the project label, support "==" and "in" operators.++For example:+name == "project name"+name.matches("project name")+resource_id == "project id"+resource_id.matches("project id")+exclude_default == true+state == "DELETED"+labels.environment == "production"+labels.tier == "critical"+labels.environment in ["staging", "prod"]+You can combine filter conditions like:+name == "project name" && resource_id.matches("project id")+name.matches("project name") || resource_id == "project id"+labels.environment == "production" && labels.tier == "critical" </p></td>+ </tr>++ <tr>+ <td>page_size</td><td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The maximum number of projects to return. The service may return fewer than+this value.+If unspecified, at most 10 projects will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr><tr>- <td>format</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>A page token, received from a previous `SearchProjects` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `SearchProjects` must match+the call that provided the page token. </p></td>+ </tr>++ <tr>+ <td>order_by</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The order by of projects.+Support title. The default sorting order is ascending.+For example:+- order_by = "title"+- order_by = "title desc"+- order_by = "title asc" </p></td></tr></tbody>@@ -25779,7 +26283,7 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.SQLReviewRule.NumberRulePayload">SQLReviewRule.NumberRulePayload</h3>+ <h3 id="bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</h3><p></p>@@ -25790,10 +26294,18 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>number</td>- <td><a href="#int32">int32</a></td>+ <td>projects</td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td>repeated</td>+ <td><p>The projects from the specified request. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody>@@ -25803,7 +26315,7 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.SQLReviewRule.StringArrayRulePayload">SQLReviewRule.StringArrayRulePayload</h3>+ <h3 id="bytebase.v1.TestWebhookRequest">TestWebhookRequest</h3><p></p>@@ -25814,10 +26326,18 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>list</td>+ <td>project</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td></td>+ <td><p>The name of the project which owns the webhook to test.+Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>webhook</td>+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>+ <td></td>+ <td><p>The webhook to test. Identified by its url. </p></td></tr></tbody>@@ -25827,7 +26347,7 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.SQLReviewRule.StringRulePayload">SQLReviewRule.StringRulePayload</h3>+ <h3 id="bytebase.v1.TestWebhookResponse">TestWebhookResponse</h3><p></p>@@ -25838,10 +26358,10 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>value</td>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The result of the test, empty if the test is successful. </p></td></tr></tbody>@@ -25851,7 +26371,7 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td>- <h3 id="bytebase.v1.UpdateReviewConfigRequest">UpdateReviewConfigRequest</h3>+ <h3 id="bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</h3><p></p>@@ -25862,12 +26382,38 @@ Format: {resource}/{resource id}, e.g., environments/test. </p></td><tbody><tr>- <td>review_config</td>- <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The SQL review config to update.+ <td><p>The name of the deleted project.+Format: projects/{project} </p></td>+ </tr>++ </tbody>+ </table>-The name field is used to identify the SQL review config to update. </p></td>+++++ <h3 id="bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</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>project</td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td></td>+ <td><p>The project to update.++The project's `name` field is used to identify the project to update.+Format: projects/{project} </p></td></tr><tr>@@ -25881,7 +26427,7 @@ The name field is used to identify the SQL review config to update. </p></td><td>allow_missing</td><td><a href="#bool">bool</a></td><td></td>- <td><p>If set to true, and the config is not found, a new config will be created.+ <td><p>If set to true, and the project is not found, a new project will be created.In this situation, `update_mask` is ignored. </p></td></tr>@@ -25892,10 +26438,120 @@ In this situation, `update_mask` is ignored. </p></td>+ <h3 id="bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</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>webhook</td>+ <td><a href="#bytebase.v1.Webhook">Webhook</a></td>+ <td></td>+ <td><p>The webhook to modify. </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update. </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the webhook is not found, a new webhook will be created.+In this situation, `update_mask` is ignored. </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.v1.SQLReviewRule.Level">SQLReviewRule.Level</h3>- <p>The severity level for SQL review rules.</p>+ <h3 id="bytebase.v1.Webhook">Webhook</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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>name is the name of the webhook, generated by the server.+format: projects/{project}/webhooks/{webhook} </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>+ <td></td>+ <td><p>Webhook integration type.+type is the type of the webhook. </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>title is the title of the webhook. </p></td>+ </tr>++ <tr>+ <td>url</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>url is the url of the webhook, should be unique within the project. </p></td>+ </tr>++ <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>+ </tr>++ <tr>+ <td>notification_types</td>+ <td><a href="#bytebase.v1.Activity.Type">Activity.Type</a></td>+ <td>repeated</td>+ <td><p>notification_types is the list of activities types that the webhook is interested in.+Bytebase will only send notifications to the webhook if the activity type is in the list.+It should not be empty, and should be a subset of the following:+- ISSUE_CREATED+- ISSUE_APPROVAL_REQUESTED+- ISSUE_SENT_BACK+- ISSUE_APPROVED+- PIPELINE_FAILED+- PIPELINE_COMPLETED </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.Activity.Type">Activity.Type</h3>+ <p>Activity type enumeration.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -25903,1472 +26559,364 @@ In this situation, `update_mask` is ignored. </p></td><tbody><tr>- <td>LEVEL_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified level.</p></td>+ <td><p>Unspecified type.</p></td></tr><tr>- <td>ERROR</td>- <td>1</td>- <td><p>Rule violation is an error.</p></td>+ <td>ISSUE_CREATED</td>+ <td>10</td>+ <td><p>ISSUE_CREATED represents a new issue creation event.</p></td></tr><tr>- <td>WARNING</td>- <td>2</td>- <td><p>Rule violation is a warning.</p></td>+ <td>ISSUE_APPROVAL_REQUESTED</td>+ <td>11</td>+ <td><p>ISSUE_APPROVAL_REQUESTED represents an approval request event.</p></td>+ </tr>++ <tr>+ <td>ISSUE_SENT_BACK</td>+ <td>12</td>+ <td><p>ISSUE_SENT_BACK represents an issue being sent back by an approver.</p></td>+ </tr>++ <tr>+ <td>PIPELINE_FAILED</td>+ <td>13</td>+ <td><p>PIPELINE_FAILED represents a pipeline failure event.</p></td>+ </tr>++ <tr>+ <td>PIPELINE_COMPLETED</td>+ <td>14</td>+ <td><p>PIPELINE_COMPLETED represents a pipeline completion event.</p></td>+ </tr>++ <tr>+ <td>ISSUE_APPROVED</td>+ <td>15</td>+ <td><p>ISSUE_APPROVED represents an issue being fully approved.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.SQLReviewRule.Type">SQLReviewRule.Type</h3>- <p></p>+++++ <h3 id="bytebase.v1.ProjectService">ProjectService</h3>+ <p>ProjectService manages projects that group databases and changes.</p><table class="enum-table"><thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr></thead><tbody><tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>+ <td>GetProject</td>+ <td><a href="#bytebase.v1.GetProjectRequest">GetProjectRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>GetProject retrieves a project by name.+Users with "bb.projects.get" permission on the workspace or the project owner can access this method.+Permissions required: bb.projects.get</p></td></tr><tr>- <td>ENGINE_MYSQL_USE_INNODB</td>- <td>1</td>- <td><p></p></td>+ <td>BatchGetProjects</td>+ <td><a href="#bytebase.v1.BatchGetProjectsRequest">BatchGetProjectsRequest</a></td>+ <td><a href="#bytebase.v1.BatchGetProjectsResponse">BatchGetProjectsResponse</a></td>+ <td><p>BatchGetProjects retrieves multiple projects by their names.+Permissions required: bb.projects.get</p></td></tr><tr>- <td>NAMING_FULLY_QUALIFIED</td>- <td>2</td>- <td><p></p></td>+ <td>ListProjects</td>+ <td><a href="#bytebase.v1.ListProjectsRequest">ListProjectsRequest</a></td>+ <td><a href="#bytebase.v1.ListProjectsResponse">ListProjectsResponse</a></td>+ <td><p>Lists all projects in the workspace with optional filtering.+Permissions required: bb.projects.list</p></td></tr><tr>- <td>NAMING_TABLE</td>- <td>3</td>- <td><p></p></td>+ <td>SearchProjects</td>+ <td><a href="#bytebase.v1.SearchProjectsRequest">SearchProjectsRequest</a></td>+ <td><a href="#bytebase.v1.SearchProjectsResponse">SearchProjectsResponse</a></td>+ <td><p>Searches for projects with advanced filtering capabilities.+Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)</p></td></tr><tr>- <td>NAMING_COLUMN</td>- <td>4</td>- <td><p></p></td>+ <td>CreateProject</td>+ <td><a href="#bytebase.v1.CreateProjectRequest">CreateProjectRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>Creates a new project in the workspace.+Permissions required: bb.projects.create</p></td></tr><tr>- <td>NAMING_INDEX_PK</td>- <td>5</td>- <td><p></p></td>+ <td>UpdateProject</td>+ <td><a href="#bytebase.v1.UpdateProjectRequest">UpdateProjectRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>Updates an existing project's properties.+Permissions required: bb.projects.update</p></td></tr><tr>- <td>NAMING_INDEX_UK</td>- <td>6</td>- <td><p></p></td>+ <td>DeleteProject</td>+ <td><a href="#bytebase.v1.DeleteProjectRequest">DeleteProjectRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes (soft-delete or purge) a project.+Permissions required: bb.projects.delete</p></td></tr><tr>- <td>NAMING_INDEX_FK</td>- <td>7</td>- <td><p></p></td>+ <td>UndeleteProject</td>+ <td><a href="#bytebase.v1.UndeleteProjectRequest">UndeleteProjectRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>Restores a soft-deleted project.+Permissions required: bb.projects.undelete</p></td></tr><tr>- <td>NAMING_INDEX_IDX</td>- <td>8</td>- <td><p></p></td>+ <td>BatchDeleteProjects</td>+ <td><a href="#bytebase.v1.BatchDeleteProjectsRequest">BatchDeleteProjectsRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes multiple projects in a single operation.+Permissions required: bb.projects.delete</p></td></tr><tr>- <td>NAMING_COLUMN_AUTO_INCREMENT</td>- <td>9</td>- <td><p></p></td>+ <td>GetIamPolicy</td>+ <td><a href="#bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</a></td>+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>+ <td><p>Retrieves the IAM policy for a project.+Permissions required: bb.projects.getIamPolicy</p></td></tr><tr>- <td>NAMING_TABLE_NO_KEYWORD</td>- <td>10</td>- <td><p></p></td>+ <td>SetIamPolicy</td>+ <td><a href="#bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</a></td>+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>+ <td><p>Sets the IAM policy for a project.+Permissions required: bb.projects.setIamPolicy</p></td></tr><tr>- <td>NAMING_IDENTIFIER_NO_KEYWORD</td>- <td>11</td>- <td><p></p></td>- </tr>-- <tr>- <td>NAMING_IDENTIFIER_CASE</td>- <td>12</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_SELECT_NO_SELECT_ALL</td>- <td>13</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_WHERE_REQUIRE_SELECT</td>- <td>14</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_WHERE_REQUIRE_UPDATE_DELETE</td>- <td>15</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_WHERE_NO_LEADING_WILDCARD_LIKE</td>- <td>16</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_DISALLOW_ON_DEL_CASCADE</td>- <td>17</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_DISALLOW_RM_TBL_CASCADE</td>- <td>18</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_DISALLOW_COMMIT</td>- <td>19</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_DISALLOW_LIMIT</td>- <td>20</td>- <td><p></p></td>+ <td>AddWebhook</td>+ <td><a href="#bytebase.v1.AddWebhookRequest">AddWebhookRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>Adds a webhook to a project for notifications.+Permissions required: bb.projects.update</p></td></tr><tr>- <td>STATEMENT_DISALLOW_ORDER_BY</td>- <td>21</td>- <td><p></p></td>+ <td>UpdateWebhook</td>+ <td><a href="#bytebase.v1.UpdateWebhookRequest">UpdateWebhookRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>Updates an existing webhook configuration.+Permissions required: bb.projects.update</p></td></tr><tr>- <td>STATEMENT_MERGE_ALTER_TABLE</td>- <td>22</td>- <td><p></p></td>+ <td>RemoveWebhook</td>+ <td><a href="#bytebase.v1.RemoveWebhookRequest">RemoveWebhookRequest</a></td>+ <td><a href="#bytebase.v1.Project">Project</a></td>+ <td><p>Removes a webhook from a project.+Permissions required: bb.projects.update</p></td></tr><tr>- <td>STATEMENT_INSERT_ROW_LIMIT</td>- <td>23</td>- <td><p></p></td>+ <td>TestWebhook</td>+ <td><a href="#bytebase.v1.TestWebhookRequest">TestWebhookRequest</a></td>+ <td><a href="#bytebase.v1.TestWebhookResponse">TestWebhookResponse</a></td>+ <td><p>Tests a webhook by sending a test notification.+Permissions required: bb.projects.update</p></td></tr>+ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead><tr>- <td>STATEMENT_INSERT_MUST_SPECIFY_COLUMN</td>- <td>24</td>- <td><p></p></td>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr>+ </thead>+ <tbody>++<tr>- <td>STATEMENT_INSERT_DISALLOW_ORDER_BY_RAND</td>- <td>25</td>- <td><p></p></td>+ <td>GetProject</td>+ <td>GET</td>+ <td>/v1/{name=projects/*}</td>+ <td></td></tr>+++<tr>- <td>STATEMENT_AFFECTED_ROW_LIMIT</td>- <td>26</td>- <td><p></p></td>+ <td>BatchGetProjects</td>+ <td>GET</td>+ <td>/v1/projects:batchGet</td>+ <td></td></tr>+++<tr>- <td>STATEMENT_DML_DRY_RUN</td>- <td>27</td>- <td><p></p></td>+ <td>ListProjects</td>+ <td>GET</td>+ <td>/v1/projects</td>+ <td></td></tr>+++<tr>- <td>STATEMENT_DISALLOW_ADD_COLUMN_WITH_DEFAULT</td>- <td>28</td>- <td><p></p></td>+ <td>SearchProjects</td>+ <td>POST</td>+ <td>/v1/projects:search</td>+ <td>*</td></tr>+++<tr>- <td>STATEMENT_ADD_CHECK_NOT_VALID</td>- <td>29</td>- <td><p></p></td>+ <td>CreateProject</td>+ <td>POST</td>+ <td>/v1/projects</td>+ <td>project</td></tr>+++<tr>- <td>STATEMENT_ADD_FOREIGN_KEY_NOT_VALID</td>- <td>30</td>- <td><p></p></td>+ <td>UpdateProject</td>+ <td>PATCH</td>+ <td>/v1/{project.name=projects/*}</td>+ <td>project</td></tr>+++<tr>- <td>STATEMENT_DISALLOW_ADD_NOT_NULL</td>- <td>31</td>- <td><p></p></td>+ <td>DeleteProject</td>+ <td>DELETE</td>+ <td>/v1/{name=projects/*}</td>+ <td></td></tr>+++<tr>- <td>STATEMENT_SELECT_FULL_TABLE_SCAN</td>- <td>32</td>- <td><p></p></td>+ <td>UndeleteProject</td>+ <td>POST</td>+ <td>/v1/{name=projects/*}:undelete</td>+ <td>*</td></tr>+++<tr>- <td>STATEMENT_CREATE_SPECIFY_SCHEMA</td>- <td>33</td>- <td><p></p></td>+ <td>BatchDeleteProjects</td>+ <td>POST</td>+ <td>/v1/projects:batchDelete</td>+ <td>*</td></tr>+++<tr>- <td>STATEMENT_CHECK_SET_ROLE_VARIABLE</td>- <td>34</td>- <td><p></p></td>+ <td>GetIamPolicy</td>+ <td>GET</td>+ <td>/v1/{resource=projects/*}:getIamPolicy</td>+ <td></td></tr>+++<tr>- <td>STATEMENT_DISALLOW_USING_FILESORT</td>- <td>35</td>- <td><p></p></td>+ <td>SetIamPolicy</td>+ <td>POST</td>+ <td>/v1/{resource=projects/*}:setIamPolicy</td>+ <td>*</td></tr>+++<tr>- <td>STATEMENT_DISALLOW_USING_TEMPORARY</td>- <td>36</td>- <td><p></p></td>+ <td>AddWebhook</td>+ <td>POST</td>+ <td>/v1/{project=projects/*}:addWebhook</td>+ <td>*</td></tr>+++<tr>- <td>STATEMENT_WHERE_NO_EQUAL_NULL</td>- <td>37</td>- <td><p></p></td>+ <td>UpdateWebhook</td>+ <td>PATCH</td>+ <td>/v1/{webhook.name=projects/*/webhooks/*}:updateWebhook</td>+ <td>webhook</td></tr>+++<tr>- <td>STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS</td>- <td>38</td>- <td><p></p></td>+ <td>RemoveWebhook</td>+ <td>POST</td>+ <td>/v1/{webhook.name=projects/*/webhooks/*}:removeWebhook</td>+ <td>*</td></tr>+++<tr>- <td>STATEMENT_QUERY_MINIMUM_PLAN_LEVEL</td>- <td>39</td>- <td><p></p></td>+ <td>TestWebhook</td>+ <td>POST</td>+ <td>/v1/{project=projects/*}:testWebhook</td>+ <td>*</td></tr>+- <tr>- <td>STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT</td>- <td>40</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_MAXIMUM_LIMIT_VALUE</td>- <td>41</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_MAXIMUM_JOIN_TABLE_COUNT</td>- <td>42</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION</td>- <td>43</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_JOIN_STRICT_COLUMN_ATTRS</td>- <td>44</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_NON_TRANSACTIONAL</td>- <td>45</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_ADD_COLUMN_WITHOUT_POSITION</td>- <td>46</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_DISALLOW_OFFLINE_DDL</td>- <td>47</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_DISALLOW_CROSS_DB_QUERIES</td>- <td>48</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_MAX_EXECUTION_TIME</td>- <td>49</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_REQUIRE_ALGORITHM_OPTION</td>- <td>50</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_REQUIRE_LOCK_OPTION</td>- <td>51</td>- <td><p></p></td>- </tr>-- <tr>- <td>STATEMENT_OBJECT_OWNER_CHECK</td>- <td>52</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_REQUIRE_PK</td>- <td>53</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_NO_FOREIGN_KEY</td>- <td>54</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_DROP_NAMING_CONVENTION</td>- <td>55</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_COMMENT</td>- <td>56</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_DISALLOW_PARTITION</td>- <td>57</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_DISALLOW_TRIGGER</td>- <td>58</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_NO_DUPLICATE_INDEX</td>- <td>59</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_TEXT_FIELDS_TOTAL_LENGTH</td>- <td>60</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_DISALLOW_SET_CHARSET</td>- <td>61</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_DISALLOW_DDL</td>- <td>62</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_DISALLOW_DML</td>- <td>63</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_LIMIT_SIZE</td>- <td>64</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_REQUIRE_CHARSET</td>- <td>65</td>- <td><p></p></td>- </tr>-- <tr>- <td>TABLE_REQUIRE_COLLATION</td>- <td>66</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_REQUIRED</td>- <td>67</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_NO_NULL</td>- <td>68</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DISALLOW_CHANGE_TYPE</td>- <td>69</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_SET_DEFAULT_FOR_NOT_NULL</td>- <td>70</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DISALLOW_CHANGE</td>- <td>71</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DISALLOW_CHANGING_ORDER</td>- <td>72</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DISALLOW_DROP</td>- <td>73</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DISALLOW_DROP_IN_INDEX</td>- <td>74</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_COMMENT</td>- <td>75</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_AUTO_INCREMENT_MUST_INTEGER</td>- <td>76</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_TYPE_DISALLOW_LIST</td>- <td>77</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DISALLOW_SET_CHARSET</td>- <td>78</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_MAXIMUM_CHARACTER_LENGTH</td>- <td>79</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_MAXIMUM_VARCHAR_LENGTH</td>- <td>80</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_AUTO_INCREMENT_INITIAL_VALUE</td>- <td>81</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_AUTO_INCREMENT_MUST_UNSIGNED</td>- <td>82</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_CURRENT_TIME_COUNT_LIMIT</td>- <td>83</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_REQUIRE_DEFAULT</td>- <td>84</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_DEFAULT_DISALLOW_VOLATILE</td>- <td>85</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_ADD_NOT_NULL_REQUIRE_DEFAULT</td>- <td>86</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_REQUIRE_CHARSET</td>- <td>87</td>- <td><p></p></td>- </tr>-- <tr>- <td>COLUMN_REQUIRE_COLLATION</td>- <td>88</td>- <td><p></p></td>- </tr>-- <tr>- <td>SCHEMA_BACKWARD_COMPATIBILITY</td>- <td>89</td>- <td><p></p></td>- </tr>-- <tr>- <td>DATABASE_DROP_EMPTY_DATABASE</td>- <td>90</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_NO_DUPLICATE_COLUMN</td>- <td>91</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_KEY_NUMBER_LIMIT</td>- <td>92</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_PK_TYPE_LIMIT</td>- <td>93</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_TYPE_NO_BLOB</td>- <td>94</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_TOTAL_NUMBER_LIMIT</td>- <td>95</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_PRIMARY_KEY_TYPE_ALLOWLIST</td>- <td>96</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_CREATE_CONCURRENTLY</td>- <td>97</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_TYPE_ALLOW_LIST</td>- <td>98</td>- <td><p></p></td>- </tr>-- <tr>- <td>INDEX_NOT_REDUNDANT</td>- <td>99</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_CHARSET_ALLOWLIST</td>- <td>100</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_COLLATION_ALLOWLIST</td>- <td>101</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_COMMENT_LENGTH</td>- <td>102</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_PROCEDURE_DISALLOW_CREATE</td>- <td>103</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_EVENT_DISALLOW_CREATE</td>- <td>104</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_VIEW_DISALLOW_CREATE</td>- <td>105</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_FUNCTION_DISALLOW_CREATE</td>- <td>106</td>- <td><p></p></td>- </tr>-- <tr>- <td>SYSTEM_FUNCTION_DISALLOWED_LIST</td>- <td>107</td>- <td><p></p></td>- </tr>-- <tr>- <td>ADVICE_ONLINE_MIGRATION</td>- <td>108</td>- <td><p></p></td>- </tr>-- <tr>- <td>BUILTIN_PRIOR_BACKUP_CHECK</td>- <td>109</td>- <td><p></p></td>- </tr>-- <tr>- <td>BUILTIN_WALK_THROUGH_CHECK</td>- <td>110</td>- <td><p></p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ReviewConfigService">ReviewConfigService</h3>- <p>ReviewConfigService manages approval flow configurations.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>CreateReviewConfig</td>- <td><a href="#bytebase.v1.CreateReviewConfigRequest">CreateReviewConfigRequest</a></td>- <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>- <td><p>Creates a new SQL review configuration.-Permissions required: bb.reviewConfigs.create</p></td>- </tr>-- <tr>- <td>ListReviewConfigs</td>- <td><a href="#bytebase.v1.ListReviewConfigsRequest">ListReviewConfigsRequest</a></td>- <td><a href="#bytebase.v1.ListReviewConfigsResponse">ListReviewConfigsResponse</a></td>- <td><p>Lists all SQL review configurations.-Permissions required: bb.reviewConfigs.list</p></td>- </tr>-- <tr>- <td>GetReviewConfig</td>- <td><a href="#bytebase.v1.GetReviewConfigRequest">GetReviewConfigRequest</a></td>- <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>- <td><p>Retrieves a SQL review configuration by name.-Permissions required: bb.reviewConfigs.get</p></td>- </tr>-- <tr>- <td>UpdateReviewConfig</td>- <td><a href="#bytebase.v1.UpdateReviewConfigRequest">UpdateReviewConfigRequest</a></td>- <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>- <td><p>Updates a SQL review configuration.-Permissions required: bb.reviewConfigs.update-When allow_missing=true, also requires: bb.reviewConfigs.create</p></td>- </tr>-- <tr>- <td>DeleteReviewConfig</td>- <td><a href="#bytebase.v1.DeleteReviewConfigRequest">DeleteReviewConfigRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a SQL review configuration.-Permissions required: bb.reviewConfigs.delete</p></td>- </tr>-- </tbody>- </table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>- </thead>- <tbody>---- <tr>- <td>CreateReviewConfig</td>- <td>POST</td>- <td>/v1/reviewConfigs</td>- <td>review_config</td>- </tr>----- <tr>- <td>ListReviewConfigs</td>- <td>GET</td>- <td>/v1/reviewConfigs</td>- <td></td>- </tr>----- <tr>- <td>GetReviewConfig</td>- <td>GET</td>- <td>/v1/{name=reviewConfigs/*}</td>- <td></td>- </tr>----- <tr>- <td>UpdateReviewConfig</td>- <td>PATCH</td>- <td>/v1/{review_config.name=reviewConfigs/*}</td>- <td>review_config</td>- </tr>----- <tr>- <td>DeleteReviewConfig</td>- <td>DELETE</td>- <td>/v1/{name=reviewConfigs/*}</td>- <td></td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/revision_service.proto">v1/revision_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.BatchCreateRevisionsRequest">BatchCreateRevisionsRequest</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>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent resource shared by all revisions being created.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>requests</td>- <td><a href="#bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</a></td>- <td>repeated</td>- <td><p>The request message specifying the revisions to create.-A maximum of 100 revisions can be created in a batch. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.BatchCreateRevisionsResponse">BatchCreateRevisionsResponse</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>revisions</td>- <td><a href="#bytebase.v1.Revision">Revision</a></td>- <td>repeated</td>- <td><p>The created revisions. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</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>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>revision</td>- <td><a href="#bytebase.v1.Revision">Revision</a></td>- <td></td>- <td><p>The revision to create. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the revision to delete.-Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetRevisionRequest">GetRevisionRequest</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the revision.-Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</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>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The parent of the revisions.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of revisions to return. The service may return fewer-than this value. If unspecified, at most 10 revisions will be returned. The-maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>- </tr>-- <tr>- <td>page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A page token, received from a previous `ListRevisions` call.-Provide this to retrieve the subsequent page.--When paginating, all other parameters provided to `ListRevisions` must-match the call that provided the page token. </p></td>- </tr>-- <tr>- <td>show_deleted</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Whether to include deleted revisions in the results. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</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>revisions</td>- <td><a href="#bytebase.v1.Revision">Revision</a></td>- <td>repeated</td>- <td><p>The revisions from the specified request. </p></td>- </tr>-- <tr>- <td>next_page_token</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Revision">Revision</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>- </tr>-- <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>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>deleter</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: users/[email protected]-Can be empty. </p></td>- </tr>-- <tr>- <td>delete_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>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>version</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schema version string for this revision. </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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.Revision.Type">Revision.Type</a></td>- <td></td>- <td><p>The type of the revision. </p></td>- </tr>-- </tbody>- </table>-------- <h3 id="bytebase.v1.Revision.Type">Revision.Type</h3>- <p>The type of schema revision.</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>Unspecified type.</p></td>- </tr>-- <tr>- <td>VERSIONED</td>- <td>1</td>- <td><p>Versioned schema migration.</p></td>- </tr>-- <tr>- <td>DECLARATIVE</td>- <td>2</td>- <td><p>Declarative schema definition.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.RevisionService">RevisionService</h3>- <p>RevisionService manages schema revision history.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ListRevisions</td>- <td><a href="#bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</a></td>- <td><a href="#bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</a></td>- <td><p>Lists schema revisions for a database.-Permissions required: bb.revisions.list</p></td>- </tr>-- <tr>- <td>GetRevision</td>- <td><a href="#bytebase.v1.GetRevisionRequest">GetRevisionRequest</a></td>- <td><a href="#bytebase.v1.Revision">Revision</a></td>- <td><p>Retrieves a schema revision by name.-Permissions required: bb.revisions.get</p></td>- </tr>-- <tr>- <td>BatchCreateRevisions</td>- <td><a href="#bytebase.v1.BatchCreateRevisionsRequest">BatchCreateRevisionsRequest</a></td>- <td><a href="#bytebase.v1.BatchCreateRevisionsResponse">BatchCreateRevisionsResponse</a></td>- <td><p>Creates multiple schema revisions in a single operation.-Permissions required: bb.revisions.create</p></td>- </tr>-- <tr>- <td>DeleteRevision</td>- <td><a href="#bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a schema revision.-Permissions required: bb.revisions.delete</p></td>- </tr>-- </tbody>- </table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>- </thead>- <tbody>---- <tr>- <td>ListRevisions</td>- <td>GET</td>- <td>/v1/{parent=instances/*/databases/*}/revisions</td>- <td></td>- </tr>----- <tr>- <td>GetRevision</td>- <td>GET</td>- <td>/v1/{name=instances/*/databases/*/revisions/*}</td>- <td></td>- </tr>----- <tr>- <td>BatchCreateRevisions</td>- <td>POST</td>- <td>/v1/{parent=instances/*/databases/*}/revisions:batchCreate</td>- <td>*</td>- </tr>----- <tr>- <td>DeleteRevision</td>- <td>DELETE</td>- <td>/v1/{name=instances/*/databases/*/revisions/*}</td>- <td></td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/role_service.proto">v1/role_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.CreateRoleRequest">CreateRoleRequest</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>role</td>- <td><a href="#bytebase.v1.Role">Role</a></td>- <td></td>- <td><p>The role to create. </p></td>- </tr>-- <tr>- <td>role_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The ID to use for the role, which will become the final component-of the role's resource name.--This value should be 4-63 characters, and valid characters-are /[a-z][A-Z][0-9]/. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.DeleteRoleRequest">DeleteRoleRequest</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the role to delete.-Format: roles/{role} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetRoleRequest">GetRoleRequest</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the role to retrieve.-Format: roles/{role} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListRolesRequest">ListRolesRequest</h3>- <p></p>------ <h3 id="bytebase.v1.ListRolesResponse">ListRolesResponse</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>roles</td>- <td><a href="#bytebase.v1.Role">Role</a></td>- <td>repeated</td>- <td><p>The roles from the specified request. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Role">Role</h3>- <p>Role defines a set of permissions that can be assigned to users.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Resource name. Format: roles/{role} </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Human-readable title. </p></td>- </tr>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Optional description of the role. </p></td>- </tr>-- <tr>- <td>permissions</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>List of permission identifiers granted by this role. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.Role.Type">Role.Type</a></td>- <td></td>- <td><p>Role type indicating if it's built-in or custom. </p></td>- </tr>-</tbody></table>--+- <h3 id="bytebase.v1.UpdateRoleRequest">UpdateRoleRequest</h3>+ <div class="file-heading">+ <h2 id="v1/release_service.proto">v1/release_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CheckReleaseRequest">CheckReleaseRequest</h3><p></p>@@ -27379,25 +26927,38 @@ Format: roles/{role} </p></td><tbody><tr>- <td>role</td>- <td><a href="#bytebase.v1.Role">Role</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The role to update. </p></td>+ <td><p>Format: projects/{project} </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>release</td>+ <td><a href="#bytebase.v1.Release">Release</a></td><td></td>- <td><p>The list of fields to update. </p></td>+ <td><p>The release to check. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>targets</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The targets to dry-run the release.+Can be database or databaseGroup.+Format:+projects/{project}/databaseGroups/{databaseGroup}+instances/{instance}/databases/{database} </p></td>+ </tr>++ <tr>+ <td>custom_rules</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>If set to true, and the role is not found, a new role will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>Custom linting rules in natural language for AI-powered validation.+Each rule should be a clear statement describing the desired schema constraint.+Example: "All tables must have a primary key"+Example: "VARCHAR columns should specify a maximum length" </p></td></tr></tbody>@@ -27407,171 +26968,7 @@ In this situation, `update_mask` is ignored. </p></td>--- <h3 id="bytebase.v1.Role.Type">Role.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>BUILT_IN</td>- <td>1</td>- <td><p>System-defined role that cannot be modified.</p></td>- </tr>-- <tr>- <td>CUSTOM</td>- <td>2</td>- <td><p>User-defined role that can be modified.</p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.RoleService">RoleService</h3>- <p>RoleService manages workspace roles and permissions.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ListRoles</td>- <td><a href="#bytebase.v1.ListRolesRequest">ListRolesRequest</a></td>- <td><a href="#bytebase.v1.ListRolesResponse">ListRolesResponse</a></td>- <td><p>Lists roles in the workspace.-Permissions required: bb.roles.list</p></td>- </tr>-- <tr>- <td>GetRole</td>- <td><a href="#bytebase.v1.GetRoleRequest">GetRoleRequest</a></td>- <td><a href="#bytebase.v1.Role">Role</a></td>- <td><p>Retrieves a role by name.-Permissions required: bb.roles.get</p></td>- </tr>-- <tr>- <td>CreateRole</td>- <td><a href="#bytebase.v1.CreateRoleRequest">CreateRoleRequest</a></td>- <td><a href="#bytebase.v1.Role">Role</a></td>- <td><p>Creates a new custom role.-Permissions required: bb.roles.create</p></td>- </tr>-- <tr>- <td>UpdateRole</td>- <td><a href="#bytebase.v1.UpdateRoleRequest">UpdateRoleRequest</a></td>- <td><a href="#bytebase.v1.Role">Role</a></td>- <td><p>Updates a role's properties.-Permissions required: bb.roles.update-When allow_missing=true, also requires: bb.roles.create</p></td>- </tr>-- <tr>- <td>DeleteRole</td>- <td><a href="#bytebase.v1.DeleteRoleRequest">DeleteRoleRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a custom role.-Permissions required: bb.roles.delete</p></td>- </tr>-- </tbody>- </table>----- <h4>Methods with HTTP bindings</h4>- <table>- <thead>- <tr>- <td>Method Name</td>- <td>Method</td>- <td>Pattern</td>- <td>Body</td>- </tr>- </thead>- <tbody>---- <tr>- <td>ListRoles</td>- <td>GET</td>- <td>/v1/roles</td>- <td></td>- </tr>----- <tr>- <td>GetRole</td>- <td>GET</td>- <td>/v1/{name=roles/*}</td>- <td></td>- </tr>----- <tr>- <td>CreateRole</td>- <td>POST</td>- <td>/v1/roles</td>- <td>role</td>- </tr>----- <tr>- <td>UpdateRole</td>- <td>PATCH</td>- <td>/v1/{role.name=roles/*}</td>- <td>role</td>- </tr>----- <tr>- <td>DeleteRole</td>- <td>DELETE</td>- <td>/v1/{name=roles/*}</td>- <td></td>- </tr>--- </tbody>- </table>----- <div class="file-heading">- <h2 id="v1/rollout_service.proto">v1/rollout_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</h3>+ <h3 id="bytebase.v1.CheckReleaseResponse">CheckReleaseResponse</h3><p></p>@@ -27582,38 +26979,35 @@ Permissions required: bb.roles.delete</p></td><tbody><tr>- <td>parent</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The task name for the taskRuns.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}-Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage. </p></td>+ <td>results</td>+ <td><a href="#bytebase.v1.CheckReleaseResponse.CheckResult">CheckReleaseResponse.CheckResult</a></td>+ <td>repeated</td>+ <td><p>The check results for each file and target combination. </p></td></tr><tr>- <td>task_runs</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The taskRuns to cancel.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The total affected rows across all checks. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</h3>- <p></p>+ <tr>+ <td>risk_level</td>+ <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>+ <td></td>+ <td><p>The aggregated risk level of the check. </p></td>+ </tr>++ </tbody>+ </table>-+- <h3 id="bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</h3>- <p></p>+ <h3 id="bytebase.v1.CheckReleaseResponse.CheckResult">CheckReleaseResponse.CheckResult</h3>+ <p>Check result for a single release file on a target database.</p><table class="field-table">@@ -27623,33 +27017,39 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/task<tbody><tr>- <td>parent</td>+ <td>file</td><td><a href="#string">string</a></td><td></td>- <td><p>The stage name for the tasks.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ <td><p>The file path that is being checked. </p></td></tr><tr>- <td>tasks</td>+ <td>target</td><td><a href="#string">string</a></td>+ <td></td>+ <td><p>The target that the check is performed on.+Should be a database. Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ <tr>+ <td>advices</td>+ <td><a href="#bytebase.v1.Advice">Advice</a></td><td>repeated</td>- <td><p>The tasks to run.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ <td><p>The list of advice for the file and the target. </p></td></tr><tr>- <td>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The task run should run after run_time. </p></td>+ <td>affected_rows</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The count of affected rows of the statement on the target. </p></td></tr><tr>- <td>skip_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>risk_level</td>+ <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td><td></td>- <td><p>If true, skip prior backup for this run even if the task has prior backup enabled. </p></td>+ <td><p>The risk level of the statement on the target. </p></td></tr></tbody>@@ -27659,14 +27059,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>- <h3 id="bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</h3>- <p></p>------ <h3 id="bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</h3>+ <h3 id="bytebase.v1.CreateReleaseRequest">CreateReleaseRequest</h3><p></p>@@ -27680,23 +27073,33 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The stage name for the tasks.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>+ <td><p>Format: projects/{project} </p></td></tr><tr>- <td>tasks</td>+ <td>release</td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td></td>+ <td><p>The release to create. </p></td>+ </tr>++ <tr>+ <td>release_id_template</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The tasks to skip.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>+ <td></td>+ <td><p>Template for release ID generation.+Available variables: {date}, {time}, {timestamp}, {iteration}.+Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00".+Default: "release_{date}-RC{iteration}". </p></td></tr><tr>- <td>reason</td>+ <td>release_id_timezone</td><td><a href="#string">string</a></td><td></td>- <td><p>The reason for skipping the tasks. </p></td>+ <td><p>Timezone for {date} and {time} variables in the template.+Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles").+Default: "UTC". </p></td></tr></tbody>@@ -27706,14 +27109,32 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p>- <h3 id="bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</h3>+ <h3 id="bytebase.v1.DeleteReleaseRequest">DeleteReleaseRequest</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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the release to delete.+Format: projects/{project}/releases/{release} </p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</h3>+ <h3 id="bytebase.v1.GetReleaseRequest">GetReleaseRequest</h3><p></p>@@ -27724,21 +27145,34 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent plan for which this rollout will be created.-Format: projects/{project}/plans/{plan} </p></td>+ <td><p>Format: projects/{project}/releases/{release} </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListReleaseCategoriesRequest">ListReleaseCategoriesRequest</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>target</td>+ <td>parent</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Create the rollout only for the specified target.-Format: environments/{environment}-If unspecified, all stages are created.-If set to "", no stages are created. </p></td>+ <td></td>+ <td><p>Format: projects/{project} </p></td></tr></tbody>@@ -27748,7 +27182,7 @@ If set to "", no stages are created. </p></td>- <h3 id="bytebase.v1.GetRolloutRequest">GetRolloutRequest</h3>+ <h3 id="bytebase.v1.ListReleaseCategoriesResponse">ListReleaseCategoriesResponse</h3><p></p>@@ -27759,12 +27193,10 @@ If set to "", no stages are created. </p></td><tbody><tr>- <td>name</td>+ <td>categories</td><td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the rollout to retrieve.-This is the rollout resource name, which is the plan name plus /rollout suffix.-Format: projects/{project}/plans/{plan}/rollout </p></td>+ <td>repeated</td>+ <td><p>The unique category values in the project. </p></td></tr></tbody>@@ -27774,7 +27206,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</h3>+ <h3 id="bytebase.v1.ListReleasesRequest">ListReleasesRequest</h3><p></p>@@ -27788,7 +27220,48 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>Format: projects/{project} </p></td>+ </tr>++ <tr>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of releases to return. The service may return fewer than this value.+If unspecified, at most 10 releases will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ </tr>++ <tr>+ <td>page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A page token, received from a previous `ListReleases` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListReleases` must match+the call that provided the page token. </p></td>+ </tr>++ <tr>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Show deleted releases if specified. </p></td>+ </tr>++ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter releases returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filters:+- category: release category, support "==" operator.++For example:+category == "webapp" </p></td></tr></tbody>@@ -27798,7 +27271,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</h3>+ <h3 id="bytebase.v1.ListReleasesResponse">ListReleasesResponse</h3><p></p>@@ -27809,10 +27282,18 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>name</td>+ <td>releases</td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td>repeated</td>+ <td><p>The releases from the specified request. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody>@@ -27822,7 +27303,7 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</h3>+ <h3 id="bytebase.v1.Release">Release</h3><p></p>@@ -27833,10 +27314,60 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>Format: projects/{project}/releases/{release} </p></td>+ </tr>++ <tr>+ <td>category</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Category extracted from release name (e.g., "webapp", "analytics").+Set by Bytebase action during release creation. </p></td>+ </tr>++ <tr>+ <td>files</td>+ <td><a href="#bytebase.v1.Release.File">Release.File</a></td>+ <td>repeated</td>+ <td><p>The SQL files included in the release. </p></td>+ </tr>++ <tr>+ <td>vcs_source</td>+ <td><a href="#bytebase.v1.Release.VCSSource">Release.VCSSource</a></td>+ <td></td>+ <td><p>The version control source of the release. </p></td>+ </tr>++ <tr>+ <td>creator</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Format: users/[email protected] </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td>+ <td></td>+ <td><p>The lifecycle state of the release. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.Release.Type">Release.Type</a></td>+ <td></td>+ <td><p>The type of schema change for all files in this release. </p></td></tr></tbody>@@ -27846,8 +27377,8 @@ Format: projects/{project}/plans/{plan}/rollout </p></td>- <h3 id="bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</h3>- <p></p>+ <h3 id="bytebase.v1.Release.File">Release.File</h3>+ <p>A SQL file in a release.</p><table class="field-table">@@ -27857,49 +27388,42 @@ Format: projects/{project}/plans/{plan}/rollout </p></td><tbody><tr>- <td>parent</td>+ <td>path</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent, which owns this collection of rollouts.-Format: projects/{project}-Use "projects/-" to list all rollouts from all projects. </p></td>+ <td><p>The path of the file. e.g., `2.2/V0001_create_table.sql`. </p></td></tr><tr>- <td>page_size</td>- <td><a href="#int32">int32</a></td>+ <td>version</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The maximum number of rollouts to return. The service may return fewer than-this value.-If unspecified, at most 10 rollouts will be returned.-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ <td><p>The version identifier for the file. </p></td></tr><tr>- <td>page_token</td>+ <td>sheet</td><td><a href="#string">string</a></td><td></td>- <td><p>A page token, received from a previous `ListRollouts` call.-Provide this to retrieve the subsequent page.+ <td><p>For inputs, we must either use `sheet` or `statement`.+For outputs, we always use `sheet`. `statement` is the preview of the sheet content.-When paginating, all other parameters provided to `ListRollouts` must match-the call that provided the page token. </p></td>+The sheet that holds the content.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>filter</td>+ <td>statement</td>+ <td><a href="#bytes">bytes</a></td>+ <td></td>+ <td><p>The raw SQL statement content. </p></td>+ </tr>++ <tr>+ <td>sheet_sha256</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter is used to filter rollouts returned in the list.-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec--Supported filters:-- update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.-- task_type: the task type, support "in" operator, check the Task.Type enum for the values.--For example:-update_time >= "2025-01-02T15:04:05Z07:00"-task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td>+ <td><p>The SHA256 hash value of the sheet content or the statement. </p></td></tr></tbody>@@ -27909,8 +27433,8 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td>- <h3 id="bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.Release.VCSSource">Release.VCSSource</h3>+ <p>Version control system source information.</p><table class="field-table">@@ -27920,18 +27444,17 @@ task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"] </p></td><tbody><tr>- <td>rollouts</td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>- <td>repeated</td>- <td><p>The rollouts from the specified request. </p></td>+ <td>vcs_type</td>+ <td><a href="#bytebase.v1.VCSType">VCSType</a></td>+ <td></td>+ <td><p>The type of VCS. </p></td></tr><tr>- <td>next_page_token</td>+ <td>url</td><td><a href="#string">string</a></td><td></td>- <td><p>A token, which can be sent as `page_token` to retrieve the next page.-If this field is omitted, there are no subsequent pages. </p></td>+ <td><p>The url link to the e.g., GitHub commit or pull request. </p></td></tr></tbody>@@ -27941,7 +27464,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</h3>+ <h3 id="bytebase.v1.UndeleteReleaseRequest">UndeleteReleaseRequest</h3><p></p>@@ -27952,12 +27475,11 @@ If this field is omitted, there are no subsequent pages. </p></td><tbody><tr>- <td>parent</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent, which owns this collection of taskRuns.-Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}-Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout. </p></td>+ <td><p>The name of the deleted release.+Format: projects/{project}/releases/{release} </p></td></tr></tbody>@@ -27967,7 +27489,7 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a- <h3 id="bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</h3>+ <h3 id="bytebase.v1.UpdateReleaseRequest">UpdateReleaseRequest</h3><p></p>@@ -27977,123 +27499,246 @@ Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list a</thead><tbody>- <tr>- <td>task_runs</td>- <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>- <td>repeated</td>- <td><p>The taskRuns from the specified request. </p></td>- </tr>+ <tr>+ <td>release</td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td></td>+ <td><p>The release to update. </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to be updated. </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.Release.Type">Release.Type</h3>+ <p>The type of schema change.</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>Unspecified type.</p></td>+ </tr>++ <tr>+ <td>VERSIONED</td>+ <td>1</td>+ <td><p>Versioned schema migration.</p></td>+ </tr>++ <tr>+ <td>DECLARATIVE</td>+ <td>2</td>+ <td><p>Declarative schema definition.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ReleaseService">ReleaseService</h3>+ <p>ReleaseService manages releases for coordinating deployments.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>GetRelease</td>+ <td><a href="#bytebase.v1.GetReleaseRequest">GetReleaseRequest</a></td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td><p>Retrieves a release by name.+Permissions required: bb.releases.get</p></td>+ </tr>++ <tr>+ <td>ListReleases</td>+ <td><a href="#bytebase.v1.ListReleasesRequest">ListReleasesRequest</a></td>+ <td><a href="#bytebase.v1.ListReleasesResponse">ListReleasesResponse</a></td>+ <td><p>Lists releases in a project.+Permissions required: bb.releases.list</p></td>+ </tr>++ <tr>+ <td>CreateRelease</td>+ <td><a href="#bytebase.v1.CreateReleaseRequest">CreateReleaseRequest</a></td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td><p>Creates a new release with SQL files.+Permissions required: bb.releases.create</p></td>+ </tr>++ <tr>+ <td>UpdateRelease</td>+ <td><a href="#bytebase.v1.UpdateReleaseRequest">UpdateReleaseRequest</a></td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td><p>Updates an existing release.+Permissions required: bb.releases.update+When allow_missing=true, also requires: bb.releases.create</p></td>+ </tr>++ <tr>+ <td>DeleteRelease</td>+ <td><a href="#bytebase.v1.DeleteReleaseRequest">DeleteReleaseRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a release.+Permissions required: bb.releases.delete</p></td>+ </tr>++ <tr>+ <td>UndeleteRelease</td>+ <td><a href="#bytebase.v1.UndeleteReleaseRequest">UndeleteReleaseRequest</a></td>+ <td><a href="#bytebase.v1.Release">Release</a></td>+ <td><p>Restores a deleted release.+Permissions required: bb.releases.undelete</p></td>+ </tr>++ <tr>+ <td>CheckRelease</td>+ <td><a href="#bytebase.v1.CheckReleaseRequest">CheckReleaseRequest</a></td>+ <td><a href="#bytebase.v1.CheckReleaseResponse">CheckReleaseResponse</a></td>+ <td><p>Validates a release by dry-running checks on target databases.+Permissions required: bb.releases.check</p></td>+ </tr>++ <tr>+ <td>ListReleaseCategories</td>+ <td><a href="#bytebase.v1.ListReleaseCategoriesRequest">ListReleaseCategoriesRequest</a></td>+ <td><a href="#bytebase.v1.ListReleaseCategoriesResponse">ListReleaseCategoriesResponse</a></td>+ <td><p>Lists all unique categories in a project.+Permissions required: bb.releases.list</p></td>+ </tr>++ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr>+ </thead>+ <tbody>++++ <tr>+ <td>GetRelease</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/releases/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>ListReleases</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/releases</td>+ <td></td>+ </tr>+++++ <tr>+ <td>CreateRelease</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/releases</td>+ <td>release</td>+ </tr>+++++ <tr>+ <td>UpdateRelease</td>+ <td>PATCH</td>+ <td>/v1/{release.name=projects/*/releases/*}</td>+ <td>release</td>+ </tr>++- </tbody>- </table>------ <h3 id="bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</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>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>- </tr>+ <tr>+ <td>DeleteRelease</td>+ <td>DELETE</td>+ <td>/v1/{name=projects/*/releases/*}</td>+ <td></td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</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>statement</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The rollback SQL statement that would undo the task run. </p></td>- </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.Rollout">Rollout</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>UndeleteRelease</td>+ <td>POST</td>+ <td>/v1/{name=projects/*/releases/*}:undelete</td>+ <td></td>+ </tr>- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the rollout.-Format: projects/{project}/plans/{plan}/rollout </p></td>- </tr>+- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The title of the rollout, inherited from the associated plan.-This field is output only and cannot be directly set. </p></td>- </tr>- <tr>- <td>stages</td>- <td><a href="#bytebase.v1.Stage">Stage</a></td>- <td>repeated</td>- <td><p>Stages and thus tasks of the rollout. </p></td>- </tr>+ <tr>+ <td>CheckRelease</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/releases:check</td>+ <td>*</td>+ </tr>- <tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>+- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>+ <tr>+ <td>ListReleaseCategories</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/releases:listCategories</td>+ <td></td>+ </tr>++</tbody></table>--+- <h3 id="bytebase.v1.Stage">Stage</h3>+ <div class="file-heading">+ <h2 id="v1/review_config_service.proto">v1/review_config_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CreateReviewConfigRequest">CreateReviewConfigRequest</h3><p></p>@@ -28104,35 +27749,10 @@ This field is output only and cannot be directly set. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}-Use "-" for {stage} when the stage has no environment or deleted environment. </p></td>- </tr>-- <tr>- <td>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>id is the environment id of the stage.-e.g., "prod".-Use "-" when the stage has no environment or deleted environment. </p></td>- </tr>-- <tr>- <td>environment</td>- <td><a href="#string">string</a></td>+ <td>review_config</td>+ <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td><td></td>- <td><p>environment is the environment of the stage.-Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments. </p></td>- </tr>-- <tr>- <td>tasks</td>- <td><a href="#bytebase.v1.Task">Task</a></td>- <td>repeated</td>- <td><p>The tasks within this stage. </p></td>+ <td><p>The SQL review config to create. </p></td></tr></tbody>@@ -28142,7 +27762,7 @@ Format: environments/{environment} for valid environments, or "environments/- <h3 id="bytebase.v1.Task">Task</h3>+ <h3 id="bytebase.v1.DeleteReviewConfigRequest">DeleteReviewConfigRequest</h3><p></p>@@ -28151,85 +27771,13 @@ Format: environments/{environment} for valid environments, or "environments/<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr></thead><tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task} </p></td>- </tr>-- <tr>- <td>spec_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>- </tr>-- <tr>- <td>status</td>- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>- <td></td>- <td><p>Status is the status of the task. </p></td>- </tr>-- <tr>- <td>skipped_reason</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The reason why the task was skipped. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.Task.Type">Task.Type</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>target</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Format: instances/{instance} if the task is DatabaseCreate.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>database_create</td>- <td><a href="#bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>database_update</td>- <td><a href="#bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>database_data_export</td>- <td><a href="#bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The update_time is the update time of latest task run.-If there are no task runs, it will be empty. </p></td>- </tr>-- <tr>- <td>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The run_time is the scheduled run time of latest task run.-If there are no task runs or the task run is not scheduled, it will be empty. </p></td>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the SQL review config to delete.+Format: reviewConfigs/{reviewConfig} </p></td></tr></tbody>@@ -28239,8 +27787,8 @@ If there are no task runs or the task run is not scheduled, it will be empty. </- <h3 id="bytebase.v1.Task.DatabaseCreate">Task.DatabaseCreate</h3>- <p>Payload for creating a new database.</p>+ <h3 id="bytebase.v1.GetReviewConfigRequest">GetReviewConfigRequest</h3>+ <p></p><table class="field-table">@@ -28250,10 +27798,11 @@ If there are no task runs or the task run is not scheduled, it will be empty. </<tbody><tr>- <td>sheet</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The name of the SQL review config to retrieve.+Format: reviewConfigs/{reviewConfig} </p></td></tr></tbody>@@ -28263,8 +27812,15 @@ If there are no task runs or the task run is not scheduled, it will be empty. </- <h3 id="bytebase.v1.Task.DatabaseDataExport">Task.DatabaseDataExport</h3>- <p>Payload for exporting database data.</p>+ <h3 id="bytebase.v1.ListReviewConfigsRequest">ListReviewConfigsRequest</h3>+ <p></p>++++++ <h3 id="bytebase.v1.ListReviewConfigsResponse">ListReviewConfigsResponse</h3>+ <p></p><table class="field-table">@@ -28274,11 +27830,10 @@ If there are no task runs or the task run is not scheduled, it will be empty. </<tbody><tr>- <td>sheet</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>review_configs</td>+ <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td>repeated</td>+ <td><p>The SQL review configs from the specified request. </p></td></tr></tbody>@@ -28288,8 +27843,8 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.Task.DatabaseUpdate">Task.DatabaseUpdate</h3>- <p>Payload for updating a database schema.</p>+ <h3 id="bytebase.v1.ReviewConfig">ReviewConfig</h3>+ <p></p><table class="field-table">@@ -28299,17 +27854,40 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>sheet</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The name of the SQL review config.+Format: reviewConfigs/{reviewConfig} </p></td></tr><tr>- <td>release</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/releases/{release} </p></td>+ <td><p>The title of the review configuration. </p></td>+ </tr>++ <tr>+ <td>enabled</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether the review configuration is enabled. </p></td>+ </tr>++ <tr>+ <td>rules</td>+ <td><a href="#bytebase.v1.SQLReviewRule">SQLReviewRule</a></td>+ <td>repeated</td>+ <td><p>The SQL review rules to enforce. </p></td>+ </tr>++ <tr>+ <td>resources</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Resources using the config.+Format: {resource}/{resource id}, e.g., environments/test. </p></td></tr></tbody>@@ -28319,8 +27897,8 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.TaskRun">TaskRun</h3>- <p></p>+ <h3 id="bytebase.v1.SQLReviewRule">SQLReviewRule</h3>+ <p>SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.</p><table class="field-table">@@ -28330,84 +27908,66 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.v1.SQLReviewRule.Type">SQLReviewRule.Type</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>+ <td><p>The type of SQL review rule. </p></td></tr><tr>- <td>creator</td>- <td><a href="#string">string</a></td>+ <td>level</td>+ <td><a href="#bytebase.v1.SQLReviewRule.Level">SQLReviewRule.Level</a></td><td></td>- <td><p>Format: users/[email protected] </p></td>+ <td><p>The severity level of the rule. </p></td></tr><tr>- <td>create_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>naming_payload</td>+ <td><a href="#bytebase.v1.SQLReviewRule.NamingRulePayload">SQLReviewRule.NamingRulePayload</a></td><td></td><td><p> </p></td></tr><tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>number_payload</td>+ <td><a href="#bytebase.v1.SQLReviewRule.NumberRulePayload">SQLReviewRule.NumberRulePayload</a></td><td></td><td><p> </p></td></tr><tr>- <td>status</td>- <td><a href="#bytebase.v1.TaskRun.Status">TaskRun.Status</a></td>- <td></td>- <td><p>The current execution status of the task run. </p></td>- </tr>-- <tr>- <td>detail</td>- <td><a href="#string">string</a></td>+ <td>string_array_payload</td>+ <td><a href="#bytebase.v1.SQLReviewRule.StringArrayRulePayload">SQLReviewRule.StringArrayRulePayload</a></td><td></td>- <td><p>Below are the results of a task run.-Detailed information about the task run result. </p></td>+ <td><p> </p></td></tr><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>comment_convention_payload</td>+ <td><a href="#bytebase.v1.SQLReviewRule.CommentConventionRulePayload">SQLReviewRule.CommentConventionRulePayload</a></td><td></td>- <td><p>The time when the task run started execution. </p></td>+ <td><p> </p></td></tr><tr>- <td>export_archive_status</td>- <td><a href="#bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</a></td>+ <td>string_payload</td>+ <td><a href="#bytebase.v1.SQLReviewRule.StringRulePayload">SQLReviewRule.StringRulePayload</a></td><td></td>- <td><p>The export archive status for data export tasks. </p></td>+ <td><p> </p></td></tr><tr>- <td>has_prior_backup</td>- <td><a href="#bool">bool</a></td>+ <td>naming_case_payload</td>+ <td><a href="#bytebase.v1.SQLReviewRule.NamingCaseRulePayload">SQLReviewRule.NamingCaseRulePayload</a></td><td></td>- <td><p>Indicates whether a prior backup was created for this task run.-When true, rollback SQL can be generated via PreviewTaskRunRollback.-Backup details are available in the task run logs. </p></td>+ <td><p> </p></td></tr><tr>- <td>scheduler_info</td>- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</a></td>+ <td>engine</td>+ <td><a href="#bytebase.v1.Engine">Engine</a></td><td></td>- <td><p>Scheduling information about the task run. </p></td>- </tr>-- <tr>- <td>run_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>The task run should run after run_time.-This can only be set when creating the task run calling BatchRunTasks. </p></td>+ <td><p>The database engine this rule applies to. </p></td></tr></tbody>@@ -28417,8 +27977,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRun.SchedulerInfo">TaskRun.SchedulerInfo</h3>- <p>Information about task run scheduling.</p>+ <h3 id="bytebase.v1.SQLReviewRule.CommentConventionRulePayload">SQLReviewRule.CommentConventionRulePayload</h3>+ <p></p><table class="field-table">@@ -28428,17 +27988,17 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>report_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>required</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The time when the scheduling info was reported. </p></td>+ <td><p> </p></td></tr><tr>- <td>waiting_cause</td>- <td><a href="#bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</a></td>+ <td>max_length</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The cause for the task run waiting. </p></td>+ <td><p> </p></td></tr></tbody>@@ -28448,8 +28008,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRun.SchedulerInfo.WaitingCause">TaskRun.SchedulerInfo.WaitingCause</h3>- <p>Information about why a task run is waiting.</p>+ <h3 id="bytebase.v1.SQLReviewRule.NamingCaseRulePayload">SQLReviewRule.NamingCaseRulePayload</h3>+ <p></p><table class="field-table">@@ -28459,10 +28019,10 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>parallel_tasks_limit</td>+ <td>upper</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Waiting due to parallel tasks limit. </p></td>+ <td><p> </p></td></tr></tbody>@@ -28472,8 +28032,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRunLog">TaskRunLog</h3>- <p></p>+ <h3 id="bytebase.v1.SQLReviewRule.NamingRulePayload">SQLReviewRule.NamingRulePayload</h3>+ <p>Payload message types for SQL review rules</p><table class="field-table">@@ -28483,17 +28043,17 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>max_length</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log </p></td>+ <td><p> </p></td></tr><tr>- <td>entries</td>- <td><a href="#bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</a></td>- <td>repeated</td>- <td><p>The log entries for this task run. </p></td>+ <td>format</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -28503,7 +28063,7 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry">TaskRunLogEntry</h3>+ <h3 id="bytebase.v1.SQLReviewRule.NumberRulePayload">SQLReviewRule.NumberRulePayload</h3><p></p>@@ -28514,80 +28074,58 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>type</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</a></td>- <td></td>- <td><p>The type of this log entry. </p></td>- </tr>-- <tr>- <td>log_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The time when the log was recorded. </p></td>- </tr>-- <tr>- <td>replica_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The replica ID for this log entry. </p></td>- </tr>-- <tr>- <td>schema_dump</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</a></td>- <td></td>- <td><p>Schema dump details (if type is SCHEMA_DUMP). </p></td>- </tr>-- <tr>- <td>command_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</a></td>- <td></td>- <td><p>Command execution details (if type is COMMAND_EXECUTE). </p></td>- </tr>-- <tr>- <td>database_sync</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</a></td>- <td></td>- <td><p>Database sync details (if type is DATABASE_SYNC). </p></td>- </tr>-- <tr>- <td>transaction_control</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</a></td>+ <td>number</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Transaction control details (if type is TRANSACTION_CONTROL). </p></td>+ <td><p> </p></td></tr>- <tr>- <td>prior_backup</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</a></td>- <td></td>- <td><p>Prior backup details (if type is PRIOR_BACKUP). </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SQLReviewRule.StringArrayRulePayload">SQLReviewRule.StringArrayRulePayload</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>retry_info</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</a></td>- <td></td>- <td><p>Retry information details (if type is RETRY_INFO). </p></td>+ <td>list</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr>- <tr>- <td>compute_diff</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</a></td>- <td></td>- <td><p>Compute diff details (if type is COMPUTE_DIFF). </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SQLReviewRule.StringRulePayload">SQLReviewRule.StringRulePayload</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_file_execute</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</a></td>+ <td>value</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Release file execution details (if type is RELEASE_FILE_EXECUTE). </p></td>+ <td><p> </p></td></tr></tbody>@@ -28597,8 +28135,8 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute">TaskRunLogEntry.CommandExecute</h3>- <p>Command execution details.</p>+ <h3 id="bytebase.v1.UpdateReviewConfigRequest">UpdateReviewConfigRequest</h3>+ <p></p><table class="field-table">@@ -28608,33 +28146,27 @@ This can only be set when creating the task run calling BatchRunTasks. </p></td><tbody><tr>- <td>log_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the command was logged. </p></td>- </tr>-- <tr>- <td>range</td>- <td><a href="#bytebase.v1.Range">Range</a></td>+ <td>review_config</td>+ <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td><td></td>- <td><p>The byte offset range of the executed command in the sheet.-Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.-Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes. </p></td>+ <td><p>The SQL review config to update.++The name field is used to identify the SQL review config to update. </p></td></tr><tr>- <td>statement</td>- <td><a href="#string">string</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>The executed statement. </p></td>+ <td><p>The list of fields to update. </p></td></tr><tr>- <td>response</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</a></td>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The response from executing the command. </p></td>+ <td><p>If set to true, and the config is not found, a new config will be created.+In this situation, `update_mask` is ignored. </p></td></tr></tbody>@@ -28644,199 +28176,849 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse">TaskRunLogEntry.CommandExecute.CommandResponse</h3>- <p>Command execution response.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>log_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the response was logged. </p></td>- </tr>-- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if command execution failed. </p></td>- </tr>-- <tr>- <td>affected_rows</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>Total affected rows. </p></td>- </tr>-- <tr>- <td>all_affected_rows</td>- <td><a href="#int64">int64</a></td>- <td>repeated</td>- <td><p>`all_affected_rows` is the affected rows of each command.-`all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case. </p></td>- </tr>-- </tbody>- </table>-++ <h3 id="bytebase.v1.SQLReviewRule.Level">SQLReviewRule.Level</h3>+ <p>The severity level for SQL review rules.</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>Unspecified level.</p></td>+ </tr>++ <tr>+ <td>ERROR</td>+ <td>1</td>+ <td><p>Rule violation is an error.</p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</td>+ <td><p>Rule violation is a warning.</p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.SQLReviewRule.Type">SQLReviewRule.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>ENGINE_MYSQL_USE_INNODB</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_FULLY_QUALIFIED</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_TABLE</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_COLUMN</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_INDEX_PK</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_INDEX_UK</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_INDEX_FK</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_INDEX_IDX</td>+ <td>8</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_COLUMN_AUTO_INCREMENT</td>+ <td>9</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_TABLE_NO_KEYWORD</td>+ <td>10</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_IDENTIFIER_NO_KEYWORD</td>+ <td>11</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NAMING_IDENTIFIER_CASE</td>+ <td>12</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_SELECT_NO_SELECT_ALL</td>+ <td>13</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_WHERE_REQUIRE_SELECT</td>+ <td>14</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_WHERE_REQUIRE_UPDATE_DELETE</td>+ <td>15</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_WHERE_NO_LEADING_WILDCARD_LIKE</td>+ <td>16</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_ON_DEL_CASCADE</td>+ <td>17</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_RM_TBL_CASCADE</td>+ <td>18</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_COMMIT</td>+ <td>19</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_LIMIT</td>+ <td>20</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_ORDER_BY</td>+ <td>21</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_MERGE_ALTER_TABLE</td>+ <td>22</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_INSERT_ROW_LIMIT</td>+ <td>23</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_INSERT_MUST_SPECIFY_COLUMN</td>+ <td>24</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_INSERT_DISALLOW_ORDER_BY_RAND</td>+ <td>25</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_AFFECTED_ROW_LIMIT</td>+ <td>26</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DML_DRY_RUN</td>+ <td>27</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_ADD_COLUMN_WITH_DEFAULT</td>+ <td>28</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_ADD_CHECK_NOT_VALID</td>+ <td>29</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_ADD_FOREIGN_KEY_NOT_VALID</td>+ <td>30</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_ADD_NOT_NULL</td>+ <td>31</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_SELECT_FULL_TABLE_SCAN</td>+ <td>32</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_CREATE_SPECIFY_SCHEMA</td>+ <td>33</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_CHECK_SET_ROLE_VARIABLE</td>+ <td>34</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_USING_FILESORT</td>+ <td>35</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_USING_TEMPORARY</td>+ <td>36</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_WHERE_NO_EQUAL_NULL</td>+ <td>37</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS</td>+ <td>38</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_QUERY_MINIMUM_PLAN_LEVEL</td>+ <td>39</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT</td>+ <td>40</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_MAXIMUM_LIMIT_VALUE</td>+ <td>41</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_MAXIMUM_JOIN_TABLE_COUNT</td>+ <td>42</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION</td>+ <td>43</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_JOIN_STRICT_COLUMN_ATTRS</td>+ <td>44</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_NON_TRANSACTIONAL</td>+ <td>45</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_ADD_COLUMN_WITHOUT_POSITION</td>+ <td>46</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_OFFLINE_DDL</td>+ <td>47</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_DISALLOW_CROSS_DB_QUERIES</td>+ <td>48</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_MAX_EXECUTION_TIME</td>+ <td>49</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_REQUIRE_ALGORITHM_OPTION</td>+ <td>50</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_REQUIRE_LOCK_OPTION</td>+ <td>51</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATEMENT_OBJECT_OWNER_CHECK</td>+ <td>52</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_REQUIRE_PK</td>+ <td>53</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_NO_FOREIGN_KEY</td>+ <td>54</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_DROP_NAMING_CONVENTION</td>+ <td>55</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_COMMENT</td>+ <td>56</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_DISALLOW_PARTITION</td>+ <td>57</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_DISALLOW_TRIGGER</td>+ <td>58</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_NO_DUPLICATE_INDEX</td>+ <td>59</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_TEXT_FIELDS_TOTAL_LENGTH</td>+ <td>60</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_DISALLOW_SET_CHARSET</td>+ <td>61</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_DISALLOW_DDL</td>+ <td>62</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_DISALLOW_DML</td>+ <td>63</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_LIMIT_SIZE</td>+ <td>64</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_REQUIRE_CHARSET</td>+ <td>65</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE_REQUIRE_COLLATION</td>+ <td>66</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_REQUIRED</td>+ <td>67</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_NO_NULL</td>+ <td>68</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DISALLOW_CHANGE_TYPE</td>+ <td>69</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_SET_DEFAULT_FOR_NOT_NULL</td>+ <td>70</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DISALLOW_CHANGE</td>+ <td>71</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DISALLOW_CHANGING_ORDER</td>+ <td>72</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DISALLOW_DROP</td>+ <td>73</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DISALLOW_DROP_IN_INDEX</td>+ <td>74</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_COMMENT</td>+ <td>75</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_AUTO_INCREMENT_MUST_INTEGER</td>+ <td>76</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_TYPE_DISALLOW_LIST</td>+ <td>77</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DISALLOW_SET_CHARSET</td>+ <td>78</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_MAXIMUM_CHARACTER_LENGTH</td>+ <td>79</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_MAXIMUM_VARCHAR_LENGTH</td>+ <td>80</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_AUTO_INCREMENT_INITIAL_VALUE</td>+ <td>81</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_AUTO_INCREMENT_MUST_UNSIGNED</td>+ <td>82</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_CURRENT_TIME_COUNT_LIMIT</td>+ <td>83</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_REQUIRE_DEFAULT</td>+ <td>84</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_DEFAULT_DISALLOW_VOLATILE</td>+ <td>85</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_ADD_NOT_NULL_REQUIRE_DEFAULT</td>+ <td>86</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_REQUIRE_CHARSET</td>+ <td>87</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>COLUMN_REQUIRE_COLLATION</td>+ <td>88</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SCHEMA_BACKWARD_COMPATIBILITY</td>+ <td>89</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DATABASE_DROP_EMPTY_DATABASE</td>+ <td>90</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_NO_DUPLICATE_COLUMN</td>+ <td>91</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_KEY_NUMBER_LIMIT</td>+ <td>92</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_PK_TYPE_LIMIT</td>+ <td>93</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_TYPE_NO_BLOB</td>+ <td>94</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_TOTAL_NUMBER_LIMIT</td>+ <td>95</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_PRIMARY_KEY_TYPE_ALLOWLIST</td>+ <td>96</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_CREATE_CONCURRENTLY</td>+ <td>97</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_TYPE_ALLOW_LIST</td>+ <td>98</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>INDEX_NOT_REDUNDANT</td>+ <td>99</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_CHARSET_ALLOWLIST</td>+ <td>100</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_COLLATION_ALLOWLIST</td>+ <td>101</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_COMMENT_LENGTH</td>+ <td>102</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_PROCEDURE_DISALLOW_CREATE</td>+ <td>103</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_EVENT_DISALLOW_CREATE</td>+ <td>104</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_VIEW_DISALLOW_CREATE</td>+ <td>105</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_FUNCTION_DISALLOW_CREATE</td>+ <td>106</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SYSTEM_FUNCTION_DISALLOWED_LIST</td>+ <td>107</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ADVICE_ONLINE_MIGRATION</td>+ <td>108</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>BUILTIN_PRIOR_BACKUP_CHECK</td>+ <td>109</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>BUILTIN_WALK_THROUGH_CHECK</td>+ <td>110</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+++-- <h3 id="bytebase.v1.TaskRunLogEntry.ComputeDiff">TaskRunLogEntry.ComputeDiff</h3>- <p>Schema diff computation details.</p>+ <h3 id="bytebase.v1.ReviewConfigService">ReviewConfigService</h3>+ <p>ReviewConfigService manages approval flow configurations.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>CreateReviewConfig</td>+ <td><a href="#bytebase.v1.CreateReviewConfigRequest">CreateReviewConfigRequest</a></td>+ <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td><p>Creates a new SQL review configuration.+Permissions required: bb.reviewConfigs.create</p></td>+ </tr>++ <tr>+ <td>ListReviewConfigs</td>+ <td><a href="#bytebase.v1.ListReviewConfigsRequest">ListReviewConfigsRequest</a></td>+ <td><a href="#bytebase.v1.ListReviewConfigsResponse">ListReviewConfigsResponse</a></td>+ <td><p>Lists all SQL review configurations.+Permissions required: bb.reviewConfigs.list</p></td>+ </tr>++ <tr>+ <td>GetReviewConfig</td>+ <td><a href="#bytebase.v1.GetReviewConfigRequest">GetReviewConfigRequest</a></td>+ <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td><p>Retrieves a SQL review configuration by name.+Permissions required: bb.reviewConfigs.get</p></td>+ </tr>++ <tr>+ <td>UpdateReviewConfig</td>+ <td><a href="#bytebase.v1.UpdateReviewConfigRequest">UpdateReviewConfigRequest</a></td>+ <td><a href="#bytebase.v1.ReviewConfig">ReviewConfig</a></td>+ <td><p>Updates a SQL review configuration.+Permissions required: bb.reviewConfigs.update+When allow_missing=true, also requires: bb.reviewConfigs.create</p></td>+ </tr>++ <tr>+ <td>DeleteReviewConfig</td>+ <td><a href="#bytebase.v1.DeleteReviewConfigRequest">DeleteReviewConfigRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a SQL review configuration.+Permissions required: bb.reviewConfigs.delete</p></td>+ </tr>++ </tbody>+ </table>- <table class="field-table">+++ <h4>Methods with HTTP bindings</h4>+ <table><thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr></thead><tbody>+- <tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When diff computation started. </p></td>- </tr>-- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When diff computation ended. </p></td>- </tr>-- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if computation failed. </p></td>- </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.DatabaseSync">TaskRunLogEntry.DatabaseSync</h3>- <p>Database synchronization details.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>CreateReviewConfig</td>+ <td>POST</td>+ <td>/v1/reviewConfigs</td>+ <td>review_config</td>+ </tr>- <tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the database sync started. </p></td>- </tr>+- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the database sync ended. </p></td>- </tr>- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if sync failed. </p></td>- </tr>+ <tr>+ <td>ListReviewConfigs</td>+ <td>GET</td>+ <td>/v1/reviewConfigs</td>+ <td></td>+ </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup">TaskRunLogEntry.PriorBackup</h3>- <p>Prior backup operation details.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+- <tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the backup started. </p></td>- </tr>- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the backup ended. </p></td>- </tr>+ <tr>+ <td>GetReviewConfig</td>+ <td>GET</td>+ <td>/v1/{name=reviewConfigs/*}</td>+ <td></td>+ </tr>- <tr>- <td>prior_backup_detail</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</a></td>- <td></td>- <td><p>The backup details. </p></td>- </tr>+- <tr>- <td>error</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Error message if the backup failed. </p></td>- </tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail">TaskRunLogEntry.PriorBackup.PriorBackupDetail</h3>- <p>Prior backup detail for rollback purposes.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>UpdateReviewConfig</td>+ <td>PATCH</td>+ <td>/v1/{review_config.name=reviewConfigs/*}</td>+ <td>review_config</td>+ </tr>- <tr>- <td>items</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</a></td>- <td>repeated</td>- <td><p>The list of backed up tables. </p></td>- </tr>++++ <tr>+ <td>DeleteReviewConfig</td>+ <td>DELETE</td>+ <td>/v1/{name=reviewConfigs/*}</td>+ <td></td>+ </tr>+</tbody></table>--+- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item</h3>- <p>A single backup table mapping.</p>+ <div class="file-heading">+ <h2 id="v1/revision_service.proto">v1/revision_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.BatchCreateRevisionsRequest">BatchCreateRevisionsRequest</h3>+ <p></p><table class="field-table">@@ -28846,31 +29028,19 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>source_table</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>- <td></td>- <td><p>The original table information. </p></td>- </tr>-- <tr>- <td>target_table</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</a></td>- <td></td>- <td><p>The target backup table information. </p></td>- </tr>-- <tr>- <td>start_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The start position in the SQL statement. </p></td>+ <td><p>The parent resource shared by all revisions being created.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>end_position</td>- <td><a href="#bytebase.v1.Position">Position</a></td>- <td></td>- <td><p>The end position in the SQL statement. </p></td>+ <td>requests</td>+ <td><a href="#bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</a></td>+ <td>repeated</td>+ <td><p>The request message specifying the revisions to create.+A maximum of 100 revisions can be created in a batch. </p></td></tr></tbody>@@ -28880,8 +29050,8 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents- <h3 id="bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table">TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table</h3>- <p>Table information.</p>+ <h3 id="bytebase.v1.BatchCreateRevisionsResponse">BatchCreateRevisionsResponse</h3>+ <p></p><table class="field-table">@@ -28891,25 +29061,10 @@ Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents<tbody><tr>- <td>database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The database information.-Format: instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schema name. </p></td>- </tr>-- <tr>- <td>table</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The table name. </p></td>+ <td>revisions</td>+ <td><a href="#bytebase.v1.Revision">Revision</a></td>+ <td>repeated</td>+ <td><p>The created revisions. </p></td></tr></tbody>@@ -28919,8 +29074,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.ReleaseFileExecute">TaskRunLogEntry.ReleaseFileExecute</h3>- <p>Release file execution details.</p>+ <h3 id="bytebase.v1.CreateRevisionRequest">CreateRevisionRequest</h3>+ <p></p><table class="field-table">@@ -28930,17 +29085,17 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>version</td>+ <td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The version of the file being executed (e.g., "0001"). </p></td>+ <td><p>Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>file_path</td>- <td><a href="#string">string</a></td>+ <td>revision</td>+ <td><a href="#bytebase.v1.Revision">Revision</a></td><td></td>- <td><p>The file path within the release (e.g., "2.2/V0001_create_table.sql"). </p></td>+ <td><p>The revision to create. </p></td></tr></tbody>@@ -28950,8 +29105,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.RetryInfo">TaskRunLogEntry.RetryInfo</h3>- <p>Retry information for failed operations.</p>+ <h3 id="bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</h3>+ <p></p><table class="field-table">@@ -28961,24 +29116,11 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>error</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The error that triggered the retry. </p></td>- </tr>-- <tr>- <td>retry_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Current retry attempt number. </p></td>- </tr>-- <tr>- <td>maximum_retries</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>Maximum number of retries allowed. </p></td>+ <td><p>The name of the revision to delete.+Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td></tr></tbody>@@ -28988,8 +29130,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.SchemaDump">TaskRunLogEntry.SchemaDump</h3>- <p>Schema dump operation details.</p>+ <h3 id="bytebase.v1.GetRevisionRequest">GetRevisionRequest</h3>+ <p></p><table class="field-table">@@ -28999,24 +29141,11 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>start_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the schema dump started. </p></td>- </tr>-- <tr>- <td>end_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>When the schema dump ended. </p></td>- </tr>-- <tr>- <td>error</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Error message if the schema dump failed. </p></td>+ <td><p>The name of the revision.+Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td></tr></tbody>@@ -29026,8 +29155,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl">TaskRunLogEntry.TransactionControl</h3>- <p>Transaction control operation details.</p>+ <h3 id="bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</h3>+ <p></p><table class="field-table">@@ -29037,48 +29166,38 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>type</td>- <td><a href="#bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The type of transaction control. </p></td>+ <td><p>The parent of the revisions.+Format: instances/{instance}/databases/{database} </p></td></tr><tr>- <td>error</td>- <td><a href="#string">string</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Error message if the operation failed. </p></td>+ <td><p>The maximum number of revisions to return. The service may return fewer+than this value. If unspecified, at most 10 revisions will be returned. The+maximum value is 1000; values above 1000 will be coerced to 1000. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.TaskRunSession">TaskRunSession</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>name</td>+ <td>page_token</td><td><a href="#string">string</a></td><td></td>- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session </p></td>+ <td><p>A page token, received from a previous `ListRevisions` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListRevisions` must+match the call that provided the page token. </p></td></tr><tr>- <td>postgres</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</a></td>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>PostgreSQL session information. </p></td>+ <td><p>Whether to include deleted revisions in the results. </p></td></tr></tbody>@@ -29088,8 +29207,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunSession.Postgres">TaskRunSession.Postgres</h3>- <p>PostgreSQL session information.</p>+ <h3 id="bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</h3>+ <p></p><table class="field-table">@@ -29099,24 +29218,18 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>session</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>- <td></td>- <td><p>`session` is the session of the task run executing commands. </p></td>- </tr>-- <tr>- <td>blocking_sessions</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>+ <td>revisions</td>+ <td><a href="#bytebase.v1.Revision">Revision</a></td><td>repeated</td>- <td><p>`blocking_sessions` block `session`. </p></td>+ <td><p>The revisions from the specified request. </p></td></tr><tr>- <td>blocked_sessions</td>- <td><a href="#bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</a></td>- <td>repeated</td>- <td><p>`blocked_sessions` are blocked by `session`. </p></td>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td></tr></tbody>@@ -29126,8 +29239,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.TaskRunSession.Postgres.Session">TaskRunSession.Postgres.Session</h3>- <p>PostgreSQL session information read from `pg_stat_activity`.</p>+ <h3 id="bytebase.v1.Revision">Revision</h3>+ <p></p><table class="field-table">@@ -29137,101 +29250,86 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>pid</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Process ID of the session. </p></td>- </tr>-- <tr>- <td>blocked_by_pids</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>PIDs of sessions blocking this session. </p></td>+ <td><p>Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td></tr><tr>- <td>query</td>+ <td>release</td><td><a href="#string">string</a></td><td></td>- <td><p>Current query being executed. </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Session state (active, idle, etc.). </p></td>- </tr>-- <tr>- <td>wait_event_type</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Wait event type if session is waiting. </p></td>+ <td><p>Format: projects/{project}/releases/{release}+Can be empty. </p></td></tr><tr>- <td>wait_event</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Specific wait event if session is waiting. </p></td>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>datname</td>+ <td>deleter</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Database name. </p></td>+ <td></td>+ <td><p>Format: users/[email protected]+Can be empty. </p></td></tr><tr>- <td>usename</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>User name. </p></td>+ <td>delete_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>Can be empty. </p></td></tr><tr>- <td>application_name</td>+ <td>file</td><td><a href="#string">string</a></td><td></td>- <td><p>Application name. </p></td>+ <td><p>Format: projects/{project}/releases/{release}/files/{id}+Can be empty. </p></td></tr><tr>- <td>client_addr</td>+ <td>version</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Client IP address. </p></td>+ <td></td>+ <td><p>The schema version string for this revision. </p></td></tr><tr>- <td>client_port</td>+ <td>sheet</td><td><a href="#string">string</a></td>- <td>optional</td>- <td><p>Client port number. </p></td>+ <td></td>+ <td><p>The sheet that holds the content.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>backend_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>sheet_sha256</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>When the backend process started. </p></td>+ <td><p>The SHA256 hash value of the sheet. </p></td></tr><tr>- <td>xact_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>When the current transaction started. </p></td>+ <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}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td></tr><tr>- <td>query_start</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td>optional</td>- <td><p>When the current query started. </p></td>+ <td>type</td>+ <td><a href="#bytebase.v1.Revision.Type">Revision.Type</a></td>+ <td></td>+ <td><p>The type of the revision. </p></td></tr></tbody>@@ -29243,67 +29341,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.v1.Task.Status">Task.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>Unspecified status.</p></td>- </tr>-- <tr>- <td>NOT_STARTED</td>- <td>1</td>- <td><p>Task has not started and is awaiting its turn in the deployment sequence.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>2</td>- <td><p>Task is ready to run and waiting for approval or scheduled time.</p></td>- </tr>-- <tr>- <td>RUNNING</td>- <td>3</td>- <td><p>Task is currently executing.</p></td>- </tr>-- <tr>- <td>DONE</td>- <td>4</td>- <td><p>Task completed successfully.</p></td>- </tr>-- <tr>- <td>FAILED</td>- <td>5</td>- <td><p>Task execution failed with errors.</p></td>- </tr>-- <tr>- <td>CANCELED</td>- <td>6</td>- <td><p>Task execution was canceled by a user.</p></td>- </tr>-- <tr>- <td>SKIPPED</td>- <td>7</td>- <td><p>Task was skipped and will not be executed.</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.v1.Task.Type">Task.Type</h3>- <p></p>+ <h3 id="bytebase.v1.Revision.Type">Revision.Type</h3>+ <p>The type of schema revision.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -29313,158 +29352,349 @@ Format: instances/{instance}/databases/{database} </p></td><tr><td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified task type.</p></td>+ <td><p>Unspecified type.</p></td></tr><tr>- <td>GENERAL</td>+ <td>VERSIONED</td><td>1</td>- <td><p>General task for miscellaneous operations.</p></td>+ <td><p>Versioned schema migration.</p></td></tr><tr>- <td>DATABASE_CREATE</td>+ <td>DECLARATIVE</td><td>2</td>- <td><p>Database creation task that creates a new database.-Use payload DatabaseCreate.</p></td>- </tr>-- <tr>- <td>DATABASE_MIGRATE</td>- <td>3</td>- <td><p>Database migration task that applies versioned schema changes.-Use payload DatabaseUpdate.</p></td>- </tr>-- <tr>- <td>DATABASE_EXPORT</td>- <td>4</td>- <td><p>Database export task that exports query results or table data.-Use payload DatabaseDataExport.</p></td>+ <td><p>Declarative schema definition.</p></td></tr></tbody></table>- <h3 id="bytebase.v1.TaskRun.ExportArchiveStatus">TaskRun.ExportArchiveStatus</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>EXPORT_ARCHIVE_STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified export archive status.</p></td>- </tr>-- <tr>- <td>READY</td>- <td>1</td>- <td><p>Export archive is ready for download.</p></td>- </tr>-- <tr>- <td>EXPORTED</td>- <td>2</td>- <td><p>Export archive has been downloaded by the user.</p></td>- </tr>-- </tbody>- </table>+- <h3 id="bytebase.v1.TaskRun.Status">TaskRun.Status</h3>- <p></p>+++ <h3 id="bytebase.v1.RevisionService">RevisionService</h3>+ <p>RevisionService manages schema revision history.</p><table class="enum-table"><thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr></thead><tbody><tr>- <td>STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified status.</p></td>- </tr>-- <tr>- <td>PENDING</td>- <td>1</td>- <td><p>Task run is queued and waiting to start execution.</p></td>- </tr>-- <tr>- <td>RUNNING</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>+ <td>ListRevisions</td>+ <td><a href="#bytebase.v1.ListRevisionsRequest">ListRevisionsRequest</a></td>+ <td><a href="#bytebase.v1.ListRevisionsResponse">ListRevisionsResponse</a></td>+ <td><p>Lists schema revisions for a database.+Permissions required: bb.revisions.list</p></td></tr><tr>- <td>FAILED</td>- <td>4</td>- <td><p>Task run execution failed with errors.</p></td>+ <td>GetRevision</td>+ <td><a href="#bytebase.v1.GetRevisionRequest">GetRevisionRequest</a></td>+ <td><a href="#bytebase.v1.Revision">Revision</a></td>+ <td><p>Retrieves a schema revision by name.+Permissions required: bb.revisions.get</p></td></tr><tr>- <td>CANCELED</td>- <td>5</td>- <td><p>Task run execution was canceled by a user.</p></td>+ <td>BatchCreateRevisions</td>+ <td><a href="#bytebase.v1.BatchCreateRevisionsRequest">BatchCreateRevisionsRequest</a></td>+ <td><a href="#bytebase.v1.BatchCreateRevisionsResponse">BatchCreateRevisionsResponse</a></td>+ <td><p>Creates multiple schema revisions in a single operation.+Permissions required: bb.revisions.create</p></td></tr><tr>- <td>AVAILABLE</td>- <td>6</td>- <td><p>Task run is ready for immediate execution.</p></td>+ <td>DeleteRevision</td>+ <td><a href="#bytebase.v1.DeleteRevisionRequest">DeleteRevisionRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a schema revision.+Permissions required: bb.revisions.delete</p></td></tr></tbody></table>-- <h3 id="bytebase.v1.TaskRunLogEntry.TransactionControl.Type">TaskRunLogEntry.TransactionControl.Type</h3>- <p>Transaction control type.</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr>+ </thead>+ <tbody>++<tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified type.</p></td>+ <td>ListRevisions</td>+ <td>GET</td>+ <td>/v1/{parent=instances/*/databases/*}/revisions</td>+ <td></td></tr>+++<tr>- <td>BEGIN</td>- <td>1</td>- <td><p>Begin transaction.</p></td>+ <td>GetRevision</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/revisions/*}</td>+ <td></td></tr>+++<tr>- <td>COMMIT</td>- <td>2</td>- <td><p>Commit transaction.</p></td>+ <td>BatchCreateRevisions</td>+ <td>POST</td>+ <td>/v1/{parent=instances/*/databases/*}/revisions:batchCreate</td>+ <td>*</td></tr>+++<tr>- <td>ROLLBACK</td>- <td>3</td>- <td><p>Rollback transaction.</p></td>+ <td>DeleteRevision</td>+ <td>DELETE</td>+ <td>/v1/{name=instances/*/databases/*/revisions/*}</td>+ <td></td></tr>+- </tbody>- </table>+ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/role_service.proto">v1/role_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CreateRoleRequest">CreateRoleRequest</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>role</td>+ <td><a href="#bytebase.v1.Role">Role</a></td>+ <td></td>+ <td><p>The role to create. </p></td>+ </tr>++ <tr>+ <td>role_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The ID to use for the role, which will become the final component+of the role's resource name.++This value should be 4-63 characters, and valid characters+are /[a-z][A-Z][0-9]/. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DeleteRoleRequest">DeleteRoleRequest</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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the role to delete.+Format: roles/{role} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetRoleRequest">GetRoleRequest</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>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the role to retrieve.+Format: roles/{role} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListRolesRequest">ListRolesRequest</h3>+ <p></p>++++++ <h3 id="bytebase.v1.ListRolesResponse">ListRolesResponse</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>roles</td>+ <td><a href="#bytebase.v1.Role">Role</a></td>+ <td>repeated</td>+ <td><p>The roles from the specified request. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Role">Role</h3>+ <p>Role defines a set of permissions that can be assigned to users.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Resource name. Format: roles/{role} </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Human-readable title. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Optional description of the role. </p></td>+ </tr>++ <tr>+ <td>permissions</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>List of permission identifiers granted by this role. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.Role.Type">Role.Type</a></td>+ <td></td>+ <td><p>Role type indicating if it's built-in or custom. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UpdateRoleRequest">UpdateRoleRequest</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>role</td>+ <td><a href="#bytebase.v1.Role">Role</a></td>+ <td></td>+ <td><p>The role to update. </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update. </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the role is not found, a new role will be created.+In this situation, `update_mask` is ignored. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.v1.TaskRunLogEntry.Type">TaskRunLogEntry.Type</h3>- <p>The type of log entry.</p>+++ <h3 id="bytebase.v1.Role.Type">Role.Type</h3>+ <p></p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -29474,55 +29704,19 @@ Use payload DatabaseDataExport.</p></td><tr><td>TYPE_UNSPECIFIED</td><td>0</td>- <td><p>Unspecified type.</p></td>+ <td><p></p></td></tr><tr>- <td>SCHEMA_DUMP</td>+ <td>BUILT_IN</td><td>1</td>- <td><p>Schema dump operation.</p></td>+ <td><p>System-defined role that cannot be modified.</p></td></tr><tr>- <td>COMMAND_EXECUTE</td>+ <td>CUSTOM</td><td>2</td>- <td><p>Command execution.</p></td>- </tr>-- <tr>- <td>DATABASE_SYNC</td>- <td>3</td>- <td><p>Database synchronization.</p></td>- </tr>-- <tr>- <td>TRANSACTION_CONTROL</td>- <td>5</td>- <td><p>Transaction control (BEGIN, COMMIT, ROLLBACK).</p></td>- </tr>-- <tr>- <td>PRIOR_BACKUP</td>- <td>6</td>- <td><p>Prior backup operation.</p></td>- </tr>-- <tr>- <td>RETRY_INFO</td>- <td>7</td>- <td><p>Retry information.</p></td>- </tr>-- <tr>- <td>COMPUTE_DIFF</td>- <td>8</td>- <td><p>Schema diff computation.</p></td>- </tr>-- <tr>- <td>RELEASE_FILE_EXECUTE</td>- <td>9</td>- <td><p>Release file execution.</p></td>+ <td><p>User-defined role that can be modified.</p></td></tr></tbody>@@ -29532,8 +29726,8 @@ Use payload DatabaseDataExport.</p></td>- <h3 id="bytebase.v1.RolloutService">RolloutService</h3>- <p>RolloutService manages the execution of deployment plans.</p>+ <h3 id="bytebase.v1.RoleService">RoleService</h3>+ <p>RoleService manages workspace roles and permissions.</p><table class="enum-table"><thead><tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>@@ -29541,91 +29735,44 @@ Use payload DatabaseDataExport.</p></td><tbody><tr>- <td>GetRollout</td>- <td><a href="#bytebase.v1.GetRolloutRequest">GetRolloutRequest</a></td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>- <td><p>Retrieves a rollout by its plan name.-Permissions required: bb.rollouts.get</p></td>- </tr>-- <tr>- <td>ListRollouts</td>- <td><a href="#bytebase.v1.ListRolloutsRequest">ListRolloutsRequest</a></td>- <td><a href="#bytebase.v1.ListRolloutsResponse">ListRolloutsResponse</a></td>- <td><p>Lists rollouts in a project.-Permissions required: bb.rollouts.list</p></td>- </tr>-- <tr>- <td>CreateRollout</td>- <td><a href="#bytebase.v1.CreateRolloutRequest">CreateRolloutRequest</a></td>- <td><a href="#bytebase.v1.Rollout">Rollout</a></td>- <td><p>Creates a new rollout for a plan.-Permissions required: bb.rollouts.create (or issue creator for data export issues)</p></td>- </tr>-- <tr>- <td>ListTaskRuns</td>- <td><a href="#bytebase.v1.ListTaskRunsRequest">ListTaskRunsRequest</a></td>- <td><a href="#bytebase.v1.ListTaskRunsResponse">ListTaskRunsResponse</a></td>- <td><p>Lists task run executions for a task.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>GetTaskRun</td>- <td><a href="#bytebase.v1.GetTaskRunRequest">GetTaskRunRequest</a></td>- <td><a href="#bytebase.v1.TaskRun">TaskRun</a></td>- <td><p>Retrieves a task run by name.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>GetTaskRunLog</td>- <td><a href="#bytebase.v1.GetTaskRunLogRequest">GetTaskRunLogRequest</a></td>- <td><a href="#bytebase.v1.TaskRunLog">TaskRunLog</a></td>- <td><p>Retrieves execution logs for a task run.-Permissions required: bb.taskRuns.list</p></td>- </tr>-- <tr>- <td>GetTaskRunSession</td>- <td><a href="#bytebase.v1.GetTaskRunSessionRequest">GetTaskRunSessionRequest</a></td>- <td><a href="#bytebase.v1.TaskRunSession">TaskRunSession</a></td>- <td><p>Retrieves database session information for a running task.-Permissions required: bb.taskRuns.list</p></td>+ <td>ListRoles</td>+ <td><a href="#bytebase.v1.ListRolesRequest">ListRolesRequest</a></td>+ <td><a href="#bytebase.v1.ListRolesResponse">ListRolesResponse</a></td>+ <td><p>Lists roles in the workspace.+Permissions required: bb.roles.list</p></td></tr><tr>- <td>BatchRunTasks</td>- <td><a href="#bytebase.v1.BatchRunTasksRequest">BatchRunTasksRequest</a></td>- <td><a href="#bytebase.v1.BatchRunTasksResponse">BatchRunTasksResponse</a></td>- <td><p>Executes multiple tasks in a rollout stage.-Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ <td>GetRole</td>+ <td><a href="#bytebase.v1.GetRoleRequest">GetRoleRequest</a></td>+ <td><a href="#bytebase.v1.Role">Role</a></td>+ <td><p>Retrieves a role by name.+Permissions required: bb.roles.get</p></td></tr><tr>- <td>BatchSkipTasks</td>- <td><a href="#bytebase.v1.BatchSkipTasksRequest">BatchSkipTasksRequest</a></td>- <td><a href="#bytebase.v1.BatchSkipTasksResponse">BatchSkipTasksResponse</a></td>- <td><p>Skips multiple tasks in a rollout stage.-Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ <td>CreateRole</td>+ <td><a href="#bytebase.v1.CreateRoleRequest">CreateRoleRequest</a></td>+ <td><a href="#bytebase.v1.Role">Role</a></td>+ <td><p>Creates a new custom role.+Permissions required: bb.roles.create</p></td></tr><tr>- <td>BatchCancelTaskRuns</td>- <td><a href="#bytebase.v1.BatchCancelTaskRunsRequest">BatchCancelTaskRunsRequest</a></td>- <td><a href="#bytebase.v1.BatchCancelTaskRunsResponse">BatchCancelTaskRunsResponse</a></td>- <td><p>Cancels multiple running task executions.-Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)</p></td>+ <td>UpdateRole</td>+ <td><a href="#bytebase.v1.UpdateRoleRequest">UpdateRoleRequest</a></td>+ <td><a href="#bytebase.v1.Role">Role</a></td>+ <td><p>Updates a role's properties.+Permissions required: bb.roles.update+When allow_missing=true, also requires: bb.roles.create</p></td></tr><tr>- <td>PreviewTaskRunRollback</td>- <td><a href="#bytebase.v1.PreviewTaskRunRollbackRequest">PreviewTaskRunRollbackRequest</a></td>- <td><a href="#bytebase.v1.PreviewTaskRunRollbackResponse">PreviewTaskRunRollbackResponse</a></td>- <td><p>Generates rollback SQL for a completed task run.-Permissions required: bb.taskRuns.list</p></td>+ <td>DeleteRole</td>+ <td><a href="#bytebase.v1.DeleteRoleRequest">DeleteRoleRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a custom role.+Permissions required: bb.roles.delete</p></td></tr></tbody>@@ -29649,9 +29796,9 @@ Permissions required: bb.taskRuns.list</p></td><tr>- <td>GetRollout</td>+ <td>ListRoles</td><td>GET</td>- <td>/v1/{name=projects/*/plans/*/rollout}</td>+ <td>/v1/roles</td><td></td></tr>@@ -29659,9 +29806,9 @@ Permissions required: bb.taskRuns.list</p></td><tr>- <td>ListRollouts</td>+ <td>GetRole</td><td>GET</td>- <td>/v1/{parent=projects/*}/rollouts</td>+ <td>/v1/{name=roles/*}</td><td></td></tr>@@ -29669,93 +29816,33 @@ Permissions required: bb.taskRuns.list</p></td><tr>- <td>CreateRollout</td>+ <td>CreateRole</td><td>POST</td>- <td>/v1/{parent=projects/*/plans/*}/rollout</td>- <td>*</td>- </tr>----- <tr>- <td>ListTaskRuns</td>- <td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns</td>- <td></td>- </tr>----- <tr>- <td>GetTaskRun</td>- <td>GET</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}</td>- <td></td>+ <td>/v1/roles</td>+ <td>role</td></tr><tr>- <td>GetTaskRunLog</td>- <td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/log</td>- <td></td>+ <td>UpdateRole</td>+ <td>PATCH</td>+ <td>/v1/{role.name=roles/*}</td>+ <td>role</td></tr><tr>- <td>GetTaskRunSession</td>- <td>GET</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}/session</td>+ <td>DeleteRole</td>+ <td>DELETE</td>+ <td>/v1/{name=roles/*}</td><td></td></tr>--- <tr>- <td>BatchRunTasks</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchRun</td>- <td>*</td>- </tr>----- <tr>- <td>BatchSkipTasks</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*}/tasks:batchSkip</td>- <td>*</td>- </tr>----- <tr>- <td>BatchCancelTaskRuns</td>- <td>POST</td>- <td>/v1/{parent=projects/*/plans/*/rollout/stages/*/tasks/*}/taskRuns:batchCancel</td>- <td>*</td>- </tr>----- <tr>- <td>PreviewTaskRunRollback</td>- <td>POST</td>- <td>/v1/{name=projects/*/plans/*/rollout/stages/*/tasks/*/taskRuns/*}:previewRollback</td>- <td>*</td>- </tr>--</tbody></table>diff --git a/proto/v1/v1/plan_service.proto b/proto/v1/v1/plan_service.protoindex 55fe1556c0..9fedc18dd8 100644--- a/proto/v1/v1/plan_service.proto+++ b/proto/v1/v1/plan_service.proto@@ -11,6 +11,8 @@ import "google/protobuf/field_mask.proto";import "google/protobuf/timestamp.proto";import "v1/annotation.proto";import "v1/common.proto";+import "v1/issue_service.proto";+import "v1/rollout_service.proto";import "v1/sql_service.proto";option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";@@ -241,6 +243,14 @@ message Plan {// Whether the plan has started the rollout.bool has_rollout = 12 [(google.api.field_behavior) = OUTPUT_ONLY];+ // The approval status of the linked issue.+ // Unspecified when no linked issue exists.+ Issue.ApprovalStatus approval_status = 13 [(google.api.field_behavior) = OUTPUT_ONLY];++ // Per-stage rollout status summary.+ // Ordered by environment deployment order. Empty when no rollout exists.+ repeated RolloutStageSummary rollout_stage_summaries = 14 [(google.api.field_behavior) = OUTPUT_ONLY];+message CreateDatabaseConfig {// The resource name of the instance on which the database is created.// Format: instances/{instance}@@ -294,6 +304,21 @@ message Plan {// Leave it empty if no needs to encrypt the zip file.optional string password = 4;}++ message RolloutStageSummary {+ // The stage resource name.+ // Format: projects/{project}/plans/{plan}/rollout/stages/{stage}+ string stage = 1;+ // Task status counts for this stage.+ repeated TaskStatusCount task_status_counts = 2;+ }++ message TaskStatusCount {+ // The task status.+ Task.Status status = 1;+ // The number of tasks in the status.+ int32 count = 2;+ }}message GetPlanCheckRunRequest {