Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: remove deprecated fields from Sheet proto (#18548)

Danny Xu52a2df7ead8c
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index 1602fe0585..8b9dda5306 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -15635,18 +15635,10 @@ components:
title:
type: string
title: title
- maxLength: 200
- description: The title of the sheet.
- creator:
- type: string
- title: creator
description: |-
- The creator of the Sheet.
- Format: users/{email}
- createTime:
- title: create_time
- description: The create time of the sheet.
- $ref: '#/components/schemas/google.protobuf.Timestamp'
+ The title of the sheet.
+ Deprecated: this field is deprecated and will be removed in a future version.
+ deprecated: true
content:
type: string
title: content
diff --git a/backend/api/v1/sheet_service.go b/backend/api/v1/sheet_service.go
index 028192b260..f7528aceb9 100644
--- a/backend/api/v1/sheet_service.go
+++ b/backend/api/v1/sheet_service.go
@@ -2,11 +2,9 @@ package v1
import (
"context"
- "fmt"
"connectrpc.com/connect"
"github.com/pkg/errors"
- "google.golang.org/protobuf/types/known/timestamppb"
"github.com/bytebase/bytebase/backend/common"
"github.com/bytebase/bytebase/backend/component/config"
@@ -180,11 +178,6 @@ func (s *SheetService) GetSheet(ctx context.Context, request *connect.Request[v1
}
func (s *SheetService) convertToAPISheetMessage(ctx context.Context, sheet *store.SheetMessage) (*v1pb.Sheet, error) {
- creator, err := s.store.GetUserByEmail(ctx, sheet.Creator)
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get creator"))
- }
-
project, err := s.store.GetProject(ctx, &store.FindProjectMessage{
ResourceID: &sheet.ProjectID,
})
@@ -197,9 +190,6 @@ func (s *SheetService) convertToAPISheetMessage(ctx context.Context, sheet *stor
return &v1pb.Sheet{
Name: common.FormatSheet(project.ResourceID, sheet.UID),
- Title: sheet.Title,
- Creator: fmt.Sprintf("users/%s", creator.Email),
- CreateTime: timestamppb.New(sheet.CreatedAt),
Content: []byte(sheet.Statement),
ContentSize: sheet.Size,
}, nil
@@ -209,7 +199,6 @@ func convertToStoreSheetMessage(projectID string, creator string, sheet *v1pb.Sh
sheetMessage := &store.SheetMessage{
ProjectID: projectID,
Creator: creator,
- Title: sheet.Title,
Statement: string(sheet.Content),
}
diff --git a/backend/generated-go/v1/sheet_service.pb.go b/backend/generated-go/v1/sheet_service.pb.go
index ef47de3183..31001f184c 100644
--- a/backend/generated-go/v1/sheet_service.pb.go
+++ b/backend/generated-go/v1/sheet_service.pb.go
@@ -7,11 +7,9 @@
package v1
import (
- _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@@ -239,12 +237,10 @@ type Sheet struct {
// The sheet ID is generated by the server on creation and cannot be changed.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The title of the sheet.
+ // Deprecated: this field is deprecated and will be removed in a future version.
+ //
+ // Deprecated: Marked as deprecated in v1/sheet_service.proto.
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- // The creator of the Sheet.
- // Format: users/{email}
- Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
- // The create time of the sheet.
- CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The content of the sheet.
// By default, it will be cut off, if it doesn't match the `content_size`, you can
// set the `raw` to true in GetSheet request to retrieve the full content.
@@ -292,6 +288,7 @@ func (x *Sheet) GetName() string {
return ""
}
+// Deprecated: Marked as deprecated in v1/sheet_service.proto.
func (x *Sheet) GetTitle() string {
if x != nil {
return x.Title
@@ -299,20 +296,6 @@ func (x *Sheet) GetTitle() string {
return ""
}
-func (x *Sheet) GetCreator() string {
- if x != nil {
- return x.Creator
- }
- return ""
-}
-
-func (x *Sheet) GetCreateTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreateTime
- }
- return nil
-}
-
func (x *Sheet) GetContent() []byte {
if x != nil {
return x.Content
@@ -331,7 +314,7 @@ var File_v1_sheet_service_proto protoreflect.FileDescriptor
const file_v1_sheet_service_proto_rawDesc = "" +
"\n" +
- "\x16v1/sheet_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"y\n" +
+ "\x16v1/sheet_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x13v1/annotation.proto\"y\n" +
"\x12CreateSheetRequest\x124\n" +
"\x06parent\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +
"\x14bytebase.com/ProjectR\x06parent\x12-\n" +
@@ -345,16 +328,13 @@ const file_v1_sheet_service_proto_rawDesc = "" +
"\x0fGetSheetRequest\x12.\n" +
"\x04name\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +
"\x12bytebase.com/SheetR\x04name\x12\x10\n" +
- "\x03raw\x18\x02 \x01(\bR\x03raw\"\xaa\x02\n" +
+ "\x03raw\x18\x02 \x01(\bR\x03raw\"\xcc\x01\n" +
"\x05Sheet\x12\x1a\n" +
- "\x04name\x18\x01 \x01(\tB\x06\xe0A\x02\xe0A\x05R\x04name\x12!\n" +
- "\x05title\x18\x02 \x01(\tB\v\xe0A\x02\xbaH\x05r\x03\x18\xc8\x01R\x05title\x12\x1d\n" +
- "\acreator\x18\x03 \x01(\tB\x03\xe0A\x03R\acreator\x12@\n" +
- "\vcreate_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
- "createTime\x12\x1d\n" +
+ "\x04name\x18\x01 \x01(\tB\x06\xe0A\x02\xe0A\x05R\x04name\x12\x18\n" +
+ "\x05title\x18\x02 \x01(\tB\x02\x18\x01R\x05title\x12\x1d\n" +
"\acontent\x18\x05 \x01(\fB\x03\xe0A\x02R\acontent\x12&\n" +
"\fcontent_size\x18\x06 \x01(\x03B\x03\xe0A\x03R\vcontentSize::\xeaA7\n" +
- "\x12bytebase.com/Sheet\x12!projects/{project}/sheets/{sheet}2\xe0\x03\n" +
+ "\x12bytebase.com/Sheet\x12!projects/{project}/sheets/{sheet}J\x04\b\x03\x10\x04J\x04\b\x04\x10\x052\xe0\x03\n" +
"\fSheetService\x12\x98\x01\n" +
"\vCreateSheet\x12\x1f.bytebase.v1.CreateSheetRequest\x1a\x12.bytebase.v1.Sheet\"T\xdaA\fparent,sheet\x8a\xea0\x10bb.sheets.create\x90\xea0\x01\x82\xd3\xe4\x93\x02':\x05sheet\"\x1e/v1/{parent=projects/*}/sheets\x12\xb1\x01\n" +
"\x11BatchCreateSheets\x12%.bytebase.v1.BatchCreateSheetsRequest\x1a&.bytebase.v1.BatchCreateSheetsResponse\"M\x8a\xea0\x10bb.sheets.create\x90\xea0\x01\x82\xd3\xe4\x93\x02/:\x01*\"*/v1/{parent=projects/*}/sheets:batchCreate\x12\x80\x01\n" +
@@ -380,24 +360,22 @@ var file_v1_sheet_service_proto_goTypes = []any{
(*BatchCreateSheetsResponse)(nil), // 2: bytebase.v1.BatchCreateSheetsResponse
(*GetSheetRequest)(nil), // 3: bytebase.v1.GetSheetRequest
(*Sheet)(nil), // 4: bytebase.v1.Sheet
- (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
}
var file_v1_sheet_service_proto_depIdxs = []int32{
4, // 0: bytebase.v1.CreateSheetRequest.sheet:type_name -> bytebase.v1.Sheet
0, // 1: bytebase.v1.BatchCreateSheetsRequest.requests:type_name -> bytebase.v1.CreateSheetRequest
4, // 2: bytebase.v1.BatchCreateSheetsResponse.sheets:type_name -> bytebase.v1.Sheet
- 5, // 3: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp
- 0, // 4: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest
- 1, // 5: bytebase.v1.SheetService.BatchCreateSheets:input_type -> bytebase.v1.BatchCreateSheetsRequest
- 3, // 6: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest
- 4, // 7: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet
- 2, // 8: bytebase.v1.SheetService.BatchCreateSheets:output_type -> bytebase.v1.BatchCreateSheetsResponse
- 4, // 9: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet
- 7, // [7:10] is the sub-list for method output_type
- 4, // [4:7] 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
+ 0, // 3: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest
+ 1, // 4: bytebase.v1.SheetService.BatchCreateSheets:input_type -> bytebase.v1.BatchCreateSheetsRequest
+ 3, // 5: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest
+ 4, // 6: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet
+ 2, // 7: bytebase.v1.SheetService.BatchCreateSheets:output_type -> bytebase.v1.BatchCreateSheetsResponse
+ 4, // 8: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet
+ 6, // [6:9] is the sub-list for method output_type
+ 3, // [3:6] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
}
func init() { file_v1_sheet_service_proto_init() }
diff --git a/backend/generated-go/v1/sheet_service_equal.pb.go b/backend/generated-go/v1/sheet_service_equal.pb.go
index c28a3d9011..3cefab9826 100644
--- a/backend/generated-go/v1/sheet_service_equal.pb.go
+++ b/backend/generated-go/v1/sheet_service_equal.pb.go
@@ -87,12 +87,6 @@ func (x *Sheet) Equal(y *Sheet) bool {
if x.Title != y.Title {
return false
}
- if x.Creator != y.Creator {
- return false
- }
- if p, q := x.CreateTime, y.CreateTime; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {
- return false
- }
if string(x.Content) != string(y.Content) {
return false
}
diff --git a/backend/store/sheet.go b/backend/store/sheet.go
index bc8f510394..e7a63207ee 100644
--- a/backend/store/sheet.go
+++ b/backend/store/sheet.go
@@ -83,7 +83,6 @@ func (s *Store) getSheet(ctx context.Context, id int, loadFull bool) (*SheetMess
sheet.creator,
sheet.created_at,
sheet.project,
- sheet.name,
%s,
sheet.sha256,
OCTET_LENGTH(sheet_blob.content)
@@ -116,7 +115,6 @@ func (s *Store) getSheet(ctx context.Context, id int, loadFull bool) (*SheetMess
&sheet.Creator,
&sheet.CreatedAt,
&sheet.ProjectID,
- &sheet.Title,
&sheet.Statement,
&sheet.Sha256,
&sheet.Size,
@@ -142,15 +140,15 @@ func (s *Store) getSheet(ctx context.Context, id int, loadFull bool) (*SheetMess
// CreateSheets creates new sheets.
// You should not use this function directly to create sheets.
// Use CreateSheets in component/sheet instead.
-func (s *Store) CreateSheets(ctx context.Context, projectID string, creator string, creates ...*SheetMessage) ([]*SheetMessage, error) {
+func (s *Store) CreateSheets(ctx context.Context, projectID string, _ string, creates ...*SheetMessage) ([]*SheetMessage, error) {
var names []string
var statements []string
var sha256s [][]byte
for _, c := range creates {
c.ProjectID = projectID
- c.Creator = creator
- names = append(names, c.Title)
+ c.Creator = SystemBotUser.Email
+ names = append(names, "")
statements = append(statements, c.Statement)
h := sha256.Sum256([]byte(c.Statement))
c.Sha256 = h[:]
@@ -173,7 +171,7 @@ func (s *Store) CreateSheets(ctx context.Context, projectID string, creator stri
unnest(CAST(? AS TEXT[])),
unnest(CAST(? AS BYTEA[]))
RETURNING id, created_at
- `, creator, projectID, names, sha256s)
+ `, SystemBotUser.Email, projectID, names, sha256s)
query, args, err := q.ToSQL()
if err != nil {
diff --git a/backend/tests/approval_test.go b/backend/tests/approval_test.go
index b81b11c394..ea41e3a804 100644
--- a/backend/tests/approval_test.go
+++ b/backend/tests/approval_test.go
@@ -85,7 +85,6 @@ func TestDirectApprovalRuleMatching(t *testing.T) {
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "Test DDL Sheet",
Content: []byte("CREATE TABLE approval_test (id INTEGER PRIMARY KEY);"),
},
}))
@@ -236,7 +235,6 @@ func TestApprovalRuleFirstMatchWins(t *testing.T) {
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "Test DDL Sheet",
Content: []byte("CREATE TABLE first_match_test (id INTEGER PRIMARY KEY);"),
},
}))
@@ -368,7 +366,6 @@ func TestApprovalRuleNoMatch(t *testing.T) {
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "Test DDL Sheet",
Content: []byte("CREATE TABLE no_match_test (id INTEGER PRIMARY KEY);"),
},
}))
@@ -585,7 +582,6 @@ func TestFallbackRuleMatchesWhenSourceSpecificDoesNot(t *testing.T) {
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "Test DDL Sheet",
Content: []byte("CREATE TABLE fallback_test (id INTEGER PRIMARY KEY);"),
},
}))
@@ -725,7 +721,6 @@ func TestSourceSpecificRuleTakesPriorityOverFallback(t *testing.T) {
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "Test DDL Sheet",
Content: []byte("CREATE TABLE priority_test (id INTEGER PRIMARY KEY);"),
},
}))
diff --git a/backend/tests/ghost_test.go b/backend/tests/ghost_test.go
index 4120080ded..d93afbd65b 100644
--- a/backend/tests/ghost_test.go
+++ b/backend/tests/ghost_test.go
@@ -96,7 +96,6 @@ func TestGhostSchemaUpdate(t *testing.T) {
sheet1Response, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "migration statement sheet 1",
Content: []byte(mysqlMigrationStatement),
},
}))
@@ -114,7 +113,6 @@ func TestGhostSchemaUpdate(t *testing.T) {
sheet2Response, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "migration statement sheet 2",
Content: []byte(mysqlGhostMigrationStatement),
},
}))
diff --git a/backend/tests/pg_sdl_rollout_test.go b/backend/tests/pg_sdl_rollout_test.go
index 132c82e203..02a56460c3 100644
--- a/backend/tests/pg_sdl_rollout_test.go
+++ b/backend/tests/pg_sdl_rollout_test.go
@@ -118,7 +118,6 @@ func (stc *sdlTestContext) executeSDLRolloutWithResult(t *testing.T, database *v
sheetResp, err := stc.ctl.sheetServiceClient.CreateSheet(stc.ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: stc.ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "SDL Schema",
Content: []byte(sdlContent),
},
}))
diff --git a/backend/tests/schema_update_test.go b/backend/tests/schema_update_test.go
index d5987bdd28..56fd5eab9e 100644
--- a/backend/tests/schema_update_test.go
+++ b/backend/tests/schema_update_test.go
@@ -58,7 +58,6 @@ func TestSchemaAndDataUpdate(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "migration statement sheet",
Content: []byte(migrationStatement1),
},
}))
@@ -78,7 +77,6 @@ func TestSchemaAndDataUpdate(t *testing.T) {
sheetResp, err = ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "dataUpdateStatement",
Content: []byte(dataUpdateStatement),
},
}))
@@ -313,7 +311,6 @@ CREATE TABLE "public"."book" (
ddlSheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "test ddl",
Content: []byte(test.ddl),
},
}))
@@ -384,7 +381,6 @@ func TestMarkTaskAsDone(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "migration statement sheet",
Content: []byte(migrationStatement1),
},
}))
diff --git a/backend/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.go
index 9b35af8e5d..cc23584f89 100644
--- a/backend/tests/sensitive_data_test.go
+++ b/backend/tests/sensitive_data_test.go
@@ -191,7 +191,6 @@ func TestSensitiveData(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "createTable",
Content: []byte(createTable),
},
}))
@@ -237,7 +236,6 @@ func TestSensitiveData(t *testing.T) {
insertDataSheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "insertData",
Content: []byte(insertData),
},
}))
diff --git a/backend/tests/sql_editor_test.go b/backend/tests/sql_editor_test.go
index 443177ad16..15e701a940 100644
--- a/backend/tests/sql_editor_test.go
+++ b/backend/tests/sql_editor_test.go
@@ -193,7 +193,6 @@ func TestAdminQueryAffectedRows(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "prepareStatements",
Content: []byte(tt.prepareStatements),
},
}))
diff --git a/backend/tests/sql_export_test.go b/backend/tests/sql_export_test.go
index 0082287ca4..5538da5c55 100644
--- a/backend/tests/sql_export_test.go
+++ b/backend/tests/sql_export_test.go
@@ -216,7 +216,6 @@ func TestSQLExport(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "prepareStatements",
Content: []byte(tt.prepareStatement),
},
}))
diff --git a/backend/tests/sql_query_test.go b/backend/tests/sql_query_test.go
index 200e9e173b..7738d4d67c 100644
--- a/backend/tests/sql_query_test.go
+++ b/backend/tests/sql_query_test.go
@@ -168,7 +168,6 @@ func TestSQLAdminQuery(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "prepareStatements",
Content: []byte(tt.prepareStatements),
},
}))
diff --git a/backend/tests/sql_review_test.go b/backend/tests/sql_review_test.go
index 24e32d1e38..8719d957a6 100644
--- a/backend/tests/sql_review_test.go
+++ b/backend/tests/sql_review_test.go
@@ -458,7 +458,6 @@ func createIssueAndReturnSQLReviewResult(ctx context.Context, a *require.Asserti
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: project.Name,
Sheet: &v1pb.Sheet{
- Title: "statement",
Content: []byte(statement),
},
}))
diff --git a/backend/tests/sql_stop_on_error_test.go b/backend/tests/sql_stop_on_error_test.go
index d8f3525cc0..08e3d38ca1 100644
--- a/backend/tests/sql_stop_on_error_test.go
+++ b/backend/tests/sql_stop_on_error_test.go
@@ -242,7 +242,6 @@ func TestSQLQueryStopOnError(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "prepareStatements",
Content: []byte(tt.prepareStatements),
},
}))
@@ -409,7 +408,6 @@ func TestSQLAdminExecuteStopOnError(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "prepareStatements",
Content: []byte(tt.prepareStatements),
},
}))
diff --git a/backend/tests/sync_schema_test.go b/backend/tests/sync_schema_test.go
index 44082ba305..e1429c11a7 100644
--- a/backend/tests/sync_schema_test.go
+++ b/backend/tests/sync_schema_test.go
@@ -80,7 +80,6 @@ DROP SCHEMA IF EXISTS "schema_a";
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "create schema",
Content: []byte(createSchema),
},
}))
diff --git a/backend/tests/syncer_test.go b/backend/tests/syncer_test.go
index 364a7c47f7..88223c30a7 100644
--- a/backend/tests/syncer_test.go
+++ b/backend/tests/syncer_test.go
@@ -229,7 +229,6 @@ func TestSyncerForPostgreSQL(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "create schema",
Content: []byte(createSchema),
},
}))
@@ -513,7 +512,6 @@ func TestSyncerForMySQL(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "create schema",
Content: []byte(createSchema),
},
}))
diff --git a/backend/tests/task_run_idempotent_test.go b/backend/tests/task_run_idempotent_test.go
index 93e702b2ba..3b7e6002bf 100644
--- a/backend/tests/task_run_idempotent_test.go
+++ b/backend/tests/task_run_idempotent_test.go
@@ -56,7 +56,6 @@ func TestBatchRunTasks_Idempotent(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: ctl.project.Name,
Sheet: &v1pb.Sheet{
- Title: "Test Sheet",
Content: []byte("SELECT 1;"),
},
}))
diff --git a/backend/tests/tenant_test.go b/backend/tests/tenant_test.go
index ea154539fd..9873905134 100644
--- a/backend/tests/tenant_test.go
+++ b/backend/tests/tenant_test.go
@@ -143,7 +143,6 @@ func TestDatabaseGroup(t *testing.T) {
sheetResp, err := ctl.sheetServiceClient.CreateSheet(ctx, connect.NewRequest(&v1pb.CreateSheetRequest{
Parent: project.Name,
Sheet: &v1pb.Sheet{
- Title: "migration statement sheet",
Content: []byte(migrationStatement1),
},
}))
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
index dae15637de..4dcf441698 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
@@ -246,7 +246,6 @@ const createSheets = async () => {
const sheetNameMap = new Map<string, string>();
for (let i = 0; i < pendingCreateSheetList.length; i++) {
const sheet = pendingCreateSheetList[i];
- sheet.title = issue.value.title;
const createdSheet = await sheetStore.createSheet(
issue.value.project,
sheet
diff --git a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
index 173ba6ac5e..812910151a 100644
--- a/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
+++ b/frontend/src/components/IssueV1/components/StatementSection/EditorView/EditorView.vue
@@ -426,13 +426,10 @@ const handleUpdateStatementAndOverwrite = async (
await handleUpdateStatement(statement, filename);
};
-const handleUpdateStatement = async (statement: string, filename: string) => {
+const handleUpdateStatement = async (statement: string, _filename: string) => {
try {
state.isUploadingFile = true;
handleStatementChange(statement);
- if (sheet.value) {
- sheet.value.title = filename;
- }
resetTempEditState();
} finally {
state.isUploadingFile = false;
@@ -448,7 +445,6 @@ const updateStatement = async (statement: string) => {
const sheet = create(SheetSchema, {
...createEmptyLocalSheet(),
- title: issue.value.title,
});
setSheetStatement(sheet, statement);
const createdSheet = await useSheetV1Store().createSheet(
diff --git a/frontend/src/components/Plan/components/AddSpecDrawer.vue b/frontend/src/components/Plan/components/AddSpecDrawer.vue
index efbc9b67cc..ccd51d80b3 100644
--- a/frontend/src/components/Plan/components/AddSpecDrawer.vue
+++ b/frontend/src/components/Plan/components/AddSpecDrawer.vue
@@ -153,7 +153,6 @@ const handleConfirm = async () => {
const localSheet = getLocalSheetByName(
`${project.value.name}/sheets/${sheetUID}`
);
- localSheet.title = "Schema Migration";
// Create spec
const spec = createProto(Plan_SpecSchema, {
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue
index c9dc5a4233..d0c69d4cc5 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue
@@ -220,7 +220,6 @@ const createSheets = async () => {
if (uid.startsWith("-")) {
// The sheet is pending create.
const sheetToCreate = getLocalSheetByName(config.sheet);
- sheetToCreate.title = plan.value.title;
const createdSheet = await sheetStore.createSheet(
project.value.name,
sheetToCreate
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue b/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue
index f47b02f928..2170d2a2cd 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue
+++ b/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue
@@ -300,7 +300,6 @@ const handleConfirm = async () => {
project.value.name,
create(SheetSchema, {
name: `${project.value.name}/sheets/${uuidv4()}`,
- title: `Rollback for ${preview.task.target}`,
content: new TextEncoder().encode(preview.statement),
})
);
diff --git a/frontend/src/components/Plan/components/SpecDetailView/SpecListSection.vue b/frontend/src/components/Plan/components/SpecDetailView/SpecListSection.vue
index 2843e9cb1c..fa484afe95 100644
--- a/frontend/src/components/Plan/components/SpecDetailView/SpecListSection.vue
+++ b/frontend/src/components/Plan/components/SpecDetailView/SpecListSection.vue
@@ -132,7 +132,6 @@ const handleSpecCreated = async (spec: Plan_Spec) => {
if (uid.startsWith("-")) {
// The sheet is pending create.
const sheetToCreate = getLocalSheetByName(spec.config.value.sheet);
- sheetToCreate.title = plan.value.title;
const createdSheet = await sheetStore.createSheet(
project.value.name,
sheetToCreate
diff --git a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue
index 2dcb22b65d..c6d4db7e85 100644
--- a/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue
+++ b/frontend/src/components/Plan/components/StatementSection/EditorView/EditorView.vue
@@ -479,13 +479,10 @@ const handleUpdateStatementAndOverwrite = async (
await handleUpdateStatement(statement, filename);
};
-const handleUpdateStatement = async (statement: string, filename: string) => {
+const handleUpdateStatement = async (statement: string, _filename: string) => {
try {
state.isUploadingFile = true;
handleStatementChange(statement);
- if (sheet.value) {
- sheet.value.title = filename;
- }
} finally {
state.isUploadingFile = false;
}
@@ -513,7 +510,6 @@ const updateStatement = async (statement: string) => {
}
const sheet = create(SheetSchema, {
...createEmptyLocalSheet(),
- title: plan.value.title,
});
setSheetStatement(sheet, statement);
const createdSheet = await useSheetV1Store().createSheet(
diff --git a/frontend/src/components/Plan/logic/utils.ts b/frontend/src/components/Plan/logic/utils.ts
index a014883934..af151c32bd 100644
--- a/frontend/src/components/Plan/logic/utils.ts
+++ b/frontend/src/components/Plan/logic/utils.ts
@@ -58,7 +58,6 @@ export const updateSpecSheetWithStatement = async (
const newSheet = create(SheetSchema, {
...createEmptyLocalSheet(),
- title: plan.title,
});
setSheetStatement(newSheet, statement);
diff --git a/frontend/src/components/Revision/CreateRevisionDrawer.vue b/frontend/src/components/Revision/CreateRevisionDrawer.vue
index 522f0abd02..3d23d72d99 100644
--- a/frontend/src/components/Revision/CreateRevisionDrawer.vue
+++ b/frontend/src/components/Revision/CreateRevisionDrawer.vue
@@ -800,7 +800,6 @@ const handleConfirm = async () => {
try {
// Create a sheet for each file
const sheet = await sheetStore.createSheet(project.value.name, {
- title: file.name,
content: new TextEncoder().encode(file.content),
});
diff --git a/frontend/src/components/Sheet/DownloadSheetButton.vue b/frontend/src/components/Sheet/DownloadSheetButton.vue
index efb645c396..86a4633343 100644
--- a/frontend/src/components/Sheet/DownloadSheetButton.vue
+++ b/frontend/src/components/Sheet/DownloadSheetButton.vue
@@ -27,10 +27,9 @@ const downloadSheet = async () => {
});
const response = await sheetServiceClientConnect.getSheet(request);
- let filename = response.title;
- if (!filename.endsWith(".sql")) {
- filename = `${response.title}.sql`;
- }
+ // Extract sheet ID from the name to use as filename
+ const sheetId = response.name.split("/").pop() || "sheet";
+ const filename = `${sheetId}.sql`;
const content = new TextDecoder().decode(response.content);
const blob = new Blob([content], { type: "text/plain" });
diff --git a/frontend/src/store/modules/v1/localSheet.ts b/frontend/src/store/modules/v1/localSheet.ts
index 100d33e277..4a3a283975 100644
--- a/frontend/src/store/modules/v1/localSheet.ts
+++ b/frontend/src/store/modules/v1/localSheet.ts
@@ -24,11 +24,8 @@ export const useLocalSheetStore = defineStore("local_sheet", () => {
const createLocalSheet = (name: string, defaults: Partial<Sheet> = {}) => {
const sheet = createProto(SheetSchema, {
name,
- title: defaults.title || "",
- creator: defaults.creator || "",
content: defaults.content || new Uint8Array(),
contentSize: defaults.contentSize || BigInt(0),
- createTime: defaults.createTime,
});
return reactive(sheet);
};
diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.ts
index edede0942e..10b79d9354 100644
--- a/frontend/src/store/modules/v1/sheet.ts
+++ b/frontend/src/store/modules/v1/sheet.ts
@@ -33,11 +33,8 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {
const createSheet = async (parent: string, sheet: Partial<Sheet>) => {
const fullSheet = create(SheetSchema, {
name: sheet.name || "",
- title: sheet.title || "",
- creator: sheet.creator || "",
content: sheet.content || new Uint8Array(),
contentSize: sheet.contentSize || BigInt(0),
- createTime: sheet.createTime,
});
const request = create(CreateSheetRequestSchema, {
parent,
diff --git a/frontend/src/types/proto-es/v1/sheet_service_pb.d.ts b/frontend/src/types/proto-es/v1/sheet_service_pb.d.ts
index 59554dfd0c..8cca3d2a1d 100644
--- a/frontend/src/types/proto-es/v1/sheet_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/sheet_service_pb.d.ts
@@ -4,7 +4,6 @@
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import type { Message } from "@bufbuild/protobuf";
-import type { Timestamp } from "@bufbuild/protobuf/wkt";
/**
* Describes the file v1/sheet_service.proto.
@@ -118,26 +117,13 @@ export declare type Sheet = Message<"bytebase.v1.Sheet"> & {
/**
* The title of the sheet.
+ * Deprecated: this field is deprecated and will be removed in a future version.
*
- * @generated from field: string title = 2;
+ * @generated from field: string title = 2 [deprecated = true];
+ * @deprecated
*/
title: string;
- /**
- * The creator of the Sheet.
- * Format: users/{email}
- *
- * @generated from field: string creator = 3;
- */
- creator: string;
-
- /**
- * The create time of the sheet.
- *
- * @generated from field: google.protobuf.Timestamp create_time = 4;
- */
- createTime?: Timestamp;
-
/**
* The content of the sheet.
* By default, it will be cut off, if it doesn't match the `content_size`, you can
diff --git a/frontend/src/types/proto-es/v1/sheet_service_pb.js b/frontend/src/types/proto-es/v1/sheet_service_pb.js
index 77436c50b2..b832ce73c9 100644
--- a/frontend/src/types/proto-es/v1/sheet_service_pb.js
+++ b/frontend/src/types/proto-es/v1/sheet_service_pb.js
@@ -3,19 +3,17 @@
/* eslint-disable */
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
-import { file_buf_validate_validate } from "../buf/validate/validate_pb";
import { file_google_api_annotations } from "../google/api/annotations_pb";
import { file_google_api_client } from "../google/api/client_pb";
import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";
import { file_google_api_resource } from "../google/api/resource_pb";
-import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import { file_v1_annotation } from "./annotation_pb";
/**
* Describes the file v1/sheet_service.proto.
*/
export const file_v1_sheet_service = /*@__PURE__*/
- fileDesc("ChZ2MS9zaGVldF9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJqChJDcmVhdGVTaGVldFJlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiYKBXNoZWV0GAIgASgLMhIuYnl0ZWJhc2UudjEuU2hlZXRCA+BBAiKAAQoYQmF0Y2hDcmVhdGVTaGVldHNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBI2CghyZXF1ZXN0cxgCIAMoCzIfLmJ5dGViYXNlLnYxLkNyZWF0ZVNoZWV0UmVxdWVzdEID4EECIj8KGUJhdGNoQ3JlYXRlU2hlZXRzUmVzcG9uc2USIgoGc2hlZXRzGAEgAygLMhIuYnl0ZWJhc2UudjEuU2hlZXQiSAoPR2V0U2hlZXRSZXF1ZXN0EigKBG5hbWUYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL1NoZWV0EgsKA3JhdxgCIAEoCCLyAQoFU2hlZXQSFAoEbmFtZRgBIAEoCUIG4EEC4EEFEhoKBXRpdGxlGAIgASgJQgvgQQK6SAVyAxjIARIUCgdjcmVhdG9yGAMgASgJQgPgQQMSNAoLY3JlYXRlX3RpbWUYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSFAoHY29udGVudBgFIAEoDEID4EECEhkKDGNvbnRlbnRfc2l6ZRgGIAEoA0ID4EEDOjrqQTcKEmJ5dGViYXNlLmNvbS9TaGVldBIhcHJvamVjdHMve3Byb2plY3R9L3NoZWV0cy97c2hlZXR9MuADCgxTaGVldFNlcnZpY2USmAEKC0NyZWF0ZVNoZWV0Eh8uYnl0ZWJhc2UudjEuQ3JlYXRlU2hlZXRSZXF1ZXN0GhIuYnl0ZWJhc2UudjEuU2hlZXQiVNpBDHBhcmVudCxzaGVldIrqMBBiYi5zaGVldHMuY3JlYXRlkOowAYLT5JMCJzoFc2hlZXQiHi92MS97cGFyZW50PXByb2plY3RzLyp9L3NoZWV0cxKxAQoRQmF0Y2hDcmVhdGVTaGVldHMSJS5ieXRlYmFzZS52MS5CYXRjaENyZWF0ZVNoZWV0c1JlcXVlc3QaJi5ieXRlYmFzZS52MS5CYXRjaENyZWF0ZVNoZWV0c1Jlc3BvbnNlIk2K6jAQYmIuc2hlZXRzLmNyZWF0ZZDqMAGC0+STAi86ASoiKi92MS97cGFyZW50PXByb2plY3RzLyp9L3NoZWV0czpiYXRjaENyZWF0ZRKAAQoIR2V0U2hlZXQSHC5ieXRlYmFzZS52MS5HZXRTaGVldFJlcXVlc3QaEi5ieXRlYmFzZS52MS5TaGVldCJC2kEEbmFtZYrqMA1iYi5zaGVldHMuZ2V0kOowAYLT5JMCIBIeL3YxL3tuYW1lPXByb2plY3RzLyovc2hlZXRzLyp9QqcBCg9jb20uYnl0ZWJhc2UudjFCEVNoZWV0U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation]);
+ fileDesc("ChZ2MS9zaGVldF9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJqChJDcmVhdGVTaGVldFJlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiYKBXNoZWV0GAIgASgLMhIuYnl0ZWJhc2UudjEuU2hlZXRCA+BBAiKAAQoYQmF0Y2hDcmVhdGVTaGVldHNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBI2CghyZXF1ZXN0cxgCIAMoCzIfLmJ5dGViYXNlLnYxLkNyZWF0ZVNoZWV0UmVxdWVzdEID4EECIj8KGUJhdGNoQ3JlYXRlU2hlZXRzUmVzcG9uc2USIgoGc2hlZXRzGAEgAygLMhIuYnl0ZWJhc2UudjEuU2hlZXQiSAoPR2V0U2hlZXRSZXF1ZXN0EigKBG5hbWUYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL1NoZWV0EgsKA3JhdxgCIAEoCCKpAQoFU2hlZXQSFAoEbmFtZRgBIAEoCUIG4EEC4EEFEhEKBXRpdGxlGAIgASgJQgIYARIUCgdjb250ZW50GAUgASgMQgPgQQISGQoMY29udGVudF9zaXplGAYgASgDQgPgQQM6OupBNwoSYnl0ZWJhc2UuY29tL1NoZWV0EiFwcm9qZWN0cy97cHJvamVjdH0vc2hlZXRzL3tzaGVldH1KBAgDEARKBAgEEAUy4AMKDFNoZWV0U2VydmljZRKYAQoLQ3JlYXRlU2hlZXQSHy5ieXRlYmFzZS52MS5DcmVhdGVTaGVldFJlcXVlc3QaEi5ieXRlYmFzZS52MS5TaGVldCJU2kEMcGFyZW50LHNoZWV0iuowEGJiLnNoZWV0cy5jcmVhdGWQ6jABgtPkkwInOgVzaGVldCIeL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vc2hlZXRzErEBChFCYXRjaENyZWF0ZVNoZWV0cxIlLmJ5dGViYXNlLnYxLkJhdGNoQ3JlYXRlU2hlZXRzUmVxdWVzdBomLmJ5dGViYXNlLnYxLkJhdGNoQ3JlYXRlU2hlZXRzUmVzcG9uc2UiTYrqMBBiYi5zaGVldHMuY3JlYXRlkOowAYLT5JMCLzoBKiIqL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vc2hlZXRzOmJhdGNoQ3JlYXRlEoABCghHZXRTaGVldBIcLmJ5dGViYXNlLnYxLkdldFNoZWV0UmVxdWVzdBoSLmJ5dGViYXNlLnYxLlNoZWV0IkLaQQRuYW1liuowDWJiLnNoZWV0cy5nZXSQ6jABgtPkkwIgEh4vdjEve25hbWU9cHJvamVjdHMvKi9zaGVldHMvKn1CpwEKD2NvbS5ieXRlYmFzZS52MUIRU2hlZXRTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_v1_annotation]);
/**
* Describes the message bytebase.v1.CreateSheetRequest.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 83e92c42e8..78f8c3add2 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -13989,7 +13989,6 @@ components:
Sheet:
required:
- name
- - title
- content
type: object
properties:
@@ -14000,19 +13999,10 @@ components:
Format: projects/{project}/sheets/{sheet}
The sheet ID is generated by the server on creation and cannot be changed.
title:
- type: string
- description: The title of the sheet.
- creator:
- readOnly: true
type: string
description: |-
- The creator of the Sheet.
- Format: users/{email}
- createTime:
- readOnly: true
- type: string
- description: The create time of the sheet.
- format: date-time
+ The title of the sheet.
+ Deprecated: this field is deprecated and will be removed in a future version.
content:
type: string
description: |-
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 74167b5483..f29b7d6045 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -10475,9 +10475,7 @@ RolloutService manages the execution of deployment plans.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | The name of the sheet resource. Format: projects/{project}/sheets/{sheet} The sheet ID is generated by the server on creation and cannot be changed. |
-| title | [string](#string) | | The title of the sheet. |
-| creator | [string](#string) | | The creator of the Sheet. Format: users/{email} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The create time of the sheet. |
+| title | [string](#string) | | **Deprecated.** The title of the sheet. Deprecated: this field is deprecated and will be removed in a future version. |
| content | [bytes](#bytes) | | The content of the sheet. By default, it will be cut off, if it doesn&#39;t match the `content_size`, you can set the `raw` to true in GetSheet request to retrieve the full content. |
| content_size | [int64](#int64) | | content_size is the full size of the content, may not match the size of the `content` field. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 9ec6cd41b5..c4a9be76aa 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -29436,22 +29436,8 @@ The sheet ID is generated by the server on creation and cannot be changed. </p><
<td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the sheet. </p></td>
- </tr>
-
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The creator of the Sheet.
-Format: users/{email} </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The create time of the sheet. </p></td>
+ <td><p><strong>Deprecated.</strong> The title of the sheet.
+Deprecated: this field is deprecated and will be removed in a future version. </p></td>
</tr>
<tr>
@@ -29474,6 +29460,27 @@ set the `raw` to true in GetSheet request to retrieve the full content. </p></td
</table>
+
+
+ <h4>Fields with deprecated option</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Name</td>
+ <td>Option</td>
+ </tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>title</td>
+ <td><p>true</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
diff --git a/proto/v1/v1/sheet_service.proto b/proto/v1/v1/sheet_service.proto
index fe362ed3a3..9637d54c6f 100644
--- a/proto/v1/v1/sheet_service.proto
+++ b/proto/v1/v1/sheet_service.proto
@@ -2,12 +2,10 @@ syntax = "proto3";
package bytebase.v1;
-import "buf/validate/validate.proto";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
-import "google/protobuf/timestamp.proto";
import "v1/annotation.proto";
option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";
@@ -101,17 +99,10 @@ message Sheet {
];
// The title of the sheet.
- string title = 2 [
- (google.api.field_behavior) = REQUIRED,
- (buf.validate.field).string.max_len = 200
- ];
-
- // The creator of the Sheet.
- // Format: users/{email}
- string creator = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ // Deprecated: this field is deprecated and will be removed in a future version.
+ string title = 2 [deprecated = true];
- // The create time of the sheet.
- google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+ reserved 3, 4;
// The content of the sheet.
// By default, it will be cut off, if it doesn't match the `content_size`, you can