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: add schema design to sheet payload (#7009)
boojackd3c188f1733e
diff --git a/frontend/src/types/proto/store/sheet.ts b/frontend/src/types/proto/store/sheet.tsindex 4d9ef641d2..5e97aaa0d1 100644--- a/frontend/src/types/proto/store/sheet.ts+++ b/frontend/src/types/proto/store/sheet.ts@@ -5,9 +5,45 @@ import * as _m0 from "protobufjs/minimal";export const protobufPackage = "bytebase.store";export interface SheetPayload {+ type: SheetPayload_Type;vcsPayload?: SheetPayload_VCSPayload;/** used_by_issues link to the issues where the sheet is used. */usedByIssues: SheetPayload_UsedByIssue[];+ schemaDesign?: SheetPayload_SchemaDesign;+}++/** Type of the SheetPayload. */+export enum SheetPayload_Type {+ TYPE_UNSPECIFIED = 0,+ SCHEMA_DESIGN = 1,+ UNRECOGNIZED = -1,+}++export function sheetPayload_TypeFromJSON(object: any): SheetPayload_Type {+ switch (object) {+ case 0:+ case "TYPE_UNSPECIFIED":+ return SheetPayload_Type.TYPE_UNSPECIFIED;+ case 1:+ case "SCHEMA_DESIGN":+ return SheetPayload_Type.SCHEMA_DESIGN;+ case -1:+ case "UNRECOGNIZED":+ default:+ return SheetPayload_Type.UNRECOGNIZED;+ }+}++export function sheetPayload_TypeToJSON(object: SheetPayload_Type): string {+ switch (object) {+ case SheetPayload_Type.TYPE_UNSPECIFIED:+ return "TYPE_UNSPECIFIED";+ case SheetPayload_Type.SCHEMA_DESIGN:+ return "SCHEMA_DESIGN";+ case SheetPayload_Type.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }}export interface SheetPayload_VCSPayload {@@ -24,17 +60,27 @@ export interface SheetPayload_UsedByIssue {issueTitle: string;}+export interface SheetPayload_SchemaDesign {+ baselineSheetId: number;+}+function createBaseSheetPayload(): SheetPayload {- return { vcsPayload: undefined, usedByIssues: [] };+ return { type: 0, vcsPayload: undefined, usedByIssues: [], schemaDesign: undefined };}export const SheetPayload = {encode(message: SheetPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.type !== 0) {+ writer.uint32(8).int32(message.type);+ }if (message.vcsPayload !== undefined) {- SheetPayload_VCSPayload.encode(message.vcsPayload, writer.uint32(10).fork()).ldelim();+ SheetPayload_VCSPayload.encode(message.vcsPayload, writer.uint32(18).fork()).ldelim();}for (const v of message.usedByIssues) {- SheetPayload_UsedByIssue.encode(v!, writer.uint32(18).fork()).ldelim();+ SheetPayload_UsedByIssue.encode(v!, writer.uint32(26).fork()).ldelim();+ }+ if (message.schemaDesign !== undefined) {+ SheetPayload_SchemaDesign.encode(message.schemaDesign, writer.uint32(34).fork()).ldelim();}return writer;},@@ -47,19 +93,33 @@ export const SheetPayload = {const tag = reader.uint32();switch (tag >>> 3) {case 1:- if (tag !== 10) {+ if (tag !== 8) {break;}- message.vcsPayload = SheetPayload_VCSPayload.decode(reader, reader.uint32());+ message.type = reader.int32() as any;continue;case 2:if (tag !== 18) {break;}+ message.vcsPayload = SheetPayload_VCSPayload.decode(reader, reader.uint32());+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }+message.usedByIssues.push(SheetPayload_UsedByIssue.decode(reader, reader.uint32()));continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.schemaDesign = SheetPayload_SchemaDesign.decode(reader, reader.uint32());+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -71,15 +131,18 @@ export const SheetPayload = {fromJSON(object: any): SheetPayload {return {+ type: isSet(object.type) ? sheetPayload_TypeFromJSON(object.type) : 0,vcsPayload: isSet(object.vcsPayload) ? SheetPayload_VCSPayload.fromJSON(object.vcsPayload) : undefined,usedByIssues: Array.isArray(object?.usedByIssues)? object.usedByIssues.map((e: any) => SheetPayload_UsedByIssue.fromJSON(e)): [],+ schemaDesign: isSet(object.schemaDesign) ? SheetPayload_SchemaDesign.fromJSON(object.schemaDesign) : undefined,};},toJSON(message: SheetPayload): unknown {const obj: any = {};+ message.type !== undefined && (obj.type = sheetPayload_TypeToJSON(message.type));message.vcsPayload !== undefined &&(obj.vcsPayload = message.vcsPayload ? SheetPayload_VCSPayload.toJSON(message.vcsPayload) : undefined);if (message.usedByIssues) {@@ -87,6 +150,8 @@ export const SheetPayload = {} else {obj.usedByIssues = [];}+ message.schemaDesign !== undefined &&+ (obj.schemaDesign = message.schemaDesign ? SheetPayload_SchemaDesign.toJSON(message.schemaDesign) : undefined);return obj;},@@ -96,10 +161,14 @@ export const SheetPayload = {fromPartial(object: DeepPartial<SheetPayload>): SheetPayload {const message = createBaseSheetPayload();+ message.type = object.type ?? 0;message.vcsPayload = (object.vcsPayload !== undefined && object.vcsPayload !== null)? SheetPayload_VCSPayload.fromPartial(object.vcsPayload): undefined;message.usedByIssues = object.usedByIssues?.map((e) => SheetPayload_UsedByIssue.fromPartial(e)) || [];+ message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)+ ? SheetPayload_SchemaDesign.fromPartial(object.schemaDesign)+ : undefined;return message;},};@@ -298,6 +367,62 @@ export const SheetPayload_UsedByIssue = {},};+function createBaseSheetPayload_SchemaDesign(): SheetPayload_SchemaDesign {+ return { baselineSheetId: 0 };+}++export const SheetPayload_SchemaDesign = {+ encode(message: SheetPayload_SchemaDesign, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.baselineSheetId !== 0) {+ writer.uint32(8).int64(message.baselineSheetId);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SheetPayload_SchemaDesign {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSheetPayload_SchemaDesign();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.baselineSheetId = longToNumber(reader.int64() as Long);+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SheetPayload_SchemaDesign {+ return { baselineSheetId: isSet(object.baselineSheetId) ? Number(object.baselineSheetId) : 0 };+ },++ toJSON(message: SheetPayload_SchemaDesign): unknown {+ const obj: any = {};+ message.baselineSheetId !== undefined && (obj.baselineSheetId = Math.round(message.baselineSheetId));+ return obj;+ },++ create(base?: DeepPartial<SheetPayload_SchemaDesign>): SheetPayload_SchemaDesign {+ return SheetPayload_SchemaDesign.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<SheetPayload_SchemaDesign>): SheetPayload_SchemaDesign {+ const message = createBaseSheetPayload_SchemaDesign();+ message.baselineSheetId = object.baselineSheetId ?? 0;+ return message;+ },+};+declare var self: any | undefined;declare var window: any | undefined;declare var global: any | undefined;diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex b86bc78e12..594e762ac2 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -112,9 +112,12 @@- [store/sheet.proto](#store_sheet-proto)- [SheetPayload](#bytebase-store-SheetPayload)+ - [SheetPayload.SchemaDesign](#bytebase-store-SheetPayload-SchemaDesign)- [SheetPayload.UsedByIssue](#bytebase-store-SheetPayload-UsedByIssue)- [SheetPayload.VCSPayload](#bytebase-store-SheetPayload-VCSPayload)+ - [SheetPayload.Type](#bytebase-store-SheetPayload-Type)+- [store/slow_query.proto](#store_slow_query-proto)- [SlowQueryDetails](#bytebase-store-SlowQueryDetails)- [SlowQueryStatistics](#bytebase-store-SlowQueryStatistics)@@ -1655,8 +1658,25 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |+| type | [SheetPayload.Type](#bytebase-store-SheetPayload-Type) | | || vcs_payload | [SheetPayload.VCSPayload](#bytebase-store-SheetPayload-VCSPayload) | | || used_by_issues | [SheetPayload.UsedByIssue](#bytebase-store-SheetPayload-UsedByIssue) | repeated | used_by_issues link to the issues where the sheet is used. |+| schema_design | [SheetPayload.SchemaDesign](#bytebase-store-SheetPayload-SchemaDesign) | | |+++++++<a name="bytebase-store-SheetPayload-SchemaDesign"></a>++### SheetPayload.SchemaDesign++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| baseline_sheet_id | [int64](#int64) | | |@@ -1700,6 +1720,18 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.++<a name="bytebase-store-SheetPayload-Type"></a>++### SheetPayload.Type+Type of the SheetPayload.++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SCHEMA_DESIGN | 1 | |++diff --git a/proto/generated-go/store/sheet.pb.go b/proto/generated-go/store/sheet.pb.goindex a5f919664f..f573f1b41f 100644--- a/proto/generated-go/store/sheet.pb.go+++ b/proto/generated-go/store/sheet.pb.go@@ -20,14 +20,63 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+// Type of the SheetPayload.+type SheetPayload_Type int32++const (+ SheetPayload_TYPE_UNSPECIFIED SheetPayload_Type = 0+ SheetPayload_SCHEMA_DESIGN SheetPayload_Type = 1+)++// Enum value maps for SheetPayload_Type.+var (+ SheetPayload_Type_name = map[int32]string{+ 0: "TYPE_UNSPECIFIED",+ 1: "SCHEMA_DESIGN",+ }+ SheetPayload_Type_value = map[string]int32{+ "TYPE_UNSPECIFIED": 0,+ "SCHEMA_DESIGN": 1,+ }+)++func (x SheetPayload_Type) Enum() *SheetPayload_Type {+ p := new(SheetPayload_Type)+ *p = x+ return p+}++func (x SheetPayload_Type) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (SheetPayload_Type) Descriptor() protoreflect.EnumDescriptor {+ return file_store_sheet_proto_enumTypes[0].Descriptor()+}++func (SheetPayload_Type) Type() protoreflect.EnumType {+ return &file_store_sheet_proto_enumTypes[0]+}++func (x SheetPayload_Type) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use SheetPayload_Type.Descriptor instead.+func (SheetPayload_Type) EnumDescriptor() ([]byte, []int) {+ return file_store_sheet_proto_rawDescGZIP(), []int{0, 0}+}+type SheetPayload struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- VcsPayload *SheetPayload_VCSPayload `protobuf:"bytes,1,opt,name=vcs_payload,json=vcsPayload,proto3" json:"vcs_payload,omitempty"`+ 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"`// used_by_issues link to the issues where the sheet is used.- UsedByIssues []*SheetPayload_UsedByIssue `protobuf:"bytes,2,rep,name=used_by_issues,json=usedByIssues,proto3" json:"used_by_issues,omitempty"`+ UsedByIssues []*SheetPayload_UsedByIssue `protobuf:"bytes,3,rep,name=used_by_issues,json=usedByIssues,proto3" json:"used_by_issues,omitempty"`+ SchemaDesign *SheetPayload_SchemaDesign `protobuf:"bytes,4,opt,name=schema_design,json=schemaDesign,proto3" json:"schema_design,omitempty"`}func (x *SheetPayload) Reset() {@@ -62,6 +111,13 @@ func (*SheetPayload) Descriptor() ([]byte, []int) {return file_store_sheet_proto_rawDescGZIP(), []int{0}}+func (x *SheetPayload) GetType() SheetPayload_Type {+ if x != nil {+ return x.Type+ }+ return SheetPayload_TYPE_UNSPECIFIED+}+func (x *SheetPayload) GetVcsPayload() *SheetPayload_VCSPayload {if x != nil {return x.VcsPayload@@ -76,6 +132,13 @@ func (x *SheetPayload) GetUsedByIssues() []*SheetPayload_UsedByIssue {return nil}+func (x *SheetPayload) GetSchemaDesign() *SheetPayload_SchemaDesign {+ if x != nil {+ return x.SchemaDesign+ }+ return nil+}+type SheetPayload_VCSPayload struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -218,41 +281,103 @@ func (x *SheetPayload_UsedByIssue) GetIssueTitle() string {return ""}+type SheetPayload_SchemaDesign struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ BaselineSheetId int64 `protobuf:"varint,1,opt,name=baseline_sheet_id,json=baselineSheetId,proto3" json:"baseline_sheet_id,omitempty"`+}++func (x *SheetPayload_SchemaDesign) Reset() {+ *x = SheetPayload_SchemaDesign{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_sheet_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SheetPayload_SchemaDesign) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SheetPayload_SchemaDesign) ProtoMessage() {}++func (x *SheetPayload_SchemaDesign) ProtoReflect() protoreflect.Message {+ mi := &file_store_sheet_proto_msgTypes[3]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SheetPayload_SchemaDesign.ProtoReflect.Descriptor instead.+func (*SheetPayload_SchemaDesign) Descriptor() ([]byte, []int) {+ return file_store_sheet_proto_rawDescGZIP(), []int{0, 2}+}++func (x *SheetPayload_SchemaDesign) GetBaselineSheetId() int64 {+ if x != nil {+ return x.BaselineSheetId+ }+ return 0+}+var File_store_sheet_proto protoreflect.FileDescriptorvar 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, 0x22, 0xb0, 0x03, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79,- 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x48, 0x0a, 0x0b, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x79, 0x6c,- 0x6f, 0x61, 0x64, 0x18, 0x01, 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, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x73,- 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 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, 0x55, 0x73, 0x65, 0x64, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65,- 0x52, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x73, 0x1a, 0xba,- 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, 0x1a, 0x49, 0x0a, 0x0b, 0x55,- 0x73, 0x65, 0x64, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73,- 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73,- 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x74,- 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75,- 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 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,+ 0x6f, 0x72, 0x65, 0x22, 0xa4, 0x05, 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, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x79,+ 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 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, 0x55, 0x73, 0x65, 0x64,+ 0x42, 0x79, 0x49, 0x73, 0x73, 0x75, 0x65, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x42, 0x79, 0x49,+ 0x73, 0x73, 0x75, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,+ 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x04, 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, 0xba, 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, 0x1a, 0x49, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x64, 0x42, 0x79, 0x49, 0x73, 0x73, 0x75,+ 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73, 0x73, 0x75, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b,+ 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x1a, 0x3a, 0x0a,+ 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x2a, 0x0a,+ 0x11, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x5f,+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69,+ 0x6e, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x49, 0x64, 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 (@@ -267,20 +392,25 @@ func file_store_sheet_proto_rawDescGZIP() []byte {return file_store_sheet_proto_rawDescData}-var file_store_sheet_proto_msgTypes = make([]protoimpl.MessageInfo, 3)+var file_store_sheet_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_store_sheet_proto_msgTypes = make([]protoimpl.MessageInfo, 4)var file_store_sheet_proto_goTypes = []interface{}{- (*SheetPayload)(nil), // 0: bytebase.store.SheetPayload- (*SheetPayload_VCSPayload)(nil), // 1: bytebase.store.SheetPayload.VCSPayload- (*SheetPayload_UsedByIssue)(nil), // 2: bytebase.store.SheetPayload.UsedByIssue+ (SheetPayload_Type)(0), // 0: bytebase.store.SheetPayload.Type+ (*SheetPayload)(nil), // 1: bytebase.store.SheetPayload+ (*SheetPayload_VCSPayload)(nil), // 2: bytebase.store.SheetPayload.VCSPayload+ (*SheetPayload_UsedByIssue)(nil), // 3: bytebase.store.SheetPayload.UsedByIssue+ (*SheetPayload_SchemaDesign)(nil), // 4: bytebase.store.SheetPayload.SchemaDesign}var file_store_sheet_proto_depIdxs = []int32{- 1, // 0: bytebase.store.SheetPayload.vcs_payload:type_name -> bytebase.store.SheetPayload.VCSPayload- 2, // 1: bytebase.store.SheetPayload.used_by_issues:type_name -> bytebase.store.SheetPayload.UsedByIssue- 2, // [2:2] is the sub-list for method output_type- 2, // [2:2] is the sub-list for method input_type- 2, // [2:2] is the sub-list for extension type_name- 2, // [2:2] is the sub-list for extension extendee- 0, // [0:2] is the sub-list for field type_name+ 0, // 0: bytebase.store.SheetPayload.type:type_name -> bytebase.store.SheetPayload.Type+ 2, // 1: bytebase.store.SheetPayload.vcs_payload:type_name -> bytebase.store.SheetPayload.VCSPayload+ 3, // 2: bytebase.store.SheetPayload.used_by_issues:type_name -> bytebase.store.SheetPayload.UsedByIssue+ 4, // 3: bytebase.store.SheetPayload.schema_design:type_name -> bytebase.store.SheetPayload.SchemaDesign+ 4, // [4:4] is the sub-list for method output_type+ 4, // [4:4] is the sub-list for method input_type+ 4, // [4:4] is the sub-list for extension type_name+ 4, // [4:4] is the sub-list for extension extendee+ 0, // [0:4] is the sub-list for field type_name}func init() { file_store_sheet_proto_init() }@@ -325,19 +455,32 @@ func file_store_sheet_proto_init() {return nil}}+ file_store_sheet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*SheetPayload_SchemaDesign); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_store_sheet_proto_rawDesc,- NumEnums: 0,- NumMessages: 3,+ NumEnums: 1,+ NumMessages: 4,NumExtensions: 0,NumServices: 0,},GoTypes: file_store_sheet_proto_goTypes,DependencyIndexes: file_store_sheet_proto_depIdxs,+ EnumInfos: file_store_sheet_proto_enumTypes,MessageInfos: file_store_sheet_proto_msgTypes,}.Build()File_store_sheet_proto = out.Filediff --git a/proto/store/sheet.proto b/proto/store/sheet.protoindex 995b8a08f1..f09f5a12bf 100644--- a/proto/store/sheet.proto+++ b/proto/store/sheet.proto@@ -5,6 +5,13 @@ package bytebase.store;option go_package = "generated-go/store";message SheetPayload {+ // Type of the SheetPayload.+ enum Type {+ TYPE_UNSPECIFIED = 0;+ SCHEMA_DESIGN = 1;+ }+ Type type = 1;+message VCSPayload {string file_name = 1;string file_path = 2;@@ -13,12 +20,17 @@ message SheetPayload {string last_commit_id = 5;int64 last_sync_ts = 6;}- VCSPayload vcs_payload = 1;+ VCSPayload vcs_payload = 2;message UsedByIssue {int64 issue_id = 1;string issue_title = 2;}// used_by_issues link to the issues where the sheet is used.- repeated UsedByIssue used_by_issues = 2;+ repeated UsedByIssue used_by_issues = 3;++ message SchemaDesign {+ int64 baseline_sheet_id = 1;+ }+ SchemaDesign schema_design = 4;}