Skip to content

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

feat: flatten plan specs (#16246)

p0nyc3c764f07053
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.go
index 9024263f2a..d5a74f1d83 100644
--- a/backend/api/v1/plan_service.go
+++ b/backend/api/v1/plan_service.go
@@ -254,13 +254,13 @@ func (s *PlanService) CreatePlan(ctx context.Context, request *v1pb.CreatePlanRe
Description: request.Plan.Description,
Config: convertPlan(request.Plan),
}
- deployment, err := getPlanDeployment(ctx, s.store, planMessage.Config.GetSteps(), project)
+ deployment, err := getPlanDeployment(ctx, s.store, planMessage.Config.GetSpecs(), project)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get plan deployment snapshot, error: %v", err)
}
planMessage.Config.Deployment = deployment
- if _, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.dbFactory, planMessage.Name, planMessage.Config.GetSteps(), deployment, project); err != nil {
+ if _, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.dbFactory, planMessage.Name, planMessage.Config.GetSpecs(), deployment, project); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline from the plan, please check you request, error: %v", err)
}
plan, err := s.store.CreatePlan(ctx, planMessage, principalID)
@@ -355,21 +355,29 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanRe
convertedDeployment := convertPlanDeployment(request.Plan.Deployment)
planUpdate.Deployment = &convertedDeployment
case "steps":
- convertedRequestSteps := convertPlanSteps(request.GetPlan().GetSteps())
- planUpdate.Steps = &convertedRequestSteps
+ // Convert steps to specs for internal storage
+ var allSpecs []*storepb.PlanConfig_Spec
+ for _, step := range request.GetPlan().GetSteps() {
+ allSpecs = append(allSpecs, convertPlanSpecs(step.Specs)...)
+ }
+ planUpdate.Specs = &allSpecs
if _, err := GetPipelineCreate(ctx,
s.store,
s.sheetManager,
s.dbFactory,
oldPlan.Name,
- convertedRequestSteps,
+ allSpecs,
oldPlan.Config.GetDeployment(),
project); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline from the plan, please check you request, error: %v", err)
}
- oldSteps := convertToPlanSteps(oldPlan.Config.Steps)
+ // Convert old specs back to steps for comparison
+ oldSteps := []*v1pb.Plan_Step{{
+ Title: "",
+ Specs: convertToPlanSpecs(oldPlan.Config.Specs),
+ }}
issue, err := s.store.GetIssueV2(ctx, &store.FindIssueMessage{PlanUID: &oldPlan.UID})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get issue: %v", err)
@@ -1275,21 +1283,19 @@ func validateSteps(steps []*v1pb.Plan_Step) error {
return nil
}
-func getPlanSpecDatabaseGroups(steps []*storepb.PlanConfig_Step) []string {
+func getPlanSpecDatabaseGroups(specs []*storepb.PlanConfig_Spec) []string {
var databaseGroups []string
- for _, step := range steps {
- for _, spec := range step.Specs {
- if target := spec.GetChangeDatabaseConfig().GetTarget(); target != "" {
- if _, _, err := common.GetProjectIDDatabaseGroupID(target); err == nil {
- databaseGroups = append(databaseGroups, target)
- }
+ for _, spec := range specs {
+ if target := spec.GetChangeDatabaseConfig().GetTarget(); target != "" {
+ if _, _, err := common.GetProjectIDDatabaseGroupID(target); err == nil {
+ databaseGroups = append(databaseGroups, target)
}
}
}
return databaseGroups
}
-func getPlanDeployment(ctx context.Context, s *store.Store, steps []*storepb.PlanConfig_Step, project *store.ProjectMessage) (*storepb.PlanConfig_Deployment, error) {
+func getPlanDeployment(ctx context.Context, s *store.Store, specs []*storepb.PlanConfig_Spec, project *store.ProjectMessage) (*storepb.PlanConfig_Deployment, error) {
snapshot := &storepb.PlanConfig_Deployment{}
environments, err := s.GetEnvironmentSetting(ctx)
@@ -1300,7 +1306,7 @@ func getPlanDeployment(ctx context.Context, s *store.Store, steps []*storepb.Pla
snapshot.Environments = append(snapshot.Environments, e.Id)
}
- databaseGroups := getPlanSpecDatabaseGroups(steps)
+ databaseGroups := getPlanSpecDatabaseGroups(specs)
allDatabases, err := s.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &project.ResourceID})
if err != nil {
diff --git a/backend/api/v1/plan_service_plan_check.go b/backend/api/v1/plan_service_plan_check.go
index 296efef164..b2bee68a0b 100644
--- a/backend/api/v1/plan_service_plan_check.go
+++ b/backend/api/v1/plan_service_plan_check.go
@@ -40,17 +40,15 @@ func getPlanCheckRunsFromPlanSpecs(ctx context.Context, s *store.Store, plan *st
}
var planCheckRuns []*store.PlanCheckRunMessage
- for _, step := range plan.Config.Steps {
- for _, spec := range step.Specs {
- if _, ok := skippedSpecIDs[spec.Id]; ok {
- continue
- }
- runs, err := getPlanCheckRunsFromSpec(ctx, s, plan, spec)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get plan check runs for plan")
- }
- planCheckRuns = append(planCheckRuns, runs...)
+ for _, spec := range plan.Config.Specs {
+ if _, ok := skippedSpecIDs[spec.Id]; ok {
+ continue
}
+ runs, err := getPlanCheckRunsFromSpec(ctx, s, plan, spec)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get plan check runs for plan")
+ }
+ planCheckRuns = append(planCheckRuns, runs...)
}
if project.Setting.GetCiSamplingSize() > 0 {
var updatedRuns []*store.PlanCheckRunMessage
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index f7cccb73a8..ff8135d7cc 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -79,9 +79,13 @@ func (s *RolloutService) PreviewRollout(ctx context.Context, request *v1pb.Previ
if err := validateSteps(request.Plan.Steps); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to validate plan steps, error: %v", err)
}
- steps := convertPlanSteps(request.Plan.Steps)
+ // Convert steps to specs
+ var specs []*storepb.PlanConfig_Spec
+ for _, step := range request.Plan.Steps {
+ specs = append(specs, convertPlanSpecs(step.Specs)...)
+ }
- rollout, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.dbFactory, request.GetPlan().GetName(), steps, nil /* snapshot */, project)
+ rollout, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.dbFactory, request.GetPlan().GetName(), specs, nil /* snapshot */, project)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline create, error: %v", err)
}
@@ -229,14 +233,14 @@ func (s *RolloutService) CreateRollout(ctx context.Context, request *v1pb.Create
if rolloutTitle == "" {
rolloutTitle = plan.Name
}
- pipelineCreate, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.dbFactory, rolloutTitle, plan.Config.GetSteps(), plan.Config.GetDeployment(), project)
+ pipelineCreate, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.dbFactory, rolloutTitle, plan.Config.GetSpecs(), plan.Config.GetDeployment(), project)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline create, error: %v", err)
}
if len(pipelineCreate.Stages) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "no database matched for deployment, hint: check deployment config setting that the target database is in a stage")
}
- if isChangeDatabasePlan(plan.Config.GetSteps()) {
+ if isChangeDatabasePlan(plan.Config.GetSpecs()) {
pipelineCreate, err = getPipelineCreateToTargetStage(ctx, s.store, plan.Config.GetDeployment().GetEnvironments(), pipelineCreate, request.Target)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to filter stages with stageId, error: %v", err)
@@ -940,25 +944,17 @@ func (s *RolloutService) PreviewTaskRunRollback(ctx context.Context, request *v1
}, nil
}
-func isChangeDatabasePlan(steps []*storepb.PlanConfig_Step) bool {
- for _, step := range steps {
- for _, spec := range step.GetSpecs() {
- if spec.GetChangeDatabaseConfig() != nil {
- return true
- }
+func isChangeDatabasePlan(specs []*storepb.PlanConfig_Spec) bool {
+ for _, spec := range specs {
+ if spec.GetChangeDatabaseConfig() != nil {
+ return true
}
}
return false
}
// GetPipelineCreate gets a pipeline create message from a plan.
-func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, dbFactory *dbfactory.DBFactory, rolloutTitle string, steps []*storepb.PlanConfig_Step, deployment *storepb.PlanConfig_Deployment /* nullable */, project *store.ProjectMessage) (*store.PipelineMessage, error) {
- // Flatten all specs from steps.
- var specs []*storepb.PlanConfig_Spec
- for _, step := range steps {
- specs = append(specs, step.Specs...)
- }
-
+func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, dbFactory *dbfactory.DBFactory, rolloutTitle string, specs []*storepb.PlanConfig_Spec, deployment *storepb.PlanConfig_Deployment /* nullable */, project *store.ProjectMessage) (*store.PipelineMessage, error) {
// Step 1 - transform database group specs.
// Others are untouched.
transformSpecs, err := transformDatabaseGroupSpecs(ctx, s, project, specs, deployment)
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index b0218d76a3..16bd51820d 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -31,12 +31,18 @@ func convertToPlans(ctx context.Context, s *store.Store, plans []*store.PlanMess
}
func convertToPlan(ctx context.Context, s *store.Store, plan *store.PlanMessage) (*v1pb.Plan, error) {
+ // Convert flattened specs back to steps for API compatibility
+ steps := []*v1pb.Plan_Step{{
+ Title: "",
+ Specs: convertToPlanSpecs(plan.Config.Specs),
+ }}
+
p := &v1pb.Plan{
Name: common.FormatPlan(plan.ProjectID, plan.UID),
Issue: "",
Title: plan.Name,
Description: plan.Description,
- Steps: convertToPlanSteps(plan.Config.Steps),
+ Steps: steps,
Deployment: convertToPlanDeployment(plan.Config.Deployment),
ReleaseSource: &v1pb.Plan_ReleaseSource{
Release: plan.Config.GetReleaseSource().GetRelease(),
@@ -62,21 +68,6 @@ func convertToPlan(ctx context.Context, s *store.Store, plan *store.PlanMessage)
return p, nil
}
-func convertToPlanSteps(steps []*storepb.PlanConfig_Step) []*v1pb.Plan_Step {
- v1Steps := make([]*v1pb.Plan_Step, len(steps))
- for i := range steps {
- v1Steps[i] = convertToPlanStep(steps[i])
- }
- return v1Steps
-}
-
-func convertToPlanStep(step *storepb.PlanConfig_Step) *v1pb.Plan_Step {
- return &v1pb.Plan_Step{
- Title: step.Title,
- Specs: convertToPlanSpecs(step.Specs),
- }
-}
-
func convertToPlanSpecs(specs []*storepb.PlanConfig_Spec) []*v1pb.Plan_Spec {
v1Specs := make([]*v1pb.Plan_Spec, len(specs))
for i := range specs {
@@ -198,8 +189,13 @@ func convertPlan(plan *v1pb.Plan) *storepb.PlanConfig {
if plan == nil {
return nil
}
+ // Flatten specs from steps
+ var allSpecs []*storepb.PlanConfig_Spec
+ for _, step := range plan.Steps {
+ allSpecs = append(allSpecs, convertPlanSpecs(step.Specs)...)
+ }
return &storepb.PlanConfig{
- Steps: convertPlanSteps(plan.Steps),
+ Specs: allSpecs,
ReleaseSource: convertPlanReleaseSource(plan.ReleaseSource),
Deployment: nil,
}
@@ -242,21 +238,6 @@ func convertDatabaseGroupMapping(s *v1pb.Plan_Deployment_DatabaseGroupMapping) *
}
}
-func convertPlanSteps(steps []*v1pb.Plan_Step) []*storepb.PlanConfig_Step {
- storeSteps := make([]*storepb.PlanConfig_Step, len(steps))
- for i := range steps {
- storeSteps[i] = convertPlanStep(steps[i])
- }
- return storeSteps
-}
-
-func convertPlanStep(step *v1pb.Plan_Step) *storepb.PlanConfig_Step {
- return &storepb.PlanConfig_Step{
- Title: step.Title,
- Specs: convertPlanSpecs(step.Specs),
- }
-}
-
func convertPlanSpecs(specs []*v1pb.Plan_Spec) []*storepb.PlanConfig_Spec {
storeSpecs := make([]*storepb.PlanConfig_Spec, len(specs))
for i := range specs {
diff --git a/backend/migrator/migration/3.7/0008##flatten_plan_specs.sql b/backend/migrator/migration/3.7/0008##flatten_plan_specs.sql
new file mode 100644
index 0000000000..46f5ef0e4f
--- /dev/null
+++ b/backend/migrator/migration/3.7/0008##flatten_plan_specs.sql
@@ -0,0 +1,15 @@
+-- Flatten specs from steps array to top-level specs array in plan config
+UPDATE plan
+SET config = jsonb_set(
+ config - 'steps', -- Remove the steps key
+ '{specs}', -- Add specs at top level
+ COALESCE(
+ (
+ SELECT jsonb_agg(spec)
+ FROM jsonb_array_elements(config->'steps') AS step,
+ jsonb_array_elements(step->'specs') AS spec
+ ),
+ '[]'::jsonb -- Default to empty array if no specs found
+ )
+)
+WHERE config ? 'steps'; -- Only update rows that have steps
\ No newline at end of file
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 57c1029635..dffd2fdd37 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.7.7"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.7.8"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.go
index 82879209cc..a551f3d24e 100644
--- a/backend/runner/approval/runner.go
+++ b/backend/runner/approval/runner.go
@@ -405,7 +405,7 @@ func (r *Runner) getDatabaseGeneralIssueRisk(ctx context.Context, issue *store.I
return 0, store.RiskSourceUnknown, false, nil
}
- pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.dbFactory, plan.Name, plan.Config.GetSteps(), plan.Config.GetDeployment(), issue.Project)
+ pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.dbFactory, plan.Name, plan.Config.GetSpecs(), plan.Config.GetDeployment(), issue.Project)
if err != nil {
return 0, store.RiskSourceUnknown, false, errors.Wrap(err, "failed to get pipeline create")
}
@@ -508,7 +508,7 @@ func (r *Runner) getDatabaseDataExportIssueRisk(ctx context.Context, issue *stor
return 0, store.RiskSourceUnknown, false, errors.Errorf("plan %v not found", *issue.PlanUID)
}
- pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.dbFactory, plan.Name, plan.Config.GetSteps(), plan.Config.GetDeployment(), issue.Project)
+ pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.dbFactory, plan.Name, plan.Config.GetSpecs(), plan.Config.GetDeployment(), issue.Project)
if err != nil {
return 0, store.RiskSourceUnknown, false, errors.Wrap(err, "failed to get pipeline create")
}
@@ -735,18 +735,16 @@ func (r *Runner) getDatabaseMap(ctx context.Context, databases []string) (map[st
}
func getRiskSourceFromPlan(config *storepb.PlanConfig) store.RiskSource {
- for _, step := range config.GetSteps() {
- for _, spec := range step.GetSpecs() {
- switch v := spec.Config.(type) {
- case *storepb.PlanConfig_Spec_CreateDatabaseConfig:
- return store.RiskSourceDatabaseCreate
- case *storepb.PlanConfig_Spec_ChangeDatabaseConfig:
- switch v.ChangeDatabaseConfig.Type {
- case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE, storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_GHOST, storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_SDL:
- return store.RiskSourceDatabaseSchemaUpdate
- case storepb.PlanConfig_ChangeDatabaseConfig_DATA:
- return store.RiskSourceDatabaseDataUpdate
- }
+ for _, spec := range config.GetSpecs() {
+ switch v := spec.Config.(type) {
+ case *storepb.PlanConfig_Spec_CreateDatabaseConfig:
+ return store.RiskSourceDatabaseCreate
+ case *storepb.PlanConfig_Spec_ChangeDatabaseConfig:
+ switch v.ChangeDatabaseConfig.Type {
+ case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE, storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_GHOST, storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_SDL:
+ return store.RiskSourceDatabaseSchemaUpdate
+ case storepb.PlanConfig_ChangeDatabaseConfig_DATA:
+ return store.RiskSourceDatabaseDataUpdate
}
}
}
diff --git a/backend/store/plan.go b/backend/store/plan.go
index 3931f434fc..b4cbb951f6 100644
--- a/backend/store/plan.go
+++ b/backend/store/plan.go
@@ -54,7 +54,7 @@ type UpdatePlanMessage struct {
PipelineUID *int
Name *string
Description *string
- Steps *[]*storepb.PlanConfig_Step
+ Specs *[]*storepb.PlanConfig_Spec
Deployment **storepb.PlanConfig_Deployment
}
@@ -258,14 +258,14 @@ func (s *Store) UpdatePlan(ctx context.Context, patch *UpdatePlanMessage) error
}
{
var payloadSets []string
- if v := patch.Steps; v != nil {
+ if v := patch.Specs; v != nil {
config, err := protojson.Marshal(&storepb.PlanConfig{
- Steps: *v,
+ Specs: *v,
})
if err != nil {
return errors.Wrapf(err, "failed to marshal plan config")
}
- payloadSets = append(payloadSets, fmt.Sprintf("jsonb_build_object('steps', ($%d)::JSONB->'steps')", len(args)+1))
+ payloadSets = append(payloadSets, fmt.Sprintf("jsonb_build_object('specs', ($%d)::JSONB->'specs')", len(args)+1))
args = append(args, config)
}
if v := patch.Deployment; v != nil {
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 1d54015934..400a37d858 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -187,7 +187,6 @@
- [PlanConfig.ReleaseSource](#bytebase-store-PlanConfig-ReleaseSource)
- [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)
- [PlanConfig.SpecReleaseSource](#bytebase-store-PlanConfig-SpecReleaseSource)
- - [PlanConfig.Step](#bytebase-store-PlanConfig-Step)
- [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type)
@@ -2969,7 +2968,7 @@ InstanceRole is the API message for instance role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| steps | [PlanConfig.Step](#bytebase-store-PlanConfig-Step) | repeated | |
+| specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |
| release_source | [PlanConfig.ReleaseSource](#bytebase-store-PlanConfig-ReleaseSource) | | |
| deployment | [PlanConfig.Deployment](#bytebase-store-PlanConfig-Deployment) | | |
@@ -3134,22 +3133,6 @@ InstanceRole is the API message for instance role.
-
-<a name="bytebase-store-PlanConfig-Step"></a>
-
-### PlanConfig.Step
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| title | [string](#string) | | Use the title if set. Use a generated title if empty. |
-| specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |
-
-
-
-
-
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index cf2a977d55..be2564bc90 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -921,10 +921,6 @@
<a href="#bytebase.store.PlanConfig.SpecReleaseSource"><span class="badge">M</span>PlanConfig.SpecReleaseSource</a>
</li>
- <li>
- <a href="#bytebase.store.PlanConfig.Step"><span class="badge">M</span>PlanConfig.Step</a>
- </li>
-
<li>
<a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type"><span class="badge">E</span>PlanConfig.ChangeDatabaseConfig.Type</a>
@@ -8314,8 +8310,8 @@ Format: instances/{instance}/databases/{database} </p></td>
<tbody>
<tr>
- <td>steps</td>
- <td><a href="#bytebase.store.PlanConfig.Step">PlanConfig.Step</a></td>
+ <td>specs</td>
+ <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>
@@ -8722,38 +8718,6 @@ Format: projects/{project}/releases/{release} </p></td>
- <h3 id="bytebase.store.PlanConfig.Step">PlanConfig.Step</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Use the title if set.
-Use a generated title if empty. </p></td>
- </tr>
-
- <tr>
- <td>specs</td>
- <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</h3>
diff --git a/proto/generated-go/store/plan.pb.go b/proto/generated-go/store/plan.pb.go
index ea8f57c060..91aee37c81 100644
--- a/proto/generated-go/store/plan.pb.go
+++ b/proto/generated-go/store/plan.pb.go
@@ -79,12 +79,12 @@ func (x PlanConfig_ChangeDatabaseConfig_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use PlanConfig_ChangeDatabaseConfig_Type.Descriptor instead.
func (PlanConfig_ChangeDatabaseConfig_Type) EnumDescriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 3, 0}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 2, 0}
}
type PlanConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
- Steps []*PlanConfig_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
+ Specs []*PlanConfig_Spec `protobuf:"bytes,1,rep,name=specs,proto3" json:"specs,omitempty"`
ReleaseSource *PlanConfig_ReleaseSource `protobuf:"bytes,3,opt,name=release_source,json=releaseSource,proto3" json:"release_source,omitempty"`
Deployment *PlanConfig_Deployment `protobuf:"bytes,4,opt,name=deployment,proto3" json:"deployment,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -121,9 +121,9 @@ func (*PlanConfig) Descriptor() ([]byte, []int) {
return file_store_plan_proto_rawDescGZIP(), []int{0}
}
-func (x *PlanConfig) GetSteps() []*PlanConfig_Step {
+func (x *PlanConfig) GetSpecs() []*PlanConfig_Spec {
if x != nil {
- return x.Steps
+ return x.Specs
}
return nil
}
@@ -142,60 +142,6 @@ func (x *PlanConfig) GetDeployment() *PlanConfig_Deployment {
return nil
}
-type PlanConfig_Step struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Use the title if set.
- // Use a generated title if empty.
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- Specs []*PlanConfig_Spec `protobuf:"bytes,1,rep,name=specs,proto3" json:"specs,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *PlanConfig_Step) Reset() {
- *x = PlanConfig_Step{}
- mi := &file_store_plan_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *PlanConfig_Step) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*PlanConfig_Step) ProtoMessage() {}
-
-func (x *PlanConfig_Step) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use PlanConfig_Step.ProtoReflect.Descriptor instead.
-func (*PlanConfig_Step) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 0}
-}
-
-func (x *PlanConfig_Step) GetTitle() string {
- if x != nil {
- return x.Title
- }
- return ""
-}
-
-func (x *PlanConfig_Step) GetSpecs() []*PlanConfig_Spec {
- if x != nil {
- return x.Specs
- }
- return nil
-}
-
type PlanConfig_Spec struct {
state protoimpl.MessageState `protogen:"open.v1"`
// A UUID4 string that uniquely identifies the Spec.
@@ -213,7 +159,7 @@ type PlanConfig_Spec struct {
func (x *PlanConfig_Spec) Reset() {
*x = PlanConfig_Spec{}
- mi := &file_store_plan_proto_msgTypes[2]
+ mi := &file_store_plan_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -225,7 +171,7 @@ func (x *PlanConfig_Spec) String() string {
func (*PlanConfig_Spec) ProtoMessage() {}
func (x *PlanConfig_Spec) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[2]
+ mi := &file_store_plan_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -238,7 +184,7 @@ func (x *PlanConfig_Spec) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_Spec.ProtoReflect.Descriptor instead.
func (*PlanConfig_Spec) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 1}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 0}
}
func (x *PlanConfig_Spec) GetId() string {
@@ -338,7 +284,7 @@ type PlanConfig_CreateDatabaseConfig struct {
func (x *PlanConfig_CreateDatabaseConfig) Reset() {
*x = PlanConfig_CreateDatabaseConfig{}
- mi := &file_store_plan_proto_msgTypes[3]
+ mi := &file_store_plan_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -350,7 +296,7 @@ func (x *PlanConfig_CreateDatabaseConfig) String() string {
func (*PlanConfig_CreateDatabaseConfig) ProtoMessage() {}
func (x *PlanConfig_CreateDatabaseConfig) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[3]
+ mi := &file_store_plan_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -363,7 +309,7 @@ func (x *PlanConfig_CreateDatabaseConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_CreateDatabaseConfig.ProtoReflect.Descriptor instead.
func (*PlanConfig_CreateDatabaseConfig) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 2}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 1}
}
func (x *PlanConfig_CreateDatabaseConfig) GetTarget() string {
@@ -444,7 +390,7 @@ type PlanConfig_ChangeDatabaseConfig struct {
func (x *PlanConfig_ChangeDatabaseConfig) Reset() {
*x = PlanConfig_ChangeDatabaseConfig{}
- mi := &file_store_plan_proto_msgTypes[4]
+ mi := &file_store_plan_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -456,7 +402,7 @@ func (x *PlanConfig_ChangeDatabaseConfig) String() string {
func (*PlanConfig_ChangeDatabaseConfig) ProtoMessage() {}
func (x *PlanConfig_ChangeDatabaseConfig) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[4]
+ mi := &file_store_plan_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -469,7 +415,7 @@ func (x *PlanConfig_ChangeDatabaseConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_ChangeDatabaseConfig.ProtoReflect.Descriptor instead.
func (*PlanConfig_ChangeDatabaseConfig) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 3}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 2}
}
func (x *PlanConfig_ChangeDatabaseConfig) GetTarget() string {
@@ -533,7 +479,7 @@ type PlanConfig_ExportDataConfig struct {
func (x *PlanConfig_ExportDataConfig) Reset() {
*x = PlanConfig_ExportDataConfig{}
- mi := &file_store_plan_proto_msgTypes[5]
+ mi := &file_store_plan_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -545,7 +491,7 @@ func (x *PlanConfig_ExportDataConfig) String() string {
func (*PlanConfig_ExportDataConfig) ProtoMessage() {}
func (x *PlanConfig_ExportDataConfig) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[5]
+ mi := &file_store_plan_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -558,7 +504,7 @@ func (x *PlanConfig_ExportDataConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_ExportDataConfig.ProtoReflect.Descriptor instead.
func (*PlanConfig_ExportDataConfig) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 4}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 3}
}
func (x *PlanConfig_ExportDataConfig) GetTarget() string {
@@ -600,7 +546,7 @@ type PlanConfig_ReleaseSource struct {
func (x *PlanConfig_ReleaseSource) Reset() {
*x = PlanConfig_ReleaseSource{}
- mi := &file_store_plan_proto_msgTypes[6]
+ mi := &file_store_plan_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -612,7 +558,7 @@ func (x *PlanConfig_ReleaseSource) String() string {
func (*PlanConfig_ReleaseSource) ProtoMessage() {}
func (x *PlanConfig_ReleaseSource) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[6]
+ mi := &file_store_plan_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -625,7 +571,7 @@ func (x *PlanConfig_ReleaseSource) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_ReleaseSource.ProtoReflect.Descriptor instead.
func (*PlanConfig_ReleaseSource) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 5}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 4}
}
func (x *PlanConfig_ReleaseSource) GetRelease() string {
@@ -645,7 +591,7 @@ type PlanConfig_SpecReleaseSource struct {
func (x *PlanConfig_SpecReleaseSource) Reset() {
*x = PlanConfig_SpecReleaseSource{}
- mi := &file_store_plan_proto_msgTypes[7]
+ mi := &file_store_plan_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -657,7 +603,7 @@ func (x *PlanConfig_SpecReleaseSource) String() string {
func (*PlanConfig_SpecReleaseSource) ProtoMessage() {}
func (x *PlanConfig_SpecReleaseSource) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[7]
+ mi := &file_store_plan_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -670,7 +616,7 @@ func (x *PlanConfig_SpecReleaseSource) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_SpecReleaseSource.ProtoReflect.Descriptor instead.
func (*PlanConfig_SpecReleaseSource) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 6}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 5}
}
func (x *PlanConfig_SpecReleaseSource) GetFile() string {
@@ -692,7 +638,7 @@ type PlanConfig_Deployment struct {
func (x *PlanConfig_Deployment) Reset() {
*x = PlanConfig_Deployment{}
- mi := &file_store_plan_proto_msgTypes[8]
+ mi := &file_store_plan_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -704,7 +650,7 @@ func (x *PlanConfig_Deployment) String() string {
func (*PlanConfig_Deployment) ProtoMessage() {}
func (x *PlanConfig_Deployment) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[8]
+ mi := &file_store_plan_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -717,7 +663,7 @@ func (x *PlanConfig_Deployment) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanConfig_Deployment.ProtoReflect.Descriptor instead.
func (*PlanConfig_Deployment) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 7}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 6}
}
func (x *PlanConfig_Deployment) GetEnvironments() []string {
@@ -746,7 +692,7 @@ type PlanConfig_Deployment_DatabaseGroupMapping struct {
func (x *PlanConfig_Deployment_DatabaseGroupMapping) Reset() {
*x = PlanConfig_Deployment_DatabaseGroupMapping{}
- mi := &file_store_plan_proto_msgTypes[10]
+ mi := &file_store_plan_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -758,7 +704,7 @@ func (x *PlanConfig_Deployment_DatabaseGroupMapping) String() string {
func (*PlanConfig_Deployment_DatabaseGroupMapping) ProtoMessage() {}
func (x *PlanConfig_Deployment_DatabaseGroupMapping) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[10]
+ mi := &file_store_plan_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -771,7 +717,7 @@ func (x *PlanConfig_Deployment_DatabaseGroupMapping) ProtoReflect() protoreflect
// Deprecated: Use PlanConfig_Deployment_DatabaseGroupMapping.ProtoReflect.Descriptor instead.
func (*PlanConfig_Deployment_DatabaseGroupMapping) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 7, 0}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 6, 0}
}
func (x *PlanConfig_Deployment_DatabaseGroupMapping) GetDatabaseGroup() string {
@@ -792,17 +738,14 @@ var File_store_plan_proto protoreflect.FileDescriptor
const file_store_plan_proto_rawDesc = "" +
"\n" +
- "\x10store/plan.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x12store/common.proto\x1a\x1astore/plan_check_run.proto\"\xe2\x10\n" +
+ "\x10store/plan.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x12store/common.proto\x1a\x1astore/plan_check_run.proto\"\x8d\x10\n" +
"\n" +
"PlanConfig\x125\n" +
- "\x05steps\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.StepR\x05steps\x12O\n" +
+ "\x05specs\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\x05specs\x12O\n" +
"\x0erelease_source\x18\x03 \x01(\v2(.bytebase.store.PlanConfig.ReleaseSourceR\rreleaseSource\x12E\n" +
"\n" +
"deployment\x18\x04 \x01(\v2%.bytebase.store.PlanConfig.DeploymentR\n" +
- "deployment\x1aS\n" +
- "\x04Step\x12\x14\n" +
- "\x05title\x18\x02 \x01(\tR\x05title\x125\n" +
- "\x05specs\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\x05specs\x1a\xad\x03\n" +
+ "deployment\x1a\xad\x03\n" +
"\x04Spec\x12\x0e\n" +
"\x02id\x18\x05 \x01(\tR\x02id\x12\\\n" +
"\x13spec_release_source\x18\b \x01(\v2,.bytebase.store.PlanConfig.SpecReleaseSourceR\x11specReleaseSource\x12g\n" +
@@ -869,42 +812,40 @@ func file_store_plan_proto_rawDescGZIP() []byte {
}
var file_store_plan_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_store_plan_proto_goTypes = []any{
(PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
(*PlanConfig)(nil), // 1: bytebase.store.PlanConfig
- (*PlanConfig_Step)(nil), // 2: bytebase.store.PlanConfig.Step
- (*PlanConfig_Spec)(nil), // 3: bytebase.store.PlanConfig.Spec
- (*PlanConfig_CreateDatabaseConfig)(nil), // 4: bytebase.store.PlanConfig.CreateDatabaseConfig
- (*PlanConfig_ChangeDatabaseConfig)(nil), // 5: bytebase.store.PlanConfig.ChangeDatabaseConfig
- (*PlanConfig_ExportDataConfig)(nil), // 6: bytebase.store.PlanConfig.ExportDataConfig
- (*PlanConfig_ReleaseSource)(nil), // 7: bytebase.store.PlanConfig.ReleaseSource
- (*PlanConfig_SpecReleaseSource)(nil), // 8: bytebase.store.PlanConfig.SpecReleaseSource
- (*PlanConfig_Deployment)(nil), // 9: bytebase.store.PlanConfig.Deployment
- nil, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- (*PlanConfig_Deployment_DatabaseGroupMapping)(nil), // 11: bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
- (*PreUpdateBackupDetail)(nil), // 12: bytebase.store.PreUpdateBackupDetail
- (ExportFormat)(0), // 13: bytebase.store.ExportFormat
+ (*PlanConfig_Spec)(nil), // 2: bytebase.store.PlanConfig.Spec
+ (*PlanConfig_CreateDatabaseConfig)(nil), // 3: bytebase.store.PlanConfig.CreateDatabaseConfig
+ (*PlanConfig_ChangeDatabaseConfig)(nil), // 4: bytebase.store.PlanConfig.ChangeDatabaseConfig
+ (*PlanConfig_ExportDataConfig)(nil), // 5: bytebase.store.PlanConfig.ExportDataConfig
+ (*PlanConfig_ReleaseSource)(nil), // 6: bytebase.store.PlanConfig.ReleaseSource
+ (*PlanConfig_SpecReleaseSource)(nil), // 7: bytebase.store.PlanConfig.SpecReleaseSource
+ (*PlanConfig_Deployment)(nil), // 8: bytebase.store.PlanConfig.Deployment
+ nil, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ (*PlanConfig_Deployment_DatabaseGroupMapping)(nil), // 10: bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
+ (*PreUpdateBackupDetail)(nil), // 11: bytebase.store.PreUpdateBackupDetail
+ (ExportFormat)(0), // 12: bytebase.store.ExportFormat
}
var file_store_plan_proto_depIdxs = []int32{
- 2, // 0: bytebase.store.PlanConfig.steps:type_name -> bytebase.store.PlanConfig.Step
- 7, // 1: bytebase.store.PlanConfig.release_source:type_name -> bytebase.store.PlanConfig.ReleaseSource
- 9, // 2: bytebase.store.PlanConfig.deployment:type_name -> bytebase.store.PlanConfig.Deployment
- 3, // 3: bytebase.store.PlanConfig.Step.specs:type_name -> bytebase.store.PlanConfig.Spec
- 8, // 4: bytebase.store.PlanConfig.Spec.spec_release_source:type_name -> bytebase.store.PlanConfig.SpecReleaseSource
- 4, // 5: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig
- 5, // 6: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig
- 6, // 7: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig
- 0, // 8: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
- 10, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- 12, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
- 13, // 11: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
- 11, // 12: bytebase.store.PlanConfig.Deployment.database_group_mappings:type_name -> bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
- 13, // [13:13] is the sub-list for method output_type
- 13, // [13:13] is the sub-list for method input_type
- 13, // [13:13] is the sub-list for extension type_name
- 13, // [13:13] is the sub-list for extension extendee
- 0, // [0:13] is the sub-list for field type_name
+ 2, // 0: bytebase.store.PlanConfig.specs:type_name -> bytebase.store.PlanConfig.Spec
+ 6, // 1: bytebase.store.PlanConfig.release_source:type_name -> bytebase.store.PlanConfig.ReleaseSource
+ 8, // 2: bytebase.store.PlanConfig.deployment:type_name -> bytebase.store.PlanConfig.Deployment
+ 7, // 3: bytebase.store.PlanConfig.Spec.spec_release_source:type_name -> bytebase.store.PlanConfig.SpecReleaseSource
+ 3, // 4: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig
+ 4, // 5: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig
+ 5, // 6: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig
+ 0, // 7: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
+ 9, // 8: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ 11, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
+ 12, // 10: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
+ 10, // 11: bytebase.store.PlanConfig.Deployment.database_group_mappings:type_name -> bytebase.store.PlanConfig.Deployment.DatabaseGroupMapping
+ 12, // [12:12] is the sub-list for method output_type
+ 12, // [12:12] is the sub-list for method input_type
+ 12, // [12:12] is the sub-list for extension type_name
+ 12, // [12:12] is the sub-list for extension extendee
+ 0, // [0:12] is the sub-list for field type_name
}
func init() { file_store_plan_proto_init() }
@@ -914,20 +855,20 @@ func file_store_plan_proto_init() {
}
file_store_common_proto_init()
file_store_plan_check_run_proto_init()
- file_store_plan_proto_msgTypes[2].OneofWrappers = []any{
+ file_store_plan_proto_msgTypes[1].OneofWrappers = []any{
(*PlanConfig_Spec_CreateDatabaseConfig)(nil),
(*PlanConfig_Spec_ChangeDatabaseConfig)(nil),
(*PlanConfig_Spec_ExportDataConfig)(nil),
}
+ file_store_plan_proto_msgTypes[3].OneofWrappers = []any{}
file_store_plan_proto_msgTypes[4].OneofWrappers = []any{}
- file_store_plan_proto_msgTypes[5].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_plan_proto_rawDesc), len(file_store_plan_proto_rawDesc)),
NumEnums: 1,
- NumMessages: 11,
+ NumMessages: 10,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/store/plan.proto b/proto/store/store/plan.proto
index cc1e064e2d..342f54cdf9 100644
--- a/proto/store/store/plan.proto
+++ b/proto/store/store/plan.proto
@@ -10,18 +10,11 @@ import "store/plan_check_run.proto";
option go_package = "generated-go/store";
message PlanConfig {
- repeated Step steps = 1;
+ repeated Spec specs = 1;
ReleaseSource release_source = 3;
Deployment deployment = 4;
-
- message Step {
- // Use the title if set.
- // Use a generated title if empty.
- string title = 2;
- repeated Spec specs = 1;
- }
message Spec {
// A UUID4 string that uniquely identifies the Spec.
string id = 5;