Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(branching): add schema config in sheet payload proto (#8491)
h3n4l67d7777568dc
diff --git a/frontend/src/types/proto/store/sheet.ts b/frontend/src/types/proto/store/sheet.tsindex 3e187cd86e..37e37fbdbe 100644--- a/frontend/src/types/proto/store/sheet.ts+++ b/frontend/src/types/proto/store/sheet.ts@@ -2,6 +2,7 @@import Long from "long";import _m0 from "protobufjs/minimal";import { Engine, engineFromJSON, engineToJSON } from "./common";+import { SchemaConfig } from "./database";import { PushEvent } from "./vcs";export const protobufPackage = "bytebase.store";@@ -9,7 +10,11 @@ export const protobufPackage = "bytebase.store";export interface SheetPayload {type: SheetPayload_Type;vcsPayload: SheetPayload_VCSPayload | undefined;- schemaDesign: SheetPayload_SchemaDesign | undefined;+ schemaDesign:+ | SheetPayload_SchemaDesign+ | undefined;+ /** schema_config will be apply to the given database after executing statement, only be used in schema design for now. */+ schemaConfig: SchemaConfig | undefined;}/** Type of the SheetPayload. */@@ -118,7 +123,7 @@ export interface SheetPayload_SchemaDesign_Protection {}function createBaseSheetPayload(): SheetPayload {- return { type: 0, vcsPayload: undefined, schemaDesign: undefined };+ return { type: 0, vcsPayload: undefined, schemaDesign: undefined, schemaConfig: undefined };}export const SheetPayload = {@@ -132,6 +137,9 @@ export const SheetPayload = {if (message.schemaDesign !== undefined) {SheetPayload_SchemaDesign.encode(message.schemaDesign, writer.uint32(26).fork()).ldelim();}+ if (message.schemaConfig !== undefined) {+ SchemaConfig.encode(message.schemaConfig, writer.uint32(34).fork()).ldelim();+ }return writer;},@@ -163,6 +171,13 @@ export const SheetPayload = {message.schemaDesign = SheetPayload_SchemaDesign.decode(reader, reader.uint32());continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.schemaConfig = SchemaConfig.decode(reader, reader.uint32());+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -177,6 +192,7 @@ export const SheetPayload = {type: isSet(object.type) ? sheetPayload_TypeFromJSON(object.type) : 0,vcsPayload: isSet(object.vcsPayload) ? SheetPayload_VCSPayload.fromJSON(object.vcsPayload) : undefined,schemaDesign: isSet(object.schemaDesign) ? SheetPayload_SchemaDesign.fromJSON(object.schemaDesign) : undefined,+ schemaConfig: isSet(object.schemaConfig) ? SchemaConfig.fromJSON(object.schemaConfig) : undefined,};},@@ -187,6 +203,8 @@ export const SheetPayload = {(obj.vcsPayload = message.vcsPayload ? SheetPayload_VCSPayload.toJSON(message.vcsPayload) : undefined);message.schemaDesign !== undefined &&(obj.schemaDesign = message.schemaDesign ? SheetPayload_SchemaDesign.toJSON(message.schemaDesign) : undefined);+ message.schemaConfig !== undefined &&+ (obj.schemaConfig = message.schemaConfig ? SchemaConfig.toJSON(message.schemaConfig) : undefined);return obj;},@@ -203,6 +221,9 @@ export const SheetPayload = {message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)? SheetPayload_SchemaDesign.fromPartial(object.schemaDesign): undefined;+ message.schemaConfig = (object.schemaConfig !== undefined && object.schemaConfig !== null)+ ? SchemaConfig.fromPartial(object.schemaConfig)+ : undefined;return message;},};diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 3ecd5abf1a..86e5f561bc 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -2544,6 +2544,7 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.| type | [SheetPayload.Type](#bytebase-store-SheetPayload-Type) | | || vcs_payload | [SheetPayload.VCSPayload](#bytebase-store-SheetPayload-VCSPayload) | | || schema_design | [SheetPayload.SchemaDesign](#bytebase-store-SheetPayload-SchemaDesign) | | |+| schema_config | [SchemaConfig](#bytebase-store-SchemaConfig) | | schema_config will be apply to the given database after executing statement, only be used in schema design for now. |diff --git a/proto/generated-go/store/sheet.pb.go b/proto/generated-go/store/sheet.pb.goindex 93973f4d71..817af972cf 100644--- a/proto/generated-go/store/sheet.pb.go+++ b/proto/generated-go/store/sheet.pb.go@@ -126,6 +126,8 @@ type SheetPayload struct {Type SheetPayload_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bytebase.store.SheetPayload_Type" json:"type,omitempty"`VcsPayload *SheetPayload_VCSPayload `protobuf:"bytes,2,opt,name=vcs_payload,json=vcsPayload,proto3" json:"vcs_payload,omitempty"`SchemaDesign *SheetPayload_SchemaDesign `protobuf:"bytes,3,opt,name=schema_design,json=schemaDesign,proto3" json:"schema_design,omitempty"`+ // schema_config will be apply to the given database after executing statement, only be used in schema design for now.+ SchemaConfig *SchemaConfig `protobuf:"bytes,4,opt,name=schema_config,json=schemaConfig,proto3" json:"schema_config,omitempty"`}func (x *SheetPayload) Reset() {@@ -181,6 +183,13 @@ func (x *SheetPayload) GetSchemaDesign() *SheetPayload_SchemaDesign {return nil}+func (x *SheetPayload) GetSchemaConfig() *SchemaConfig {+ if x != nil {+ return x.SchemaConfig+ }+ return nil+}+type SheetPayload_VCSPayload struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -423,74 +432,80 @@ var file_store_sheet_proto_rawDesc = []byte{0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x70, 0x72,0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,0x6f, 0x72, 0x65, 0x1a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,- 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76,- 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x08, 0x0a, 0x0c, 0x53, 0x68, 0x65,- 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70,- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x64,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x73,+ 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8,+ 0x08, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,+ 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65,+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x61,+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x65,+ 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x56, 0x43, 0x53, 0x50, 0x61, 0x79,+ 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0a, 0x76, 0x63, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,+ 0x12, 0x4e, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67,+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61,+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,+ 0x67, 0x6e, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e,+ 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,+ 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43,+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e,+ 0x66, 0x69, 0x67, 0x1a, 0xf4, 0x01, 0x0a, 0x0a, 0x56, 0x43, 0x53, 0x50, 0x61, 0x79, 0x6c, 0x6f,+ 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,+ 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04,+ 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65,+ 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74,+ 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x20,+ 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x73, 0x18, 0x06,+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x73,+ 0x12, 0x38, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x07,+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,+ 0x09, 0x70, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0xfb, 0x03, 0x0a, 0x0c, 0x53,+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x42, 0x0a, 0x04, 0x74,+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74,+ 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,+ 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 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,+ 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x68, 0x65, 0x65,+ 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x61, 0x73, 0x65,+ 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x62,+ 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64,+ 0x65, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16,+ 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,+ 0x73, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69,+ 0x6e, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,+ 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x62, 0x61, 0x73, 0x65,+ 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72,+ 0x79, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f,+ 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61,- 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,- 0x12, 0x48, 0x0a, 0x0b, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18,- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c,- 0x6f, 0x61, 0x64, 0x2e, 0x56, 0x43, 0x53, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0a,- 0x76, 0x63, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4e, 0x0a, 0x0d, 0x73, 0x63,- 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,- 0x72, 0x65, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e,- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x0c, 0x73, 0x63,- 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x1a, 0xf4, 0x01, 0x0a, 0x0a, 0x56,- 0x43, 0x53, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c,- 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69,- 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70,- 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50,- 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f,- 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12,- 0x24, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69,- 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d,- 0x6d, 0x69, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79,- 0x6e, 0x63, 0x5f, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x61, 0x73,- 0x74, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x5f,- 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x73,- 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x70, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e,- 0x74, 0x1a, 0xfb, 0x03, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,- 0x67, 0x6e, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,- 0x32, 0x2e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,- 0x65, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53,- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65,- 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 0x2a, 0x0a, 0x11, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69,- 0x6e, 0x65, 0x5f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74,- 0x49, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73,- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x64, 0x18,- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53,- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a,- 0x1a, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,- 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x17, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67,- 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0a, 0x70, 0x72,- 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,- 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53, 0x63, 0x68,- 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63,- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,- 0x1a, 0x3a, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c,- 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x75,- 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f,- 0x77, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x50, 0x75, 0x73, 0x68, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x04,- 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41,- 0x49, 0x4e, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50,- 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x52, 0x41, 0x46, 0x54, 0x10, 0x02, 0x22,- 0x2f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f,- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a,- 0x0d, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01,- 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,+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,+ 0x67, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70,+ 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3a, 0x0a, 0x0a, 0x50, 0x72, 0x6f,+ 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77,+ 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x50,+ 0x75, 0x73, 0x68, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,+ 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,+ 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x5f, 0x42, 0x52, 0x41, 0x4e,+ 0x43, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c,+ 0x5f, 0x44, 0x52, 0x41, 0x46, 0x54, 0x10, 0x02, 0x22, 0x2f, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65,+ 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41,+ 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 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 (@@ -514,22 +529,24 @@ var file_store_sheet_proto_goTypes = []interface{}{(*SheetPayload_VCSPayload)(nil), // 3: bytebase.store.SheetPayload.VCSPayload(*SheetPayload_SchemaDesign)(nil), // 4: bytebase.store.SheetPayload.SchemaDesign(*SheetPayload_SchemaDesign_Protection)(nil), // 5: bytebase.store.SheetPayload.SchemaDesign.Protection- (*PushEvent)(nil), // 6: bytebase.store.PushEvent- (Engine)(0), // 7: bytebase.store.Engine+ (*SchemaConfig)(nil), // 6: bytebase.store.SchemaConfig+ (*PushEvent)(nil), // 7: bytebase.store.PushEvent+ (Engine)(0), // 8: bytebase.store.Engine}var file_store_sheet_proto_depIdxs = []int32{0, // 0: bytebase.store.SheetPayload.type:type_name -> bytebase.store.SheetPayload.Type3, // 1: bytebase.store.SheetPayload.vcs_payload:type_name -> bytebase.store.SheetPayload.VCSPayload4, // 2: bytebase.store.SheetPayload.schema_design:type_name -> bytebase.store.SheetPayload.SchemaDesign- 6, // 3: bytebase.store.SheetPayload.VCSPayload.push_event:type_name -> bytebase.store.PushEvent- 1, // 4: bytebase.store.SheetPayload.SchemaDesign.type:type_name -> bytebase.store.SheetPayload.SchemaDesign.Type- 7, // 5: bytebase.store.SheetPayload.SchemaDesign.engine:type_name -> bytebase.store.Engine- 5, // 6: bytebase.store.SheetPayload.SchemaDesign.protection:type_name -> bytebase.store.SheetPayload.SchemaDesign.Protection- 7, // [7:7] is the sub-list for method output_type- 7, // [7:7] is the sub-list for method input_type- 7, // [7:7] is the sub-list for extension type_name- 7, // [7:7] is the sub-list for extension extendee- 0, // [0:7] is the sub-list for field type_name+ 6, // 3: bytebase.store.SheetPayload.schema_config:type_name -> bytebase.store.SchemaConfig+ 7, // 4: bytebase.store.SheetPayload.VCSPayload.push_event:type_name -> bytebase.store.PushEvent+ 1, // 5: bytebase.store.SheetPayload.SchemaDesign.type:type_name -> bytebase.store.SheetPayload.SchemaDesign.Type+ 8, // 6: bytebase.store.SheetPayload.SchemaDesign.engine:type_name -> bytebase.store.Engine+ 5, // 7: bytebase.store.SheetPayload.SchemaDesign.protection:type_name -> bytebase.store.SheetPayload.SchemaDesign.Protection+ 8, // [8:8] is the sub-list for method output_type+ 8, // [8:8] is the sub-list for method input_type+ 8, // [8:8] is the sub-list for extension type_name+ 8, // [8:8] is the sub-list for extension extendee+ 0, // [0:8] is the sub-list for field type_name}func init() { file_store_sheet_proto_init() }@@ -538,6 +555,7 @@ func file_store_sheet_proto_init() {return}file_store_common_proto_init()+ file_store_database_proto_init()file_store_vcs_proto_init()if !protoimpl.UnsafeEnabled {file_store_sheet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {diff --git a/proto/store/sheet.proto b/proto/store/sheet.protoindex 4f0c10bec3..50ef297384 100644--- a/proto/store/sheet.proto+++ b/proto/store/sheet.proto@@ -3,6 +3,7 @@ syntax = "proto3";package bytebase.store;import "store/common.proto";+import "store/database.proto";import "store/vcs.proto";option go_package = "generated-go/store";@@ -54,4 +55,7 @@ message SheetPayload {Protection protection = 6;}SchemaDesign schema_design = 3;++ // schema_config will be apply to the given database after executing statement, only be used in schema design for now.+ SchemaConfig schema_config = 4;}