Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: remove target in plan config (#16304)
boojackeb4586df5f35
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex 5c4ed425d6..d36bd587eb 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -2,6 +2,7 @@ package v1import ("context"+ "fmt""log/slog""slices""strings"@@ -242,10 +243,6 @@ func (s *PlanService) CreatePlan(ctx context.Context, request *v1pb.CreatePlanRereturn nil, status.Errorf(codes.NotFound, "project not found for id: %v", projectID)}- // Convert steps to specs if needed for backward compatibility- convertStepsToSpecs(request.Plan)- // Convert Target to Targets grouped by Sheet- convertTargetToTargets(request.Plan)// Validate plan specsif err := validateSpecs(request.Plan.Specs); err != nil {return nil, status.Errorf(codes.InvalidArgument, "failed to validate plan specs, error: %v", err)@@ -514,7 +511,8 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanReif backupDatabaseName != nil {if *backupDatabaseName != "" {// If backup is enabled, we need to check if the backup is available for the source database. AKA, the task's target database.- sourceDatabaseName := config.ChangeDatabaseConfig.Target+ // Construct the source database name from the task's instance and database+ sourceDatabaseName := fmt.Sprintf("instances/%s/databases/%s", task.InstanceID, task.GetDatabaseName())instanceID, databaseName, err := common.GetInstanceDatabaseID(sourceDatabaseName)if err != nil {return errors.Wrapf(err, "failed to get instance database id from %q", sourceDatabaseName)@@ -1170,87 +1168,3 @@ func getTaskTypeFromSpec(spec *v1pb.Plan_Spec) (base.TaskType, error) {}return "", errors.Errorf("unknown spec config type")}--// convertStepsToSpecs converts deprecated Plan.Steps to Plan.Specs for backward compatibility.-//-//nolint:staticcheck // SA1019: deprecated field used for backward compatibility-func convertStepsToSpecs(plan *v1pb.Plan) {- if len(plan.Specs) == 0 && len(plan.Steps) > 0 {- //nolint:staticcheck // SA1019: deprecated field used for backward compatibility- for _, step := range plan.Steps {- plan.Specs = append(plan.Specs, step.Specs...)- }- }-}--// convertTargetToTargets converts deprecated Target field to Targets field grouped by Sheet.-func convertTargetToTargets(plan *v1pb.Plan) {- // Group specs by sheet- sheetToSpecs := make(map[string][]*v1pb.Plan_Spec)- var otherSpecs []*v1pb.Plan_Spec-- for _, spec := range plan.Specs {- if changeDatabaseConfig := spec.GetChangeDatabaseConfig(); changeDatabaseConfig != nil {- // Only process if Target is set and Targets is empty- if changeDatabaseConfig.Target != "" && len(changeDatabaseConfig.Targets) == 0 {- changeDatabaseConfig.Targets = []string{changeDatabaseConfig.Target}- changeDatabaseConfig.Target = "" // Clear the deprecated field- sheetToSpecs[changeDatabaseConfig.Sheet] = append(sheetToSpecs[changeDatabaseConfig.Sheet], spec)- continue- }- }- otherSpecs = append(otherSpecs, spec)- }-- // Merge specs with the same sheet- var newSpecs []*v1pb.Plan_Spec- for sheet, specs := range sheetToSpecs {- if len(specs) == 1 {- newSpecs = append(newSpecs, specs[0])- } else {- // Merge multiple specs with the same sheet- var targets []string- var release string- var changeType v1pb.Plan_ChangeDatabaseConfig_Type- var ghostFlags map[string]string- var preUpdateBackupDetail *v1pb.Plan_ChangeDatabaseConfig_PreUpdateBackupDetail-- for _, spec := range specs {- config := spec.GetChangeDatabaseConfig()- targets = append(targets, config.Targets...)- if release == "" {- release = config.Release- }- if changeType == v1pb.Plan_ChangeDatabaseConfig_TYPE_UNSPECIFIED {- changeType = config.Type- }- if len(ghostFlags) == 0 {- ghostFlags = config.GhostFlags- }- if preUpdateBackupDetail == nil {- preUpdateBackupDetail = config.PreUpdateBackupDetail- }- }-- // Create merged spec- mergedSpec := &v1pb.Plan_Spec{- Id: specs[0].Id, // Use the first spec's ID- Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{- ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{- Targets: targets,- Sheet: sheet,- Release: release,- Type: changeType,- GhostFlags: ghostFlags,- PreUpdateBackupDetail: preUpdateBackupDetail,- },- },- }- newSpecs = append(newSpecs, mergedSpec)- }- }-- // Add back non-change database specs- newSpecs = append(newSpecs, otherSpecs...)- plan.Specs = newSpecs-}diff --git a/backend/api/v1/plan_service_plan_check.go b/backend/api/v1/plan_service_plan_check.goindex cc5083a4f8..7e28199436 100644--- a/backend/api/v1/plan_service_plan_check.go+++ b/backend/api/v1/plan_service_plan_check.go@@ -85,9 +85,6 @@ func getPlanCheckRunsFromSpec(ctx context.Context, s *store.Store, plan *store.Preturn getPlanCheckRunsFromExportDataConfigDatabaseGroupTarget(ctx, s, plan, target, config.ExportDataConfig)}}- if _, _, err := common.GetInstanceDatabaseID(config.ExportDataConfig.Target); err == nil {- return getPlanCheckRunsFromExportDataConfigDatabaseTarget(ctx, s, plan, []string{config.ExportDataConfig.Target}, config.ExportDataConfig)- }return getPlanCheckRunsFromExportDataConfigDatabaseTarget(ctx, s, plan, config.ExportDataConfig.Targets, config.ExportDataConfig)default:return nil, errors.Errorf("unknown spec config type %T", config)diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.goindex 2e592d02d2..136f942116 100644--- a/backend/api/v1/rollout_service.go+++ b/backend/api/v1/rollout_service.go@@ -76,10 +76,6 @@ func (s *RolloutService) PreviewRollout(ctx context.Context, request *v1pb.Previreturn nil, status.Errorf(codes.NotFound, "project %q not found", projectID)}- // Convert steps to specs if needed for backward compatibility- convertStepsToSpecs(request.Plan)- // Convert Target to Targets grouped by Sheet- convertTargetToTargets(request.Plan)// Validate plan specsif err := validateSpecs(request.Plan.Specs); err != nil {return nil, status.Errorf(codes.InvalidArgument, "failed to validate plan specs, error: %v", err)diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.goindex 379221dcb3..b036ee4c10 100644--- a/backend/api/v1/rollout_service_converter.go+++ b/backend/api/v1/rollout_service_converter.go@@ -137,7 +137,6 @@ func convertToPlanSpecExportDataConfig(config *storepb.PlanConfig_Spec_ExportDatc := config.ExportDataConfigreturn &v1pb.Plan_Spec_ExportDataConfig{ExportDataConfig: &v1pb.Plan_ExportDataConfig{- Target: c.Target,Targets: c.Targets,Sheet: c.Sheet,Format: convertExportFormat(c.Format),@@ -255,7 +254,6 @@ func convertPlanSpecExportDataConfig(config *v1pb.Plan_Spec_ExportDataConfig) *sc := config.ExportDataConfigreturn &storepb.PlanConfig_Spec_ExportDataConfig{ExportDataConfig: &storepb.PlanConfig_ExportDataConfig{- Target: c.Target,Targets: c.Targets,Sheet: c.Sheet,Format: convertToExportFormat(c.Format),diff --git a/backend/api/v1/rollout_service_task.go b/backend/api/v1/rollout_service_task.goindex 777c9cac6f..cfa015fbb0 100644--- a/backend/api/v1/rollout_service_task.go+++ b/backend/api/v1/rollout_service_task.go@@ -256,12 +256,7 @@ func getTaskCreatesFromExportDataConfig(spec *storepb.PlanConfig_Spec,c *storepb.PlanConfig_ExportDataConfig,) ([]*store.TaskMessage, error) {- targets := c.Targets- if c.Target != "" {- targets = []string{c.Target}- }-- databases, err := getDatabaseMessagesByTargets(ctx, s, targets)+ databases, err := getDatabaseMessagesByTargets(ctx, s, c.Targets)if err != nil {return nil, err}diff --git a/backend/migrator/migration/3.7/0013##migrate_plan_export_target.sql b/backend/migrator/migration/3.7/0013##migrate_plan_export_target.sqlnew file mode 100644index 0000000000..5de83cb998--- /dev/null+++ b/backend/migrator/migration/3.7/0013##migrate_plan_export_target.sql@@ -0,0 +1,32 @@+-- Migrate plan config from single "target" to array "targets" for exportDataConfig only+UPDATE plan+SET config = jsonb_set(+ config,+ '{specs}',+ (+ SELECT jsonb_agg(+ CASE+ -- Handle exportDataConfig with target field+ WHEN spec_value->'exportDataConfig' ? 'target' THEN+ jsonb_set(+ spec_value,+ '{exportDataConfig}',+ jsonb_set(+ (spec_value->'exportDataConfig')::jsonb - 'target',+ '{targets}',+ jsonb_build_array(spec_value->'exportDataConfig'->'target')+ )+ )+ -- Keep other specs unchanged+ ELSE spec_value+ END+ )+ FROM jsonb_array_elements(config->'specs') AS spec_value+ )+)+WHERE config ? 'specs'+ AND EXISTS (+ SELECT 1+ FROM jsonb_array_elements(config->'specs') AS spec+ WHERE spec->'exportDataConfig' ? 'target'+ );\ No newline at end of filediff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 7a55de5b4e..7be23a58c3 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.12"), *files[len(files)-1].version)+ require.Equal(t, semver.MustParse("3.7.13"), *files[len(files)-1].version)}func TestVersionUnique(t *testing.T) {diff --git a/backend/tests/database.go b/backend/tests/database.goindex 78d3d84dab..076249145d 100644--- a/backend/tests/database.go+++ b/backend/tests/database.go@@ -23,21 +23,17 @@ func (ctl *controller) createDatabaseV2(ctx context.Context, project *v1pb.Projeplan, err := ctl.planServiceClient.CreatePlan(ctx, &v1pb.CreatePlanRequest{Parent: project.Name,Plan: &v1pb.Plan{- Steps: []*v1pb.Plan_Step{+ Specs: []*v1pb.Plan_Spec{{- Specs: []*v1pb.Plan_Spec{- {- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_CreateDatabaseConfig{- CreateDatabaseConfig: &v1pb.Plan_CreateDatabaseConfig{- Target: instance.Name,- Database: databaseName,- CharacterSet: characterSet,- Collation: collation,- Owner: owner,- Environment: environmentName,- },- },+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_CreateDatabaseConfig{+ CreateDatabaseConfig: &v1pb.Plan_CreateDatabaseConfig{+ Target: instance.Name,+ Database: databaseName,+ CharacterSet: characterSet,+ Collation: collation,+ Owner: owner,+ Environment: environmentName,},},},diff --git a/backend/tests/project_test.go b/backend/tests/project_test.goindex 93eb4a2f56..7036a8a0ba 100644--- a/backend/tests/project_test.go+++ b/backend/tests/project_test.go@@ -51,17 +51,13 @@ func TestArchiveProject(t *testing.T) {plan, err := ctl.planServiceClient.CreatePlan(ctx, &v1pb.CreatePlanRequest{Parent: ctl.project.Name,Plan: &v1pb.Plan{- Steps: []*v1pb.Plan_Step{+ Specs: []*v1pb.Plan_Spec{{- Specs: []*v1pb.Plan_Spec{- {- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_CreateDatabaseConfig{- CreateDatabaseConfig: &v1pb.Plan_CreateDatabaseConfig{- Target: instance.Name,- Database: "fakedb",- },- },+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_CreateDatabaseConfig{+ CreateDatabaseConfig: &v1pb.Plan_CreateDatabaseConfig{+ Target: instance.Name,+ Database: "fakedb",},},},diff --git a/backend/tests/rollout.go b/backend/tests/rollout.goindex 2e1abae180..b331662fbf 100644--- a/backend/tests/rollout.go+++ b/backend/tests/rollout.go@@ -12,31 +12,25 @@ import ()func (ctl *controller) changeDatabase(ctx context.Context, project *v1pb.Project, database *v1pb.Database, sheet *v1pb.Sheet, changeType v1pb.Plan_ChangeDatabaseConfig_Type) error {- _, _, _, err := ctl.changeDatabaseWithConfig(ctx, project, []*v1pb.Plan_Step{- {- Specs: []*v1pb.Plan_Spec{- {- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{- ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{- Targets: []string{database.Name},- Sheet: sheet.Name,- Type: changeType,- },- },- },+ spec := &v1pb.Plan_Spec{+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{database.Name},+ Sheet: sheet.Name,+ Type: changeType,},},- },- )+ }+ _, _, _, err := ctl.changeDatabaseWithConfig(ctx, project, spec)return err}-func (ctl *controller) changeDatabaseWithConfig(ctx context.Context, project *v1pb.Project, steps []*v1pb.Plan_Step) (*v1pb.Plan, *v1pb.Rollout, *v1pb.Issue, error) {+func (ctl *controller) changeDatabaseWithConfig(ctx context.Context, project *v1pb.Project, spec *v1pb.Plan_Spec) (*v1pb.Plan, *v1pb.Rollout, *v1pb.Issue, error) {plan, err := ctl.planServiceClient.CreatePlan(ctx, &v1pb.CreatePlanRequest{Parent: project.Name,Plan: &v1pb.Plan{- Steps: steps,+ Specs: []*v1pb.Plan_Spec{spec},},})if err != nil {diff --git a/backend/tests/schema_update_test.go b/backend/tests/schema_update_test.goindex 898eb3a2dc..00062b4e35 100644--- a/backend/tests/schema_update_test.go+++ b/backend/tests/schema_update_test.go@@ -397,18 +397,14 @@ func TestMarkTaskAsDone(t *testing.T) {plan, err := ctl.planServiceClient.CreatePlan(ctx, &v1pb.CreatePlanRequest{Parent: ctl.project.Name,Plan: &v1pb.Plan{- Steps: []*v1pb.Plan_Step{+ Specs: []*v1pb.Plan_Spec{{- Specs: []*v1pb.Plan_Spec{- {- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{- ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{- Targets: []string{database.Name},- Sheet: sheet.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,- },- },+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{database.Name},+ Sheet: sheet.Name,+ Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,},},},diff --git a/backend/tests/sql_review_test.go b/backend/tests/sql_review_test.goindex e7c7d6233d..d7be7daf31 100644--- a/backend/tests/sql_review_test.go+++ b/backend/tests/sql_review_test.go@@ -473,18 +473,14 @@ func createIssueAndReturnSQLReviewResult(ctx context.Context, a *require.Assertiplan, err := ctl.planServiceClient.CreatePlan(ctx, &v1pb.CreatePlanRequest{Parent: project.Name,Plan: &v1pb.Plan{- Steps: []*v1pb.Plan_Step{+ Specs: []*v1pb.Plan_Spec{{- Specs: []*v1pb.Plan_Spec{- {- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{- ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{- Targets: []string{database.Name},- Sheet: sheet.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,- },- },+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{database.Name},+ Sheet: sheet.Name,+ Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,},},},diff --git a/backend/tests/tenant_test.go b/backend/tests/tenant_test.goindex 9487c05575..ad611b585f 100644--- a/backend/tests/tenant_test.go+++ b/backend/tests/tenant_test.go@@ -147,21 +147,17 @@ func TestDatabaseGroup(t *testing.T) {a.NoError(err)// Create an issue that updates database schema.- step := &v1pb.Plan_Step{- Specs: []*v1pb.Plan_Spec{- {- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{- ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{- Targets: []string{databaseGroup.Name},- Sheet: sheet.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,- },- },+ spec := &v1pb.Plan_Spec{+ Id: uuid.NewString(),+ Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{+ ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{+ Targets: []string{databaseGroup.Name},+ Sheet: sheet.Name,+ Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,},},}- plan, rollout, issue, err := ctl.changeDatabaseWithConfig(ctx, project, []*v1pb.Plan_Step{step})+ plan, rollout, issue, err := ctl.changeDatabaseWithConfig(ctx, project, spec)a.NoError(err)// Assert the plan deployment.diff --git a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vueindex 12ca4b0ada..b34e72af3d 100644--- a/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue+++ b/frontend/src/components/CreateDatabasePrepForm/CreateDatabasePrepForm.vue@@ -366,7 +366,7 @@ const createV1 = async () => {state.creating = true;try {const planCreate = Plan.fromPartial({- steps: [{ specs: [spec] }],+ specs: [spec],creator: currentUserV1.value.name,});const { createdIssue } = await experimentalCreateIssueByPlan(diff --git a/frontend/src/components/IssueV1/logic/plan-check.ts b/frontend/src/components/IssueV1/logic/plan-check.tsindex da505f1627..b3ecbc8360 100644--- a/frontend/src/components/IssueV1/logic/plan-check.ts+++ b/frontend/src/components/IssueV1/logic/plan-check.ts@@ -48,12 +48,10 @@ export const planCheckStatusForTask = (task: Task) => {};export const planCheckRunSummaryForIssue = (issue: ComposedIssue) => {- const sheets = issue.planEntity?.steps.reduce((acc, step) => {- step.specs.forEach((spec) => {- if (spec.changeDatabaseConfig?.sheet) {- acc.add(spec.changeDatabaseConfig?.sheet);- }- });+ const sheets = issue.planEntity?.specs.reduce((acc, spec) => {+ if (spec.changeDatabaseConfig?.sheet) {+ acc.add(spec.changeDatabaseConfig.sheet);+ }return acc;}, new Set<string>());const planCheckRunList = issue.planCheckRunList.filter((check) => {diff --git a/frontend/src/components/Plan/logic/plan.ts b/frontend/src/components/Plan/logic/plan.tsindex de788b7ae2..8060e288b6 100644--- a/frontend/src/components/Plan/logic/plan.ts+++ b/frontend/src/components/Plan/logic/plan.ts@@ -96,10 +96,7 @@ export const isGroupingChangeSpec = (spec?: Plan_Spec) => {export const targetsForSpec = (spec: Plan_Spec): string[] => {const config = spec.changeDatabaseConfig || spec.exportDataConfig;if (config) {- if (config.targets && config.targets.length > 0) {- return config.targets;- }- return [config.target];+ return config.targets || [];}return [];};diff --git a/frontend/src/types/proto/v1/plan_service.ts b/frontend/src/types/proto/v1/plan_service.tsindex 35bca2725a..fb2e429ae0 100644--- a/frontend/src/types/proto/v1/plan_service.ts+++ b/frontend/src/types/proto/v1/plan_service.ts@@ -144,8 +144,6 @@ export interface Plan {issue: string;title: string;description: string;- /** Deprecated: use specs instead. */- steps: Plan_Step[];specs: Plan_Spec[];/** Format: users/[email protected] */creator: string;@@ -211,13 +209,6 @@ export interface Plan_CreateDatabaseConfig {}export interface Plan_ChangeDatabaseConfig {- /**- * The resource name of the target.- * Format: instances/{instance-id}/databases/{database-name}.- * Format: projects/{project}/databaseGroups/{databaseGroup}.- * Deprecated: use targets instead.- */- target: string;/*** The list of targets.* Multi-database format: [instances/{instance-id}/databases/{database-name}].@@ -328,12 +319,6 @@ export interface Plan_ChangeDatabaseConfig_PreUpdateBackupDetail {}export interface Plan_ExportDataConfig {- /**- * The resource name of the target.- * Format: instances/{instance-id}/databases/{database-name}- * Deprecated: use targets instead.- */- target: string;/*** The list of targets.* Multi-database format: [instances/{instance-id}/databases/{database-name}].@@ -1201,7 +1186,6 @@ function createBasePlan(): Plan {issue: "",title: "",description: "",- steps: [],specs: [],creator: "",createTime: undefined,@@ -1225,9 +1209,6 @@ export const Plan: MessageFns<Plan> = {if (message.description !== "") {writer.uint32(42).string(message.description);}- for (const v of message.steps) {- Plan_Step.encode(v!, writer.uint32(50).fork()).join();- }for (const v of message.specs) {Plan_Spec.encode(v!, writer.uint32(114).fork()).join();}@@ -1288,14 +1269,6 @@ export const Plan: MessageFns<Plan> = {message.description = reader.string();continue;}- case 6: {- if (tag !== 50) {- break;- }-- message.steps.push(Plan_Step.decode(reader, reader.uint32()));- continue;- }case 14: {if (tag !== 114) {break;@@ -1370,9 +1343,6 @@ export const Plan: MessageFns<Plan> = {if (message.description !== "") {obj.description = message.description;}- if (message.steps?.length) {- obj.steps = message.steps.map((e) => Plan_Step.toJSON(e));- }if (message.specs?.length) {obj.specs = message.specs.map((e) => Plan_Spec.toJSON(e));}@@ -1409,7 +1379,6 @@ export const Plan: MessageFns<Plan> = {message.issue = object.issue ?? "";message.title = object.title ?? "";message.description = object.description ?? "";- message.steps = object.steps?.map((e) => Plan_Step.fromPartial(e)) || [];message.specs = object.specs?.map((e) => Plan_Spec.fromPartial(e)) || [];message.creator = object.creator ?? "";message.createTime = (object.createTime !== undefined && object.createTime !== null)@@ -1846,7 +1815,6 @@ export const Plan_CreateDatabaseConfig: MessageFns<Plan_CreateDatabaseConfig> =function createBasePlan_ChangeDatabaseConfig(): Plan_ChangeDatabaseConfig {return {- target: "",targets: [],sheet: "",release: "",@@ -1858,9 +1826,6 @@ function createBasePlan_ChangeDatabaseConfig(): Plan_ChangeDatabaseConfig {export const Plan_ChangeDatabaseConfig: MessageFns<Plan_ChangeDatabaseConfig> = {encode(message: Plan_ChangeDatabaseConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.target !== "") {- writer.uint32(10).string(message.target);- }for (const v of message.targets) {writer.uint32(82).string(v!);}@@ -1890,14 +1855,6 @@ export const Plan_ChangeDatabaseConfig: MessageFns<Plan_ChangeDatabaseConfig> =while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.target = reader.string();- continue;- }case 10: {if (tag !== 82) {break;@@ -1963,9 +1920,6 @@ export const Plan_ChangeDatabaseConfig: MessageFns<Plan_ChangeDatabaseConfig> =toJSON(message: Plan_ChangeDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }if (message.targets?.length) {obj.targets = message.targets;}@@ -1998,7 +1952,6 @@ export const Plan_ChangeDatabaseConfig: MessageFns<Plan_ChangeDatabaseConfig> =},fromPartial(object: DeepPartial<Plan_ChangeDatabaseConfig>): Plan_ChangeDatabaseConfig {const message = createBasePlan_ChangeDatabaseConfig();- message.target = object.target ?? "";message.targets = object.targets?.map((e) => e) || [];message.sheet = object.sheet ?? "";message.release = object.release ?? "";@@ -2155,14 +2108,11 @@ export const Plan_ChangeDatabaseConfig_PreUpdateBackupDetail: MessageFns<};function createBasePlan_ExportDataConfig(): Plan_ExportDataConfig {- return { target: "", targets: [], sheet: "", format: ExportFormat.FORMAT_UNSPECIFIED, password: undefined };+ return { targets: [], sheet: "", format: ExportFormat.FORMAT_UNSPECIFIED, password: undefined };}export const Plan_ExportDataConfig: MessageFns<Plan_ExportDataConfig> = {encode(message: Plan_ExportDataConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.target !== "") {- writer.uint32(10).string(message.target);- }for (const v of message.targets) {writer.uint32(42).string(v!);}@@ -2185,14 +2135,6 @@ export const Plan_ExportDataConfig: MessageFns<Plan_ExportDataConfig> = {while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.target = reader.string();- continue;- }case 5: {if (tag !== 42) {break;@@ -2236,9 +2178,6 @@ export const Plan_ExportDataConfig: MessageFns<Plan_ExportDataConfig> = {toJSON(message: Plan_ExportDataConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }if (message.targets?.length) {obj.targets = message.targets;}@@ -2259,7 +2198,6 @@ export const Plan_ExportDataConfig: MessageFns<Plan_ExportDataConfig> = {},fromPartial(object: DeepPartial<Plan_ExportDataConfig>): Plan_ExportDataConfig {const message = createBasePlan_ExportDataConfig();- message.target = object.target ?? "";message.targets = object.targets?.map((e) => e) || [];message.sheet = object.sheet ?? "";message.format = object.format ?? ExportFormat.FORMAT_UNSPECIFIED;diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 2038b012ef..2bfdbbac88 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -11088,11 +11088,6 @@ components:type: stringdescription:type: string- steps:- type: array- items:- $ref: '#/components/schemas/Plan_Step'- description: 'Deprecated: use specs instead.'specs:type: arrayitems:@@ -11190,13 +11185,6 @@ components:Plan_ChangeDatabaseConfig:type: objectproperties:- target:- type: string- description: |-- The resource name of the target.- Format: instances/{instance-id}/databases/{database-name}.- Format: projects/{project}/databaseGroups/{databaseGroup}.- Deprecated: use targets instead.targets:type: arrayitems:@@ -11284,12 +11272,6 @@ components:Plan_ExportDataConfig:type: objectproperties:- target:- type: string- description: |-- The resource name of the target.- Format: instances/{instance-id}/databases/{database-name}- Deprecated: use targets instead.targets:type: arrayitems:@@ -11330,15 +11312,6 @@ components:$ref: '#/components/schemas/Plan_ChangeDatabaseConfig'exportDataConfig:$ref: '#/components/schemas/Plan_ExportDataConfig'- Plan_Step:- type: object- properties:- title:- type: string- specs:- type: array- items:- $ref: '#/components/schemas/Plan_Spec'Policy:type: objectproperties:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 3f82916405..8f2ee33cf9 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -3071,7 +3071,6 @@ InstanceRole is the API message for instance role.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| target | [string](#string) | | The resource name of the target. Format: instances/{instance-id}/databases/{database-name} Deprecated: Use `targets` instead. || 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-store-ExportFormat) | | The format of the exported file. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 7bc8f66c4c..29eae78f5e 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -8557,15 +8557,6 @@ Format: environments/prod where prod is the environment resource ID. </p></td></thead><tbody>- <tr>- <td>target</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the target.-Format: instances/{instance-id}/databases/{database-name}-Deprecated: Use `targets` instead. </p></td>- </tr>-<tr><td>targets</td><td><a href="#string">string</a></td>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 278229ecaa..e56f04e16b 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -7307,7 +7307,6 @@ When paginating, all other parameters provided to `ListPlans` must match the cal| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} || title | [string](#string) | | || description | [string](#string) | | |-| steps | [Plan.Step](#bytebase-v1-Plan-Step) | repeated | Deprecated: use specs instead. || specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | || creator | [string](#string) | | Format: users/[email protected] || create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |@@ -7328,7 +7327,6 @@ When paginating, all other parameters provided to `ListPlans` must match the cal| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| target | [string](#string) | | The resource name of the target. Format: instances/{instance-id}/databases/{database-name}. Format: projects/{project}/databaseGroups/{databaseGroup}. Deprecated: use targets instead. || 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} |@@ -7434,7 +7432,6 @@ When paginating, all other parameters provided to `ListPlans` must match the cal| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| target | [string](#string) | | The resource name of the target. Format: instances/{instance-id}/databases/{database-name} Deprecated: use targets instead. || 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. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 54fcc83b9d..a50faead53 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -20380,13 +20380,6 @@ Format: projects/{project}/issues/{issue} </p></td><td><p> </p></td></tr>- <tr>- <td>steps</td>- <td><a href="#bytebase.v1.Plan.Step">Plan.Step</a></td>- <td>repeated</td>- <td><p>Deprecated: use specs instead. </p></td>- </tr>-<tr><td>specs</td><td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>@@ -20450,16 +20443,6 @@ Keys are:</thead><tbody>- <tr>- <td>target</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the target.-Format: instances/{instance-id}/databases/{database-name}.-Format: projects/{project}/databaseGroups/{databaseGroup}.-Deprecated: use targets instead. </p></td>- </tr>-<tr><td>targets</td><td><a href="#string">string</a></td>@@ -20717,15 +20700,6 @@ Format: environments/prod where prod is the environment resource ID. </p></td></thead><tbody>- <tr>- <td>target</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The resource name of the target.-Format: instances/{instance-id}/databases/{database-name}-Deprecated: use targets instead. </p></td>- </tr>-<tr><td>targets</td><td><a href="#string">string</a></td>diff --git a/proto/generated-go/store/plan.pb.go b/proto/generated-go/store/plan.pb.goindex a7f2e8a911..648b25af3a 100644--- a/proto/generated-go/store/plan.pb.go+++ b/proto/generated-go/store/plan.pb.go@@ -446,10 +446,6 @@ func (x *PlanConfig_ChangeDatabaseConfig) GetPreUpdateBackupDetail() *PreUpdateBtype PlanConfig_ExportDataConfig struct {state protoimpl.MessageState `protogen:"open.v1"`- // The resource name of the target.- // Format: instances/{instance-id}/databases/{database-name}- // Deprecated: Use `targets` instead.- Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`// The list of targets.// Multi-database format: [instances/{instance-id}/databases/{database-name}].// Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].@@ -496,13 +492,6 @@ func (*PlanConfig_ExportDataConfig) Descriptor() ([]byte, []int) {return file_store_plan_proto_rawDescGZIP(), []int{0, 3}}-func (x *PlanConfig_ExportDataConfig) GetTarget() string {- if x != nil {- return x.Target- }- return ""-}-func (x *PlanConfig_ExportDataConfig) GetTargets() []string {if x != nil {return x.Targets@@ -643,7 +632,7 @@ var File_store_plan_proto protoreflect.FileDescriptorconst file_store_plan_proto_rawDesc = "" +"\n" +- "\x10store/plan.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x12store/common.proto\x1a\x1astore/plan_check_run.proto\"\xf2\r\n" ++ "\x10store/plan.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x12store/common.proto\x1a\x1astore/plan_check_run.proto\"\xda\r\n" +"\n" +"PlanConfig\x125\n" +"\x05specs\x18\x01 \x03(\v2\x1f.bytebase.store.PlanConfig.SpecR\x05specs\x12E\n" +@@ -683,9 +672,8 @@ const file_store_plan_proto_rawDesc = "" +"\vMIGRATE_SDL\x10\x03\x12\x11\n" +"\rMIGRATE_GHOST\x10\x04\x12\b\n" +"\x04DATA\x10\x06B\x1b\n" +- "\x19_pre_update_backup_detail\x1a\xbe\x01\n" +- "\x10ExportDataConfig\x12\x16\n" +- "\x06target\x18\x01 \x01(\tR\x06target\x12\x18\n" ++ "\x19_pre_update_backup_detail\x1a\xa6\x01\n" ++ "\x10ExportDataConfig\x12\x18\n" +"\atargets\x18\x05 \x03(\tR\atargets\x12\x14\n" +"\x05sheet\x18\x02 \x01(\tR\x05sheet\x124\n" +"\x06format\x18\x03 \x01(\x0e2\x1c.bytebase.store.ExportFormatR\x06format\x12\x1f\n" +diff --git a/proto/generated-go/v1/plan_service.pb.go b/proto/generated-go/v1/plan_service.pb.goindex a0ee799a07..b655335484 100644--- a/proto/generated-go/v1/plan_service.pb.go+++ b/proto/generated-go/v1/plan_service.pb.go@@ -690,12 +690,10 @@ type Plan struct {// The issue associated with the plan.// Can be empty.// Format: projects/{project}/issues/{issue}- Issue string `protobuf:"bytes,3,opt,name=issue,proto3" json:"issue,omitempty"`- Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`- Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`- // Deprecated: use specs instead.- Steps []*Plan_Step `protobuf:"bytes,6,rep,name=steps,proto3" json:"steps,omitempty"`- Specs []*Plan_Spec `protobuf:"bytes,14,rep,name=specs,proto3" json:"specs,omitempty"`+ Issue string `protobuf:"bytes,3,opt,name=issue,proto3" json:"issue,omitempty"`+ Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`+ Specs []*Plan_Spec `protobuf:"bytes,14,rep,name=specs,proto3" json:"specs,omitempty"`// Format: users/[email protected]Creator string `protobuf:"bytes,8,opt,name=creator,proto3" json:"creator,omitempty"`CreateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`@@ -769,13 +767,6 @@ func (x *Plan) GetDescription() string {return ""}-func (x *Plan) GetSteps() []*Plan_Step {- if x != nil {- return x.Steps- }- return nil-}-func (x *Plan) GetSpecs() []*Plan_Spec {if x != nil {return x.Specs@@ -1506,11 +1497,6 @@ func (x *Plan_CreateDatabaseConfig) GetEnvironment() string {type Plan_ChangeDatabaseConfig struct {state protoimpl.MessageState `protogen:"open.v1"`- // The resource name of the target.- // Format: instances/{instance-id}/databases/{database-name}.- // Format: projects/{project}/databaseGroups/{databaseGroup}.- // Deprecated: use targets instead.- Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`// The list of targets.// Multi-database format: [instances/{instance-id}/databases/{database-name}].// Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].@@ -1559,13 +1545,6 @@ func (*Plan_ChangeDatabaseConfig) Descriptor() ([]byte, []int) {return file_v1_plan_service_proto_rawDescGZIP(), []int{7, 4}}-func (x *Plan_ChangeDatabaseConfig) GetTarget() string {- if x != nil {- return x.Target- }- return ""-}-func (x *Plan_ChangeDatabaseConfig) GetTargets() []string {if x != nil {return x.Targets@@ -1610,10 +1589,6 @@ func (x *Plan_ChangeDatabaseConfig) GetPreUpdateBackupDetail() *Plan_ChangeDatabtype Plan_ExportDataConfig struct {state protoimpl.MessageState `protogen:"open.v1"`- // The resource name of the target.- // Format: instances/{instance-id}/databases/{database-name}- // Deprecated: use targets instead.- Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`// The list of targets.// Multi-database format: [instances/{instance-id}/databases/{database-name}].// Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].@@ -1660,13 +1635,6 @@ func (*Plan_ExportDataConfig) Descriptor() ([]byte, []int) {return file_v1_plan_service_proto_rawDescGZIP(), []int{7, 5}}-func (x *Plan_ExportDataConfig) GetTarget() string {- if x != nil {- return x.Target- }- return ""-}-func (x *Plan_ExportDataConfig) GetTargets() []string {if x != nil {return x.Targets@@ -2127,13 +2095,12 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x11UpdatePlanRequest\x12+\n" +"\x04plan\x18\x01 \x01(\v2\x11.bytebase.v1.PlanB\x04\xe2A\x01\x02R\x04plan\x12A\n" +"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x04\xe2A\x01\x02R\n" +- "updateMask\"\xad\x13\n" ++ "updateMask\"\xcf\x12\n" +"\x04Plan\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +"\x05issue\x18\x03 \x01(\tR\x05issue\x12\x14\n" +"\x05title\x18\x04 \x01(\tR\x05title\x12 \n" +"\vdescription\x18\x05 \x01(\tR\vdescription\x12,\n" +- "\x05steps\x18\x06 \x03(\v2\x16.bytebase.v1.Plan.StepR\x05steps\x12,\n" +"\x05specs\x18\x0e \x03(\v2\x16.bytebase.v1.Plan.SpecR\x05specs\x12\x1e\n" +"\acreator\x18\b \x01(\tB\x04\xe2A\x01\x03R\acreator\x12A\n" +"\vcreate_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\n" +@@ -2165,9 +2132,8 @@ const file_v1_plan_service_proto_rawDesc = "" +"\tcollation\x18\x05 \x01(\tB\x04\xe2A\x01\x01R\tcollation\x12\x1e\n" +"\acluster\x18\x06 \x01(\tB\x04\xe2A\x01\x01R\acluster\x12\x1a\n" +"\x05owner\x18\a \x01(\tB\x04\xe2A\x01\x01R\x05owner\x12&\n" +- "\venvironment\x18\t \x01(\tB\x04\xe2A\x01\x01R\venvironment\x1a\x9f\x05\n" +- "\x14ChangeDatabaseConfig\x12\x16\n" +- "\x06target\x18\x01 \x01(\tR\x06target\x12\x18\n" ++ "\venvironment\x18\t \x01(\tB\x04\xe2A\x01\x01R\venvironment\x1a\x87\x05\n" ++ "\x14ChangeDatabaseConfig\x12\x18\n" +"\atargets\x18\n" +" \x03(\tR\atargets\x12\x14\n" +"\x05sheet\x18\x02 \x01(\tR\x05sheet\x123\n" +@@ -2188,9 +2154,8 @@ const file_v1_plan_service_proto_rawDesc = "" +"\vMIGRATE_SDL\x10\x03\x12\x11\n" +"\rMIGRATE_GHOST\x10\x04\x12\b\n" +"\x04DATA\x10\x06B\x1b\n" +- "\x19_pre_update_backup_detailJ\x04\b\x05\x10\x06J\x04\b\x06\x10\a\x1a\xbb\x01\n" +- "\x10ExportDataConfig\x12\x16\n" +- "\x06target\x18\x01 \x01(\tR\x06target\x12\x18\n" ++ "\x19_pre_update_backup_detailJ\x04\b\x05\x10\x06J\x04\b\x06\x10\a\x1a\xa3\x01\n" ++ "\x10ExportDataConfig\x12\x18\n" +"\atargets\x18\x05 \x03(\tR\atargets\x12\x14\n" +"\x05sheet\x18\x02 \x01(\tR\x05sheet\x121\n" +"\x06format\x18\x03 \x01(\x0e2\x19.bytebase.v1.ExportFormatR\x06format\x12\x1f\n" +@@ -2342,53 +2307,52 @@ var file_v1_plan_service_proto_depIdxs = []int32{11, // 2: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan11, // 3: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan32, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask- 19, // 5: bytebase.v1.Plan.steps:type_name -> bytebase.v1.Plan.Step- 20, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec- 33, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp- 33, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp- 21, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry- 25, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment- 18, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun- 1, // 12: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type- 2, // 13: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status- 29, // 14: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result- 33, // 15: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp- 20, // 16: bytebase.v1.Plan.Step.specs:type_name -> bytebase.v1.Plan.Spec- 22, // 17: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig- 23, // 18: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig- 24, // 19: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig- 0, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.Type- 26, // 21: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry- 27, // 22: bytebase.v1.Plan.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.PreUpdateBackupDetail- 34, // 23: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat- 28, // 24: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping- 3, // 25: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status- 30, // 26: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- 31, // 27: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport- 35, // 28: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources- 36, // 29: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position- 36, // 30: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position- 4, // 31: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest- 5, // 32: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest- 7, // 33: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest- 9, // 34: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest- 10, // 35: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest- 12, // 36: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest- 14, // 37: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest- 16, // 38: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest- 11, // 39: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan- 6, // 40: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse- 8, // 41: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse- 11, // 42: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan- 11, // 43: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan- 13, // 44: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse- 15, // 45: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse- 17, // 46: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse- 39, // [39:47] is the sub-list for method output_type- 31, // [31:39] is the sub-list for method input_type- 31, // [31:31] is the sub-list for extension type_name- 31, // [31:31] is the sub-list for extension extendee- 0, // [0:31] is the sub-list for field type_name+ 20, // 5: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec+ 33, // 6: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp+ 33, // 7: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp+ 21, // 8: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry+ 25, // 9: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment+ 18, // 10: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun+ 1, // 11: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type+ 2, // 12: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status+ 29, // 13: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result+ 33, // 14: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp+ 20, // 15: bytebase.v1.Plan.Step.specs:type_name -> bytebase.v1.Plan.Spec+ 22, // 16: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig+ 23, // 17: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig+ 24, // 18: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig+ 0, // 19: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.Type+ 26, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry+ 27, // 21: bytebase.v1.Plan.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.PreUpdateBackupDetail+ 34, // 22: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat+ 28, // 23: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping+ 3, // 24: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status+ 30, // 25: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ 31, // 26: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ 35, // 27: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources+ 36, // 28: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position+ 36, // 29: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position+ 4, // 30: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest+ 5, // 31: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest+ 7, // 32: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest+ 9, // 33: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest+ 10, // 34: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest+ 12, // 35: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest+ 14, // 36: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest+ 16, // 37: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest+ 11, // 38: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan+ 6, // 39: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse+ 8, // 40: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse+ 11, // 41: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan+ 11, // 42: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan+ 13, // 43: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse+ 15, // 44: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse+ 17, // 45: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse+ 38, // [38:46] is the sub-list for method output_type+ 30, // [30:38] is the sub-list for method input_type+ 30, // [30:30] is the sub-list for extension type_name+ 30, // [30:30] is the sub-list for extension extendee+ 0, // [0:30] is the sub-list for field type_name}func init() { file_v1_plan_service_proto_init() }diff --git a/proto/store/store/plan.proto b/proto/store/store/plan.protoindex e54eb496cc..2f694eeab3 100644--- a/proto/store/store/plan.proto+++ b/proto/store/store/plan.proto@@ -78,10 +78,6 @@ message PlanConfig {}message ExportDataConfig {- // The resource name of the target.- // Format: instances/{instance-id}/databases/{database-name}- // Deprecated: Use `targets` instead.- string target = 1;// The list of targets.// Multi-database format: [instances/{instance-id}/databases/{database-name}].// Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].diff --git a/proto/v1/v1/plan_service.proto b/proto/v1/v1/plan_service.protoindex d4925a9f80..5d0ee42f94 100644--- a/proto/v1/v1/plan_service.proto+++ b/proto/v1/v1/plan_service.proto@@ -220,9 +220,6 @@ message Plan {string title = 4;string description = 5;- // Deprecated: use specs instead.- repeated Step steps = 6;-repeated Spec specs = 14;message Step {@@ -282,11 +279,6 @@ message Plan {message ChangeDatabaseConfig {reserved 5, 6;- // The resource name of the target.- // Format: instances/{instance-id}/databases/{database-name}.- // Format: projects/{project}/databaseGroups/{databaseGroup}.- // Deprecated: use targets instead.- string target = 1;// The list of targets.// Multi-database format: [instances/{instance-id}/databases/{database-name}].// Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].@@ -325,10 +317,6 @@ message Plan {}message ExportDataConfig {- // The resource name of the target.- // Format: instances/{instance-id}/databases/{database-name}- // Deprecated: use targets instead.- string target = 1;// The list of targets.// Multi-database format: [instances/{instance-id}/databases/{database-name}].// Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].