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: pre-update backup store proto (#9855)
Danny Xu33e5100787ac
diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.tsindex 1f2d6529be..adae8c130a 100644--- a/frontend/src/types/proto/store/plan.ts+++ b/frontend/src/types/proto/store/plan.ts@@ -85,10 +85,12 @@ export interface PlanConfig_ChangeDatabaseConfig {* It is automatically generated in the UI workflow.*/schemaVersion: string;- /** If RollbackEnabled, build the RollbackSheetID of the task. */+ /** If RollbackEnabled, build the RollbackSheetID of the task after the task is completed. */rollbackEnabled: boolean;rollbackDetail?: PlanConfig_ChangeDatabaseConfig_RollbackDetail | undefined;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;}/** Type is the database change type. */@@ -183,6 +185,14 @@ 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_RestoreDatabaseConfig {/*** The resource name of the target to restore.@@ -771,6 +781,7 @@ function createBasePlanConfig_ChangeDatabaseConfig(): PlanConfig_ChangeDatabaseCrollbackEnabled: false,rollbackDetail: undefined,ghostFlags: {},+ preUpdateBackupDetail: undefined,};}@@ -798,6 +809,12 @@ export const PlanConfig_ChangeDatabaseConfig = {PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry.encode({ key: key as any, value }, writer.uint32(58).fork()).ldelim();});+ if (message.preUpdateBackupDetail !== undefined) {+ PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.encode(+ message.preUpdateBackupDetail,+ writer.uint32(66).fork(),+ ).ldelim();+ }return writer;},@@ -860,6 +877,16 @@ export const PlanConfig_ChangeDatabaseConfig = {message.ghostFlags[entry7.key] = entry7.value;}continue;+ case 8:+ if (tag !== 66) {+ break;+ }++ message.preUpdateBackupDetail = PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.decode(+ reader,+ reader.uint32(),+ );+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -885,6 +912,9 @@ export const PlanConfig_ChangeDatabaseConfig = {return acc;}, {}): {},+ preUpdateBackupDetail: isSet(object.preUpdateBackupDetail)+ ? PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.fromJSON(object.preUpdateBackupDetail)+ : undefined,};},@@ -917,6 +947,11 @@ export const PlanConfig_ChangeDatabaseConfig = {});}}+ if (message.preUpdateBackupDetail !== undefined) {+ obj.preUpdateBackupDetail = PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.toJSON(+ message.preUpdateBackupDetail,+ );+ }return obj;},@@ -942,6 +977,10 @@ export const PlanConfig_ChangeDatabaseConfig = {},{},);+ message.preUpdateBackupDetail =+ (object.preUpdateBackupDetail !== undefined && object.preUpdateBackupDetail !== null)+ ? PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail.fromPartial(object.preUpdateBackupDetail)+ : undefined;return message;},};@@ -1108,6 +1147,70 @@ 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_RestoreDatabaseConfig(): PlanConfig_RestoreDatabaseConfig {return { target: "", createDatabaseConfig: undefined, backup: undefined, pointInTime: undefined };}diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.tsindex 7c62783073..44a7cfefb6 100644--- a/frontend/src/types/proto/v1/rollout_service.ts+++ b/frontend/src/types/proto/v1/rollout_service.ts@@ -168,7 +168,7 @@ export interface Plan_ChangeDatabaseConfig {* It is automatically generated in the UI workflow.*/schemaVersion: string;- /** If RollbackEnabled, build the RollbackSheetID of the task after the task is completed.. */+ /** If RollbackEnabled, build the RollbackSheetID of the task after the task is completed. */rollbackEnabled: boolean;rollbackDetail?: Plan_ChangeDatabaseConfig_RollbackDetail | undefined;ghostFlags: { [key: string]: string };diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex c70be321d3..0e35b0e046 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -111,6 +111,7 @@- [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.ChangeDatabaseConfig.RollbackDetail](#bytebase-store-PlanConfig-ChangeDatabaseConfig-RollbackDetail)- [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)- [PlanConfig.CreateDatabaseConfig.LabelsEntry](#bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry)@@ -1750,9 +1751,10 @@ InstanceOptions is the option for instances.| 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. |-| rollback_enabled | [bool](#bool) | | If RollbackEnabled, build the RollbackSheetID of the task. |+| rollback_enabled | [bool](#bool) | | If RollbackEnabled, build the RollbackSheetID of the task after the task is completed. || rollback_detail | [PlanConfig.ChangeDatabaseConfig.RollbackDetail](#bytebase-store-PlanConfig-ChangeDatabaseConfig-RollbackDetail) | optional | || 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. |@@ -1775,6 +1777,21 @@ InstanceOptions is the option for instances.+<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-PreUpdateBackupDetail"></a>++### PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| database | [string](#string) | | The database for keeping the backup data. Format: instances/{instance}/databases/{database} |++++++<a name="bytebase-store-PlanConfig-ChangeDatabaseConfig-RollbackDetail"></a>### PlanConfig.ChangeDatabaseConfig.RollbackDetaildiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex b3419af059..7e82463578 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -7851,7 +7851,7 @@ When paginating, all other parameters provided to `ListRolloutTaskRuns` must mat| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} || type | [Plan.ChangeDatabaseConfig.Type](#bytebase-v1-Plan-ChangeDatabaseConfig-Type) | | || schema_version | [string](#string) | | schema_version is parsed from VCS file name. It is automatically generated in the UI workflow. |-| rollback_enabled | [bool](#bool) | | If RollbackEnabled, build the RollbackSheetID of the task after the task is completed.. |+| rollback_enabled | [bool](#bool) | | If RollbackEnabled, build the RollbackSheetID of the task after the task is completed. || rollback_detail | [Plan.ChangeDatabaseConfig.RollbackDetail](#bytebase-v1-Plan-ChangeDatabaseConfig-RollbackDetail) | optional | || ghost_flags | [Plan.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | || pre_update_backup_detail | [Plan.ChangeDatabaseConfig.PreUpdateBackupDetail](#bytebase-v1-Plan-ChangeDatabaseConfig-PreUpdateBackupDetail) | optional | If set, a backup of the modified data will be created automatically before any changes are applied. |diff --git a/proto/generated-go/store/plan.pb.go b/proto/generated-go/store/plan.pb.goindex de41dc6214..cac7bc720b 100644--- a/proto/generated-go/store/plan.pb.go+++ b/proto/generated-go/store/plan.pb.go@@ -450,10 +450,12 @@ type PlanConfig_ChangeDatabaseConfig struct {// schema_version is parsed from VCS file name.// It is automatically generated in the UI workflow.SchemaVersion string `protobuf:"bytes,4,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`- // If RollbackEnabled, build the RollbackSheetID of the task.+ // If RollbackEnabled, build the RollbackSheetID of the task after the task is completed.RollbackEnabled bool `protobuf:"varint,5,opt,name=rollback_enabled,json=rollbackEnabled,proto3" json:"rollback_enabled,omitempty"`RollbackDetail *PlanConfig_ChangeDatabaseConfig_RollbackDetail `protobuf:"bytes,6,opt,name=rollback_detail,json=rollbackDetail,proto3,oneof" json:"rollback_detail,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"`}func (x *PlanConfig_ChangeDatabaseConfig) Reset() {@@ -537,6 +539,13 @@ func (x *PlanConfig_ChangeDatabaseConfig) GetGhostFlags() map[string]string {return nil}+func (x *PlanConfig_ChangeDatabaseConfig) GetPreUpdateBackupDetail() *PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail {+ if x != nil {+ return x.PreUpdateBackupDetail+ }+ return nil+}+type PlanConfig_RestoreDatabaseConfig struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -703,6 +712,55 @@ func (x *PlanConfig_ChangeDatabaseConfig_RollbackDetail) GetRollbackFromIssue()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, 2}+}++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{@@ -712,7 +770,7 @@ var file_store_plan_proto_rawDesc = []byte{0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72,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, 0x22, 0x8d, 0x10, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e,+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x11, 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,@@ -776,7 +834,7 @@ var file_store_plan_proto_rawDesc = []byte{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, 0xe6, 0x05, 0x0a,+ 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xbe, 0x07, 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,@@ -803,47 +861,60 @@ var file_store_plan_proto_rawDesc = []byte{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, 0x1a,- 0x6e, 0x0a, 0x0e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69,- 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x72,- 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72,- 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12,- 0x2e, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x72, 0x6f, 0x6d,- 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x6f,- 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x49, 0x73, 0x73, 0x75, 0x65, 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, 0x12, 0x0a, 0x10, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64,- 0x65, 0x74, 0x61, 0x69, 0x6c, 0x1a, 0x9c, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72,- 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, 0x6a, 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, 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, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61,+ 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, 0x01, 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, 0x6e, 0x0a, 0x0e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63,+ 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x6f, 0x6c, 0x6c, 0x62,+ 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x6f,+ 0x6d, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63,+ 0x6b, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x11, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x6f, 0x6d,+ 0x49, 0x73, 0x73, 0x75, 0x65, 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, 0x12, 0x0a, 0x10,+ 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,+ 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, 0x1a, 0x9c, 0x02,+ 0x0a, 0x15, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 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,+ 0x6a, 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, 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, 0x72, 0x65, 0x61,0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,- 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20,- 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x40, 0x0a,- 0x0d, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 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,- 0x48, 0x00, 0x52, 0x0b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x42,- 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x63, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f,- 0x6e, 0x66, 0x69, 0x67, 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,+ 0x48, 0x01, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x06, 0x62,+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x62,+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x69,+ 0x6e, 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, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x6f, 0x69, 0x6e,+ 0x74, 0x49, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,+ 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74,+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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 (@@ -859,7 +930,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, 9)+var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 10)var file_store_plan_proto_goTypes = []interface{}{(PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type(*PlanConfig)(nil), // 1: bytebase.store.PlanConfig@@ -870,13 +941,14 @@ var file_store_plan_proto_goTypes = []interface{}{(*PlanConfig_RestoreDatabaseConfig)(nil), // 6: bytebase.store.PlanConfig.RestoreDatabaseConfignil, // 7: bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry(*PlanConfig_ChangeDatabaseConfig_RollbackDetail)(nil), // 8: bytebase.store.PlanConfig.ChangeDatabaseConfig.RollbackDetail- nil, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry- (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp+ nil, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry+ (*PlanConfig_ChangeDatabaseConfig_PreUpdateBackupDetail)(nil), // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail+ (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp}var file_store_plan_proto_depIdxs = []int32{2, // 0: bytebase.store.PlanConfig.steps:type_name -> bytebase.store.PlanConfig.Step3, // 1: bytebase.store.PlanConfig.Step.specs:type_name -> bytebase.store.PlanConfig.Spec- 10, // 2: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp+ 11, // 2: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp4, // 3: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig5, // 4: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig6, // 5: bytebase.store.PlanConfig.Spec.restore_database_config:type_name -> bytebase.store.PlanConfig.RestoreDatabaseConfig@@ -884,13 +956,14 @@ var file_store_plan_proto_depIdxs = []int32{0, // 7: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type8, // 8: bytebase.store.PlanConfig.ChangeDatabaseConfig.rollback_detail:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.RollbackDetail9, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry- 4, // 10: bytebase.store.PlanConfig.RestoreDatabaseConfig.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig- 10, // 11: bytebase.store.PlanConfig.RestoreDatabaseConfig.point_in_time:type_name -> google.protobuf.Timestamp- 12, // [12:12] is the sub-list for method output_type- 12, // [12:12] is the sub-list for method input_type- 12, // [12:12] is the sub-list for extension type_name- 12, // [12:12] is the sub-list for extension extendee- 0, // [0:12] is the sub-list for field type_name+ 10, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.PreUpdateBackupDetail+ 4, // 11: bytebase.store.PlanConfig.RestoreDatabaseConfig.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig+ 11, // 12: bytebase.store.PlanConfig.RestoreDatabaseConfig.point_in_time:type_name -> google.protobuf.Timestamp+ 13, // [13:13] is the sub-list for method output_type+ 13, // [13:13] is the sub-list for method input_type+ 13, // [13:13] is the sub-list for extension type_name+ 13, // [13:13] is the sub-list for extension extendee+ 0, // [0:13] is the sub-list for field type_name}func init() { file_store_plan_proto_init() }@@ -983,6 +1056,18 @@ func file_store_plan_proto_init() {return nil}}+ file_store_plan_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {+ 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 = []interface{}{(*PlanConfig_Spec_CreateDatabaseConfig)(nil),@@ -1000,7 +1085,7 @@ func file_store_plan_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_store_plan_proto_rawDesc,NumEnums: 1,- NumMessages: 9,+ NumMessages: 10,NumExtensions: 0,NumServices: 0,},diff --git a/proto/generated-go/v1/rollout_service.pb.go b/proto/generated-go/v1/rollout_service.pb.goindex d87923911c..d803507d6c 100644--- a/proto/generated-go/v1/rollout_service.pb.go+++ b/proto/generated-go/v1/rollout_service.pb.go@@ -2783,7 +2783,7 @@ type Plan_ChangeDatabaseConfig struct {// schema_version is parsed from VCS file name.// It is automatically generated in the UI workflow.SchemaVersion string `protobuf:"bytes,4,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`- // If RollbackEnabled, build the RollbackSheetID of the task after the task is completed..+ // If RollbackEnabled, build the RollbackSheetID of the task after the task is completed.RollbackEnabled bool `protobuf:"varint,5,opt,name=rollback_enabled,json=rollbackEnabled,proto3" json:"rollback_enabled,omitempty"`RollbackDetail *Plan_ChangeDatabaseConfig_RollbackDetail `protobuf:"bytes,6,opt,name=rollback_detail,json=rollbackDetail,proto3,oneof" json:"rollback_detail,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"`diff --git a/proto/store/plan.proto b/proto/store/plan.protoindex e003e49dd3..f9112b37d0 100644--- a/proto/store/plan.proto+++ b/proto/store/plan.proto@@ -86,7 +86,7 @@ message PlanConfig {// It is automatically generated in the UI workflow.string schema_version = 4;- // If RollbackEnabled, build the RollbackSheetID of the task.+ // If RollbackEnabled, build the RollbackSheetID of the task after the task is completed.bool rollback_enabled = 5;message RollbackDetail {@@ -100,6 +100,14 @@ message PlanConfig {optional RollbackDetail rollback_detail = 6;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;}message RestoreDatabaseConfig {diff --git a/proto/v1/rollout_service.proto b/proto/v1/rollout_service.protoindex 8ef0326da6..6f1d87e723 100644--- a/proto/v1/rollout_service.proto+++ b/proto/v1/rollout_service.proto@@ -252,7 +252,7 @@ message Plan {// It is automatically generated in the UI workflow.string schema_version = 4;- // If RollbackEnabled, build the RollbackSheetID of the task after the task is completed..+ // If RollbackEnabled, build the RollbackSheetID of the task after the task is completed.bool rollback_enabled = 5;message RollbackDetail {