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: rerun plan checks when update pre-backup detail (#13581)
boojackfc74b63554c8
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex 7dd5680c98..b0bc51eefc 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -336,7 +336,7 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanReUpdaterID: user.ID,}- var doUpdateSheet bool+ var planCheckRunsTrigger boolfor _, path := range request.UpdateMask.Paths {switch path {case "title":@@ -724,10 +724,14 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanRe}}+ var doUpdateSheet boolfor _, taskPatch := range taskPatchList {+ // If pre-backup detail has been updated, we need to rerun the plan check runs.+ if taskPatch.PreUpdateBackupDetail != nil {+ planCheckRunsTrigger = true+ }if taskPatch.SheetID != nil {doUpdateSheet = true- break}}@@ -745,6 +749,11 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanRe}}+ // If sheet is updated, we need to rerun the plan check runs.+ if doUpdateSheet {+ planCheckRunsTrigger = true+ }+// Check project setting for modify statement.if len(taskPatchList) > 0 && doUpdateSheet && !project.Setting.AllowModifyStatement {return nil, status.Errorf(codes.FailedPrecondition, "modify statement is not allowed for project %s", project.Title)@@ -804,7 +813,7 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanRereturn nil, status.Errorf(codes.NotFound, "updated plan %q not found", request.Plan.Name)}- if doUpdateSheet {+ if planCheckRunsTrigger {planCheckRuns, err := getPlanCheckRunsFromPlan(ctx, s.store, updatedPlan)if err != nil {return nil, status.Errorf(codes.Internal, "failed to get plan check runs for plan, error: %v", err)diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.goindex 99f723aef8..642745e884 100644--- a/backend/api/v1/rollout_service_converter.go+++ b/backend/api/v1/rollout_service_converter.go@@ -235,9 +235,9 @@ func convertPlanConfigCreateDatabaseConfig(c *v1pb.Plan_CreateDatabaseConfig) *sfunc convertPlanSpecChangeDatabaseConfig(config *v1pb.Plan_Spec_ChangeDatabaseConfig) *storepb.PlanConfig_Spec_ChangeDatabaseConfig {c := config.ChangeDatabaseConfig- var preUpdateBackupDetail *storepb.PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail+ var preUpdateBackupDetail *storepb.PreUpdateBackupDetailif c.PreUpdateBackupDetail != nil && c.GetPreUpdateBackupDetail().GetDatabase() != "" {- preUpdateBackupDetail = &storepb.PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail{+ preUpdateBackupDetail = &storepb.PreUpdateBackupDetail{Database: c.GetPreUpdateBackupDetail().GetDatabase(),}}diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.tsindex 4208bdc5b0..0f90c23a34 100644--- a/frontend/src/types/proto/store/plan.ts+++ b/frontend/src/types/proto/store/plan.ts@@ -12,6 +12,7 @@ import {vCSTypeToJSON,vCSTypeToNumber,} from "./common";+import { PreUpdateBackupDetail } from "./plan_check_run";export const protobufPackage = "bytebase.store";@@ -106,7 +107,7 @@ export interface PlanConfig_ChangeDatabaseConfig {schemaVersion: string;ghostFlags: { [key: string]: string };/** If set, a backup of the modified data will be created automatically before any changes are applied. */- preUpdateBackupDetail?: PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail | undefined;+ preUpdateBackupDetail?: PreUpdateBackupDetail | undefined;}/** Type is the database change type. */@@ -210,14 +211,6 @@ export interface PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry {value: string;}-export interface PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {- /**- * The database for keeping the backup data.- * Format: instances/{instance}/databases/{database}- */- database: string;-}-export interface PlanConfig_ExportDataConfig {/*** The resource name of the target.@@ -886,10 +879,7 @@ export const PlanConfig_ChangeDatabaseConfig = {.ldelim();});if (message.preUpdateBackupDetail !== undefined) {- PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.encode(- message.preUpdateBackupDetail,- writer.uint32(66).fork(),- ).ldelim();+ PreUpdateBackupDetail.encode(message.preUpdateBackupDetail, writer.uint32(66).fork()).ldelim();}return writer;},@@ -944,10 +934,7 @@ export const PlanConfig_ChangeDatabaseConfig = {break;}- message.preUpdateBackupDetail = PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.decode(- reader,- reader.uint32(),- );+ message.preUpdateBackupDetail = PreUpdateBackupDetail.decode(reader, reader.uint32());continue;}if ((tag & 7) === 4 || tag === 0) {@@ -973,7 +960,7 @@ export const PlanConfig_ChangeDatabaseConfig = {}, {}): {},preUpdateBackupDetail: isSet(object.preUpdateBackupDetail)- ? PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.fromJSON(object.preUpdateBackupDetail)+ ? PreUpdateBackupDetail.fromJSON(object.preUpdateBackupDetail): undefined,};},@@ -1002,9 +989,7 @@ export const PlanConfig_ChangeDatabaseConfig = {}}if (message.preUpdateBackupDetail !== undefined) {- obj.preUpdateBackupDetail = PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.toJSON(- message.preUpdateBackupDetail,- );+ obj.preUpdateBackupDetail = PreUpdateBackupDetail.toJSON(message.preUpdateBackupDetail);}return obj;},@@ -1029,7 +1014,7 @@ export const PlanConfig_ChangeDatabaseConfig = {);message.preUpdateBackupDetail =(object.preUpdateBackupDetail !== undefined && object.preUpdateBackupDetail !== null)- ? PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.fromPartial(object.preUpdateBackupDetail)+ ? PreUpdateBackupDetail.fromPartial(object.preUpdateBackupDetail): undefined;return message;},@@ -1116,70 +1101,6 @@ export const PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry = {},};-function createBasePlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail(): PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {- return { database: "" };-}--export const PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail = {- encode(- message: PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail,- writer: _m0.Writer = _m0.Writer.create(),- ): _m0.Writer {- if (message.database !== "") {- writer.uint32(10).string(message.database);- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBasePlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.database = reader.string();- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {- return { database: isSet(object.database) ? globalThis.String(object.database) : "" };- },-- toJSON(message: PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail): unknown {- const obj: any = {};- if (message.database !== "") {- obj.database = message.database;- }- return obj;- },-- create(- base?: DeepPartial<PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail>,- ): PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {- return PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.fromPartial(base ?? {});- },- fromPartial(- object: DeepPartial<PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail>,- ): PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {- const message = createBasePlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail();- message.database = object.database ?? "";- return message;- },-};-function createBasePlanConfig_ExportDataConfig(): PlanConfig_ExportDataConfig {return { target: "", sheet: "", format: ExportFormat.FORMAT_UNSPECIFIED, password: undefined };}diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex b27804b396..d858bbeafc 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -161,11 +161,22 @@- [IssueCommentPayload.IssueUpdate.IssueStatus](#bytebase-store-IssueCommentPayload-IssueUpdate-IssueStatus)- [IssueCommentPayload.TaskUpdate.Status](#bytebase-store-IssueCommentPayload-TaskUpdate-Status)+- [store/plan_check_run.proto](#store_plan_check_run-proto)+ - [PlanCheckRunConfig](#bytebase-store-PlanCheckRunConfig)+ - [PlanCheckRunConfig.GhostFlagsEntry](#bytebase-store-PlanCheckRunConfig-GhostFlagsEntry)+ - [PlanCheckRunResult](#bytebase-store-PlanCheckRunResult)+ - [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result)+ - [PlanCheckRunResult.Result.SqlReviewReport](#bytebase-store-PlanCheckRunResult-Result-SqlReviewReport)+ - [PlanCheckRunResult.Result.SqlSummaryReport](#bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport)+ - [PreUpdateBackupDetail](#bytebase-store-PreUpdateBackupDetail)++ - [PlanCheckRunConfig.ChangeDatabaseType](#bytebase-store-PlanCheckRunConfig-ChangeDatabaseType)+ - [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status)+- [store/plan.proto](#store_plan-proto)- [PlanConfig](#bytebase-store-PlanConfig)- [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig)- [PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry)- - [PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail](#bytebase-store-PlanConfig-ChangeDatabaseConfig-PreUpdateBackupDetail)- [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)- [PlanConfig.CreateDatabaseConfig.LabelsEntry](#bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry)- [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig)@@ -175,18 +186,6 @@- [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type)-- [store/plan_check_run.proto](#store_plan_check_run-proto)- - [PlanCheckRunConfig](#bytebase-store-PlanCheckRunConfig)- - [PlanCheckRunConfig.GhostFlagsEntry](#bytebase-store-PlanCheckRunConfig-GhostFlagsEntry)- - [PlanCheckRunResult](#bytebase-store-PlanCheckRunResult)- - [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result)- - [PlanCheckRunResult.Result.SqlReviewReport](#bytebase-store-PlanCheckRunResult-Result-SqlReviewReport)- - [PlanCheckRunResult.Result.SqlSummaryReport](#bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport)- - [PreUpdateBackupDetail](#bytebase-store-PreUpdateBackupDetail)-- - [PlanCheckRunConfig.ChangeDatabaseType](#bytebase-store-PlanCheckRunConfig-ChangeDatabaseType)- - [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status)-- [store/policy.proto](#store_policy-proto)- [Binding](#bytebase-store-Binding)- [DataSourceQueryPolicy](#bytebase-store-DataSourceQueryPolicy)@@ -2618,52 +2617,37 @@ InstanceRole is the API message for instance role.-<a name="store_plan-proto"></a>+<a name="store_plan_check_run-proto"></a><p align="right"><a href="#top">Top</a></p>-## store/plan.proto----<a name="bytebase-store-PlanConfig"></a>--### PlanConfig----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| steps | [PlanConfig.Step](#bytebase-store-PlanConfig-Step) | repeated | |-| vcs_source | [PlanConfig.VCSSource](#bytebase-store-PlanConfig-VCSSource) | | |---+## store/plan_check_run.proto-<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig"></a>+<a name="bytebase-store-PlanCheckRunConfig"></a>-### PlanConfig.ChangeDatabaseConfig+### PlanCheckRunConfig| 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}. |-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |-| type | [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type) | | |-| schema_version | [string](#string) | | schema_version is parsed from VCS file name. It is automatically generated in the UI workflow. |-| ghost_flags | [PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | |-| pre_update_backup_detail | [PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail](#bytebase-store-PlanConfig-ChangeDatabaseConfig-PreUpdateBackupDetail) | optional | If set, a backup of the modified data will be created automatically before any changes are applied. |+| sheet_uid | [int32](#int32) | | |+| change_database_type | [PlanCheckRunConfig.ChangeDatabaseType](#bytebase-store-PlanCheckRunConfig-ChangeDatabaseType) | | |+| instance_uid | [int32](#int32) | | |+| database_name | [string](#string) | | |+| database_group_uid | [int64](#int64) | optional | **Deprecated.** |+| ghost_flags | [PlanCheckRunConfig.GhostFlagsEntry](#bytebase-store-PlanCheckRunConfig-GhostFlagsEntry) | repeated | |+| pre_update_backup_detail | [PreUpdateBackupDetail](#bytebase-store-PreUpdateBackupDetail) | optional | If set, a backup of the modified data will be created automatically before any changes are applied. |-<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry"></a>+<a name="bytebase-store-PlanCheckRunConfig-GhostFlagsEntry"></a>-### PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry+### PlanCheckRunConfig.GhostFlagsEntry@@ -2677,179 +2661,170 @@ InstanceRole is the API message for instance role.-<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-PreUpdateBackupDetail"></a>+<a name="bytebase-store-PlanCheckRunResult"></a>-### PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail+### PlanCheckRunResult| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database | [string](#string) | | The database for keeping the backup data. Format: instances/{instance}/databases/{database} |+| results | [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result) | repeated | |+| error | [string](#string) | | |-<a name="bytebase-store-PlanConfig-CreateDatabaseConfig"></a>+<a name="bytebase-store-PlanCheckRunResult-Result"></a>-### PlanConfig.CreateDatabaseConfig+### PlanCheckRunResult.Result| 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>>". |-| backup | [string](#string) | | backup is the resource name of the backup. Format: instances/{instance}/databases/{database}/backups/{backup-name} |-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |-| labels | [PlanConfig.CreateDatabaseConfig.LabelsEntry](#bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry) | repeated | labels of the database. |+| status | [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status) | | |+| title | [string](#string) | | |+| content | [string](#string) | | |+| code | [int32](#int32) | | |+| sql_summary_report | [PlanCheckRunResult.Result.SqlSummaryReport](#bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport) | | |+| sql_review_report | [PlanCheckRunResult.Result.SqlReviewReport](#bytebase-store-PlanCheckRunResult-Result-SqlReviewReport) | | |-<a name="bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry"></a>+<a name="bytebase-store-PlanCheckRunResult-Result-SqlReviewReport"></a>-### PlanConfig.CreateDatabaseConfig.LabelsEntry+### PlanCheckRunResult.Result.SqlReviewReport| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |+| line | [int32](#int32) | | |+| column | [int32](#int32) | | |+| detail | [string](#string) | | |+| code | [int32](#int32) | | Code from sql review. |+| start_position | [Position](#bytebase-store-Position) | | 1-based Position of the SQL statement. To supersede `line` and `column` above. |+| end_position | [Position](#bytebase-store-Position) | | |-<a name="bytebase-store-PlanConfig-ExportDataConfig"></a>+<a name="bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport"></a>-### PlanConfig.ExportDataConfig+### PlanCheckRunResult.Result.SqlSummaryReport| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| target | [string](#string) | | The resource name of the target. Format: instances/{instance-id}/databases/{database-name} |-| 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. |-| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |+| code | [int32](#int32) | | |+| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |+| affected_rows | [int32](#int32) | | |+| changed_resources | [ChangedResources](#bytebase-store-ChangedResources) | | |-<a name="bytebase-store-PlanConfig-Spec"></a>+<a name="bytebase-store-PreUpdateBackupDetail"></a>-### PlanConfig.Spec+### PreUpdateBackupDetail| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| earliest_allowed_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | earliest_allowed_time the earliest execution time of the change. |-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |-| depends_on_specs | [string](#string) | repeated | IDs of the specs that this spec depends on. Must be a subset of the specs in the same step. |-| create_database_config | [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig) | | |-| change_database_config | [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig) | | |-| export_data_config | [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig) | | |--+| database | [string](#string) | | The database for keeping the backup data. Format: instances/{instance}/databases/{database} |-<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 | |+<a name="bytebase-store-PlanCheckRunConfig-ChangeDatabaseType"></a>+### PlanCheckRunConfig.ChangeDatabaseType+| Name | Number | Description |+| ---- | ------ | ----------- |+| CHANGE_DATABASE_TYPE_UNSPECIFIED | 0 | |+| DDL | 1 | |+| DML | 2 | |+| SDL | 3 | |+| DDL_GHOST | 4 | |+| SQL_EDITOR | 5 | |-<a name="bytebase-store-PlanConfig-VCSSource"></a>+<a name="bytebase-store-PlanCheckRunResult-Result-Status"></a>-### PlanConfig.VCSSource+### PlanCheckRunResult.Result.Status+| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| ERROR | 1 | |+| WARNING | 2 | |+| SUCCESS | 3 | |-| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| vcs_type | [VCSType](#bytebase-store-VCSType) | | |-| vcs_connector | [string](#string) | | Optional. If present, we will update the pull request for rollout status. Format: projects/{project-ID}/vcsConnectors/{vcs-connector} |-| pull_request_url | [string](#string) | | |+++-+<a name="store_plan-proto"></a>+<p align="right"><a href="#top">Top</a></p>-<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-Type"></a>+## store/plan.proto-### PlanConfig.ChangeDatabaseConfig.Type-Type is the database change type.-| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| BASELINE | 1 | Used for establishing schema baseline, this is used when 1. Onboard the database into Bytebase since Bytebase needs to know the current database schema. 2. Had schema drift and need to re-establish the baseline. |-| MIGRATE | 2 | Used for DDL changes including CREATE DATABASE. |-| MIGRATE_SDL | 3 | Used for schema changes via state-based schema migration including CREATE DATABASE. |-| MIGRATE_GHOST | 4 | Used for DDL changes using gh-ost. |-| BRANCH | 5 | Used when restoring from a backup (the restored database branched from the original backup). |-| DATA | 6 | Used for DML change. |+<a name="bytebase-store-PlanConfig"></a>-+### PlanConfig--+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| steps | [PlanConfig.Step](#bytebase-store-PlanConfig-Step) | repeated | |+| vcs_source | [PlanConfig.VCSSource](#bytebase-store-PlanConfig-VCSSource) | | |-<a name="store_plan_check_run-proto"></a>-<p align="right"><a href="#top">Top</a></p>-## store/plan_check_run.proto-<a name="bytebase-store-PlanCheckRunConfig"></a>+<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig"></a>-### PlanCheckRunConfig+### PlanConfig.ChangeDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| sheet_uid | [int32](#int32) | | |-| change_database_type | [PlanCheckRunConfig.ChangeDatabaseType](#bytebase-store-PlanCheckRunConfig-ChangeDatabaseType) | | |-| instance_uid | [int32](#int32) | | |-| database_name | [string](#string) | | |-| database_group_uid | [int64](#int64) | optional | **Deprecated.** |-| ghost_flags | [PlanCheckRunConfig.GhostFlagsEntry](#bytebase-store-PlanCheckRunConfig-GhostFlagsEntry) | repeated | |+| target | [string](#string) | | The resource name of the target. Format: instances/{instance-id}/databases/{database-name}. Format: projects/{project}/databaseGroups/{databaseGroup}. |+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |+| type | [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type) | | |+| schema_version | [string](#string) | | schema_version is parsed from VCS file name. It is automatically generated in the UI workflow. |+| ghost_flags | [PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | || pre_update_backup_detail | [PreUpdateBackupDetail](#bytebase-store-PreUpdateBackupDetail) | optional | If set, a backup of the modified data will be created automatically before any changes are applied. |@@ -2857,9 +2832,9 @@ Type is the database change type.-<a name="bytebase-store-PlanCheckRunConfig-GhostFlagsEntry"></a>+<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry"></a>-### PlanCheckRunConfig.GhostFlagsEntry+### PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry@@ -2873,124 +2848,133 @@ Type is the database change type.-<a name="bytebase-store-PlanCheckRunResult"></a>+<a name="bytebase-store-PlanConfig-CreateDatabaseConfig"></a>-### PlanCheckRunResult+### PlanConfig.CreateDatabaseConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| results | [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result) | repeated | |-| error | [string](#string) | | |+| 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>>". |+| backup | [string](#string) | | backup is the resource name of the backup. Format: instances/{instance}/databases/{database}/backups/{backup-name} |+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |+| labels | [PlanConfig.CreateDatabaseConfig.LabelsEntry](#bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry) | repeated | labels of the database. |-<a name="bytebase-store-PlanCheckRunResult-Result"></a>+<a name="bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry"></a>-### PlanCheckRunResult.Result+### PlanConfig.CreateDatabaseConfig.LabelsEntry| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| status | [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status) | | |-| title | [string](#string) | | |-| content | [string](#string) | | |-| code | [int32](#int32) | | |-| sql_summary_report | [PlanCheckRunResult.Result.SqlSummaryReport](#bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport) | | |-| sql_review_report | [PlanCheckRunResult.Result.SqlReviewReport](#bytebase-store-PlanCheckRunResult-Result-SqlReviewReport) | | |+| key | [string](#string) | | |+| value | [string](#string) | | |-<a name="bytebase-store-PlanCheckRunResult-Result-SqlReviewReport"></a>+<a name="bytebase-store-PlanConfig-ExportDataConfig"></a>-### PlanCheckRunResult.Result.SqlReviewReport+### PlanConfig.ExportDataConfig| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| line | [int32](#int32) | | |-| column | [int32](#int32) | | |-| detail | [string](#string) | | |-| code | [int32](#int32) | | Code from sql review. |-| start_position | [Position](#bytebase-store-Position) | | 1-based Position of the SQL statement. To supersede `line` and `column` above. |-| end_position | [Position](#bytebase-store-Position) | | |+| target | [string](#string) | | The resource name of the target. Format: instances/{instance-id}/databases/{database-name} |+| 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. |+| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |-<a name="bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport"></a>+<a name="bytebase-store-PlanConfig-Spec"></a>-### PlanCheckRunResult.Result.SqlSummaryReport+### PlanConfig.Spec| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| code | [int32](#int32) | | |-| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |-| affected_rows | [int32](#int32) | | |-| changed_resources | [ChangedResources](#bytebase-store-ChangedResources) | | |+| earliest_allowed_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | earliest_allowed_time the earliest execution time of the change. |+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |+| depends_on_specs | [string](#string) | repeated | IDs of the specs that this spec depends on. Must be a subset of the specs in the same step. |+| create_database_config | [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig) | | |+| change_database_config | [PlanConfig.ChangeDatabaseConfig](#bytebase-store-PlanConfig-ChangeDatabaseConfig) | | |+| export_data_config | [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig) | | |-<a name="bytebase-store-PreUpdateBackupDetail"></a>+<a name="bytebase-store-PlanConfig-Step"></a>-### PreUpdateBackupDetail+### PlanConfig.Step| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| database | [string](#string) | | The database for keeping the backup data. Format: instances/{instance}/databases/{database} |+| title | [string](#string) | | Use the title if set. Use a generated title if empty. |+| specs | [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec) | repeated | |-+<a name="bytebase-store-PlanConfig-VCSSource"></a>-<a name="bytebase-store-PlanCheckRunConfig-ChangeDatabaseType"></a>+### PlanConfig.VCSSource-### PlanCheckRunConfig.ChangeDatabaseType-| Name | Number | Description |-| ---- | ------ | ----------- |-| CHANGE_DATABASE_TYPE_UNSPECIFIED | 0 | |-| DDL | 1 | |-| DML | 2 | |-| SDL | 3 | |-| DDL_GHOST | 4 | |-| SQL_EDITOR | 5 | |+| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| vcs_type | [VCSType](#bytebase-store-VCSType) | | |+| vcs_connector | [string](#string) | | Optional. If present, we will update the pull request for rollout status. Format: projects/{project-ID}/vcsConnectors/{vcs-connector} |+| pull_request_url | [string](#string) | | |-<a name="bytebase-store-PlanCheckRunResult-Result-Status"></a>-### PlanCheckRunResult.Result.Status++++<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-Type"></a>++### PlanConfig.ChangeDatabaseConfig.Type+Type is the database change type.| Name | Number | Description || ---- | ------ | ----------- |-| STATUS_UNSPECIFIED | 0 | |-| ERROR | 1 | |-| WARNING | 2 | |-| SUCCESS | 3 | |+| TYPE_UNSPECIFIED | 0 | |+| BASELINE | 1 | Used for establishing schema baseline, this is used when 1. Onboard the database into Bytebase since Bytebase needs to know the current database schema. 2. Had schema drift and need to re-establish the baseline. |+| MIGRATE | 2 | Used for DDL changes including CREATE DATABASE. |+| MIGRATE_SDL | 3 | Used for schema changes via state-based schema migration including CREATE DATABASE. |+| MIGRATE_GHOST | 4 | Used for DDL changes using gh-ost. |+| BRANCH | 5 | Used when restoring from a backup (the restored database branched from the original backup). |+| DATA | 6 | Used for DML change. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 07fa0fb513..e13e6adfc2 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -822,52 +822,44 @@<li>- <a href="#store%2fplan.proto">store/plan.proto</a>+ <a href="#store%2fplan_check_run.proto">store/plan_check_run.proto</a><ul><li>- <a href="#bytebase.store.PlanConfig"><span class="badge">M</span>PlanConfig</a>- </li>-- <li>- <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig</a>+ <a href="#bytebase.store.PlanCheckRunConfig"><span class="badge">M</span>PlanCheckRunConfig</a></li><li>- <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</a>+ <a href="#bytebase.store.PlanCheckRunConfig.GhostFlagsEntry"><span class="badge">M</span>PlanCheckRunConfig.GhostFlagsEntry</a></li><li>- <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail</a>+ <a href="#bytebase.store.PlanCheckRunResult"><span class="badge">M</span>PlanCheckRunResult</a></li><li>- <a href="#bytebase.store.PlanConfig.CreateDatabaseConfig"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig</a>+ <a href="#bytebase.store.PlanCheckRunResult.Result"><span class="badge">M</span>PlanCheckRunResult.Result</a></li><li>- <a href="#bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig.LabelsEntry</a>+ <a href="#bytebase.store.PlanCheckRunResult.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRunResult.Result.SqlReviewReport</a></li><li>- <a href="#bytebase.store.PlanConfig.ExportDataConfig"><span class="badge">M</span>PlanConfig.ExportDataConfig</a>+ <a href="#bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRunResult.Result.SqlSummaryReport</a></li><li>- <a href="#bytebase.store.PlanConfig.Spec"><span class="badge">M</span>PlanConfig.Spec</a>+ <a href="#bytebase.store.PreUpdateBackupDetail"><span class="badge">M</span>PreUpdateBackupDetail</a></li>- <li>- <a href="#bytebase.store.PlanConfig.Step"><span class="badge">M</span>PlanConfig.Step</a>- </li><li>- <a href="#bytebase.store.PlanConfig.VCSSource"><span class="badge">M</span>PlanConfig.VCSSource</a>+ <a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType"><span class="badge">E</span>PlanCheckRunConfig.ChangeDatabaseType</a></li>-<li>- <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type"><span class="badge">E</span>PlanConfig.ChangeDatabaseConfig.Type</a>+ <a href="#bytebase.store.PlanCheckRunResult.Result.Status"><span class="badge">E</span>PlanCheckRunResult.Result.Status</a></li>@@ -877,44 +869,48 @@<li>- <a href="#store%2fplan_check_run.proto">store/plan_check_run.proto</a>+ <a href="#store%2fplan.proto">store/plan.proto</a><ul><li>- <a href="#bytebase.store.PlanCheckRunConfig"><span class="badge">M</span>PlanCheckRunConfig</a>+ <a href="#bytebase.store.PlanConfig"><span class="badge">M</span>PlanConfig</a></li><li>- <a href="#bytebase.store.PlanCheckRunConfig.GhostFlagsEntry"><span class="badge">M</span>PlanCheckRunConfig.GhostFlagsEntry</a>+ <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig</a></li><li>- <a href="#bytebase.store.PlanCheckRunResult"><span class="badge">M</span>PlanCheckRunResult</a>+ <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry"><span class="badge">M</span>PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</a></li><li>- <a href="#bytebase.store.PlanCheckRunResult.Result"><span class="badge">M</span>PlanCheckRunResult.Result</a>+ <a href="#bytebase.store.PlanConfig.CreateDatabaseConfig"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig</a></li><li>- <a href="#bytebase.store.PlanCheckRunResult.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRunResult.Result.SqlReviewReport</a>+ <a href="#bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig.LabelsEntry</a></li><li>- <a href="#bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRunResult.Result.SqlSummaryReport</a>+ <a href="#bytebase.store.PlanConfig.ExportDataConfig"><span class="badge">M</span>PlanConfig.ExportDataConfig</a></li><li>- <a href="#bytebase.store.PreUpdateBackupDetail"><span class="badge">M</span>PreUpdateBackupDetail</a>+ <a href="#bytebase.store.PlanConfig.Spec"><span class="badge">M</span>PlanConfig.Spec</a></li>+ <li>+ <a href="#bytebase.store.PlanConfig.Step"><span class="badge">M</span>PlanConfig.Step</a>+ </li><li>- <a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType"><span class="badge">E</span>PlanCheckRunConfig.ChangeDatabaseType</a>+ <a href="#bytebase.store.PlanConfig.VCSSource"><span class="badge">M</span>PlanConfig.VCSSource</a></li>+<li>- <a href="#bytebase.store.PlanCheckRunResult.Result.Status"><span class="badge">E</span>PlanCheckRunResult.Result.Status</a>+ <a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type"><span class="badge">E</span>PlanConfig.ChangeDatabaseConfig.Type</a></li>@@ -6942,12 +6938,12 @@ Format: users/{userUID}. </p></td><div class="file-heading">- <h2 id="store/plan.proto">store/plan.proto</h2><a href="#title">Top</a>+ <h2 id="store/plan_check_run.proto">store/plan_check_run.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.store.PlanConfig">PlanConfig</h3>+ <h3 id="bytebase.store.PlanCheckRunConfig">PlanCheckRunConfig</h3><p></p>@@ -6958,78 +6954,50 @@ Format: users/{userUID}. </p></td><tbody><tr>- <td>steps</td>- <td><a href="#bytebase.store.PlanConfig.Step">PlanConfig.Step</a></td>- <td>repeated</td>+ <td>sheet_uid</td>+ <td><a href="#int32">int32</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>vcs_source</td>- <td><a href="#bytebase.store.PlanConfig.VCSSource">PlanConfig.VCSSource</a></td>+ <td>change_database_type</td>+ <td><a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</a></td><td></td><td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>target</td>- <td><a href="#string">string</a></td>+ <td>instance_uid</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The resource name of the target.-Format: instances/{instance-id}/databases/{database-name}.-Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>+ <td><p> </p></td></tr><tr>- <td>sheet</td>+ <td>database_name</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>type</td>- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</a></td>- <td></td><td><p> </p></td></tr><tr>- <td>schema_version</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>schema_version is parsed from VCS file name.-It is automatically generated in the UI workflow. </p></td>+ <td>database_group_uid</td>+ <td><a href="#int64">int64</a></td>+ <td>optional</td>+ <td><p><strong>Deprecated.</strong> </p></td></tr><tr><td>ghost_flags</td>- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</a></td>+ <td><a href="#bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</a></td><td>repeated</td><td><p> </p></td></tr><tr><td>pre_update_backup_detail</td>- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail">PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail</a></td>+ <td><a href="#bytebase.store.PreUpdateBackupDetail">PreUpdateBackupDetail</a></td><td>optional</td><td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td></tr>@@ -7038,10 +7006,31 @@ It is automatically generated in the UI workflow. </p></td></table>+++ <h4>Fields with deprecated option</h4>+ <table>+ <thead>+ <tr>+ <td>Name</td>+ <td>Option</td>+ </tr>+ </thead>+ <tbody>++ <tr>+ <td>database_group_uid</td>+ <td><p>true</p></td>+ </tr>++ </tbody>+ </table>++- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</h3>+ <h3 id="bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</h3><p></p>@@ -7072,7 +7061,7 @@ It is automatically generated in the UI workflow. </p></td>- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail">PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail</h3>+ <h3 id="bytebase.store.PlanCheckRunResult">PlanCheckRunResult</h3><p></p>@@ -7083,11 +7072,17 @@ It is automatically generated in the UI workflow. </p></td><tbody><tr>- <td>database</td>+ <td>results</td>+ <td><a href="#bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>error</td><td><a href="#string">string</a></td><td></td>- <td><p>The database for keeping the backup data.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p> </p></td></tr></tbody>@@ -7097,7 +7092,7 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</h3>+ <h3 id="bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</h3><p></p>@@ -7108,77 +7103,45 @@ Format: instances/{instance}/databases/{database} </p></td><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>status</td>+ <td><a href="#bytebase.store.PlanCheckRunResult.Result.Status">PlanCheckRunResult.Result.Status</a></td><td></td>- <td><p>character_set is the character set of the database. </p></td>+ <td><p> </p></td></tr><tr>- <td>collation</td>+ <td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>collation is the collation of the database. </p></td>+ <td><p> </p></td></tr><tr>- <td>cluster</td>+ <td>content</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>+ <td><p> </p></td></tr><tr>- <td>owner</td>- <td><a href="#string">string</a></td>+ <td>code</td>+ <td><a href="#int32">int32</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>backup</td>- <td><a href="#string">string</a></td>+ <td>sql_summary_report</td>+ <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</a></td><td></td>- <td><p>backup is the resource name of the backup.-Format: instances/{instance}/databases/{database}/backups/{backup-name} </p></td>+ <td><p> </p></td></tr><tr>- <td>environment</td>- <td><a href="#string">string</a></td>+ <td>sql_review_report</td>+ <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</a></td><td></td>- <td><p>The environment resource.-Format: environments/prod where prod is the environment resource ID. </p></td>- </tr>-- <tr>- <td>labels</td>- <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry">PlanConfig.CreateDatabaseConfig.LabelsEntry</a></td>- <td>repeated</td>- <td><p>labels of the database. </p></td>+ <td><p> </p></td></tr></tbody>@@ -7188,7 +7151,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry">PlanConfig.CreateDatabaseConfig.LabelsEntry</h3>+ <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</h3><p></p>@@ -7199,19 +7162,48 @@ Format: environments/prod where prod is the environment resource ID. </p></td><tbody><tr>- <td>key</td>- <td><a href="#string">string</a></td>+ <td>line</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr><tr>- <td>value</td>+ <td>column</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>detail</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>Code from sql review. </p></td>+ </tr>++ <tr>+ <td>start_position</td>+ <td><a href="#bytebase.store.Position">Position</a></td>+ <td></td>+ <td><p>1-based Position of the SQL statement.+To supersede `line` and `column` above. </p></td>+ </tr>++ <tr>+ <td>end_position</td>+ <td><a href="#bytebase.store.Position">Position</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>@@ -7219,7 +7211,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>- <h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3>+ <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</h3><p></p>@@ -7230,125 +7222,30 @@ Format: environments/prod where prod is the environment resource ID. </p></td><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} </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.store.ExportFormat">ExportFormat</a></td>- <td></td>- <td><p>The format of the exported file. </p></td>- </tr>-- <tr>- <td>password</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The zip password provide by users.-Leave it empty if no needs to encrypt the zip file. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.PlanConfig.Spec">PlanConfig.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>earliest_allowed_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>earliest_allowed_time the earliest execution time of the change. </p></td>- </tr>-- <tr>- <td>id</td>- <td><a href="#string">string</a></td>+ <td>code</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>+ <td><p> </p></td></tr><tr>- <td>depends_on_specs</td>+ <td>statement_types</td><td><a href="#string">string</a></td><td>repeated</td>- <td><p>IDs of the specs that this spec depends on.-Must be a subset of the specs in the same step. </p></td>- </tr>-- <tr>- <td>create_database_config</td>- <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</a></td>- <td></td>- <td><p> </p></td>+ <td><p>statement_types are the types of statements that are found in the sql. </p></td></tr><tr>- <td>change_database_config</td>- <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</a></td>+ <td>affected_rows</td>+ <td><a href="#int32">int32</a></td><td></td><td><p> </p></td></tr><tr>- <td>export_data_config</td>- <td><a href="#bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <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>changed_resources</td>+ <td><a href="#bytebase.store.ChangedResources">ChangedResources</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>@@ -7359,7 +7256,7 @@ Use a generated title if empty. </p></td>- <h3 id="bytebase.store.PlanConfig.VCSSource">PlanConfig.VCSSource</h3>+ <h3 id="bytebase.store.PreUpdateBackupDetail">PreUpdateBackupDetail</h3><p></p>@@ -7370,26 +7267,11 @@ Use a generated title if empty. </p></td><tbody><tr>- <td>vcs_type</td>- <td><a href="#bytebase.store.VCSType">VCSType</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>vcs_connector</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Optional.-If present, we will update the pull request for rollout status.-Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>- </tr>-- <tr>- <td>pull_request_url</td>+ <td>database</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The database for keeping the backup data.+Format: instances/{instance}/databases/{database} </p></td></tr></tbody>@@ -7401,8 +7283,8 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>- <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</h3>- <p>Type is the database change type.</p>+ <h3 id="bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</h3>+ <p></p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -7410,47 +7292,74 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>+ <td>CHANGE_DATABASE_TYPE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>BASELINE</td>+ <td>DDL</td><td>1</td>- <td><p>Used for establishing schema baseline, this is used when-1. Onboard the database into Bytebase since Bytebase needs to know the current database schema.-2. Had schema drift and need to re-establish the baseline.</p></td>+ <td><p></p></td></tr><tr>- <td>MIGRATE</td>+ <td>DML</td><td>2</td>- <td><p>Used for DDL changes including CREATE DATABASE.</p></td>+ <td><p></p></td></tr><tr>- <td>MIGRATE_SDL</td>+ <td>SDL</td><td>3</td>- <td><p>Used for schema changes via state-based schema migration including CREATE DATABASE.</p></td>+ <td><p></p></td></tr><tr>- <td>MIGRATE_GHOST</td>+ <td>DDL_GHOST</td><td>4</td>- <td><p>Used for DDL changes using gh-ost.</p></td>+ <td><p></p></td></tr><tr>- <td>BRANCH</td>+ <td>SQL_EDITOR</td><td>5</td>- <td><p>Used when restoring from a backup (the restored database branched from the original backup).</p></td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.PlanCheckRunResult.Result.Status">PlanCheckRunResult.Result.Status</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>STATUS_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td></tr><tr>- <td>DATA</td>- <td>6</td>- <td><p>Used for DML change.</p></td>+ <td>ERROR</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>WARNING</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SUCCESS</td>+ <td>3</td>+ <td><p></p></td></tr></tbody>@@ -7463,12 +7372,12 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td><div class="file-heading">- <h2 id="store/plan_check_run.proto">store/plan_check_run.proto</h2><a href="#title">Top</a>+ <h2 id="store/plan.proto">store/plan.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.store.PlanCheckRunConfig">PlanCheckRunConfig</h3>+ <h3 id="bytebase.store.PlanConfig">PlanConfig</h3><p></p>@@ -7479,43 +7388,71 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td><tbody><tr>- <td>sheet_uid</td>- <td><a href="#int32">int32</a></td>- <td></td>+ <td>steps</td>+ <td><a href="#bytebase.store.PlanConfig.Step">PlanConfig.Step</a></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>change_database_type</td>- <td><a href="#bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</a></td>+ <td>vcs_source</td>+ <td><a href="#bytebase.store.PlanConfig.VCSSource">PlanConfig.VCSSource</a></td><td></td><td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>instance_uid</td>- <td><a href="#int32">int32</a></td>+ <td>target</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The resource name of the target.+Format: instances/{instance-id}/databases/{database-name}.+Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td></tr><tr>- <td>database_name</td>+ <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>type</td>+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>database_group_uid</td>- <td><a href="#int64">int64</a></td>- <td>optional</td>- <td><p><strong>Deprecated.</strong> </p></td>+ <td>schema_version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>schema_version is parsed from VCS file name.+It is automatically generated in the UI workflow. </p></td></tr><tr><td>ghost_flags</td>- <td><a href="#bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</a></td>+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</a></td><td>repeated</td><td><p> </p></td></tr>@@ -7531,52 +7468,122 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td></table>--- <h4>Fields with deprecated option</h4>- <table>- <thead>++++ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry">PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry</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>++++++ <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.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>Name</td>- <td>Option</td>+ <td>collation</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>collation is the collation of the database. </p></td></tr>- </thead>- <tbody><tr>- <td>database_group_uid</td>- <td><p>true</p></td>+ <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>- </tbody>- </table>------ <h3 id="bytebase.store.PlanCheckRunConfig.GhostFlagsEntry">PlanCheckRunConfig.GhostFlagsEntry</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>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>key</td>+ <td>backup</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>backup is the resource name of the backup.+Format: instances/{instance}/databases/{database}/backups/{backup-name} </p></td></tr><tr>- <td>value</td>+ <td>environment</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The environment resource.+Format: environments/prod where prod is the environment resource ID. </p></td>+ </tr>++ <tr>+ <td>labels</td>+ <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry">PlanConfig.CreateDatabaseConfig.LabelsEntry</a></td>+ <td>repeated</td>+ <td><p>labels of the database. </p></td></tr></tbody>@@ -7586,7 +7593,7 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>- <h3 id="bytebase.store.PlanCheckRunResult">PlanCheckRunResult</h3>+ <h3 id="bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry">PlanConfig.CreateDatabaseConfig.LabelsEntry</h3><p></p>@@ -7597,14 +7604,14 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td><tbody><tr>- <td>results</td>- <td><a href="#bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</a></td>- <td>repeated</td>+ <td>key</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>error</td>+ <td>value</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -7617,7 +7624,7 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>- <h3 id="bytebase.store.PlanCheckRunResult.Result">PlanCheckRunResult.Result</h3>+ <h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3><p></p>@@ -7628,45 +7635,34 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td><tbody><tr>- <td>status</td>- <td><a href="#bytebase.store.PlanCheckRunResult.Result.Status">PlanCheckRunResult.Result.Status</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>title</td>+ <td>target</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The resource name of the target.+Format: instances/{instance-id}/databases/{database-name} </p></td></tr><tr>- <td>content</td>+ <td>sheet</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>+ <td><p>The resource name of the sheet.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>sql_summary_report</td>- <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</a></td>+ <td>format</td>+ <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td><td></td>- <td><p> </p></td>+ <td><p>The format of the exported file. </p></td></tr><tr>- <td>sql_review_report</td>- <td><a href="#bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</a></td>- <td></td>- <td><p> </p></td>+ <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>@@ -7676,7 +7672,7 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>- <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlReviewReport">PlanCheckRunResult.Result.SqlReviewReport</h3>+ <h3 id="bytebase.store.PlanConfig.Spec">PlanConfig.Spec</h3><p></p>@@ -7687,44 +7683,44 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td><tbody><tr>- <td>line</td>- <td><a href="#int32">int32</a></td>+ <td>earliest_allowed_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p> </p></td>+ <td><p>earliest_allowed_time the earliest execution time of the change. </p></td></tr><tr>- <td>column</td>- <td><a href="#int32">int32</a></td>+ <td>id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td></tr><tr>- <td>detail</td>+ <td>depends_on_specs</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>repeated</td>+ <td><p>IDs of the specs that this spec depends on.+Must be a subset of the specs in the same step. </p></td></tr><tr>- <td>code</td>- <td><a href="#int32">int32</a></td>+ <td>create_database_config</td>+ <td><a href="#bytebase.store.PlanConfig.CreateDatabaseConfig">PlanConfig.CreateDatabaseConfig</a></td><td></td>- <td><p>Code from sql review. </p></td>+ <td><p> </p></td></tr><tr>- <td>start_position</td>- <td><a href="#bytebase.store.Position">Position</a></td>+ <td>change_database_config</td>+ <td><a href="#bytebase.store.PlanConfig.ChangeDatabaseConfig">PlanConfig.ChangeDatabaseConfig</a></td><td></td>- <td><p>1-based Position of the SQL statement.-To supersede `line` and `column` above. </p></td>+ <td><p> </p></td></tr><tr>- <td>end_position</td>- <td><a href="#bytebase.store.Position">Position</a></td>+ <td>export_data_config</td>+ <td><a href="#bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</a></td><td></td><td><p> </p></td></tr>@@ -7736,7 +7732,7 @@ To supersede `line` and `column` above. </p></td>- <h3 id="bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport">PlanCheckRunResult.Result.SqlSummaryReport</h3>+ <h3 id="bytebase.store.PlanConfig.Step">PlanConfig.Step</h3><p></p>@@ -7747,30 +7743,17 @@ To supersede `line` and `column` above. </p></td><tbody><tr>- <td>code</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>statement_types</td>+ <td>title</td><td><a href="#string">string</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="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>Use the title if set.+Use a generated title if empty. </p></td></tr><tr>- <td>changed_resources</td>- <td><a href="#bytebase.store.ChangedResources">ChangedResources</a></td>- <td></td>+ <td>specs</td>+ <td><a href="#bytebase.store.PlanConfig.Spec">PlanConfig.Spec</a></td>+ <td>repeated</td><td><p> </p></td></tr>@@ -7781,7 +7764,7 @@ To supersede `line` and `column` above. </p></td>- <h3 id="bytebase.store.PreUpdateBackupDetail">PreUpdateBackupDetail</h3>+ <h3 id="bytebase.store.PlanConfig.VCSSource">PlanConfig.VCSSource</h3><p></p>@@ -7792,11 +7775,26 @@ To supersede `line` and `column` above. </p></td><tbody><tr>- <td>database</td>+ <td>vcs_type</td>+ <td><a href="#bytebase.store.VCSType">VCSType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>vcs_connector</td><td><a href="#string">string</a></td><td></td>- <td><p>The database for keeping the backup data.-Format: instances/{instance}/databases/{database} </p></td>+ <td><p>Optional.+If present, we will update the pull request for rollout status.+Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>+ </tr>++ <tr>+ <td>pull_request_url</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -7808,8 +7806,8 @@ Format: instances/{instance}/databases/{database} </p></td>- <h3 id="bytebase.store.PlanCheckRunConfig.ChangeDatabaseType">PlanCheckRunConfig.ChangeDatabaseType</h3>- <p></p>+ <h3 id="bytebase.store.PlanConfig.ChangeDatabaseConfig.Type">PlanConfig.ChangeDatabaseConfig.Type</h3>+ <p>Type is the database change type.</p><table class="enum-table"><thead><tr><td>Name</td><td>Number</td><td>Description</td></tr>@@ -7817,74 +7815,47 @@ Format: instances/{instance}/databases/{database} </p></td><tbody><tr>- <td>CHANGE_DATABASE_TYPE_UNSPECIFIED</td>+ <td>TYPE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>DDL</td>+ <td>BASELINE</td><td>1</td>- <td><p></p></td>+ <td><p>Used for establishing schema baseline, this is used when+1. Onboard the database into Bytebase since Bytebase needs to know the current database schema.+2. Had schema drift and need to re-establish the baseline.</p></td></tr><tr>- <td>DML</td>+ <td>MIGRATE</td><td>2</td>- <td><p></p></td>+ <td><p>Used for DDL changes including CREATE DATABASE.</p></td></tr><tr>- <td>SDL</td>+ <td>MIGRATE_SDL</td><td>3</td>- <td><p></p></td>+ <td><p>Used for schema changes via state-based schema migration including CREATE DATABASE.</p></td></tr><tr>- <td>DDL_GHOST</td>+ <td>MIGRATE_GHOST</td><td>4</td>- <td><p></p></td>+ <td><p>Used for DDL changes using gh-ost.</p></td></tr><tr>- <td>SQL_EDITOR</td>+ <td>BRANCH</td><td>5</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.PlanCheckRunResult.Result.Status">PlanCheckRunResult.Result.Status</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>STATUS_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ERROR</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>WARNING</td>- <td>2</td>- <td><p></p></td>+ <td><p>Used when restoring from a backup (the restored database branched from the original backup).</p></td></tr><tr>- <td>SUCCESS</td>- <td>3</td>- <td><p></p></td>+ <td>DATA</td>+ <td>6</td>+ <td><p>Used for DML change.</p></td></tr></tbody>diff --git a/proto/generated-go/store/plan.pb.go b/proto/generated-go/store/plan.pb.goindex 2aa148663b..1c2fe0e216 100644--- a/proto/generated-go/store/plan.pb.go+++ b/proto/generated-go/store/plan.pb.go@@ -478,7 +478,7 @@ type PlanConfig_ChangeDatabaseConfig struct {SchemaVersion string `protobuf:"bytes,4,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`GhostFlags map[string]string `protobuf:"bytes,7,rep,name=ghost_flags,json=ghostFlags,proto3" json:"ghost_flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`// If set, a backup of the modified data will be created automatically before any changes are applied.- PreUpdateBackupDetail *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail `protobuf:"bytes,8,opt,name=pre_update_backup_detail,json=preUpdateBackupDetail,proto3,oneof" json:"pre_update_backup_detail,omitempty"`+ PreUpdateBackupDetail *PreUpdateBackupDetail `protobuf:"bytes,8,opt,name=pre_update_backup_detail,json=preUpdateBackupDetail,proto3,oneof" json:"pre_update_backup_detail,omitempty"`}func (x *PlanConfig_ChangeDatabaseConfig) Reset() {@@ -548,7 +548,7 @@ func (x *PlanConfig_ChangeDatabaseConfig) GetGhostFlags() map[string]string {return nil}-func (x *PlanConfig_ChangeDatabaseConfig) GetPreUpdateBackupDetail() *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {+func (x *PlanConfig_ChangeDatabaseConfig) GetPreUpdateBackupDetail() *PreUpdateBackupDetail {if x != nil {return x.PreUpdateBackupDetail}@@ -699,55 +699,6 @@ func (x *PlanConfig_VCSSource) GetPullRequestUrl() string {return ""}-type PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The database for keeping the backup data.- // Format: instances/{instance}/databases/{database}- Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`-}--func (x *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail) Reset() {- *x = PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail{}- if protoimpl.UnsafeEnabled {- mi := &file_store_plan_proto_msgTypes[9]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail) ProtoMessage() {}--func (x *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail) ProtoReflect() protoreflect.Message {- mi := &file_store_plan_proto_msgTypes[9]- if protoimpl.UnsafeEnabled && 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_ChangeDatabaseConfig_PreUpdateBackupDetail.ProtoReflect.Descriptor instead.-func (*PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail) Descriptor() ([]byte, []int) {- return file_store_plan_proto_rawDescGZIP(), []int{0, 3, 1}-}--func (x *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail) GetDatabase() string {- if x != nil {- return x.Database- }- return ""-}-var File_store_plan_proto protoreflect.FileDescriptorvar file_store_plan_proto_rawDesc = []byte{@@ -758,144 +709,140 @@ var file_store_plan_proto_rawDesc = []byte{0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,- 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x10, 0x0a, 0x0a, 0x50, 0x6c, 0x61,- 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73,- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66,- 0x69, 0x67, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x43,- 0x0a, 0x0a, 0x76, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01,- 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,- 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56,- 0x43, 0x53, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x76, 0x63, 0x73, 0x53, 0x6f, 0x75,- 0x72, 0x63, 0x65, 0x1a, 0x53, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74,- 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,- 0x65, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,- 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,- 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x70, 0x65,- 0x63, 0x52, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x1a, 0xc9, 0x03, 0x0a, 0x04, 0x53, 0x70, 0x65,- 0x63, 0x12, 0x4e, 0x0a, 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c,- 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,- 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,- 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x65, 0x61,- 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x54, 0x69, 0x6d,- 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,- 0x64, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x5f,- 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70,- 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x63,- 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63,- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61,- 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14,- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f,- 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x16, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,- 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43,- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a,- 0x12, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e,- 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43,- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61,- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74,- 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f,- 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd9, 0x03, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a,- 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,- 0x41, 0x01, 0x02, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x64,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,- 0x41, 0x01, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a,- 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41,- 0x01, 0x01, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x0d, 0x63, 0x68, 0x61,- 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,- 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65,- 0x72, 0x53, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f,- 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x63,- 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73,- 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52,- 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65,- 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x6f,- 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x08,- 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b,- 0x75, 0x70, 0x12, 0x26, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e,- 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x0b, 0x65,- 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x06, 0x6c, 0x61,- 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e,- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74,- 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x61, 0x62, 0x65,- 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x06, 0x6c,- 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45,- 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,- 0x1a, 0xad, 0x05, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,- 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72,- 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,- 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,- 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f,+ 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x2e, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x10, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e,+ 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,+ 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53,+ 0x74, 0x65, 0x70, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x76, 0x63,+ 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,+ 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x43, 0x53, 0x53, 0x6f,+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x76, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a,+ 0x53, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x35, 0x0a,+ 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c,+ 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x73,+ 0x70, 0x65, 0x63, 0x73, 0x1a, 0xc9, 0x03, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4e, 0x0a,+ 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65,+ 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65,+ 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a,+ 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a,+ 0x10, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63,+ 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73,+ 0x4f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74,+ 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,+ 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e,+ 0x66, 0x69, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61,+ 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,+ 0x12, 0x67, 0x0a, 0x16, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,+ 0x32, 0x2f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,+ 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61,+ 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,+ 0x67, 0x48, 0x00, 0x52, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x12, 0x65, 0x78, 0x70,+ 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,+ 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,- 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,- 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73,- 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d,- 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0b, 0x67, 0x68, 0x6f, 0x73,- 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,- 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,- 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47,- 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a,- 0x67, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x18, 0x70,- 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70,- 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,- 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,- 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50,- 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65,- 0x74, 0x61, 0x69, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x70, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01,- 0x1a, 0x3d, 0x0a, 0x0f, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e,- 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,- 0x33, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b,- 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x22, 0x71, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10,- 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,- 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x41, 0x53, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01,- 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a,- 0x0b, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x44, 0x4c, 0x10, 0x03, 0x12, 0x11,- 0x0a, 0x0d, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10,- 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x05, 0x12, 0x08, 0x0a,- 0x04, 0x44, 0x41, 0x54, 0x41, 0x10, 0x06, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x70, 0x72, 0x65, 0x5f,- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65,- 0x74, 0x61, 0x69, 0x6c, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07,- 0x1a, 0xa4, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43,+ 0x67, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61,+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,+ 0x1a, 0xd9, 0x03, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x06, 0x74, 0x61, 0x72,+ 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52,+ 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52,+ 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x05, 0x74, 0x61, 0x62,+ 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05,+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74,+ 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41,+ 0x01, 0x01, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74,+ 0x12, 0x22, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61,+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18,+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75,+ 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,+ 0x12, 0x1c, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x26,+ 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72,+ 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,+ 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,+ 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e,+ 0x74, 0x72, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,+ 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xd7, 0x04, 0x0a,+ 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43,0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18,0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a,0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68,- 0x65, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20,- 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61,- 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73,- 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70,- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70,- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x8e, 0x01, 0x0a, 0x09, 0x56, 0x43, 0x53, 0x53,- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x76, 0x63, 0x73, 0x5f, 0x74, 0x79, 0x70,- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x43, 0x53, 0x54, 0x79, 0x70, 0x65,- 0x52, 0x07, 0x76, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x63, 0x73,- 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x0c, 0x76, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x28,- 0x0a, 0x10, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x75,- 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x72, 0x6c, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65,- 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06,- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x65, 0x65, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,+ 0x0e, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,+ 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68,+ 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a,+ 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, 0x72,+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0b, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x6c,+ 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43,+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61,+ 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x68, 0x6f, 0x73, 0x74,+ 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x67, 0x68, 0x6f, 0x73,+ 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x18, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61,+ 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x55, 0x70, 0x64,+ 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x48,+ 0x00, 0x52, 0x15, 0x70, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b,+ 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x47,+ 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,+ 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x71, 0x0a, 0x04, 0x54, 0x79,+ 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x41, 0x53, 0x45,+ 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54,+ 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x53,+ 0x44, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x45, 0x5f,+ 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43,+ 0x48, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x41, 0x10, 0x06, 0x42, 0x1b, 0x0a,+ 0x19, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63,+ 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06,+ 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x1a, 0xa4, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72,+ 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74,+ 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72,+ 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72,+ 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72,+ 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,+ 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,+ 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01,+ 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x8e, 0x01,+ 0x0a, 0x09, 0x56, 0x43, 0x53, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x76,+ 0x63, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56,+ 0x43, 0x53, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x76, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,+ 0x23, 0x0a, 0x0d, 0x76, 0x63, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65,+ 0x63, 0x74, 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,+ 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x72, 0x6c, 0x42, 0x14,+ 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73,+ 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -911,7 +858,7 @@ 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, 10)+var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 9)var file_store_plan_proto_goTypes = []any{(PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type(*PlanConfig)(nil), // 1: bytebase.store.PlanConfig@@ -923,23 +870,23 @@ var file_store_plan_proto_goTypes = []any{(*PlanConfig_VCSSource)(nil), // 7: bytebase.store.PlanConfig.VCSSourcenil, // 8: bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntrynil, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry- (*PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail)(nil), // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail- (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp- (ExportFormat)(0), // 12: bytebase.store.ExportFormat- (VCSType)(0), // 13: bytebase.store.VCSType+ (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp+ (*PreUpdateBackupDetail)(nil), // 11: bytebase.store.PreUpdateBackupDetail+ (ExportFormat)(0), // 12: bytebase.store.ExportFormat+ (VCSType)(0), // 13: bytebase.store.VCSType}var file_store_plan_proto_depIdxs = []int32{2, // 0: bytebase.store.PlanConfig.steps:type_name -> bytebase.store.PlanConfig.Step7, // 1: bytebase.store.PlanConfig.vcs_source:type_name -> bytebase.store.PlanConfig.VCSSource3, // 2: bytebase.store.PlanConfig.Step.specs:type_name -> bytebase.store.PlanConfig.Spec- 11, // 3: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp+ 10, // 3: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp4, // 4: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig5, // 5: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig6, // 6: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig8, // 7: bytebase.store.PlanConfig.CreateDatabaseConfig.labels:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry0, // 8: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type9, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry- 10, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail+ 11, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail12, // 11: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat13, // 12: bytebase.store.PlanConfig.VCSSource.vcs_type:type_name -> bytebase.store.VCSType13, // [13:13] is the sub-list for method output_type@@ -955,6 +902,7 @@ func file_store_plan_proto_init() {return}file_store_common_proto_init()+ file_store_plan_check_run_proto_init()if !protoimpl.UnsafeEnabled {file_store_plan_proto_msgTypes[0].Exporter = func(v any, i int) any {switch v := v.(*PlanConfig); i {@@ -1040,18 +988,6 @@ func file_store_plan_proto_init() {return nil}}- file_store_plan_proto_msgTypes[9].Exporter = func(v any, i int) any {- switch v := v.(*PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail); i {- case 0:- return &v.state- case 1:- return &v.sizeCache- case 2:- return &v.unknownFields- default:- return nil- }- }}file_store_plan_proto_msgTypes[2].OneofWrappers = []any{(*PlanConfig_Spec_CreateDatabaseConfig)(nil),@@ -1066,7 +1002,7 @@ func file_store_plan_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_store_plan_proto_rawDesc,NumEnums: 1,- NumMessages: 10,+ NumMessages: 9,NumExtensions: 0,NumServices: 0,},diff --git a/proto/store/plan.proto b/proto/store/plan.protoindex 6f2a418fb9..8109556246 100644--- a/proto/store/plan.proto+++ b/proto/store/plan.proto@@ -5,6 +5,7 @@ package bytebase.store;import "google/api/field_behavior.proto";import "google/protobuf/timestamp.proto";import "store/common.proto";+import "store/plan_check_run.proto";option go_package = "generated-go/store";@@ -97,11 +98,6 @@ message PlanConfig {map<string, string> ghost_flags = 7;- message PreUpdateBackupDetail {- // The database for keeping the backup data.- // Format: instances/{instance}/databases/{database}- string database = 1;- }// If set, a backup of the modified data will be created automatically before any changes are applied.optional PreUpdateBackupDetail pre_update_backup_detail = 8;}