Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: move DatabaseChange.Type enum to common.proto (#17538)
Danny Xuffad6e8d2ffb
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex 55d67d1170..9eb78e64f4 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -1423,15 +1423,15 @@ func getTaskTypeFromSpec(spec *v1pb.Plan_Spec) (storepb.Task_Type, error) {return storepb.Task_DATABASE_CREATE, nilcase *v1pb.Plan_Spec_ChangeDatabaseConfig:switch s.ChangeDatabaseConfig.Type {- case v1pb.Plan_ChangeDatabaseConfig_DATA:+ case v1pb.DatabaseChangeType_DATA:return storepb.Task_DATABASE_DATA_UPDATE, nil- case v1pb.Plan_ChangeDatabaseConfig_MIGRATE:+ case v1pb.DatabaseChangeType_MIGRATE:return storepb.Task_DATABASE_SCHEMA_UPDATE, nil- case v1pb.Plan_ChangeDatabaseConfig_MIGRATE_GHOST:+ case v1pb.DatabaseChangeType_MIGRATE_GHOST:return storepb.Task_DATABASE_SCHEMA_UPDATE_GHOST, nil- case v1pb.Plan_ChangeDatabaseConfig_MIGRATE_SDL:+ case v1pb.DatabaseChangeType_MIGRATE_SDL:return storepb.Task_DATABASE_SCHEMA_UPDATE_SDL, nil- case v1pb.Plan_ChangeDatabaseConfig_TYPE_UNSPECIFIED:+ case v1pb.DatabaseChangeType_DATABASE_CHANGE_TYPE_UNSPECIFIED:return storepb.Task_TASK_TYPE_UNSPECIFIED, errors.Errorf("unexpected unspecified change database config type")default:return storepb.Task_TASK_TYPE_UNSPECIFIED, errors.Errorf("invalid change database config type %s", s.ChangeDatabaseConfig.Type)diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.goindex 37c280465a..24449de73d 100644--- a/backend/api/v1/rollout_service_converter.go+++ b/backend/api/v1/rollout_service_converter.go@@ -147,20 +147,20 @@ func convertToPlanSpecChangeDatabaseConfig(config *storepb.PlanConfig_Spec_Chang}}-func convertToPlanSpecChangeDatabaseConfigType(t storepb.PlanConfig_ChangeDatabaseConfig_Type) v1pb.Plan_ChangeDatabaseConfig_Type {+func convertToPlanSpecChangeDatabaseConfigType(t storepb.PlanConfig_ChangeDatabaseConfig_Type) v1pb.DatabaseChangeType {switch t {case storepb.PlanConfig_ChangeDatabaseConfig_TYPE_UNSPECIFIED:- return v1pb.Plan_ChangeDatabaseConfig_TYPE_UNSPECIFIED+ return v1pb.DatabaseChangeType_DATABASE_CHANGE_TYPE_UNSPECIFIEDcase storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE+ return v1pb.DatabaseChangeType_MIGRATEcase storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_SDL:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE_SDL+ return v1pb.DatabaseChangeType_MIGRATE_SDLcase storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_GHOST:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE_GHOST+ return v1pb.DatabaseChangeType_MIGRATE_GHOSTcase storepb.PlanConfig_ChangeDatabaseConfig_DATA:- return v1pb.Plan_ChangeDatabaseConfig_DATA+ return v1pb.DatabaseChangeType_DATAdefault:- return v1pb.Plan_ChangeDatabaseConfig_TYPE_UNSPECIFIED+ return v1pb.DatabaseChangeType_DATABASE_CHANGE_TYPE_UNSPECIFIED}}diff --git a/backend/generated-go/v1/common.pb.go b/backend/generated-go/v1/common.pb.goindex 33267685ed..c4a300cc0b 100644--- a/backend/generated-go/v1/common.pb.go+++ b/backend/generated-go/v1/common.pb.go@@ -298,6 +298,66 @@ func (ExportFormat) EnumDescriptor() ([]byte, []int) {return file_v1_common_proto_rawDescGZIP(), []int{3}}+// DatabaseChangeType is the database change type.+type DatabaseChangeType int32++const (+ DatabaseChangeType_DATABASE_CHANGE_TYPE_UNSPECIFIED DatabaseChangeType = 0+ // Used for DDL changes including CREATE DATABASE.+ DatabaseChangeType_MIGRATE DatabaseChangeType = 2+ // Used for schema changes via state-based schema migration including CREATE DATABASE.+ DatabaseChangeType_MIGRATE_SDL DatabaseChangeType = 3+ // Used for DDL changes using gh-ost.+ DatabaseChangeType_MIGRATE_GHOST DatabaseChangeType = 4+ // Used for DML change.+ DatabaseChangeType_DATA DatabaseChangeType = 6+)++// Enum value maps for DatabaseChangeType.+var (+ DatabaseChangeType_name = map[int32]string{+ 0: "DATABASE_CHANGE_TYPE_UNSPECIFIED",+ 2: "MIGRATE",+ 3: "MIGRATE_SDL",+ 4: "MIGRATE_GHOST",+ 6: "DATA",+ }+ DatabaseChangeType_value = map[string]int32{+ "DATABASE_CHANGE_TYPE_UNSPECIFIED": 0,+ "MIGRATE": 2,+ "MIGRATE_SDL": 3,+ "MIGRATE_GHOST": 4,+ "DATA": 6,+ }+)++func (x DatabaseChangeType) Enum() *DatabaseChangeType {+ p := new(DatabaseChangeType)+ *p = x+ return p+}++func (x DatabaseChangeType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DatabaseChangeType) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_common_proto_enumTypes[4].Descriptor()+}++func (DatabaseChangeType) Type() protoreflect.EnumType {+ return &file_v1_common_proto_enumTypes[4]+}++func (x DatabaseChangeType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DatabaseChangeType.Descriptor instead.+func (DatabaseChangeType) EnumDescriptor() ([]byte, []int) {+ return file_v1_common_proto_rawDescGZIP(), []int{4}+}+// Position in a text expressed as zero-based line and zero-based column byte// offset.type Position struct {@@ -467,7 +527,13 @@ const file_v1_common_proto_rawDesc = "" +"\x03CSV\x10\x01\x12\b\n" +"\x04JSON\x10\x02\x12\a\n" +"\x03SQL\x10\x03\x12\b\n" +- "\x04XLSX\x10\x04B6Z4github.com/bytebase/bytebase/backend/generated-go/v1b\x06proto3"+ "\x04XLSX\x10\x04*u\n" ++ "\x12DatabaseChangeType\x12$\n" ++ " DATABASE_CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\v\n" ++ "\aMIGRATE\x10\x02\x12\x0f\n" ++ "\vMIGRATE_SDL\x10\x03\x12\x11\n" ++ "\rMIGRATE_GHOST\x10\x04\x12\b\n" ++ "\x04DATA\x10\x06B6Z4github.com/bytebase/bytebase/backend/generated-go/v1b\x06proto3"var (file_v1_common_proto_rawDescOnce sync.Once@@ -481,15 +547,16 @@ func file_v1_common_proto_rawDescGZIP() []byte {return file_v1_common_proto_rawDescData}-var file_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4)+var file_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 5)var file_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)var file_v1_common_proto_goTypes = []any{- (State)(0), // 0: bytebase.v1.State- (Engine)(0), // 1: bytebase.v1.Engine- (VCSType)(0), // 2: bytebase.v1.VCSType- (ExportFormat)(0), // 3: bytebase.v1.ExportFormat- (*Position)(nil), // 4: bytebase.v1.Position- (*Range)(nil), // 5: bytebase.v1.Range+ (State)(0), // 0: bytebase.v1.State+ (Engine)(0), // 1: bytebase.v1.Engine+ (VCSType)(0), // 2: bytebase.v1.VCSType+ (ExportFormat)(0), // 3: bytebase.v1.ExportFormat+ (DatabaseChangeType)(0), // 4: bytebase.v1.DatabaseChangeType+ (*Position)(nil), // 5: bytebase.v1.Position+ (*Range)(nil), // 6: bytebase.v1.Range}var file_v1_common_proto_depIdxs = []int32{0, // [0:0] is the sub-list for method output_type@@ -509,7 +576,7 @@ func file_v1_common_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_common_proto_rawDesc), len(file_v1_common_proto_rawDesc)),- NumEnums: 4,+ NumEnums: 5,NumMessages: 2,NumExtensions: 0,NumServices: 0,diff --git a/backend/generated-go/v1/plan_service.pb.go b/backend/generated-go/v1/plan_service.pb.goindex 17e81959e7..181c02758a 100644--- a/backend/generated-go/v1/plan_service.pb.go+++ b/backend/generated-go/v1/plan_service.pb.go@@ -24,66 +24,6 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))-// Type is the database change type.-type Plan_ChangeDatabaseConfig_Type int32--const (- Plan_ChangeDatabaseConfig_TYPE_UNSPECIFIED Plan_ChangeDatabaseConfig_Type = 0- // Used for DDL changes including CREATE DATABASE.- Plan_ChangeDatabaseConfig_MIGRATE Plan_ChangeDatabaseConfig_Type = 2- // Used for schema changes via state-based schema migration including CREATE DATABASE.- Plan_ChangeDatabaseConfig_MIGRATE_SDL Plan_ChangeDatabaseConfig_Type = 3- // Used for DDL changes using gh-ost.- Plan_ChangeDatabaseConfig_MIGRATE_GHOST Plan_ChangeDatabaseConfig_Type = 4- // Used for DML change.- Plan_ChangeDatabaseConfig_DATA Plan_ChangeDatabaseConfig_Type = 6-)--// Enum value maps for Plan_ChangeDatabaseConfig_Type.-var (- Plan_ChangeDatabaseConfig_Type_name = map[int32]string{- 0: "TYPE_UNSPECIFIED",- 2: "MIGRATE",- 3: "MIGRATE_SDL",- 4: "MIGRATE_GHOST",- 6: "DATA",- }- Plan_ChangeDatabaseConfig_Type_value = map[string]int32{- "TYPE_UNSPECIFIED": 0,- "MIGRATE": 2,- "MIGRATE_SDL": 3,- "MIGRATE_GHOST": 4,- "DATA": 6,- }-)--func (x Plan_ChangeDatabaseConfig_Type) Enum() *Plan_ChangeDatabaseConfig_Type {- p := new(Plan_ChangeDatabaseConfig_Type)- *p = x- return p-}--func (x Plan_ChangeDatabaseConfig_Type) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (Plan_ChangeDatabaseConfig_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_plan_service_proto_enumTypes[0].Descriptor()-}--func (Plan_ChangeDatabaseConfig_Type) Type() protoreflect.EnumType {- return &file_v1_plan_service_proto_enumTypes[0]-}--func (x Plan_ChangeDatabaseConfig_Type) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use Plan_ChangeDatabaseConfig_Type.Descriptor instead.-func (Plan_ChangeDatabaseConfig_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{7, 3, 0}-}-type PlanCheckRun_Type int32const (@@ -126,11 +66,11 @@ func (x PlanCheckRun_Type) String() string {}func (PlanCheckRun_Type) Descriptor() protoreflect.EnumDescriptor {- return file_v1_plan_service_proto_enumTypes[1].Descriptor()+ return file_v1_plan_service_proto_enumTypes[0].Descriptor()}func (PlanCheckRun_Type) Type() protoreflect.EnumType {- return &file_v1_plan_service_proto_enumTypes[1]+ return &file_v1_plan_service_proto_enumTypes[0]}func (x PlanCheckRun_Type) Number() protoreflect.EnumNumber {@@ -181,11 +121,11 @@ func (x PlanCheckRun_Status) String() string {}func (PlanCheckRun_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_plan_service_proto_enumTypes[2].Descriptor()+ return file_v1_plan_service_proto_enumTypes[1].Descriptor()}func (PlanCheckRun_Status) Type() protoreflect.EnumType {- return &file_v1_plan_service_proto_enumTypes[2]+ return &file_v1_plan_service_proto_enumTypes[1]}func (x PlanCheckRun_Status) Number() protoreflect.EnumNumber {@@ -233,11 +173,11 @@ func (x PlanCheckRun_Result_Status) String() string {}func (PlanCheckRun_Result_Status) Descriptor() protoreflect.EnumDescriptor {- return file_v1_plan_service_proto_enumTypes[3].Descriptor()+ return file_v1_plan_service_proto_enumTypes[2].Descriptor()}func (PlanCheckRun_Result_Status) Type() protoreflect.EnumType {- return &file_v1_plan_service_proto_enumTypes[3]+ return &file_v1_plan_service_proto_enumTypes[2]}func (x PlanCheckRun_Result_Status) Number() protoreflect.EnumNumber {@@ -1523,9 +1463,10 @@ type Plan_ChangeDatabaseConfig struct {Sheet string `protobuf:"bytes,2,opt,name=sheet,proto3" json:"sheet,omitempty"`// The resource name of the release.// Format: projects/{project}/releases/{release}- Release string `protobuf:"bytes,9,opt,name=release,proto3" json:"release,omitempty"`- Type Plan_ChangeDatabaseConfig_Type `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.v1.Plan_ChangeDatabaseConfig_Type" json:"type,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" protobuf_val:"bytes,2,opt,name=value"`+ Release string `protobuf:"bytes,9,opt,name=release,proto3" json:"release,omitempty"`+ // Type is the database change type.+ Type DatabaseChangeType `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.v1.DatabaseChangeType" json:"type,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" protobuf_val:"bytes,2,opt,name=value"`// If set, a backup of the modified data will be created automatically before any changes are applied.EnablePriorBackup bool `protobuf:"varint,8,opt,name=enable_prior_backup,json=enablePriorBackup,proto3" json:"enable_prior_backup,omitempty"`unknownFields protoimpl.UnknownFields@@ -1583,11 +1524,11 @@ func (x *Plan_ChangeDatabaseConfig) GetRelease() string {return ""}-func (x *Plan_ChangeDatabaseConfig) GetType() Plan_ChangeDatabaseConfig_Type {+func (x *Plan_ChangeDatabaseConfig) GetType() DatabaseChangeType {if x != nil {return x.Type}- return Plan_ChangeDatabaseConfig_TYPE_UNSPECIFIED+ return DatabaseChangeType_DATABASE_CHANGE_TYPE_UNSPECIFIED}func (x *Plan_ChangeDatabaseConfig) GetGhostFlags() map[string]string {@@ -2067,7 +2008,7 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x04plan\x18\x01 \x01(\v2\x11.bytebase.v1.PlanB\x03\xe0A\x02R\x04plan\x12@\n" +"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" +"updateMask\x12#\n" +- "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"\xa1\x11\n" ++ "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"\xbc\x10\n" +"\x04Plan\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12(\n" +"\x05state\x18\x02 \x01(\x0e2\x12.bytebase.v1.StateR\x05state\x12\x19\n" +@@ -2103,26 +2044,20 @@ const file_v1_plan_service_proto_rawDesc = "" +"\tcollation\x18\x05 \x01(\tB\x03\xe0A\x01R\tcollation\x12\x1d\n" +"\acluster\x18\x06 \x01(\tB\x03\xe0A\x01R\acluster\x12\x19\n" +"\x05owner\x18\a \x01(\tB\x03\xe0A\x01R\x05owner\x12%\n" +- "\venvironment\x18\t \x01(\tB\x03\xe0A\x01R\venvironment\x1a\xe9\x03\n" ++ "\venvironment\x18\t \x01(\tB\x03\xe0A\x01R\venvironment\x1a\x84\x03\n" +"\x14ChangeDatabaseConfig\x12\x18\n" +"\atargets\x18\n" +" \x03(\tR\atargets\x12\x14\n" +"\x05sheet\x18\x02 \x01(\tR\x05sheet\x123\n" +"\arelease\x18\t \x01(\tB\x19\xfaA\x16\n" +- "\x14bytebase.com/ReleaseR\arelease\x12?\n" +- "\x04type\x18\x03 \x01(\x0e2+.bytebase.v1.Plan.ChangeDatabaseConfig.TypeR\x04type\x12W\n" ++ "\x14bytebase.com/ReleaseR\arelease\x123\n" ++ "\x04type\x18\x03 \x01(\x0e2\x1f.bytebase.v1.DatabaseChangeTypeR\x04type\x12W\n" +"\vghost_flags\x18\a \x03(\v26.bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntryR\n" +"ghostFlags\x12.\n" +"\x13enable_prior_backup\x18\b \x01(\bR\x11enablePriorBackup\x1a=\n" +"\x0fGhostFlagsEntry\x12\x10\n" +"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"W\n" +- "\x04Type\x12\x14\n" +- "\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" +- "\aMIGRATE\x10\x02\x12\x0f\n" +- "\vMIGRATE_SDL\x10\x03\x12\x11\n" +- "\rMIGRATE_GHOST\x10\x04\x12\b\n" +- "\x04DATA\x10\x06J\x04\b\x05\x10\x06J\x04\b\x06\x10\a\x1a\xa3\x01\n" ++ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01J\x04\b\x05\x10\x06J\x04\b\x06\x10\a\x1a\xa3\x01\n" +"\x10ExportDataConfig\x12\x18\n" +"\atargets\x18\x05 \x03(\tR\atargets\x12\x14\n" +"\x05sheet\x18\x02 \x01(\tR\x05sheet\x121\n" +@@ -2232,92 +2167,92 @@ func file_v1_plan_service_proto_rawDescGZIP() []byte {return file_v1_plan_service_proto_rawDescData}-var file_v1_plan_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)+var file_v1_plan_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3)var file_v1_plan_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26)var file_v1_plan_service_proto_goTypes = []any{- (Plan_ChangeDatabaseConfig_Type)(0), // 0: bytebase.v1.Plan.ChangeDatabaseConfig.Type- (PlanCheckRun_Type)(0), // 1: bytebase.v1.PlanCheckRun.Type- (PlanCheckRun_Status)(0), // 2: bytebase.v1.PlanCheckRun.Status- (PlanCheckRun_Result_Status)(0), // 3: bytebase.v1.PlanCheckRun.Result.Status- (*GetPlanRequest)(nil), // 4: bytebase.v1.GetPlanRequest- (*ListPlansRequest)(nil), // 5: bytebase.v1.ListPlansRequest- (*ListPlansResponse)(nil), // 6: bytebase.v1.ListPlansResponse- (*SearchPlansRequest)(nil), // 7: bytebase.v1.SearchPlansRequest- (*SearchPlansResponse)(nil), // 8: bytebase.v1.SearchPlansResponse- (*CreatePlanRequest)(nil), // 9: bytebase.v1.CreatePlanRequest- (*UpdatePlanRequest)(nil), // 10: bytebase.v1.UpdatePlanRequest- (*Plan)(nil), // 11: bytebase.v1.Plan- (*ListPlanCheckRunsRequest)(nil), // 12: bytebase.v1.ListPlanCheckRunsRequest- (*ListPlanCheckRunsResponse)(nil), // 13: bytebase.v1.ListPlanCheckRunsResponse- (*RunPlanChecksRequest)(nil), // 14: bytebase.v1.RunPlanChecksRequest- (*RunPlanChecksResponse)(nil), // 15: bytebase.v1.RunPlanChecksResponse- (*BatchCancelPlanCheckRunsRequest)(nil), // 16: bytebase.v1.BatchCancelPlanCheckRunsRequest- (*BatchCancelPlanCheckRunsResponse)(nil), // 17: bytebase.v1.BatchCancelPlanCheckRunsResponse- (*PlanCheckRun)(nil), // 18: bytebase.v1.PlanCheckRun- (*Plan_Spec)(nil), // 19: bytebase.v1.Plan.Spec- nil, // 20: bytebase.v1.Plan.PlanCheckRunStatusCountEntry- (*Plan_CreateDatabaseConfig)(nil), // 21: bytebase.v1.Plan.CreateDatabaseConfig- (*Plan_ChangeDatabaseConfig)(nil), // 22: bytebase.v1.Plan.ChangeDatabaseConfig- (*Plan_ExportDataConfig)(nil), // 23: bytebase.v1.Plan.ExportDataConfig- (*Plan_Deployment)(nil), // 24: bytebase.v1.Plan.Deployment- nil, // 25: bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry- (*Plan_Deployment_DatabaseGroupMapping)(nil), // 26: bytebase.v1.Plan.Deployment.DatabaseGroupMapping- (*PlanCheckRun_Result)(nil), // 27: bytebase.v1.PlanCheckRun.Result- (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 28: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- (*PlanCheckRun_Result_SqlReviewReport)(nil), // 29: bytebase.v1.PlanCheckRun.Result.SqlReviewReport- (*fieldmaskpb.FieldMask)(nil), // 30: google.protobuf.FieldMask- (State)(0), // 31: bytebase.v1.State- (*timestamppb.Timestamp)(nil), // 32: google.protobuf.Timestamp+ (PlanCheckRun_Type)(0), // 0: bytebase.v1.PlanCheckRun.Type+ (PlanCheckRun_Status)(0), // 1: bytebase.v1.PlanCheckRun.Status+ (PlanCheckRun_Result_Status)(0), // 2: bytebase.v1.PlanCheckRun.Result.Status+ (*GetPlanRequest)(nil), // 3: bytebase.v1.GetPlanRequest+ (*ListPlansRequest)(nil), // 4: bytebase.v1.ListPlansRequest+ (*ListPlansResponse)(nil), // 5: bytebase.v1.ListPlansResponse+ (*SearchPlansRequest)(nil), // 6: bytebase.v1.SearchPlansRequest+ (*SearchPlansResponse)(nil), // 7: bytebase.v1.SearchPlansResponse+ (*CreatePlanRequest)(nil), // 8: bytebase.v1.CreatePlanRequest+ (*UpdatePlanRequest)(nil), // 9: bytebase.v1.UpdatePlanRequest+ (*Plan)(nil), // 10: bytebase.v1.Plan+ (*ListPlanCheckRunsRequest)(nil), // 11: bytebase.v1.ListPlanCheckRunsRequest+ (*ListPlanCheckRunsResponse)(nil), // 12: bytebase.v1.ListPlanCheckRunsResponse+ (*RunPlanChecksRequest)(nil), // 13: bytebase.v1.RunPlanChecksRequest+ (*RunPlanChecksResponse)(nil), // 14: bytebase.v1.RunPlanChecksResponse+ (*BatchCancelPlanCheckRunsRequest)(nil), // 15: bytebase.v1.BatchCancelPlanCheckRunsRequest+ (*BatchCancelPlanCheckRunsResponse)(nil), // 16: bytebase.v1.BatchCancelPlanCheckRunsResponse+ (*PlanCheckRun)(nil), // 17: bytebase.v1.PlanCheckRun+ (*Plan_Spec)(nil), // 18: bytebase.v1.Plan.Spec+ nil, // 19: bytebase.v1.Plan.PlanCheckRunStatusCountEntry+ (*Plan_CreateDatabaseConfig)(nil), // 20: bytebase.v1.Plan.CreateDatabaseConfig+ (*Plan_ChangeDatabaseConfig)(nil), // 21: bytebase.v1.Plan.ChangeDatabaseConfig+ (*Plan_ExportDataConfig)(nil), // 22: bytebase.v1.Plan.ExportDataConfig+ (*Plan_Deployment)(nil), // 23: bytebase.v1.Plan.Deployment+ nil, // 24: bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry+ (*Plan_Deployment_DatabaseGroupMapping)(nil), // 25: bytebase.v1.Plan.Deployment.DatabaseGroupMapping+ (*PlanCheckRun_Result)(nil), // 26: bytebase.v1.PlanCheckRun.Result+ (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 27: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ (*PlanCheckRun_Result_SqlReviewReport)(nil), // 28: bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ (*fieldmaskpb.FieldMask)(nil), // 29: google.protobuf.FieldMask+ (State)(0), // 30: bytebase.v1.State+ (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp+ (DatabaseChangeType)(0), // 32: bytebase.v1.DatabaseChangeType(ExportFormat)(0), // 33: bytebase.v1.ExportFormat(*ChangedResources)(nil), // 34: bytebase.v1.ChangedResources(*Position)(nil), // 35: bytebase.v1.Position}var file_v1_plan_service_proto_depIdxs = []int32{- 11, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan- 11, // 1: bytebase.v1.SearchPlansResponse.plans:type_name -> bytebase.v1.Plan- 11, // 2: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan- 11, // 3: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan- 30, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask- 31, // 5: bytebase.v1.Plan.state:type_name -> bytebase.v1.State- 19, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec- 32, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp- 32, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp- 20, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry- 24, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment- 18, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun- 1, // 12: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type- 2, // 13: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status- 27, // 14: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result- 32, // 15: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp- 21, // 16: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig- 22, // 17: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig- 23, // 18: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig- 0, // 19: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.Type- 25, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry+ 10, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan+ 10, // 1: bytebase.v1.SearchPlansResponse.plans:type_name -> bytebase.v1.Plan+ 10, // 2: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan+ 10, // 3: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan+ 29, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask+ 30, // 5: bytebase.v1.Plan.state:type_name -> bytebase.v1.State+ 18, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec+ 31, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp+ 31, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp+ 19, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry+ 23, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment+ 17, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun+ 0, // 12: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type+ 1, // 13: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status+ 26, // 14: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result+ 31, // 15: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp+ 20, // 16: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig+ 21, // 17: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig+ 22, // 18: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig+ 32, // 19: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.DatabaseChangeType+ 24, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry33, // 21: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat- 26, // 22: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping- 3, // 23: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status- 28, // 24: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- 29, // 25: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ 25, // 22: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping+ 2, // 23: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status+ 27, // 24: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ 28, // 25: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport34, // 26: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources35, // 27: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position35, // 28: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position- 4, // 29: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest- 5, // 30: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest- 7, // 31: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest- 9, // 32: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest- 10, // 33: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest- 12, // 34: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest- 14, // 35: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest- 16, // 36: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest- 11, // 37: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan- 6, // 38: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse- 8, // 39: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse- 11, // 40: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan- 11, // 41: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan- 13, // 42: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse- 15, // 43: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse- 17, // 44: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse+ 3, // 29: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest+ 4, // 30: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest+ 6, // 31: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest+ 8, // 32: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest+ 9, // 33: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest+ 11, // 34: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest+ 13, // 35: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest+ 15, // 36: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest+ 10, // 37: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan+ 5, // 38: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse+ 7, // 39: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse+ 10, // 40: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan+ 10, // 41: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan+ 12, // 42: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse+ 14, // 43: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse+ 16, // 44: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse37, // [37:45] is the sub-list for method output_type29, // [29:37] is the sub-list for method input_type29, // [29:29] is the sub-list for extension type_name@@ -2349,7 +2284,7 @@ func file_v1_plan_service_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_plan_service_proto_rawDesc), len(file_v1_plan_service_proto_rawDesc)),- NumEnums: 4,+ NumEnums: 3,NumMessages: 26,NumExtensions: 0,NumServices: 1,diff --git a/backend/tests/change_history_test.go b/backend/tests/change_history_test.goindex 9629619ff4..c878c3c998 100644--- a/backend/tests/change_history_test.go+++ b/backend/tests/change_history_test.go@@ -110,7 +110,7 @@ func TestFilterChangeHistoryByResources(t *testing.T) {a.NoError(err)// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, databaseResp.Msg, sheetResp.Msg, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, databaseResp.Msg, sheetResp.Msg, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)}diff --git a/backend/tests/ghost_test.go b/backend/tests/ghost_test.goindex 1477fc3de2..8c50533e03 100644--- a/backend/tests/ghost_test.go+++ b/backend/tests/ghost_test.go@@ -103,7 +103,7 @@ func TestGhostSchemaUpdate(t *testing.T) {a.NoError(err)sheet1 := sheet1Response.Msg- err = ctl.changeDatabase(ctx, ctl.project, database, sheet1, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet1, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)dbMetadataResponse, err := ctl.databaseServiceClient.GetDatabaseSchema(ctx, connect.NewRequest(&v1pb.GetDatabaseSchemaRequest{Name: fmt.Sprintf("%s/schema", database.Name)}))@@ -121,7 +121,7 @@ func TestGhostSchemaUpdate(t *testing.T) {a.NoError(err)sheet2 := sheet2Response.Msg- err = ctl.changeDatabase(ctx, ctl.project, database, sheet2, v1pb.Plan_ChangeDatabaseConfig_MIGRATE_GHOST)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet2, v1pb.DatabaseChangeType_MIGRATE_GHOST)a.NoError(err)dbMetadataResponse, err = ctl.databaseServiceClient.GetDatabaseSchema(ctx, connect.NewRequest(&v1pb.GetDatabaseSchemaRequest{Name: fmt.Sprintf("%s/schema", database.Name)}))a.NoError(err)diff --git a/backend/tests/gitops_test.go b/backend/tests/gitops_test.goindex 9aa3d171ac..990eebaf4b 100644--- a/backend/tests/gitops_test.go+++ b/backend/tests/gitops_test.go@@ -235,7 +235,7 @@ func TestGitOpsRollout(t *testing.T) {Targets: []string{fmt.Sprintf("%s/databases/%s", testInstance.Name, databaseName),},- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},},@@ -459,7 +459,7 @@ func TestGitOpsRolloutMultiTarget(t *testing.T) {fmt.Sprintf("%s/databases/%s", testInstance.Name, databaseName),fmt.Sprintf("%s/databases/%s", prodInstance.Name, databaseName),},- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},},@@ -695,7 +695,7 @@ func TestGitOpsCheckAppliedButChanged(t *testing.T) {Targets: []string{fmt.Sprintf("%s/databases/%s", testInstance.Name, databaseName),},- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},},diff --git a/backend/tests/risk_calculation_test.go b/backend/tests/risk_calculation_test.goindex 55b23170ff..d8139135ff 100644--- a/backend/tests/risk_calculation_test.go+++ b/backend/tests/risk_calculation_test.go@@ -82,7 +82,7 @@ func TestRiskLevelCalculation(t *testing.T) {ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{Targets: []string{fmt.Sprintf("%s/databases/%s", instanceResp.Msg.Name, dbName)},Sheet: sheet.Msg.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},}},@@ -211,7 +211,7 @@ func TestRiskLevelCalculationWithInvalidSQL(t *testing.T) {ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{Targets: []string{fmt.Sprintf("%s/databases/%s", instanceResp.Msg.Name, dbName)},Sheet: sheet.Msg.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},}},diff --git a/backend/tests/rollout.go b/backend/tests/rollout.goindex 29e07663db..4801a7d529 100644--- a/backend/tests/rollout.go+++ b/backend/tests/rollout.go@@ -12,7 +12,7 @@ import (v1pb "github.com/bytebase/bytebase/backend/generated-go/v1")-func (ctl *controller) changeDatabase(ctx context.Context, project *v1pb.Project, database *v1pb.Database, sheet *v1pb.Sheet, changeType v1pb.Plan_ChangeDatabaseConfig_Type) error {+func (ctl *controller) changeDatabase(ctx context.Context, project *v1pb.Project, database *v1pb.Database, sheet *v1pb.Sheet, changeType v1pb.DatabaseChangeType) error {spec := &v1pb.Plan_Spec{Id: uuid.NewString(),Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{diff --git a/backend/tests/schema_update_test.go b/backend/tests/schema_update_test.goindex b0e8ced486..fa31603614 100644--- a/backend/tests/schema_update_test.go+++ b/backend/tests/schema_update_test.go@@ -66,7 +66,7 @@ func TestSchemaAndDataUpdate(t *testing.T) {sheet := sheetResp.Msg// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)// Query schema.@@ -86,7 +86,7 @@ func TestSchemaAndDataUpdate(t *testing.T) {sheet = sheetResp.Msg// Create an issue that updates database data.- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_DATA)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_DATA)a.NoError(err)resp, err := ctl.databaseServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{@@ -327,7 +327,7 @@ CREATE TABLE "public"."book" (ddlSheet := ddlSheetResp.Msg// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, database, ddlSheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, ddlSheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)latestSchemaResp, err := ctl.databaseServiceClient.GetDatabaseSchema(ctx, connect.NewRequest(&v1pb.GetDatabaseSchemaRequest{@@ -417,7 +417,7 @@ func TestMarkTaskAsDone(t *testing.T) {ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{Targets: []string{database.Name},Sheet: sheet.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},},diff --git a/backend/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.goindex 17c0f3fa9c..a4e344ea3e 100644--- a/backend/tests/sensitive_data_test.go+++ b/backend/tests/sensitive_data_test.go@@ -202,7 +202,7 @@ func TestSensitiveData(t *testing.T) {sheet := sheetResp.Msg// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)// Create sensitive data in the database config.@@ -248,7 +248,7 @@ func TestSensitiveData(t *testing.T) {insertDataSheet := insertDataSheetResp.Msg// Insert data into table tech_book.- err = ctl.changeDatabase(ctx, ctl.project, database, insertDataSheet, v1pb.Plan_ChangeDatabaseConfig_DATA)+ err = ctl.changeDatabase(ctx, ctl.project, database, insertDataSheet, v1pb.DatabaseChangeType_DATA)a.NoError(err)// Query masked data.diff --git a/backend/tests/sql_editor_test.go b/backend/tests/sql_editor_test.goindex 548b05f435..e03931c116 100644--- a/backend/tests/sql_editor_test.go+++ b/backend/tests/sql_editor_test.go@@ -205,7 +205,7 @@ func TestAdminQueryAffectedRows(t *testing.T) {a.NoError(err)sheet := sheetResp.Msg- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)results, err := ctl.adminQuery(ctx, database, tt.query)diff --git a/backend/tests/sql_export_test.go b/backend/tests/sql_export_test.goindex 8a8ce5e9b6..2ea26540fb 100644--- a/backend/tests/sql_export_test.go+++ b/backend/tests/sql_export_test.go@@ -195,7 +195,7 @@ func TestSQLExport(t *testing.T) {a.Equal(1, len(database.InstanceResource.DataSources))dataSource := database.InstanceResource.DataSources[0]- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)statement := tt.querydiff --git a/backend/tests/sql_review_test.go b/backend/tests/sql_review_test.goindex 98015772b6..efb065a5c0 100644--- a/backend/tests/sql_review_test.go+++ b/backend/tests/sql_review_test.go@@ -479,7 +479,7 @@ func createIssueAndReturnSQLReviewResult(ctx context.Context, a *require.AssertiChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{Targets: []string{database.Name},Sheet: sheet.Msg.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},},diff --git a/backend/tests/sync_schema_test.go b/backend/tests/sync_schema_test.goindex 83845ed536..3102abe64b 100644--- a/backend/tests/sync_schema_test.go+++ b/backend/tests/sync_schema_test.go@@ -93,7 +93,7 @@ DROP SCHEMA "schema_a";sheet := sheetResp.Msg// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)resp, err := ctl.databaseServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{diff --git a/backend/tests/syncer_test.go b/backend/tests/syncer_test.goindex 00d00e0df9..92fde7ef4c 100644--- a/backend/tests/syncer_test.go+++ b/backend/tests/syncer_test.go@@ -237,7 +237,7 @@ func TestSyncerForPostgreSQL(t *testing.T) {sheet := sheetResp.Msg// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)latestSchemaMetadataResp, err := ctl.databaseServiceClient.GetDatabaseMetadata(ctx, connect.NewRequest(&v1pb.GetDatabaseMetadataRequest{@@ -521,7 +521,7 @@ func TestSyncerForMySQL(t *testing.T) {sheet := sheetResp.Msg// Create an issue that updates database schema.- err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.Plan_ChangeDatabaseConfig_MIGRATE)+ err = ctl.changeDatabase(ctx, ctl.project, database, sheet, v1pb.DatabaseChangeType_MIGRATE)a.NoError(err)latestSchemaMetadataResp, err := ctl.databaseServiceClient.GetDatabaseMetadata(ctx, connect.NewRequest(&v1pb.GetDatabaseMetadataRequest{diff --git a/backend/tests/tenant_test.go b/backend/tests/tenant_test.goindex d5f5a007e7..32dcf5e6ce 100644--- a/backend/tests/tenant_test.go+++ b/backend/tests/tenant_test.go@@ -157,7 +157,7 @@ func TestDatabaseGroup(t *testing.T) {ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{Targets: []string{databaseGroup.Name},Sheet: sheet.Name,- Type: v1pb.Plan_ChangeDatabaseConfig_MIGRATE,+ Type: v1pb.DatabaseChangeType_MIGRATE,},},}diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vueindex 195fef51f7..8f72c4b79e 100644--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskCard.vue@@ -59,7 +59,7 @@ import { computed } from "vue";import { InstanceV1Name } from "@/components/v2";import { useCurrentProjectV1 } from "@/store";import { isValidDatabaseName } from "@/types";-import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Type, Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { databaseForTask } from "@/utils";@@ -99,7 +99,7 @@ const showGhostTag = computed(() => {const spec = specForTask(issue.value.planEntity, props.task);return (spec?.config?.case === "changeDatabaseConfig" &&- spec.config.value?.type === Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST+ spec.config.value?.type === DatabaseChangeType.MIGRATE_GHOST);}return props.task.type === Task_Type.DATABASE_SCHEMA_UPDATE_GHOST;diff --git a/frontend/src/components/Plan/components/AddSpecDrawer.vue b/frontend/src/components/Plan/components/AddSpecDrawer.vueindex 612dafc579..54dc354cd6 100644--- a/frontend/src/components/Plan/components/AddSpecDrawer.vue+++ b/frontend/src/components/Plan/components/AddSpecDrawer.vue@@ -35,10 +35,7 @@'border-blue-500 bg-blue-50': isMigrateSelected,}">- <NRadio- :value="Plan_ChangeDatabaseConfig_Type.MIGRATE"- class="w-full"- >+ <NRadio :value="DatabaseChangeType.MIGRATE" class="w-full"><div class="flex items-start space-x-3 w-full"><FileDiffIconclass="w-6 h-6 mt-1 flex-shrink-0"@@ -63,10 +60,7 @@'border-blue-500 bg-blue-50': isDataSelected,}">- <NRadio- :value="Plan_ChangeDatabaseConfig_Type.DATA"- class="w-full"- >+ <NRadio :value="DatabaseChangeType.DATA" class="w-full"><div class="flex items-start space-x-3 w-full"><EditIconclass="w-6 h-6 mt-1 flex-shrink-0"@@ -236,11 +230,9 @@ import {batchGetOrFetchDatabases,pushNotification,} from "@/store";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import {- Plan_ChangeDatabaseConfig_Type,Plan_ChangeDatabaseConfigSchema,-} from "@/types/proto-es/v1/plan_service_pb";-import {Plan_SpecSchema,type Plan_Spec,} from "@/types/proto-es/v1/plan_service_pb";@@ -268,8 +260,8 @@ const databaseV1Store = useDatabaseV1Store();const dbSchemaStore = useDBSchemaV1Store();const dbCatalogStore = useDatabaseCatalogV1Store();-const selectedChangeType: Ref<Plan_ChangeDatabaseConfig_Type> = ref(- Plan_ChangeDatabaseConfig_Type.MIGRATE+const selectedChangeType: Ref<DatabaseChangeType> = ref(+ DatabaseChangeType.MIGRATE);const isCreating = ref(false);const currentStep = ref(Step.SELECT_CHANGE_TYPE);@@ -332,11 +324,9 @@ const isLastStep = computed(() => {const changeTypeTitle = computed(() => {if (currentStep.value !== Step.SELECT_CHANGE_TYPE) {- if (selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.MIGRATE) {+ if (selectedChangeType.value === DatabaseChangeType.MIGRATE) {return t("plan.schema-migration");- } else if (- selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.DATA- ) {+ } else if (selectedChangeType.value === DatabaseChangeType.DATA) {return t("plan.data-change");}}@@ -344,18 +334,18 @@ const changeTypeTitle = computed(() => {});const isMigrateSelected = computed(() => {- return selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.MIGRATE;+ return selectedChangeType.value === DatabaseChangeType.MIGRATE;});const isDataSelected = computed(() => {- return selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.DATA;+ return selectedChangeType.value === DatabaseChangeType.DATA;});// Reset state when drawer openswatch(show, (newVal) => {if (newVal) {currentStep.value = Step.SELECT_CHANGE_TYPE;- selectedChangeType.value = Plan_ChangeDatabaseConfig_Type.MIGRATE;+ selectedChangeType.value = DatabaseChangeType.MIGRATE;databaseSelectState.changeSource = "DATABASE";databaseSelectState.selectedDatabaseNameList = [];databaseSelectState.selectedDatabaseGroup = undefined;@@ -561,7 +551,7 @@ const handleConfirm = async () => {`${project.value.name}/sheets/${sheetUID}`);localSheet.title =- selectedChangeType.value === Plan_ChangeDatabaseConfig_Type.MIGRATE+ selectedChangeType.value === DatabaseChangeType.MIGRATE? "Schema Migration": "Data Change";if (statement) {diff --git a/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vue b/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vueindex b723bbb13a..6b30fdd328 100644--- a/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vue+++ b/frontend/src/components/Plan/components/Configuration/GhostSection/GhostSwitch.vue@@ -37,8 +37,8 @@ import type { ErrorItem } from "@/components/misc/ErrorList.vue";import { default as ErrorList } from "@/components/misc/ErrorList.vue";import { planServiceClientConnect } from "@/grpcweb";import { pushNotification } from "@/store";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";-import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";import { allowGhostForDatabase } from "./common";import { useGhostSettingContext } from "./context";@@ -143,8 +143,8 @@ const toggleChecked = async (on: boolean) => {)return;selectedSpec.value.config.value.type = on- ? Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST- : Plan_ChangeDatabaseConfig_Type.MIGRATE;+ ? DatabaseChangeType.MIGRATE_GHOST+ : DatabaseChangeType.MIGRATE;} else {const planPatch = cloneDeep(plan.value);const spec = (planPatch?.specs || []).find((spec) => {@@ -158,8 +158,8 @@ const toggleChecked = async (on: boolean) => {}spec.config.value.type = on- ? Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST- : Plan_ChangeDatabaseConfig_Type.MIGRATE;+ ? DatabaseChangeType.MIGRATE_GHOST+ : DatabaseChangeType.MIGRATE;const request = create(UpdatePlanRequestSchema, {plan: planPatch,updateMask: { paths: ["specs"] },diff --git a/frontend/src/components/Plan/components/Configuration/GhostSection/common.ts b/frontend/src/components/Plan/components/Configuration/GhostSection/common.tsindex 68684a9ad5..cfe28a3fdc 100644--- a/frontend/src/components/Plan/components/Configuration/GhostSection/common.ts+++ b/frontend/src/components/Plan/components/Configuration/GhostSection/common.ts@@ -1,10 +1,8 @@import { isDBGroupChangeSpec } from "@/components/Plan/logic";import type { ComposedDatabase } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";-import {- Plan_ChangeDatabaseConfig_Type,- type Plan_Spec,-} from "@/types/proto-es/v1/plan_service_pb";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";+import { type Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import { semverCompare } from "@/utils";export const GHOST_AVAILABLE_ENGINES = [Engine.MYSQL, Engine.MARIADB];@@ -39,8 +37,8 @@ export const allowGhostForSpec = (spec: Plan_Spec | undefined) => {if (!config) return false;return [- Plan_ChangeDatabaseConfig_Type.MIGRATE,- Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST,+ DatabaseChangeType.MIGRATE,+ DatabaseChangeType.MIGRATE_GHOST,].includes(config.type);};@@ -57,10 +55,10 @@ export const getGhostEnabledForSpec = (if (!config) {return undefined;}- if (config.type === Plan_ChangeDatabaseConfig_Type.MIGRATE) {+ if (config.type === DatabaseChangeType.MIGRATE) {return false;}- if (config.type === Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST) {+ if (config.type === DatabaseChangeType.MIGRATE_GHOST) {return true;}return undefined;diff --git a/frontend/src/components/Plan/components/Configuration/InstanceRoleSection/context.ts b/frontend/src/components/Plan/components/Configuration/InstanceRoleSection/context.tsindex bc4aeac0d0..af6391263c 100644--- a/frontend/src/components/Plan/components/Configuration/InstanceRoleSection/context.ts+++ b/frontend/src/components/Plan/components/Configuration/InstanceRoleSection/context.ts@@ -5,13 +5,10 @@ import { targetsForSpec } from "@/components/Plan/logic";import { useDatabaseV1Store } from "@/store";import { isValidDatabaseName } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";-import {- Plan_ChangeDatabaseConfig_Type,- type Plan,- type Plan_Spec,-} from "@/types/proto-es/v1/plan_service_pb";+import { type Plan, type Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";@@ -67,9 +64,9 @@ export const provideInstanceRoleSettingContext = (refs: {return false;}return [- Plan_ChangeDatabaseConfig_Type.DATA,- Plan_ChangeDatabaseConfig_Type.MIGRATE,- Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST,+ DatabaseChangeType.DATA,+ DatabaseChangeType.MIGRATE,+ DatabaseChangeType.MIGRATE_GHOST,].includes(selectedSpec.value.config.value.type);});diff --git a/frontend/src/components/Plan/components/Configuration/IsolationLevelSection/context.ts b/frontend/src/components/Plan/components/Configuration/IsolationLevelSection/context.tsindex b49dc1e711..1f5294e840 100644--- a/frontend/src/components/Plan/components/Configuration/IsolationLevelSection/context.ts+++ b/frontend/src/components/Plan/components/Configuration/IsolationLevelSection/context.ts@@ -5,13 +5,10 @@ import { targetsForSpec } from "@/components/Plan/logic";import { useDatabaseV1Store } from "@/store";import { isValidDatabaseName } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";-import {- Plan_ChangeDatabaseConfig_Type,- type Plan,- type Plan_Spec,-} from "@/types/proto-es/v1/plan_service_pb";+import { type Plan, type Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";@@ -73,9 +70,9 @@ export const provideIsolationLevelSettingContext = (refs: {return false;}return [- Plan_ChangeDatabaseConfig_Type.DATA,- Plan_ChangeDatabaseConfig_Type.MIGRATE,- Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST,+ DatabaseChangeType.DATA,+ DatabaseChangeType.MIGRATE,+ DatabaseChangeType.MIGRATE_GHOST,].includes(selectedSpec.value.config.value.type);});diff --git a/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.ts b/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.tsindex 19b96b5d6f..8e11304587 100644--- a/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.ts+++ b/frontend/src/components/Plan/components/Configuration/PreBackupSection/context.ts@@ -13,11 +13,10 @@ import { isDatabaseChangeSpec, targetsForSpec } from "@/components/Plan/logic";import { planServiceClientConnect } from "@/grpcweb";import { useCurrentUserV1, extractUserId, useDatabaseV1Store } from "@/store";import { isValidDatabaseName } from "@/types";-import { Engine } from "@/types/proto-es/v1/common_pb";+import { DatabaseChangeType, Engine } from "@/types/proto-es/v1/common_pb";import { IssueStatus, type Issue } from "@/types/proto-es/v1/issue_service_pb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import {- Plan_ChangeDatabaseConfig_Type,+ UpdatePlanRequestSchema,type Plan,type Plan_Spec,} from "@/types/proto-es/v1/plan_service_pb";@@ -75,8 +74,7 @@ export const providePreBackupSettingContext = (refs: {if (!selectedSpec.value ||selectedSpec.value.config?.case !== "changeDatabaseConfig" ||- selectedSpec.value.config.value.type !==- Plan_ChangeDatabaseConfig_Type.DATA+ selectedSpec.value.config.value.type !== DatabaseChangeType.DATA) {return false;}diff --git a/frontend/src/components/Plan/components/Configuration/TransactionModeSection/context.ts b/frontend/src/components/Plan/components/Configuration/TransactionModeSection/context.tsindex 2d79f3942f..32d4018a67 100644--- a/frontend/src/components/Plan/components/Configuration/TransactionModeSection/context.ts+++ b/frontend/src/components/Plan/components/Configuration/TransactionModeSection/context.ts@@ -4,13 +4,10 @@ import { computed, inject, provide, ref } from "vue";import { targetsForSpec } from "@/components/Plan/logic";import { useDatabaseV1Store } from "@/store";import { isValidDatabaseName } from "@/types";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";-import {- Plan_ChangeDatabaseConfig_Type,- type Plan,- type Plan_Spec,-} from "@/types/proto-es/v1/plan_service_pb";+import { type Plan, type Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";@@ -66,9 +63,9 @@ export const provideTransactionModeSettingContext = (refs: {return false;}return [- Plan_ChangeDatabaseConfig_Type.DATA,- Plan_ChangeDatabaseConfig_Type.MIGRATE,- Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST,+ DatabaseChangeType.DATA,+ DatabaseChangeType.MIGRATE,+ DatabaseChangeType.MIGRATE_GHOST,].includes(selectedSpec.value.config.value.type);});diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue b/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vueindex 61c92badf3..f76e5fc455 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue@@ -139,10 +139,10 @@ import {useCurrentProjectV1,useSheetV1Store,} from "@/store";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import {CreatePlanRequestSchema,- Plan_ChangeDatabaseConfig_Type,Plan_ChangeDatabaseConfigSchema,Plan_SpecSchema,PlanSchema,@@ -313,7 +313,7 @@ const handleConfirm = async () => {case: "changeDatabaseConfig",value: create(Plan_ChangeDatabaseConfigSchema, {targets: [preview.task.target],- type: Plan_ChangeDatabaseConfig_Type.DATA,+ type: DatabaseChangeType.DATA,sheet: sheet.name,}),},diff --git a/frontend/src/components/Plan/components/SQLCheckSection/common.ts b/frontend/src/components/Plan/components/SQLCheckSection/common.tsindex f7569349b9..bf9647516b 100644--- a/frontend/src/components/Plan/components/SQLCheckSection/common.ts+++ b/frontend/src/components/Plan/components/SQLCheckSection/common.ts@@ -1,4 +1,4 @@-import { Plan_ChangeDatabaseConfig_Type } from "@/types/proto-es/v1/plan_service_pb";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import { Release_File_ChangeType } from "@/types/proto-es/v1/release_service_pb";@@ -14,11 +14,11 @@ export const getSpecChangeType = (? spec.config.value: undefined;switch (changeDatabaseConfig?.type) {- case Plan_ChangeDatabaseConfig_Type.MIGRATE:+ case DatabaseChangeType.MIGRATE:return Release_File_ChangeType.DDL;- case Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST:+ case DatabaseChangeType.MIGRATE_GHOST:return Release_File_ChangeType.DDL_GHOST;- case Plan_ChangeDatabaseConfig_Type.DATA:+ case DatabaseChangeType.DATA:return Release_File_ChangeType.DML;}// Default to DDL if no type is specified.diff --git a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vueindex 39553790fa..2ea298d654 100644--- a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue+++ b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue@@ -96,8 +96,8 @@ import Drawer from "@/components/v2/Container/Drawer.vue";import DrawerContent from "@/components/v2/Container/DrawerContent.vue";import { releaseServiceClientConnect } from "@/grpcweb";import { projectNamePrefix } from "@/store";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import {- Plan_ChangeDatabaseConfig_Type,PlanCheckRun_Type,PlanCheckRun_Status,PlanCheckRun_Result_Status,@@ -221,7 +221,7 @@ const runChecks = async () => {type: Release_File_Type.VERSIONED,statement: new TextEncoder().encode(statement),changeType:- config.type === Plan_ChangeDatabaseConfig_Type.DATA+ config.type === DatabaseChangeType.DATA? Release_File_ChangeType.DML: Release_File_ChangeType.DDL,},diff --git a/frontend/src/components/Plan/logic/initialize/create.ts b/frontend/src/components/Plan/logic/initialize/create.tsindex 63ff1bb226..3012ecf671 100644--- a/frontend/src/components/Plan/logic/initialize/create.ts+++ b/frontend/src/components/Plan/logic/initialize/create.ts@@ -9,12 +9,14 @@ import {} from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";import type { IssueType } from "@/types";-import { ExportFormat } from "@/types/proto-es/v1/common_pb";+import {+ DatabaseChangeType,+ ExportFormat,+} from "@/types/proto-es/v1/common_pb";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import {PlanSchema,Plan_ChangeDatabaseConfigSchema,- Plan_ChangeDatabaseConfig_Type,Plan_ExportDataConfigSchema,Plan_SpecSchema,} from "@/types/proto-es/v1/plan_service_pb";@@ -163,8 +165,8 @@ const buildSpecForTargetsV1 = async (sheet,type:template === "bb.issue.database.data.update"- ? Plan_ChangeDatabaseConfig_Type.DATA- : Plan_ChangeDatabaseConfig_Type.MIGRATE,+ ? DatabaseChangeType.DATA+ : DatabaseChangeType.MIGRATE,enablePriorBackup:template === "bb.issue.database.data.update" &&project.autoEnableBackup,diff --git a/frontend/src/components/Plan/logic/utils.ts b/frontend/src/components/Plan/logic/utils.tsindex ef9ed2326b..1d518719be 100644--- a/frontend/src/components/Plan/logic/utils.ts+++ b/frontend/src/components/Plan/logic/utils.ts@@ -4,11 +4,9 @@ import { planServiceClientConnect } from "@/grpcweb";import { t } from "@/plugins/i18n";import { projectNamePrefix, useSheetV1Store } from "@/store";import { useProjectV1Store } from "@/store";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";-import {- Plan_ChangeDatabaseConfig_Type,- UpdatePlanRequestSchema,-} from "@/types/proto-es/v1/plan_service_pb";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";import { extractProjectResourceName, setSheetStatement } from "@/utils";@@ -26,16 +24,16 @@ export const getSpecTitle = (spec: Plan_Spec): string => {} else if (spec.config?.case === "changeDatabaseConfig") {const changeType = spec.config.value.type;switch (changeType) {- case Plan_ChangeDatabaseConfig_Type.MIGRATE:+ case DatabaseChangeType.MIGRATE:title = t("plan.spec.type.schema-change");break;- case Plan_ChangeDatabaseConfig_Type.MIGRATE_SDL:+ case DatabaseChangeType.MIGRATE_SDL:title = "SDL";break;- case Plan_ChangeDatabaseConfig_Type.MIGRATE_GHOST:+ case DatabaseChangeType.MIGRATE_GHOST:title = t("plan.spec.type.ghost-migration");break;- case Plan_ChangeDatabaseConfig_Type.DATA:+ case DatabaseChangeType.DATA:title = t("plan.spec.type.data-change");break;default:diff --git a/frontend/src/types/proto-es/v1/common_pb.d.ts b/frontend/src/types/proto-es/v1/common_pb.d.tsindex 440357d217..dac8bab014 100644--- a/frontend/src/types/proto-es/v1/common_pb.d.ts+++ b/frontend/src/types/proto-es/v1/common_pb.d.ts@@ -294,3 +294,48 @@ export enum ExportFormat {*/export declare const ExportFormatSchema: GenEnum<ExportFormat>;+/**+ * DatabaseChangeType is the database change type.+ *+ * @generated from enum bytebase.v1.DatabaseChangeType+ */+export enum DatabaseChangeType {+ /**+ * @generated from enum value: DATABASE_CHANGE_TYPE_UNSPECIFIED = 0;+ */+ DATABASE_CHANGE_TYPE_UNSPECIFIED = 0,++ /**+ * Used for DDL changes including CREATE DATABASE.+ *+ * @generated from enum value: MIGRATE = 2;+ */+ MIGRATE = 2,++ /**+ * Used for schema changes via state-based schema migration including CREATE DATABASE.+ *+ * @generated from enum value: MIGRATE_SDL = 3;+ */+ MIGRATE_SDL = 3,++ /**+ * Used for DDL changes using gh-ost.+ *+ * @generated from enum value: MIGRATE_GHOST = 4;+ */+ MIGRATE_GHOST = 4,++ /**+ * Used for DML change.+ *+ * @generated from enum value: DATA = 6;+ */+ DATA = 6,+}++/**+ * Describes the enum bytebase.v1.DatabaseChangeType.+ */+export declare const DatabaseChangeTypeSchema: GenEnum<DatabaseChangeType>;+diff --git a/frontend/src/types/proto-es/v1/common_pb.js b/frontend/src/types/proto-es/v1/common_pb.jsindex b406215ee0..e7ded00068 100644--- a/frontend/src/types/proto-es/v1/common_pb.js+++ b/frontend/src/types/proto-es/v1/common_pb.js@@ -8,7 +8,7 @@ import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/code* Describes the file v1/common.proto.*/export const file_v1_common = /*@__PURE__*/- fileDesc("Cg92MS9jb21tb24ucHJvdG8SC2J5dGViYXNlLnYxIigKCFBvc2l0aW9uEgwKBGxpbmUYASABKAUSDgoGY29sdW1uGAIgASgFIiMKBVJhbmdlEg0KBXN0YXJ0GAEgASgFEgsKA2VuZBgCIAEoBSo3CgVTdGF0ZRIVChFTVEFURV9VTlNQRUNJRklFRBAAEgoKBkFDVElWRRABEgsKB0RFTEVURUQQAirwAgoGRW5naW5lEhYKEkVOR0lORV9VTlNQRUNJRklFRBAAEg4KCkNMSUNLSE9VU0UQARIJCgVNWVNRTBACEgwKCFBPU1RHUkVTEAMSDQoJU05PV0ZMQUtFEAQSCgoGU1FMSVRFEAUSCAoEVElEQhAGEgsKB01PTkdPREIQBxIJCgVSRURJUxAIEgoKBk9SQUNMRRAJEgsKB1NQQU5ORVIQChIJCgVNU1NRTBALEgwKCFJFRFNISUZUEAwSCwoHTUFSSUFEQhANEg0KCU9DRUFOQkFTRRAOEg0KCVNUQVJST0NLUxASEgkKBURPUklTEBMSCAoESElWRRAUEhEKDUVMQVNUSUNTRUFSQ0gQFRIMCghCSUdRVUVSWRAWEgwKCERZTkFNT0RCEBcSDgoKRE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kSDAoIQ09TTU9TREIQGhIJCgVUUklOTxAbEg0KCUNBU1NBTkRSQRAcKlwKB1ZDU1R5cGUSGAoUVkNTX1RZUEVfVU5TUEVDSUZJRUQQABIKCgZHSVRIVUIQARIKCgZHSVRMQUIQAhINCglCSVRCVUNLRVQQAxIQCgxBWlVSRV9ERVZPUFMQBCpMCgxFeHBvcnRGb3JtYXQSFgoSRk9STUFUX1VOU1BFQ0lGSUVEEAASBwoDQ1NWEAESCAoESlNPThACEgcKA1NRTBADEggKBFhMU1gQBCp1ChJEYXRhYmFzZUNoYW5nZVR5cGUSJAogREFUQUJBU0VfQ0hBTkdFX1RZUEVfVU5TUEVDSUZJRUQQABILCgdNSUdSQVRFEAISDwoLTUlHUkFURV9TREwQAxIRCg1NSUdSQVRFX0dIT1NUEAQSCAoEREFUQRAGQjZaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw");/*** Describes the message bytebase.v1.Position.@@ -72,3 +72,17 @@ export const ExportFormatSchema = /*@__PURE__*/export const ExportFormat = /*@__PURE__*/tsEnum(ExportFormatSchema);+/**+ * Describes the enum bytebase.v1.DatabaseChangeType.+ */+export const DatabaseChangeTypeSchema = /*@__PURE__*/+ enumDesc(file_v1_common, 4);++/**+ * DatabaseChangeType is the database change type.+ *+ * @generated from enum bytebase.v1.DatabaseChangeType+ */+export const DatabaseChangeType = /*@__PURE__*/+ tsEnum(DatabaseChangeTypeSchema);+diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.d.ts b/frontend/src/types/proto-es/v1/plan_service_pb.d.tsindex fc589ad8e1..dd11141b22 100644--- a/frontend/src/types/proto-es/v1/plan_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/plan_service_pb.d.ts@@ -5,7 +5,7 @@import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";import type { Message } from "@bufbuild/protobuf";import type { FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";-import type { ExportFormat, Position, State } from "./common_pb";+import type { DatabaseChangeType, ExportFormat, Position, State } from "./common_pb";import type { ChangedResources } from "./database_service_pb";/**@@ -488,9 +488,11 @@ export declare type Plan_ChangeDatabaseConfig = Message<"bytebase.v1.Plan.Changerelease: string;/**- * @generated from field: bytebase.v1.Plan.ChangeDatabaseConfig.Type type = 3;+ * Type is the database change type.+ *+ * @generated from field: bytebase.v1.DatabaseChangeType type = 3;*/- type: Plan_ChangeDatabaseConfig_Type;+ type: DatabaseChangeType;/*** @generated from field: map<string, string> ghost_flags = 7;@@ -511,51 +513,6 @@ export declare type Plan_ChangeDatabaseConfig = Message<"bytebase.v1.Plan.Change*/export declare const Plan_ChangeDatabaseConfigSchema: GenMessage<Plan_ChangeDatabaseConfig>;-/**- * Type is the database change type.- *- * @generated from enum bytebase.v1.Plan.ChangeDatabaseConfig.Type- */-export enum Plan_ChangeDatabaseConfig_Type {- /**- * @generated from enum value: TYPE_UNSPECIFIED = 0;- */- TYPE_UNSPECIFIED = 0,-- /**- * Used for DDL changes including CREATE DATABASE.- *- * @generated from enum value: MIGRATE = 2;- */- MIGRATE = 2,-- /**- * Used for schema changes via state-based schema migration including CREATE DATABASE.- *- * @generated from enum value: MIGRATE_SDL = 3;- */- MIGRATE_SDL = 3,-- /**- * Used for DDL changes using gh-ost.- *- * @generated from enum value: MIGRATE_GHOST = 4;- */- MIGRATE_GHOST = 4,-- /**- * Used for DML change.- *- * @generated from enum value: DATA = 6;- */- DATA = 6,-}--/**- * Describes the enum bytebase.v1.Plan.ChangeDatabaseConfig.Type.- */-export declare const Plan_ChangeDatabaseConfig_TypeSchema: GenEnum<Plan_ChangeDatabaseConfig_Type>;-/*** @generated from message bytebase.v1.Plan.ExportDataConfig*/diff --git a/frontend/src/types/proto-es/v1/plan_service_pb.js b/frontend/src/types/proto-es/v1/plan_service_pb.jsindex 7fb4d75f29..568bce9cf3 100644--- a/frontend/src/types/proto-es/v1/plan_service_pb.js+++ b/frontend/src/types/proto-es/v1/plan_service_pb.js@@ -16,7 +16,7 @@ import { file_v1_database_service } from "./database_service_pb";* Describes the file v1/plan_service.proto.*/export const file_v1_plan_service = /*@__PURE__*/- fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4iZwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkiTgoRTGlzdFBsYW5zUmVzcG9uc2USIAoFcGxhbnMYASADKAsyES5ieXRlYmFzZS52MS5QbGFuEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJgChJTZWFyY2hQbGFuc1JlcXVlc3QSEwoGcGFyZW50GAEgASgJQgPgQQISEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJIlAKE1NlYXJjaFBsYW5zUmVzcG9uc2USIAoFcGxhbnMYASADKAsyES5ieXRlYmFzZS52MS5QbGFuEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJnChFDcmVhdGVQbGFuUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSJAoEcGxhbhgCIAEoCzIRLmJ5dGViYXNlLnYxLlBsYW5CA+BBAiKGAQoRVXBkYXRlUGxhblJlcXVlc3QSJAoEcGxhbhgBIAEoCzIRLmJ5dGViYXNlLnYxLlBsYW5CA+BBAhI0Cgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2tCA+BBAhIVCg1hbGxvd19taXNzaW5nGAMgASgIItsNCgRQbG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vamVjdHMvKi9wbGFucy8qfS9wbGFuQ2hlY2tSdW5zOmJhdGNoQ2FuY2VsQjZaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service]);+ fileDesc("ChV2MS9wbGFuX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIjkKDkdldFBsYW5SZXF1ZXN0EicKBG5hbWUYASABKAlCGeBBAvpBEwoRYnl0ZWJhc2UuY29tL1BsYW4iZwoQTGlzdFBsYW5zUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkiTgoRTGlzdFBsYW5zUmVzcG9uc2USIAoFcGxhbnMYASADKAsyES5ieXRlYmFzZS52MS5QbGFuEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJgChJTZWFyY2hQbGFuc1JlcXVlc3QSEwoGcGFyZW50GAEgASgJQgPgQQISEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJIlAKE1NlYXJjaFBsYW5zUmVzcG9uc2USIAoFcGxhbnMYASADKAsyES5ieXRlYmFzZS52MS5QbGFuEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJnChFDcmVhdGVQbGFuUmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSJAoEcGxhbhgCIAEoCzIRLmJ5dGViYXNlLnYxLlBsYW5CA+BBAiKGAQoRVXBkYXRlUGxhblJlcXVlc3QSJAoEcGxhbhgBIAEoCzIRLmJ5dGViYXN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vcGxhbkNoZWNrUnVuczpiYXRjaENhbmNlbEI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service]);/*** Describes the message bytebase.v1.GetPlanRequest.@@ -95,20 +95,6 @@ export const Plan_CreateDatabaseConfigSchema = /*@__PURE__*/export const Plan_ChangeDatabaseConfigSchema = /*@__PURE__*/messageDesc(file_v1_plan_service, 7, 2);-/**- * Describes the enum bytebase.v1.Plan.ChangeDatabaseConfig.Type.- */-export const Plan_ChangeDatabaseConfig_TypeSchema = /*@__PURE__*/- enumDesc(file_v1_plan_service, 7, 2, 0);--/**- * Type is the database change type.- *- * @generated from enum bytebase.v1.Plan.ChangeDatabaseConfig.Type- */-export const Plan_ChangeDatabaseConfig_Type = /*@__PURE__*/- tsEnum(Plan_ChangeDatabaseConfig_TypeSchema);-/*** Describes the message bytebase.v1.Plan.ExportDataConfig.* Use `create(Plan_ExportDataConfigSchema)` to create a new message.diff --git a/frontend/src/views/project/ProjectPlanDashboard.vue b/frontend/src/views/project/ProjectPlanDashboard.vueindex 933a888ece..44ad331744 100644--- a/frontend/src/views/project/ProjectPlanDashboard.vue+++ b/frontend/src/views/project/ProjectPlanDashboard.vue@@ -75,11 +75,8 @@ import {import { usePlanStore } from "@/store/modules/v1/plan";import { buildPlanFindBySearchParams } from "@/store/modules/v1/plan";import { isValidDatabaseGroupName, SYSTEM_BOT_USER_NAME } from "@/types";-import {- Plan_ChangeDatabaseConfig_Type,- type Plan,- type Plan_Spec,-} from "@/types/proto-es/v1/plan_service_pb";+import { DatabaseChangeType } from "@/types/proto-es/v1/common_pb";+import { type Plan, type Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import { UserType } from "@/types/proto-es/v1/user_service_pb";import {extractDatabaseGroupName,@@ -292,7 +289,7 @@ const allowToCreatePlan = computed(() => {const handleSpecCreated = async (spec: Plan_Spec) => {const template =spec.config?.case === "changeDatabaseConfig" &&- spec.config.value.type === Plan_ChangeDatabaseConfig_Type.DATA+ spec.config.value.type === DatabaseChangeType.DATA? "bb.issue.database.data.update": "bb.issue.database.schema.update";const targets = targetsForSpec(spec);diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 90a0ea01f1..3904963c2b 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -11778,12 +11778,13 @@ components:Format: projects/{project}/releases/{release}type:enum:- - TYPE_UNSPECIFIED+ - DATABASE_CHANGE_TYPE_UNSPECIFIED- MIGRATE- MIGRATE_SDL- MIGRATE_GHOST- DATAtype: string+ description: Type is the database change type.format: enumghostFlags:type: objectdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex aabcad79f0..ef62952172 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -15,6 +15,7 @@- [Position](#bytebase-v1-Position)- [Range](#bytebase-v1-Range)+ - [DatabaseChangeType](#bytebase-v1-DatabaseChangeType)- [Engine](#bytebase-v1-Engine)- [ExportFormat](#bytebase-v1-ExportFormat)- [State](#bytebase-v1-State)@@ -454,7 +455,6 @@- [SearchPlansResponse](#bytebase-v1-SearchPlansResponse)- [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest)- - [Plan.ChangeDatabaseConfig.Type](#bytebase-v1-Plan-ChangeDatabaseConfig-Type)- [PlanCheckRun.Result.Status](#bytebase-v1-PlanCheckRun-Result-Status)- [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status)- [PlanCheckRun.Type](#bytebase-v1-PlanCheckRun-Type)@@ -794,6 +794,21 @@ offset.+<a name="bytebase-v1-DatabaseChangeType"></a>++### DatabaseChangeType+DatabaseChangeType is the database change type.++| Name | Number | Description |+| ---- | ------ | ----------- |+| DATABASE_CHANGE_TYPE_UNSPECIFIED | 0 | |+| 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. |+| DATA | 6 | Used for DML change. |+++<a name="bytebase-v1-Engine"></a>### Engine@@ -7321,7 +7336,7 @@ When paginating, all other parameters provided to `ListPlans` must match the cal| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. || sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} || release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |-| type | [Plan.ChangeDatabaseConfig.Type](#bytebase-v1-Plan-ChangeDatabaseConfig-Type) | | |+| type | [DatabaseChangeType](#bytebase-v1-DatabaseChangeType) | | Type is the database change type. || ghost_flags | [Plan.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-v1-Plan-ChangeDatabaseConfig-GhostFlagsEntry) | repeated | || enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |@@ -7616,21 +7631,6 @@ The plan's `name` field is used to identify the plan to update. Format: proj-<a name="bytebase-v1-Plan-ChangeDatabaseConfig-Type"></a>--### Plan.ChangeDatabaseConfig.Type-Type is the database change type.--| Name | Number | Description |-| ---- | ------ | ----------- |-| TYPE_UNSPECIFIED | 0 | |-| 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. |-| DATA | 6 | Used for DML change. |---<a name="bytebase-v1-PlanCheckRun-Result-Status"></a>### PlanCheckRun.Result.Statusdiff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex adece55c59..8aa39811c6 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -218,6 +218,10 @@</li>+ <li>+ <a href="#bytebase.v1.DatabaseChangeType"><span class="badge">E</span>DatabaseChangeType</a>+ </li>+<li><a href="#bytebase.v1.Engine"><span class="badge">E</span>Engine</a></li>@@ -1912,10 +1916,6 @@</li>- <li>- <a href="#bytebase.v1.Plan.ChangeDatabaseConfig.Type"><span class="badge">E</span>Plan.ChangeDatabaseConfig.Type</a>- </li>-<li><a href="#bytebase.v1.PlanCheckRun.Result.Status"><span class="badge">E</span>PlanCheckRun.Result.Status</a></li>@@ -3038,6 +3038,47 @@+ <h3 id="bytebase.v1.DatabaseChangeType">DatabaseChangeType</h3>+ <p>DatabaseChangeType is the database change type.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>DATABASE_CHANGE_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MIGRATE</td>+ <td>2</td>+ <td><p>Used for DDL changes including CREATE DATABASE.</p></td>+ </tr>++ <tr>+ <td>MIGRATE_SDL</td>+ <td>3</td>+ <td><p>Used for schema changes via state-based schema migration including CREATE DATABASE.</p></td>+ </tr>++ <tr>+ <td>MIGRATE_GHOST</td>+ <td>4</td>+ <td><p>Used for DDL changes using gh-ost.</p></td>+ </tr>++ <tr>+ <td>DATA</td>+ <td>6</td>+ <td><p>Used for DML change.</p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.v1.Engine">Engine</h3><p></p><table class="enum-table">@@ -20622,9 +20663,9 @@ Format: projects/{project}/releases/{release} </p></td><tr><td>type</td>- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig.Type">Plan.ChangeDatabaseConfig.Type</a></td>+ <td><a href="#bytebase.v1.DatabaseChangeType">DatabaseChangeType</a></td><td></td>- <td><p> </p></td>+ <td><p>Type is the database change type. </p></td></tr><tr>@@ -21347,47 +21388,6 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig.Type">Plan.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>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>MIGRATE</td>- <td>2</td>- <td><p>Used for DDL changes including CREATE DATABASE.</p></td>- </tr>-- <tr>- <td>MIGRATE_SDL</td>- <td>3</td>- <td><p>Used for schema changes via state-based schema migration including CREATE DATABASE.</p></td>- </tr>-- <tr>- <td>MIGRATE_GHOST</td>- <td>4</td>- <td><p>Used for DDL changes using gh-ost.</p></td>- </tr>-- <tr>- <td>DATA</td>- <td>6</td>- <td><p>Used for DML change.</p></td>- </tr>-- </tbody>- </table>-<h3 id="bytebase.v1.PlanCheckRun.Result.Status">PlanCheckRun.Result.Status</h3><p></p><table class="enum-table">diff --git a/proto/v1/v1/common.proto b/proto/v1/v1/common.protoindex 1ea8a27c38..8de7c82253 100644--- a/proto/v1/v1/common.proto+++ b/proto/v1/v1/common.proto@@ -68,3 +68,16 @@ message Range {int32 start = 1;int32 end = 2;}++// DatabaseChangeType is the database change type.+enum DatabaseChangeType {+ DATABASE_CHANGE_TYPE_UNSPECIFIED = 0;+ // Used for DDL changes including CREATE DATABASE.+ MIGRATE = 2;+ // Used for schema changes via state-based schema migration including CREATE DATABASE.+ MIGRATE_SDL = 3;+ // Used for DDL changes using gh-ost.+ MIGRATE_GHOST = 4;+ // Used for DML change.+ DATA = 6;+}diff --git a/proto/v1/v1/plan_service.proto b/proto/v1/v1/plan_service.protoindex 3ba24e6bbe..d0ac8d05f7 100644--- a/proto/v1/v1/plan_service.proto+++ b/proto/v1/v1/plan_service.proto@@ -313,18 +313,7 @@ message Plan {string release = 9 [(google.api.resource_reference) = {type: "bytebase.com/Release"}];// Type is the database change type.- enum Type {- TYPE_UNSPECIFIED = 0;- // Used for DDL changes including CREATE DATABASE.- MIGRATE = 2;- // Used for schema changes via state-based schema migration including CREATE DATABASE.- MIGRATE_SDL = 3;- // Used for DDL changes using gh-ost.- MIGRATE_GHOST = 4;- // Used for DML change.- DATA = 6;- }- Type type = 3;+ DatabaseChangeType type = 3;map<string, string> ghost_flags = 7;