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: update backend for schema template setting (#7094)
ecmadaoc71f44556339
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 340c17d93e..45ed8154ce 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -12,7 +12,9 @@ import ("google.golang.org/grpc/status""google.golang.org/protobuf/encoding/protojson""google.golang.org/protobuf/reflect/protoreflect"+ "google.golang.org/protobuf/testing/protocmp"+ "github.com/google/go-cmp/cmp""github.com/pkg/errors""github.com/bytebase/bytebase/backend/common"@@ -22,9 +24,12 @@ import (api "github.com/bytebase/bytebase/backend/legacyapi""github.com/bytebase/bytebase/backend/plugin/app/feishu""github.com/bytebase/bytebase/backend/plugin/mail"+ parser "github.com/bytebase/bytebase/backend/plugin/parser/sql""github.com/bytebase/bytebase/backend/store"storepb "github.com/bytebase/bytebase/proto/generated-go/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"++ "github.com/bytebase/bytebase/backend/plugin/parser/sql/edit")// SettingService implements the setting service.@@ -66,6 +71,7 @@ var whitelistSettings = []api.SettingName{api.SettingWorkspaceProfile,api.SettingWorkspaceExternalApproval,api.SettingEnterpriseTrial,+ api.SettingSchemaTemplate,}var (@@ -397,6 +403,67 @@ func (s *SettingService) SetSetting(ctx context.Context, request *v1pb.SetSettinstoreSettingValue = string(bytes)case api.SettingEnterpriseTrial:return nil, status.Errorf(codes.InvalidArgument, "cannot set setting %s", settingName)+ case api.SettingSchemaTemplate:+ oldSetting, err := s.store.GetSchemaTemplateSetting(ctx)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to get schema template setting: %v", err)+ }+ oldTemplateMap := map[string]*v1pb.SchemaTemplateSetting_FieldTemplate{}+ for _, template := range convertToSchemaTemplateSetting(oldSetting).FieldTemplates {+ oldTemplateMap[template.Id] = template+ }++ schemaTemplateSetting := request.Setting.Value.GetSchemaTemplateSettingValue()+ if schemaTemplateSetting == nil {+ return nil, status.Errorf(codes.InvalidArgument, "value cannot be nil when setting schema template setting")+ }++ // validate the changed template+ for _, template := range schemaTemplateSetting.FieldTemplates {+ oldTemplate, ok := oldTemplateMap[template.Id]+ if ok && cmp.Equal(oldTemplate, template, protocmp.Transform()) {+ continue+ }+ engineType := parser.EngineType(template.Engine.String())+ var defaultVal string+ if template.Column.Default != nil {+ defaultVal = template.Column.Default.Value+ }+ validateResultList, err := edit.ValidateDatabaseEdit(engineType, &api.DatabaseEdit{+ DatabaseID: api.UnknownID,+ CreateTableList: []*api.CreateTableContext{+ {+ Name: "validation",+ Type: "BASE TABLE",+ AddColumnList: []*api.AddColumnContext{+ {+ Name: template.Column.Name,+ Type: template.Column.Type,+ Default: &defaultVal,+ Nullable: template.Column.Nullable,+ Comment: template.Column.Comment,+ },+ },+ },+ },+ })+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to validate template, error: %v", err)+ }+ if len(validateResultList) != 0 {+ return nil, status.Errorf(codes.InvalidArgument, validateResultList[0].Message)+ }+ }++ payload := new(storepb.SchemaTemplateSetting)+ if err := convertV1PbToStorePb(schemaTemplateSetting, payload); err != nil {+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting value for %s with error: %v", apiSettingName, err)+ }+ bytes, err := protojson.Marshal(payload)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to marshal external approval setting, error: %v", err)+ }+ storeSettingValue = string(bytes)default:storeSettingValue = request.Setting.Value.GetStringValue()}@@ -546,6 +613,20 @@ func (s *SettingService) convertToSettingMessage(ctx context.Context, setting *s},},}, nil+ case api.SettingSchemaTemplate:+ storeValue := new(storepb.SchemaTemplateSetting)+ if err := protojson.Unmarshal([]byte(setting.Value), storeValue); err != nil {+ return nil, status.Errorf(codes.Internal, "failed to unmarshal setting values for %s with error: %v", setting.Name, err)+ }+ v1Value := convertToSchemaTemplateSetting(storeValue)+ return &v1pb.Setting{+ Name: settingName,+ Value: &v1pb.Value{+ Value: &v1pb.Value_SchemaTemplateSettingValue{+ SchemaTemplateSettingValue: v1Value,+ },+ },+ }, nildefault:return &v1pb.Setting{Name: settingName,@@ -777,6 +858,27 @@ func convertToExternalApprovalSettingNode(o *storepb.ExternalApprovalSetting_Nod}}+func convertToSchemaTemplateSetting(s *storepb.SchemaTemplateSetting) *v1pb.SchemaTemplateSetting {+ v1Templates := []*v1pb.SchemaTemplateSetting_FieldTemplate{}+ for _, template := range s.FieldTemplates {+ v1Templates = append(v1Templates, &v1pb.SchemaTemplateSetting_FieldTemplate{+ Id: template.Id,+ Engine: v1pb.Engine(template.Engine),+ Column: &v1pb.ColumnMetadata{+ Name: template.Column.Name,+ Type: template.Column.Type,+ Default: template.Column.Default,+ Nullable: template.Column.Nullable,+ Comment: template.Column.Comment,+ },+ })+ }++ return &v1pb.SchemaTemplateSetting{+ FieldTemplates: v1Templates,+ }+}+func convertExternalApprovalSetting(s *v1pb.ExternalApprovalSetting) *storepb.ExternalApprovalSetting {return &storepb.ExternalApprovalSetting{Nodes: convertExternalApprovalSettingNodes(s.Nodes),diff --git a/backend/legacyapi/plan.go b/backend/legacyapi/plan.goindex d3da3dea24..8acd0bdb01 100644--- a/backend/legacyapi/plan.go+++ b/backend/legacyapi/plan.go@@ -113,6 +113,8 @@ const (FeatureEncryptedSecrets FeatureType = "bb.feature.encrypted-secrets"// FeatureDatabaseGrouping allows user to create database/schema groups.FeatureDatabaseGrouping FeatureType = "bb.feature.database-grouping"+ // FeatureSchemaTemplate allows user to create and use the schema template.+ FeatureSchemaTemplate FeatureType = "bb.feature.schema-template"// VCS Integration.@@ -214,6 +216,8 @@ func (e FeatureType) Name() string {return "Encrypted secrets"case FeatureDatabaseGrouping:return "Database grouping"+ case FeatureSchemaTemplate:+ return "Schema template"// VCS Integrationcase FeatureVCSSchemaWriteBack:return "Schema write-back"@@ -296,6 +300,7 @@ var FeatureMatrix = map[FeatureType][3]bool{FeatureTaskScheduleTime: {false, true, true},FeatureEncryptedSecrets: {false, true, true},FeatureDatabaseGrouping: {false, false, true},+ FeatureSchemaTemplate: {false, false, true},// VCS IntegrationFeatureVCSSchemaWriteBack: {false, true, true},FeatureVCSSheetSync: {false, true, true},diff --git a/backend/legacyapi/setting.go b/backend/legacyapi/setting.goindex a35702684b..50c9fe2800 100644--- a/backend/legacyapi/setting.go+++ b/backend/legacyapi/setting.go@@ -38,6 +38,8 @@ const (SettingPluginAgent SettingName = "bb.plugin.agent"// SettingWorkspaceMailDelivery is the setting name for workspace mail delivery.SettingWorkspaceMailDelivery SettingName = "bb.workspace.mail-delivery"+ // SettingSchemaTemplate is the setting name for schema template.+ SettingSchemaTemplate SettingName = "bb.workspace.schema-template")// IMType is the type of IM.diff --git a/backend/plugin/parser/sql/edit/mysql/validate.go b/backend/plugin/parser/sql/edit/mysql/validate.goindex 48f0803d59..6f0dd4b1cb 100644--- a/backend/plugin/parser/sql/edit/mysql/validate.go+++ b/backend/plugin/parser/sql/edit/mysql/validate.go@@ -30,7 +30,7 @@ func (*SchemaEditor) ValidateDatabaseEdit(databaseEdit *api.DatabaseEdit) ([]*apMessage: fmt.Sprintf("invalid column type `%s`", addColumnContext.Type),})}- if addColumnContext.Default != nil {+ if columnType != nil && addColumnContext.Default != nil {// TEXT will be regarded as mysql.TypeBlob in the TiDB parser.if columnType.GetType() == mysql.TypeBlob || columnType.GetType() == mysql.TypeGeometry || columnType.GetType() == mysql.TypeJSON {validateResultList = append(validateResultList, &api.ValidateResult{diff --git a/backend/server/server.go b/backend/server/server.goindex 8bc786d250..6b37908458 100644--- a/backend/server/server.go+++ b/backend/server/server.go@@ -848,6 +848,19 @@ func (s *Server) getInitSetting(ctx context.Context, datastore *store.Store) (*wreturn nil, err}+ // initial schema template setting+ schemaTemplateSettingValue, err := protojson.Marshal(&storepb.SchemaTemplateSetting{})+ if err != nil {+ return nil, errors.Wrap(err, "failed to marshal initial schema template setting")+ }+ if _, _, err := datastore.CreateSettingIfNotExistV2(ctx, &store.SettingMessage{+ Name: api.SettingSchemaTemplate,+ Value: string(schemaTemplateSettingValue),+ Description: "The schema template setting",+ }, api.SystemBotID); err != nil {+ return nil, err+ }+// initial workspace approval settingapprovalSettingValue, err := protojson.Marshal(&storepb.WorkspaceApprovalSetting{})if err != nil {diff --git a/backend/store/setting.go b/backend/store/setting.goindex b37a2809db..c9007dbc7e 100644--- a/backend/store/setting.go+++ b/backend/store/setting.go@@ -132,6 +132,26 @@ func (s *Store) GetWorkspaceExternalApprovalSetting(ctx context.Context) (*storereturn payload, nil}+// GetSchemaTemplateSetting gets the schema template setting.+func (s *Store) GetSchemaTemplateSetting(ctx context.Context) (*storepb.SchemaTemplateSetting, error) {+ settingName := api.SettingSchemaTemplate+ setting, err := s.GetSettingV2(ctx, &FindSettingMessage{+ Name: &settingName,+ })+ if err != nil {+ return nil, errors.Wrapf(err, "failed to get setting %s", settingName)+ }+ if setting == nil {+ return &storepb.SchemaTemplateSetting{}, nil+ }++ payload := new(storepb.SchemaTemplateSetting)+ if err := protojson.Unmarshal([]byte(setting.Value), payload); err != nil {+ return nil, err+ }+ return payload, nil+}+// DeleteCache deletes the cache.func (s *Store) DeleteCache() {s.settingCache = sync.Map{}diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.tsindex cd67cf0c55..deefc8a47e 100644--- a/frontend/src/types/proto/store/setting.ts+++ b/frontend/src/types/proto/store/setting.ts@@ -183,7 +183,7 @@ export interface SchemaTemplateSetting {export interface SchemaTemplateSetting_FieldTemplate {id: string;engine: Engine;- payload?: ColumnMetadata | undefined;+ column?: ColumnMetadata | undefined;}function createBaseWorkspaceProfileSetting(): WorkspaceProfileSetting {@@ -927,7 +927,7 @@ export const SchemaTemplateSetting = {};function createBaseSchemaTemplateSetting_FieldTemplate(): SchemaTemplateSetting_FieldTemplate {- return { id: "", engine: 0, payload: undefined };+ return { id: "", engine: 0, column: undefined };}export const SchemaTemplateSetting_FieldTemplate = {@@ -938,8 +938,8 @@ export const SchemaTemplateSetting_FieldTemplate = {if (message.engine !== 0) {writer.uint32(16).int32(message.engine);}- if (message.payload !== undefined) {- ColumnMetadata.encode(message.payload, writer.uint32(26).fork()).ldelim();+ if (message.column !== undefined) {+ ColumnMetadata.encode(message.column, writer.uint32(26).fork()).ldelim();}return writer;},@@ -970,7 +970,7 @@ export const SchemaTemplateSetting_FieldTemplate = {break;}- message.payload = ColumnMetadata.decode(reader, reader.uint32());+ message.column = ColumnMetadata.decode(reader, reader.uint32());continue;}if ((tag & 7) === 4 || tag === 0) {@@ -985,7 +985,7 @@ export const SchemaTemplateSetting_FieldTemplate = {return {id: isSet(object.id) ? String(object.id) : "",engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,- payload: isSet(object.payload) ? ColumnMetadata.fromJSON(object.payload) : undefined,+ column: isSet(object.column) ? ColumnMetadata.fromJSON(object.column) : undefined,};},@@ -993,8 +993,7 @@ export const SchemaTemplateSetting_FieldTemplate = {const obj: any = {};message.id !== undefined && (obj.id = message.id);message.engine !== undefined && (obj.engine = engineToJSON(message.engine));- message.payload !== undefined &&- (obj.payload = message.payload ? ColumnMetadata.toJSON(message.payload) : undefined);+ message.column !== undefined && (obj.column = message.column ? ColumnMetadata.toJSON(message.column) : undefined);return obj;},@@ -1006,8 +1005,8 @@ export const SchemaTemplateSetting_FieldTemplate = {const message = createBaseSchemaTemplateSetting_FieldTemplate();message.id = object.id ?? "";message.engine = object.engine ?? 0;- message.payload = (object.payload !== undefined && object.payload !== null)- ? ColumnMetadata.fromPartial(object.payload)+ message.column = (object.column !== undefined && object.column !== null)+ ? ColumnMetadata.fromPartial(object.column): undefined;return message;},diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex 9a55f6d314..654a495bf0 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -320,7 +320,7 @@ export interface SchemaTemplateSetting {export interface SchemaTemplateSetting_FieldTemplate {id: string;engine: Engine;- payload?: ColumnMetadata | undefined;+ column?: ColumnMetadata | undefined;}export interface WorkspaceTrialSetting {@@ -1880,7 +1880,7 @@ export const SchemaTemplateSetting = {};function createBaseSchemaTemplateSetting_FieldTemplate(): SchemaTemplateSetting_FieldTemplate {- return { id: "", engine: 0, payload: undefined };+ return { id: "", engine: 0, column: undefined };}export const SchemaTemplateSetting_FieldTemplate = {@@ -1891,8 +1891,8 @@ export const SchemaTemplateSetting_FieldTemplate = {if (message.engine !== 0) {writer.uint32(16).int32(message.engine);}- if (message.payload !== undefined) {- ColumnMetadata.encode(message.payload, writer.uint32(26).fork()).ldelim();+ if (message.column !== undefined) {+ ColumnMetadata.encode(message.column, writer.uint32(26).fork()).ldelim();}return writer;},@@ -1923,7 +1923,7 @@ export const SchemaTemplateSetting_FieldTemplate = {break;}- message.payload = ColumnMetadata.decode(reader, reader.uint32());+ message.column = ColumnMetadata.decode(reader, reader.uint32());continue;}if ((tag & 7) === 4 || tag === 0) {@@ -1938,7 +1938,7 @@ export const SchemaTemplateSetting_FieldTemplate = {return {id: isSet(object.id) ? String(object.id) : "",engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,- payload: isSet(object.payload) ? ColumnMetadata.fromJSON(object.payload) : undefined,+ column: isSet(object.column) ? ColumnMetadata.fromJSON(object.column) : undefined,};},@@ -1946,8 +1946,7 @@ export const SchemaTemplateSetting_FieldTemplate = {const obj: any = {};message.id !== undefined && (obj.id = message.id);message.engine !== undefined && (obj.engine = engineToJSON(message.engine));- message.payload !== undefined &&- (obj.payload = message.payload ? ColumnMetadata.toJSON(message.payload) : undefined);+ message.column !== undefined && (obj.column = message.column ? ColumnMetadata.toJSON(message.column) : undefined);return obj;},@@ -1959,8 +1958,8 @@ export const SchemaTemplateSetting_FieldTemplate = {const message = createBaseSchemaTemplateSetting_FieldTemplate();message.id = object.id ?? "";message.engine = object.engine ?? 0;- message.payload = (object.payload !== undefined && object.payload !== null)- ? ColumnMetadata.fromPartial(object.payload)+ message.column = (object.column !== undefined && object.column !== null)+ ? ColumnMetadata.fromPartial(object.column): undefined;return message;},diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex a09f734118..1810a6402c 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -1606,7 +1606,7 @@ Reference: https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#bind| ----- | ---- | ----- | ----------- || id | [string](#string) | | || engine | [Engine](#bytebase-store-Engine) | | |-| payload | [ColumnMetadata](#bytebase-store-ColumnMetadata) | | |+| column | [ColumnMetadata](#bytebase-store-ColumnMetadata) | | |diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 5bdbfabf44..f3f98ab1f2 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -8131,7 +8131,7 @@ When paginating, all other parameters provided to `ListSettings` must match the| ----- | ---- | ----- | ----------- || id | [string](#string) | | || engine | [Engine](#bytebase-v1-Engine) | | |-| payload | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | | |+| column | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | | |diff --git a/proto/generated-go/store/setting.pb.go b/proto/generated-go/store/setting.pb.goindex 4eb73e57ec..c5ba9246c2 100644--- a/proto/generated-go/store/setting.pb.go+++ b/proto/generated-go/store/setting.pb.go@@ -676,9 +676,9 @@ type SchemaTemplateSetting_FieldTemplate struct {sizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`- Engine Engine `protobuf:"varint,2,opt,name=engine,proto3,enum=bytebase.store.Engine" json:"engine,omitempty"`- Payload *ColumnMetadata `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Engine Engine `protobuf:"varint,2,opt,name=engine,proto3,enum=bytebase.store.Engine" json:"engine,omitempty"`+ Column *ColumnMetadata `protobuf:"bytes,3,opt,name=column,proto3" json:"column,omitempty"`}func (x *SchemaTemplateSetting_FieldTemplate) Reset() {@@ -727,9 +727,9 @@ func (x *SchemaTemplateSetting_FieldTemplate) GetEngine() Engine {return Engine_ENGINE_UNSPECIFIED}-func (x *SchemaTemplateSetting_FieldTemplate) GetPayload() *ColumnMetadata {+func (x *SchemaTemplateSetting_FieldTemplate) GetColumn() *ColumnMetadata {if x != nil {- return x.Payload+ return x.Column}return nil}@@ -834,7 +834,7 @@ var file_store_setting_proto_rawDesc = []byte{0x02, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54,0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x41,0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52,- 0x41, 0x4d, 0x5f, 0x4d, 0x44, 0x35, 0x10, 0x04, 0x22, 0x81, 0x02, 0x0a, 0x15, 0x53, 0x63, 0x68,+ 0x41, 0x4d, 0x5f, 0x4d, 0x44, 0x35, 0x10, 0x04, 0x22, 0xff, 0x01, 0x0a, 0x15, 0x53, 0x63, 0x68,0x65, 0x6d, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69,0x6e, 0x67, 0x12, 0x5c, 0x0a, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x74, 0x65, 0x6d, 0x70,0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x79,@@ -842,17 +842,17 @@ var file_store_setting_proto_rawDesc = []byte{0x65, 0x6d, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69,0x6e, 0x67, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,0x52, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,- 0x1a, 0x89, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,+ 0x1a, 0x87, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,0x69, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01,0x28, 0x0e, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69,- 0x6e, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20,- 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64,- 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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,+ 0x6e, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01,+ 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,+ 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,+ 0x74, 0x61, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 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 (@@ -897,7 +897,7 @@ var file_store_setting_proto_depIdxs = []int32{12, // 6: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate13, // 7: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr14, // 8: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine- 15, // 9: bytebase.store.SchemaTemplateSetting.FieldTemplate.payload:type_name -> bytebase.store.ColumnMetadata+ 15, // 9: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata10, // [10:10] is the sub-list for method output_type10, // [10:10] is the sub-list for method input_type10, // [10:10] is the sub-list for extension type_namediff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.goindex 01af201b92..c7cb3b168e 100644--- a/proto/generated-go/v1/setting_service.pb.go+++ b/proto/generated-go/v1/setting_service.pb.go@@ -1461,9 +1461,9 @@ type SchemaTemplateSetting_FieldTemplate struct {sizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`- Engine Engine `protobuf:"varint,2,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`- Payload *ColumnMetadata `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Engine Engine `protobuf:"varint,2,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`+ Column *ColumnMetadata `protobuf:"bytes,3,opt,name=column,proto3" json:"column,omitempty"`}func (x *SchemaTemplateSetting_FieldTemplate) Reset() {@@ -1512,9 +1512,9 @@ func (x *SchemaTemplateSetting_FieldTemplate) GetEngine() Engine {return Engine_ENGINE_UNSPECIFIED}-func (x *SchemaTemplateSetting_FieldTemplate) GetPayload() *ColumnMetadata {+func (x *SchemaTemplateSetting_FieldTemplate) GetColumn() *ColumnMetadata {if x != nil {- return x.Payload+ return x.Column}return nil}@@ -1736,7 +1736,7 @@ var file_v1_setting_service_proto_rawDesc = []byte{0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74,0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xf8, 0x01,+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xf6, 0x01,0x0a, 0x15, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x59, 0x0a, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64,0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,@@ -1744,56 +1744,56 @@ var file_v1_setting_service_proto_rawDesc = []byte{0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74,0x74, 0x69, 0x6e, 0x67, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,0x74, 0x65, 0x52, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,- 0x65, 0x73, 0x1a, 0x83, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70,+ 0x65, 0x73, 0x1a, 0x81, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x65, 0x6d, 0x70,0x6c, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02,0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e,- 0x65, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01,- 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,- 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x98, 0x02, 0x0a, 0x15, 0x57, 0x6f, 0x72,- 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63,- 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70,- 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,- 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,- 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64,- 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x54,- 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x19, 0x0a,- 0x08, 0x6f, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x07, 0x6f, 0x72, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e,- 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x70,- 0x6c, 0x61, 0x6e, 0x32, 0xdc, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53,- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65,- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,+ 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x06,+ 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x98, 0x02, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73,+ 0x70, 0x61, 0x63, 0x65, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75,+ 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,+ 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72,+ 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65,+ 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x74,+ 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x54, 0x69, 0x6d,+ 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f,+ 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f,+ 0x72, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x06,+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x70, 0x6c, 0x61,+ 0x6e, 0x32, 0xdc, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72,+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda, 0x41, 0x00,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74,- 0x69, 0x6e, 0x67, 0x73, 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x24, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,- 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,- 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x72,- 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65,- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69,- 0x6e, 0x67, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74,- 0x69, 0x6e, 0x67, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f,- 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,- 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda, 0x41, 0x00, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x73, 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,+ 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x24, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,+ 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x72, 0x0a, 0x0a,+ 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e,+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d,+ 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,+ 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -1866,7 +1866,7 @@ var file_v1_setting_service_proto_depIdxs = []int32{24, // 22: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate25, // 23: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr26, // 24: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine- 27, // 25: bytebase.v1.SchemaTemplateSetting.FieldTemplate.payload:type_name -> bytebase.v1.ColumnMetadata+ 27, // 25: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata3, // 26: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest5, // 27: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest7, // 28: bytebase.v1.SettingService.SetSetting:input_type -> bytebase.v1.SetSettingRequestdiff --git a/proto/store/setting.proto b/proto/store/setting.protoindex 90b8850984..bc3a2b89e7 100644--- a/proto/store/setting.proto+++ b/proto/store/setting.proto@@ -106,7 +106,7 @@ message SchemaTemplateSetting {Engine engine = 2;- ColumnMetadata payload = 3;+ ColumnMetadata column = 3;}repeated FieldTemplate field_templates = 1;diff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.protoindex b9244cb761..c64bd037b0 100644--- a/proto/v1/setting_service.proto+++ b/proto/v1/setting_service.proto@@ -227,7 +227,7 @@ message SchemaTemplateSetting {// TODO: support category- ColumnMetadata payload = 3;+ ColumnMetadata column = 3;}repeated FieldTemplate field_templates = 1;