Skip to content

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

refactor: extract ChangelogService from DatabaseService (#21065)

Danny Xu63533652b9dd
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index de58a6ce6a..33958696ea 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -870,6 +870,82 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.BatchParseResponse'
+ /bytebase.v1.ChangelogService/GetChangelog:
+ post:
+ tags:
+ - bytebase.v1.ChangelogService
+ summary: GetChangelog
+ description: |-
+ Retrieves a specific changelog entry.
+ Permissions required: bb.changelogs.get
+ operationId: bytebase.v1.ChangelogService.GetChangelog
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetChangelogRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Changelog'
+ /bytebase.v1.ChangelogService/ListChangelogs:
+ post:
+ tags:
+ - bytebase.v1.ChangelogService
+ summary: ListChangelogs
+ description: |-
+ Lists migration history for a database.
+ Permissions required: bb.changelogs.list
+ operationId: bytebase.v1.ChangelogService.ListChangelogs
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListChangelogsRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ListChangelogsResponse'
/bytebase.v1.DatabaseCatalogService/GetDatabaseCatalog:
post:
tags:
@@ -1289,44 +1365,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DiffSchemaResponse'
- /bytebase.v1.DatabaseService/GetChangelog:
- post:
- tags:
- - bytebase.v1.DatabaseService
- summary: GetChangelog
- description: |-
- Retrieves a specific changelog entry.
- Permissions required: bb.changelogs.get
- operationId: bytebase.v1.DatabaseService.GetChangelog
- parameters:
- - name: Connect-Protocol-Version
- in: header
- required: true
- schema:
- $ref: '#/components/schemas/connect-protocol-version'
- - name: Connect-Timeout-Ms
- in: header
- schema:
- $ref: '#/components/schemas/connect-timeout-header'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.GetChangelogRequest'
- required: true
- responses:
- default:
- description: Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/connect.error'
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.Changelog'
/bytebase.v1.DatabaseService/GetDatabase:
post:
tags:
@@ -1517,44 +1555,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.GetSchemaStringResponse'
- /bytebase.v1.DatabaseService/ListChangelogs:
- post:
- tags:
- - bytebase.v1.DatabaseService
- summary: ListChangelogs
- description: |-
- Lists migration history for a database.
- Permissions required: bb.changelogs.list
- operationId: bytebase.v1.DatabaseService.ListChangelogs
- parameters:
- - name: Connect-Protocol-Version
- in: header
- required: true
- schema:
- $ref: '#/components/schemas/connect-protocol-version'
- - name: Connect-Timeout-Ms
- in: header
- schema:
- $ref: '#/components/schemas/connect-timeout-header'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.ListChangelogsRequest'
- required: true
- responses:
- default:
- description: Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/connect.error'
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.ListChangelogsResponse'
/bytebase.v1.DatabaseService/ListDatabases:
post:
tags:
@@ -22525,6 +22525,8 @@ tags:
description: AuthService handles user authentication operations.
- name: bytebase.v1.CelService
description: CelService manages CEL (Common Expression Language) parsing and formatting operations.
+ - name: bytebase.v1.ChangelogService
+ description: ChangelogService manages database migration history.
- name: bytebase.v1.DatabaseCatalogService
description: DatabaseCatalogService manages database schema metadata and classification.
- name: bytebase.v1.DatabaseGroupService
diff --git a/backend/api/v1/database_service_changelog.go b/backend/api/v1/changelog_service.go
similarity index 87%
rename from backend/api/v1/database_service_changelog.go
rename to backend/api/v1/changelog_service.go
index 9eec6c0304..a9edf25b23 100644
--- a/backend/api/v1/database_service_changelog.go
+++ b/backend/api/v1/changelog_service.go
@@ -14,9 +14,23 @@ import (
"github.com/bytebase/bytebase/backend/common"
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
+ "github.com/bytebase/bytebase/backend/generated-go/v1/v1connect"
"github.com/bytebase/bytebase/backend/store"
)
+// ChangelogService implements the changelog service.
+type ChangelogService struct {
+ v1connect.UnimplementedChangelogServiceHandler
+ store *store.Store
+}
+
+// NewChangelogService creates a new ChangelogService.
+func NewChangelogService(store *store.Store) *ChangelogService {
+ return &ChangelogService{
+ store: store,
+ }
+}
+
func parseChangelogFilter(filter string, find *store.FindChangelogMessage) error {
if filter == "" {
return nil
@@ -88,7 +102,7 @@ func parseChangelogFilter(filter string, find *store.FindChangelogMessage) error
return parseFilter(ast.NativeRep().Expr())
}
-func (s *DatabaseService) ListChangelogs(ctx context.Context, req *connect.Request[v1pb.ListChangelogsRequest]) (*connect.Response[v1pb.ListChangelogsResponse], error) {
+func (s *ChangelogService) ListChangelogs(ctx context.Context, req *connect.Request[v1pb.ListChangelogsRequest]) (*connect.Response[v1pb.ListChangelogsResponse], error) {
instanceID, databaseName, err := common.GetInstanceDatabaseID(req.Msg.Parent)
if err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrapf(err, "failed to parse %q", req.Msg.Parent))
@@ -143,14 +157,14 @@ func (s *DatabaseService) ListChangelogs(ctx context.Context, req *connect.Reque
}
// no subsequent pages
- converted := s.convertToChangelogs(ctx, database, changelogs)
+ converted := convertToChangelogs(database, changelogs)
return connect.NewResponse(&v1pb.ListChangelogsResponse{
Changelogs: converted,
NextPageToken: nextPageToken,
}), nil
}
-func (s *DatabaseService) GetChangelog(ctx context.Context, req *connect.Request[v1pb.GetChangelogRequest]) (*connect.Response[v1pb.Changelog], error) {
+func (s *ChangelogService) GetChangelog(ctx context.Context, req *connect.Request[v1pb.GetChangelogRequest]) (*connect.Response[v1pb.Changelog], error) {
instanceID, databaseName, changelogID, err := common.GetInstanceDatabaseChangelogID(req.Msg.Name)
if err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, err)
@@ -185,20 +199,20 @@ func (s *DatabaseService) GetChangelog(ctx context.Context, req *connect.Request
return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("database %q not found", databaseName))
}
- converted := s.convertToChangelog(database, changelog)
+ converted := convertToChangelog(database, changelog)
return connect.NewResponse(converted), nil
}
-func (s *DatabaseService) convertToChangelogs(_ context.Context, d *store.DatabaseMessage, cs []*store.ChangelogMessage) []*v1pb.Changelog {
+func convertToChangelogs(d *store.DatabaseMessage, cs []*store.ChangelogMessage) []*v1pb.Changelog {
var changelogs []*v1pb.Changelog
for _, c := range cs {
- changelog := s.convertToChangelog(d, c)
+ changelog := convertToChangelog(d, c)
changelogs = append(changelogs, changelog)
}
return changelogs
}
-func (*DatabaseService) convertToChangelog(d *store.DatabaseMessage, c *store.ChangelogMessage) *v1pb.Changelog {
+func convertToChangelog(d *store.DatabaseMessage, c *store.ChangelogMessage) *v1pb.Changelog {
cl := &v1pb.Changelog{
Name: common.FormatChangelog(d.InstanceID, d.DatabaseName, c.ResourceID),
CreateTime: timestamppb.New(c.CreatedAt),
diff --git a/backend/generated-go/v1/changelog_service.pb.go b/backend/generated-go/v1/changelog_service.pb.go
new file mode 100644
index 0000000000..8c0e8301b3
--- /dev/null
+++ b/backend/generated-go/v1/changelog_service.pb.go
@@ -0,0 +1,544 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.11
+// protoc (unknown)
+// source: v1/changelog_service.proto
+
+package v1
+
+import (
+ _ "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"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ChangelogView int32
+
+const (
+ // The default / unset value.
+ // The API will default to the BASIC view.
+ ChangelogView_CHANGELOG_VIEW_UNSPECIFIED ChangelogView = 0
+ ChangelogView_CHANGELOG_VIEW_BASIC ChangelogView = 1
+ ChangelogView_CHANGELOG_VIEW_FULL ChangelogView = 2
+)
+
+// Enum value maps for ChangelogView.
+var (
+ ChangelogView_name = map[int32]string{
+ 0: "CHANGELOG_VIEW_UNSPECIFIED",
+ 1: "CHANGELOG_VIEW_BASIC",
+ 2: "CHANGELOG_VIEW_FULL",
+ }
+ ChangelogView_value = map[string]int32{
+ "CHANGELOG_VIEW_UNSPECIFIED": 0,
+ "CHANGELOG_VIEW_BASIC": 1,
+ "CHANGELOG_VIEW_FULL": 2,
+ }
+)
+
+func (x ChangelogView) Enum() *ChangelogView {
+ p := new(ChangelogView)
+ *p = x
+ return p
+}
+
+func (x ChangelogView) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ChangelogView) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_changelog_service_proto_enumTypes[0].Descriptor()
+}
+
+func (ChangelogView) Type() protoreflect.EnumType {
+ return &file_v1_changelog_service_proto_enumTypes[0]
+}
+
+func (x ChangelogView) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ChangelogView.Descriptor instead.
+func (ChangelogView) EnumDescriptor() ([]byte, []int) {
+ return file_v1_changelog_service_proto_rawDescGZIP(), []int{0}
+}
+
+type Changelog_Status int32
+
+const (
+ Changelog_STATUS_UNSPECIFIED Changelog_Status = 0
+ Changelog_PENDING Changelog_Status = 1
+ Changelog_DONE Changelog_Status = 2
+ Changelog_FAILED Changelog_Status = 3
+)
+
+// Enum value maps for Changelog_Status.
+var (
+ Changelog_Status_name = map[int32]string{
+ 0: "STATUS_UNSPECIFIED",
+ 1: "PENDING",
+ 2: "DONE",
+ 3: "FAILED",
+ }
+ Changelog_Status_value = map[string]int32{
+ "STATUS_UNSPECIFIED": 0,
+ "PENDING": 1,
+ "DONE": 2,
+ "FAILED": 3,
+ }
+)
+
+func (x Changelog_Status) Enum() *Changelog_Status {
+ p := new(Changelog_Status)
+ *p = x
+ return p
+}
+
+func (x Changelog_Status) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Changelog_Status) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_changelog_service_proto_enumTypes[1].Descriptor()
+}
+
+func (Changelog_Status) Type() protoreflect.EnumType {
+ return &file_v1_changelog_service_proto_enumTypes[1]
+}
+
+func (x Changelog_Status) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Changelog_Status.Descriptor instead.
+func (Changelog_Status) EnumDescriptor() ([]byte, []int) {
+ return file_v1_changelog_service_proto_rawDescGZIP(), []int{3, 0}
+}
+
+type ListChangelogsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The parent of the changelogs.
+ // Format: instances/{instance}/databases/{database}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The maximum number of changelogs to return. The service may return fewer
+ // than this value. If unspecified, at most 10 changelogs will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from the previous call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ View ChangelogView `protobuf:"varint,4,opt,name=view,proto3,enum=bytebase.v1.ChangelogView" json:"view,omitempty"`
+ // Filter is used to filter changelogs returned in the list.
+ // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ //
+ // Supported filter:
+ // - status: the changelog status, support "==" operation. check Changelog.Status for available values.
+ // - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
+ //
+ // Example:
+ // status == "DONE"
+ // status == "FAILED" && type == "SDL"
+ // create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"
+ Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListChangelogsRequest) Reset() {
+ *x = ListChangelogsRequest{}
+ mi := &file_v1_changelog_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListChangelogsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListChangelogsRequest) ProtoMessage() {}
+
+func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_changelog_service_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListChangelogsRequest.ProtoReflect.Descriptor instead.
+func (*ListChangelogsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_changelog_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ListChangelogsRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListChangelogsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListChangelogsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListChangelogsRequest) GetView() ChangelogView {
+ if x != nil {
+ return x.View
+ }
+ return ChangelogView_CHANGELOG_VIEW_UNSPECIFIED
+}
+
+func (x *ListChangelogsRequest) GetFilter() string {
+ if x != nil {
+ return x.Filter
+ }
+ return ""
+}
+
+type ListChangelogsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The list of changelogs.
+ Changelogs []*Changelog `protobuf:"bytes,1,rep,name=changelogs,proto3" json:"changelogs,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListChangelogsResponse) Reset() {
+ *x = ListChangelogsResponse{}
+ mi := &file_v1_changelog_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListChangelogsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListChangelogsResponse) ProtoMessage() {}
+
+func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_changelog_service_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListChangelogsResponse.ProtoReflect.Descriptor instead.
+func (*ListChangelogsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_changelog_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListChangelogsResponse) GetChangelogs() []*Changelog {
+ if x != nil {
+ return x.Changelogs
+ }
+ return nil
+}
+
+func (x *ListChangelogsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type GetChangelogRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The name of the changelog to retrieve.
+ // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ View ChangelogView `protobuf:"varint,2,opt,name=view,proto3,enum=bytebase.v1.ChangelogView" json:"view,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetChangelogRequest) Reset() {
+ *x = GetChangelogRequest{}
+ mi := &file_v1_changelog_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetChangelogRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetChangelogRequest) ProtoMessage() {}
+
+func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_changelog_service_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetChangelogRequest.ProtoReflect.Descriptor instead.
+func (*GetChangelogRequest) Descriptor() ([]byte, []int) {
+ return file_v1_changelog_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetChangelogRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetChangelogRequest) GetView() ChangelogView {
+ if x != nil {
+ return x.View
+ }
+ return ChangelogView_CHANGELOG_VIEW_UNSPECIFIED
+}
+
+type Changelog struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ Status Changelog_Status `protobuf:"varint,3,opt,name=status,proto3,enum=bytebase.v1.Changelog_Status" json:"status,omitempty"`
+ Schema string `protobuf:"bytes,7,opt,name=schema,proto3" json:"schema,omitempty"`
+ SchemaSize int64 `protobuf:"varint,8,opt,name=schema_size,json=schemaSize,proto3" json:"schema_size,omitempty"`
+ // Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ TaskRun string `protobuf:"bytes,11,opt,name=task_run,json=taskRun,proto3" json:"task_run,omitempty"`
+ // The title of the plan associated with this changelog's task run.
+ // This field is populated by deriving the plan from task_run for display purposes.
+ PlanTitle string `protobuf:"bytes,15,opt,name=plan_title,json=planTitle,proto3" json:"plan_title,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Changelog) Reset() {
+ *x = Changelog{}
+ mi := &file_v1_changelog_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Changelog) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Changelog) ProtoMessage() {}
+
+func (x *Changelog) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_changelog_service_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Changelog.ProtoReflect.Descriptor instead.
+func (*Changelog) Descriptor() ([]byte, []int) {
+ return file_v1_changelog_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *Changelog) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Changelog) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Changelog) GetStatus() Changelog_Status {
+ if x != nil {
+ return x.Status
+ }
+ return Changelog_STATUS_UNSPECIFIED
+}
+
+func (x *Changelog) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+func (x *Changelog) GetSchemaSize() int64 {
+ if x != nil {
+ return x.SchemaSize
+ }
+ return 0
+}
+
+func (x *Changelog) GetTaskRun() string {
+ if x != nil {
+ return x.TaskRun
+ }
+ return ""
+}
+
+func (x *Changelog) GetPlanTitle() string {
+ if x != nil {
+ return x.PlanTitle
+ }
+ return ""
+}
+
+var File_v1_changelog_service_proto protoreflect.FileDescriptor
+
+const file_v1_changelog_service_proto_rawDesc = "" +
+ "\n" +
+ "\x1av1/changelog_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\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\xd2\x01\n" +
+ "\x15ListChangelogsRequest\x125\n" +
+ "\x06parent\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
+ "\x15bytebase.com/DatabaseR\x06parent\x12\x1b\n" +
+ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
+ "\n" +
+ "page_token\x18\x03 \x01(\tR\tpageToken\x12.\n" +
+ "\x04view\x18\x04 \x01(\x0e2\x1a.bytebase.v1.ChangelogViewR\x04view\x12\x16\n" +
+ "\x06filter\x18\x05 \x01(\tR\x06filter\"x\n" +
+ "\x16ListChangelogsResponse\x126\n" +
+ "\n" +
+ "changelogs\x18\x01 \x03(\v2\x16.bytebase.v1.ChangelogR\n" +
+ "changelogs\x12&\n" +
+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\x81\x01\n" +
+ "\x13GetChangelogRequest\x12:\n" +
+ "\x04name\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" +
+ "\x1ebytebase.com/DatabaseChangelogR\x04name\x12.\n" +
+ "\x04view\x18\x02 \x01(\x0e2\x1a.bytebase.v1.ChangelogViewR\x04view\"\xb7\x03\n" +
+ "\tChangelog\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12;\n" +
+ "\vcreate_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
+ "createTime\x125\n" +
+ "\x06status\x18\x03 \x01(\x0e2\x1d.bytebase.v1.Changelog.StatusR\x06status\x12\x16\n" +
+ "\x06schema\x18\a \x01(\tR\x06schema\x12\x1f\n" +
+ "\vschema_size\x18\b \x01(\x03R\n" +
+ "schemaSize\x12\x19\n" +
+ "\btask_run\x18\v \x01(\tR\ataskRun\x12\"\n" +
+ "\n" +
+ "plan_title\x18\x0f \x01(\tB\x03\xe0A\x03R\tplanTitle\"C\n" +
+ "\x06Status\x12\x16\n" +
+ "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +
+ "\aPENDING\x10\x01\x12\b\n" +
+ "\x04DONE\x10\x02\x12\n" +
+ "\n" +
+ "\x06FAILED\x10\x03:e\xeaAb\n" +
+ "\x1ebytebase.com/DatabaseChangelog\x12@instances/{instance}/databases/{database}/changelogs/{changelog}*b\n" +
+ "\rChangelogView\x12\x1e\n" +
+ "\x1aCHANGELOG_VIEW_UNSPECIFIED\x10\x00\x12\x18\n" +
+ "\x14CHANGELOG_VIEW_BASIC\x10\x01\x12\x17\n" +
+ "\x13CHANGELOG_VIEW_FULL\x10\x022\xee\x02\n" +
+ "\x10ChangelogService\x12\xb5\x01\n" +
+ "\x0eListChangelogs\x12\".bytebase.v1.ListChangelogsRequest\x1a#.bytebase.v1.ListChangelogsResponse\"Z\xdaA\x06parent\x8a\xea0\x12bb.changelogs.list\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{parent=instances/*/databases/*}/changelogs\x12\xa1\x01\n" +
+ "\fGetChangelog\x12 .bytebase.v1.GetChangelogRequest\x1a\x16.bytebase.v1.Changelog\"W\xdaA\x04name\x8a\xea0\x11bb.changelogs.get\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{name=instances/*/databases/*/changelogs/*}B\xab\x01\n" +
+ "\x0fcom.bytebase.v1B\x15ChangelogServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"
+
+var (
+ file_v1_changelog_service_proto_rawDescOnce sync.Once
+ file_v1_changelog_service_proto_rawDescData []byte
+)
+
+func file_v1_changelog_service_proto_rawDescGZIP() []byte {
+ file_v1_changelog_service_proto_rawDescOnce.Do(func() {
+ file_v1_changelog_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_changelog_service_proto_rawDesc), len(file_v1_changelog_service_proto_rawDesc)))
+ })
+ return file_v1_changelog_service_proto_rawDescData
+}
+
+var file_v1_changelog_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_v1_changelog_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_v1_changelog_service_proto_goTypes = []any{
+ (ChangelogView)(0), // 0: bytebase.v1.ChangelogView
+ (Changelog_Status)(0), // 1: bytebase.v1.Changelog.Status
+ (*ListChangelogsRequest)(nil), // 2: bytebase.v1.ListChangelogsRequest
+ (*ListChangelogsResponse)(nil), // 3: bytebase.v1.ListChangelogsResponse
+ (*GetChangelogRequest)(nil), // 4: bytebase.v1.GetChangelogRequest
+ (*Changelog)(nil), // 5: bytebase.v1.Changelog
+ (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
+}
+var file_v1_changelog_service_proto_depIdxs = []int32{
+ 0, // 0: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView
+ 5, // 1: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog
+ 0, // 2: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView
+ 6, // 3: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp
+ 1, // 4: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status
+ 2, // 5: bytebase.v1.ChangelogService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest
+ 4, // 6: bytebase.v1.ChangelogService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest
+ 3, // 7: bytebase.v1.ChangelogService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse
+ 5, // 8: bytebase.v1.ChangelogService.GetChangelog:output_type -> bytebase.v1.Changelog
+ 7, // [7:9] is the sub-list for method output_type
+ 5, // [5:7] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_v1_changelog_service_proto_init() }
+func file_v1_changelog_service_proto_init() {
+ if File_v1_changelog_service_proto != nil {
+ return
+ }
+ file_v1_annotation_proto_init()
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_changelog_service_proto_rawDesc), len(file_v1_changelog_service_proto_rawDesc)),
+ NumEnums: 2,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_changelog_service_proto_goTypes,
+ DependencyIndexes: file_v1_changelog_service_proto_depIdxs,
+ EnumInfos: file_v1_changelog_service_proto_enumTypes,
+ MessageInfos: file_v1_changelog_service_proto_msgTypes,
+ }.Build()
+ File_v1_changelog_service_proto = out.File
+ file_v1_changelog_service_proto_goTypes = nil
+ file_v1_changelog_service_proto_depIdxs = nil
+}
diff --git a/backend/generated-go/v1/changelog_service.pb.gw.go b/backend/generated-go/v1/changelog_service.pb.gw.go
new file mode 100644
index 0000000000..2b0b68085e
--- /dev/null
+++ b/backend/generated-go/v1/changelog_service.pb.gw.go
@@ -0,0 +1,275 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: v1/changelog_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var (
+ _ codes.Code
+ _ io.Reader
+ _ status.Status
+ _ = errors.New
+ _ = runtime.String
+ _ = utilities.NewDoubleArray
+ _ = metadata.Join
+)
+
+var filter_ChangelogService_ListChangelogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+
+func request_ChangelogService_ListChangelogs_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ListChangelogsRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if req.Body != nil {
+ _, _ = io.Copy(io.Discard, req.Body)
+ }
+ val, ok := pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ChangelogService_ListChangelogs_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ListChangelogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ChangelogService_ListChangelogs_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ListChangelogsRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ChangelogService_ListChangelogs_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ListChangelogs(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+var filter_ChangelogService_GetChangelog_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+
+func request_ChangelogService_GetChangelog_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetChangelogRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if req.Body != nil {
+ _, _ = io.Copy(io.Discard, req.Body)
+ }
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ChangelogService_GetChangelog_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.GetChangelog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ChangelogService_GetChangelog_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetChangelogRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ChangelogService_GetChangelog_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.GetChangelog(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+// RegisterChangelogServiceHandlerServer registers the http handlers for service ChangelogService to "mux".
+// UnaryRPC :call ChangelogServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterChangelogServiceHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
+func RegisterChangelogServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChangelogServiceServer) error {
+ mux.Handle(http.MethodGet, pattern_ChangelogService_ListChangelogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ChangelogService/ListChangelogs", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/changelogs"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ChangelogService_ListChangelogs_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ChangelogService_ListChangelogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodGet, pattern_ChangelogService_GetChangelog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ChangelogService/GetChangelog", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/changelogs/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ChangelogService_GetChangelog_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ChangelogService_GetChangelog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
+ return nil
+}
+
+// RegisterChangelogServiceHandlerFromEndpoint is same as RegisterChangelogServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterChangelogServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.NewClient(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+ return RegisterChangelogServiceHandler(ctx, mux, conn)
+}
+
+// RegisterChangelogServiceHandler registers the http handlers for service ChangelogService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterChangelogServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterChangelogServiceHandlerClient(ctx, mux, NewChangelogServiceClient(conn))
+}
+
+// RegisterChangelogServiceHandlerClient registers the http handlers for service ChangelogService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChangelogServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChangelogServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "ChangelogServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterChangelogServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChangelogServiceClient) error {
+ mux.Handle(http.MethodGet, pattern_ChangelogService_ListChangelogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ChangelogService/ListChangelogs", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/changelogs"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ChangelogService_ListChangelogs_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ChangelogService_ListChangelogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodGet, pattern_ChangelogService_GetChangelog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ChangelogService/GetChangelog", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/changelogs/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ChangelogService_GetChangelog_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ChangelogService_GetChangelog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ return nil
+}
+
+var (
+ pattern_ChangelogService_ListChangelogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "changelogs"}, ""))
+ pattern_ChangelogService_GetChangelog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "changelogs", "name"}, ""))
+)
+
+var (
+ forward_ChangelogService_ListChangelogs_0 = runtime.ForwardResponseMessage
+ forward_ChangelogService_GetChangelog_0 = runtime.ForwardResponseMessage
+)
diff --git a/backend/generated-go/v1/changelog_service_equal.pb.go b/backend/generated-go/v1/changelog_service_equal.pb.go
new file mode 100644
index 0000000000..eb03c54e56
--- /dev/null
+++ b/backend/generated-go/v1/changelog_service_equal.pb.go
@@ -0,0 +1,97 @@
+// Code generated by protoc-gen-equal-go. DO NOT EDIT.
+// source: v1/changelog_service.proto
+
+package v1
+
+func (x *ListChangelogsRequest) Equal(y *ListChangelogsRequest) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Parent != y.Parent {
+ return false
+ }
+ if x.PageSize != y.PageSize {
+ return false
+ }
+ if x.PageToken != y.PageToken {
+ return false
+ }
+ if x.View != y.View {
+ return false
+ }
+ if x.Filter != y.Filter {
+ return false
+ }
+ return true
+}
+
+func (x *ListChangelogsResponse) Equal(y *ListChangelogsResponse) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if len(x.Changelogs) != len(y.Changelogs) {
+ return false
+ }
+ for i := 0; i < len(x.Changelogs); i++ {
+ if !x.Changelogs[i].Equal(y.Changelogs[i]) {
+ return false
+ }
+ }
+ if x.NextPageToken != y.NextPageToken {
+ return false
+ }
+ return true
+}
+
+func (x *GetChangelogRequest) Equal(y *GetChangelogRequest) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Name != y.Name {
+ return false
+ }
+ if x.View != y.View {
+ return false
+ }
+ return true
+}
+
+func (x *Changelog) Equal(y *Changelog) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Name != y.Name {
+ 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 x.Status != y.Status {
+ return false
+ }
+ if x.Schema != y.Schema {
+ return false
+ }
+ if x.SchemaSize != y.SchemaSize {
+ return false
+ }
+ if x.TaskRun != y.TaskRun {
+ return false
+ }
+ if x.PlanTitle != y.PlanTitle {
+ return false
+ }
+ return true
+}
diff --git a/backend/generated-go/v1/changelog_service_grpc.pb.go b/backend/generated-go/v1/changelog_service_grpc.pb.go
new file mode 100644
index 0000000000..bef547bd99
--- /dev/null
+++ b/backend/generated-go/v1/changelog_service_grpc.pb.go
@@ -0,0 +1,171 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.6.2
+// - protoc (unknown)
+// source: v1/changelog_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ChangelogService_ListChangelogs_FullMethodName = "/bytebase.v1.ChangelogService/ListChangelogs"
+ ChangelogService_GetChangelog_FullMethodName = "/bytebase.v1.ChangelogService/GetChangelog"
+)
+
+// ChangelogServiceClient is the client API for ChangelogService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// ChangelogService manages database migration history.
+type ChangelogServiceClient interface {
+ // Lists migration history for a database.
+ // Permissions required: bb.changelogs.list
+ ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error)
+ // Retrieves a specific changelog entry.
+ // Permissions required: bb.changelogs.get
+ GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error)
+}
+
+type changelogServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewChangelogServiceClient(cc grpc.ClientConnInterface) ChangelogServiceClient {
+ return &changelogServiceClient{cc}
+}
+
+func (c *changelogServiceClient) ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ListChangelogsResponse)
+ err := c.cc.Invoke(ctx, ChangelogService_ListChangelogs_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *changelogServiceClient) GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Changelog)
+ err := c.cc.Invoke(ctx, ChangelogService_GetChangelog_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// ChangelogServiceServer is the server API for ChangelogService service.
+// All implementations must embed UnimplementedChangelogServiceServer
+// for forward compatibility.
+//
+// ChangelogService manages database migration history.
+type ChangelogServiceServer interface {
+ // Lists migration history for a database.
+ // Permissions required: bb.changelogs.list
+ ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error)
+ // Retrieves a specific changelog entry.
+ // Permissions required: bb.changelogs.get
+ GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error)
+ mustEmbedUnimplementedChangelogServiceServer()
+}
+
+// UnimplementedChangelogServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedChangelogServiceServer struct{}
+
+func (UnimplementedChangelogServiceServer) ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error) {
+ return nil, status.Error(codes.Unimplemented, "method ListChangelogs not implemented")
+}
+func (UnimplementedChangelogServiceServer) GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error) {
+ return nil, status.Error(codes.Unimplemented, "method GetChangelog not implemented")
+}
+func (UnimplementedChangelogServiceServer) mustEmbedUnimplementedChangelogServiceServer() {}
+func (UnimplementedChangelogServiceServer) testEmbeddedByValue() {}
+
+// UnsafeChangelogServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ChangelogServiceServer will
+// result in compilation errors.
+type UnsafeChangelogServiceServer interface {
+ mustEmbedUnimplementedChangelogServiceServer()
+}
+
+func RegisterChangelogServiceServer(s grpc.ServiceRegistrar, srv ChangelogServiceServer) {
+ // If the following call panics, it indicates UnimplementedChangelogServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ChangelogService_ServiceDesc, srv)
+}
+
+func _ChangelogService_ListChangelogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListChangelogsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ChangelogServiceServer).ListChangelogs(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ChangelogService_ListChangelogs_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ChangelogServiceServer).ListChangelogs(ctx, req.(*ListChangelogsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ChangelogService_GetChangelog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetChangelogRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ChangelogServiceServer).GetChangelog(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ChangelogService_GetChangelog_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ChangelogServiceServer).GetChangelog(ctx, req.(*GetChangelogRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ChangelogService_ServiceDesc is the grpc.ServiceDesc for ChangelogService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ChangelogService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.ChangelogService",
+ HandlerType: (*ChangelogServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ListChangelogs",
+ Handler: _ChangelogService_ListChangelogs_Handler,
+ },
+ {
+ MethodName: "GetChangelog",
+ Handler: _ChangelogService_GetChangelog_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/changelog_service.proto",
+}
diff --git a/backend/generated-go/v1/database_service.pb.go b/backend/generated-go/v1/database_service.pb.go
index d98ef4d38e..3229ee2e8d 100644
--- a/backend/generated-go/v1/database_service.pb.go
+++ b/backend/generated-go/v1/database_service.pb.go
@@ -76,57 +76,6 @@ func (SyncStatus) EnumDescriptor() ([]byte, []int) {
return file_v1_database_service_proto_rawDescGZIP(), []int{0}
}
-type ChangelogView int32
-
-const (
- // The default / unset value.
- // The API will default to the BASIC view.
- ChangelogView_CHANGELOG_VIEW_UNSPECIFIED ChangelogView = 0
- ChangelogView_CHANGELOG_VIEW_BASIC ChangelogView = 1
- ChangelogView_CHANGELOG_VIEW_FULL ChangelogView = 2
-)
-
-// Enum value maps for ChangelogView.
-var (
- ChangelogView_name = map[int32]string{
- 0: "CHANGELOG_VIEW_UNSPECIFIED",
- 1: "CHANGELOG_VIEW_BASIC",
- 2: "CHANGELOG_VIEW_FULL",
- }
- ChangelogView_value = map[string]int32{
- "CHANGELOG_VIEW_UNSPECIFIED": 0,
- "CHANGELOG_VIEW_BASIC": 1,
- "CHANGELOG_VIEW_FULL": 2,
- }
-)
-
-func (x ChangelogView) Enum() *ChangelogView {
- p := new(ChangelogView)
- *p = x
- return p
-}
-
-func (x ChangelogView) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (ChangelogView) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[1].Descriptor()
-}
-
-func (ChangelogView) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[1]
-}
-
-func (x ChangelogView) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use ChangelogView.Descriptor instead.
-func (ChangelogView) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{1}
-}
-
// SDLFormat specifies the output format for SDL schema.
type GetDatabaseSDLSchemaRequest_SDLFormat int32
@@ -165,11 +114,11 @@ func (x GetDatabaseSDLSchemaRequest_SDLFormat) String() string {
}
func (GetDatabaseSDLSchemaRequest_SDLFormat) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[2].Descriptor()
+ return file_v1_database_service_proto_enumTypes[1].Descriptor()
}
func (GetDatabaseSDLSchemaRequest_SDLFormat) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[2]
+ return &file_v1_database_service_proto_enumTypes[1]
}
func (x GetDatabaseSDLSchemaRequest_SDLFormat) Number() protoreflect.EnumNumber {
@@ -239,11 +188,11 @@ func (x TablePartitionMetadata_Type) String() string {
}
func (TablePartitionMetadata_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[3].Descriptor()
+ return file_v1_database_service_proto_enumTypes[2].Descriptor()
}
func (TablePartitionMetadata_Type) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[3]
+ return &file_v1_database_service_proto_enumTypes[2]
}
func (x TablePartitionMetadata_Type) Number() protoreflect.EnumNumber {
@@ -288,11 +237,11 @@ func (x ColumnMetadata_IdentityGeneration) String() string {
}
func (ColumnMetadata_IdentityGeneration) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[4].Descriptor()
+ return file_v1_database_service_proto_enumTypes[3].Descriptor()
}
func (ColumnMetadata_IdentityGeneration) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[4]
+ return &file_v1_database_service_proto_enumTypes[3]
}
func (x ColumnMetadata_IdentityGeneration) Number() protoreflect.EnumNumber {
@@ -337,11 +286,11 @@ func (x GenerationMetadata_Type) String() string {
}
func (GenerationMetadata_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[5].Descriptor()
+ return file_v1_database_service_proto_enumTypes[4].Descriptor()
}
func (GenerationMetadata_Type) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[5]
+ return &file_v1_database_service_proto_enumTypes[4]
}
func (x GenerationMetadata_Type) Number() protoreflect.EnumNumber {
@@ -386,11 +335,11 @@ func (x TaskMetadata_State) String() string {
}
func (TaskMetadata_State) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[6].Descriptor()
+ return file_v1_database_service_proto_enumTypes[5].Descriptor()
}
func (TaskMetadata_State) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[6]
+ return &file_v1_database_service_proto_enumTypes[5]
}
func (x TaskMetadata_State) Number() protoreflect.EnumNumber {
@@ -432,11 +381,11 @@ func (x StreamMetadata_Type) String() string {
}
func (StreamMetadata_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[7].Descriptor()
+ return file_v1_database_service_proto_enumTypes[6].Descriptor()
}
func (StreamMetadata_Type) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[7]
+ return &file_v1_database_service_proto_enumTypes[6]
}
func (x StreamMetadata_Type) Number() protoreflect.EnumNumber {
@@ -484,11 +433,11 @@ func (x StreamMetadata_Mode) String() string {
}
func (StreamMetadata_Mode) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[8].Descriptor()
+ return file_v1_database_service_proto_enumTypes[7].Descriptor()
}
func (StreamMetadata_Mode) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[8]
+ return &file_v1_database_service_proto_enumTypes[7]
}
func (x StreamMetadata_Mode) Number() protoreflect.EnumNumber {
@@ -500,58 +449,6 @@ func (StreamMetadata_Mode) EnumDescriptor() ([]byte, []int) {
return file_v1_database_service_proto_rawDescGZIP(), []int{40, 1}
}
-type Changelog_Status int32
-
-const (
- Changelog_STATUS_UNSPECIFIED Changelog_Status = 0
- Changelog_PENDING Changelog_Status = 1
- Changelog_DONE Changelog_Status = 2
- Changelog_FAILED Changelog_Status = 3
-)
-
-// Enum value maps for Changelog_Status.
-var (
- Changelog_Status_name = map[int32]string{
- 0: "STATUS_UNSPECIFIED",
- 1: "PENDING",
- 2: "DONE",
- 3: "FAILED",
- }
- Changelog_Status_value = map[string]int32{
- "STATUS_UNSPECIFIED": 0,
- "PENDING": 1,
- "DONE": 2,
- "FAILED": 3,
- }
-)
-
-func (x Changelog_Status) Enum() *Changelog_Status {
- p := new(Changelog_Status)
- *p = x
- return p
-}
-
-func (x Changelog_Status) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (Changelog_Status) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[9].Descriptor()
-}
-
-func (Changelog_Status) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[9]
-}
-
-func (x Changelog_Status) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use Changelog_Status.Descriptor instead.
-func (Changelog_Status) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{56, 0}
-}
-
type GetSchemaStringRequest_ObjectType int32
const (
@@ -603,11 +500,11 @@ func (x GetSchemaStringRequest_ObjectType) String() string {
}
func (GetSchemaStringRequest_ObjectType) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_database_service_proto_enumTypes[10].Descriptor()
+ return file_v1_database_service_proto_enumTypes[8].Descriptor()
}
func (GetSchemaStringRequest_ObjectType) Type() protoreflect.EnumType {
- return &file_v1_database_service_proto_enumTypes[10]
+ return &file_v1_database_service_proto_enumTypes[8]
}
func (x GetSchemaStringRequest_ObjectType) Number() protoreflect.EnumNumber {
@@ -616,7 +513,7 @@ func (x GetSchemaStringRequest_ObjectType) Number() protoreflect.EnumNumber {
// Deprecated: Use GetSchemaStringRequest_ObjectType.Descriptor instead.
func (GetSchemaStringRequest_ObjectType) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{57, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{53, 0}
}
type GetDatabaseRequest struct {
@@ -5326,308 +5223,6 @@ func (x *DatabaseSDLSchema) GetContentType() string {
return ""
}
-type ListChangelogsRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The parent of the changelogs.
- // Format: instances/{instance}/databases/{database}
- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
- // The maximum number of changelogs to return. The service may return fewer
- // than this value. If unspecified, at most 10 changelogs will be returned.
- // The maximum value is 1000; values above 1000 will be coerced to 1000.
- PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- // A page token, received from the previous call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided must match
- // the call that provided the page token.
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- View ChangelogView `protobuf:"varint,4,opt,name=view,proto3,enum=bytebase.v1.ChangelogView" json:"view,omitempty"`
- // Filter is used to filter changelogs returned in the list.
- // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
- //
- // Supported filter:
- // - status: the changelog status, support "==" operation. check Changelog.Status for available values.
- // - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
- //
- // Example:
- // status == "DONE"
- // status == "FAILED" && type == "SDL"
- // create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"
- Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ListChangelogsRequest) Reset() {
- *x = ListChangelogsRequest{}
- mi := &file_v1_database_service_proto_msgTypes[53]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ListChangelogsRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListChangelogsRequest) ProtoMessage() {}
-
-func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[53]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListChangelogsRequest.ProtoReflect.Descriptor instead.
-func (*ListChangelogsRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{53}
-}
-
-func (x *ListChangelogsRequest) GetParent() string {
- if x != nil {
- return x.Parent
- }
- return ""
-}
-
-func (x *ListChangelogsRequest) GetPageSize() int32 {
- if x != nil {
- return x.PageSize
- }
- return 0
-}
-
-func (x *ListChangelogsRequest) GetPageToken() string {
- if x != nil {
- return x.PageToken
- }
- return ""
-}
-
-func (x *ListChangelogsRequest) GetView() ChangelogView {
- if x != nil {
- return x.View
- }
- return ChangelogView_CHANGELOG_VIEW_UNSPECIFIED
-}
-
-func (x *ListChangelogsRequest) GetFilter() string {
- if x != nil {
- return x.Filter
- }
- return ""
-}
-
-type ListChangelogsResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The list of changelogs.
- Changelogs []*Changelog `protobuf:"bytes,1,rep,name=changelogs,proto3" json:"changelogs,omitempty"`
- // A token, which can be sent as `page_token` to retrieve the next page.
- // If this field is omitted, there are no subsequent pages.
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ListChangelogsResponse) Reset() {
- *x = ListChangelogsResponse{}
- mi := &file_v1_database_service_proto_msgTypes[54]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ListChangelogsResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListChangelogsResponse) ProtoMessage() {}
-
-func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[54]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListChangelogsResponse.ProtoReflect.Descriptor instead.
-func (*ListChangelogsResponse) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{54}
-}
-
-func (x *ListChangelogsResponse) GetChangelogs() []*Changelog {
- if x != nil {
- return x.Changelogs
- }
- return nil
-}
-
-func (x *ListChangelogsResponse) GetNextPageToken() string {
- if x != nil {
- return x.NextPageToken
- }
- return ""
-}
-
-type GetChangelogRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The name of the changelog to retrieve.
- // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- View ChangelogView `protobuf:"varint,2,opt,name=view,proto3,enum=bytebase.v1.ChangelogView" json:"view,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *GetChangelogRequest) Reset() {
- *x = GetChangelogRequest{}
- mi := &file_v1_database_service_proto_msgTypes[55]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *GetChangelogRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetChangelogRequest) ProtoMessage() {}
-
-func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[55]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetChangelogRequest.ProtoReflect.Descriptor instead.
-func (*GetChangelogRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{55}
-}
-
-func (x *GetChangelogRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *GetChangelogRequest) GetView() ChangelogView {
- if x != nil {
- return x.View
- }
- return ChangelogView_CHANGELOG_VIEW_UNSPECIFIED
-}
-
-type Changelog struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
- Status Changelog_Status `protobuf:"varint,3,opt,name=status,proto3,enum=bytebase.v1.Changelog_Status" json:"status,omitempty"`
- Schema string `protobuf:"bytes,7,opt,name=schema,proto3" json:"schema,omitempty"`
- SchemaSize int64 `protobuf:"varint,8,opt,name=schema_size,json=schemaSize,proto3" json:"schema_size,omitempty"`
- // Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
- TaskRun string `protobuf:"bytes,11,opt,name=task_run,json=taskRun,proto3" json:"task_run,omitempty"`
- // The title of the plan associated with this changelog's task run.
- // This field is populated by deriving the plan from task_run for display purposes.
- PlanTitle string `protobuf:"bytes,15,opt,name=plan_title,json=planTitle,proto3" json:"plan_title,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *Changelog) Reset() {
- *x = Changelog{}
- mi := &file_v1_database_service_proto_msgTypes[56]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *Changelog) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Changelog) ProtoMessage() {}
-
-func (x *Changelog) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[56]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Changelog.ProtoReflect.Descriptor instead.
-func (*Changelog) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{56}
-}
-
-func (x *Changelog) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *Changelog) GetCreateTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreateTime
- }
- return nil
-}
-
-func (x *Changelog) GetStatus() Changelog_Status {
- if x != nil {
- return x.Status
- }
- return Changelog_STATUS_UNSPECIFIED
-}
-
-func (x *Changelog) GetSchema() string {
- if x != nil {
- return x.Schema
- }
- return ""
-}
-
-func (x *Changelog) GetSchemaSize() int64 {
- if x != nil {
- return x.SchemaSize
- }
- return 0
-}
-
-func (x *Changelog) GetTaskRun() string {
- if x != nil {
- return x.TaskRun
- }
- return ""
-}
-
-func (x *Changelog) GetPlanTitle() string {
- if x != nil {
- return x.PlanTitle
- }
- return ""
-}
-
type GetSchemaStringRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of the database.
@@ -5647,7 +5242,7 @@ type GetSchemaStringRequest struct {
func (x *GetSchemaStringRequest) Reset() {
*x = GetSchemaStringRequest{}
- mi := &file_v1_database_service_proto_msgTypes[57]
+ mi := &file_v1_database_service_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5659,7 +5254,7 @@ func (x *GetSchemaStringRequest) String() string {
func (*GetSchemaStringRequest) ProtoMessage() {}
func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[57]
+ mi := &file_v1_database_service_proto_msgTypes[53]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5672,7 +5267,7 @@ func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSchemaStringRequest.ProtoReflect.Descriptor instead.
func (*GetSchemaStringRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{57}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{53}
}
func (x *GetSchemaStringRequest) GetName() string {
@@ -5719,7 +5314,7 @@ type GetSchemaStringResponse struct {
func (x *GetSchemaStringResponse) Reset() {
*x = GetSchemaStringResponse{}
- mi := &file_v1_database_service_proto_msgTypes[58]
+ mi := &file_v1_database_service_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5731,7 +5326,7 @@ func (x *GetSchemaStringResponse) String() string {
func (*GetSchemaStringResponse) ProtoMessage() {}
func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[58]
+ mi := &file_v1_database_service_proto_msgTypes[54]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5744,7 +5339,7 @@ func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSchemaStringResponse.ProtoReflect.Descriptor instead.
func (*GetSchemaStringResponse) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{58}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{54}
}
func (x *GetSchemaStringResponse) GetSchemaString() string {
@@ -6224,42 +5819,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"\x06schema\x18\x01 \x01(\tR\x06schema\"S\n" +
"\x11DatabaseSDLSchema\x12\x16\n" +
"\x06schema\x18\x01 \x01(\fR\x06schema\x12&\n" +
- "\fcontent_type\x18\x02 \x01(\tB\x03\xe0A\x03R\vcontentType\"\xd2\x01\n" +
- "\x15ListChangelogsRequest\x125\n" +
- "\x06parent\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
- "\x15bytebase.com/DatabaseR\x06parent\x12\x1b\n" +
- "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
- "\n" +
- "page_token\x18\x03 \x01(\tR\tpageToken\x12.\n" +
- "\x04view\x18\x04 \x01(\x0e2\x1a.bytebase.v1.ChangelogViewR\x04view\x12\x16\n" +
- "\x06filter\x18\x05 \x01(\tR\x06filter\"x\n" +
- "\x16ListChangelogsResponse\x126\n" +
- "\n" +
- "changelogs\x18\x01 \x03(\v2\x16.bytebase.v1.ChangelogR\n" +
- "changelogs\x12&\n" +
- "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\x81\x01\n" +
- "\x13GetChangelogRequest\x12:\n" +
- "\x04name\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" +
- "\x1ebytebase.com/DatabaseChangelogR\x04name\x12.\n" +
- "\x04view\x18\x02 \x01(\x0e2\x1a.bytebase.v1.ChangelogViewR\x04view\"\xb7\x03\n" +
- "\tChangelog\x12\x12\n" +
- "\x04name\x18\x01 \x01(\tR\x04name\x12;\n" +
- "\vcreate_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
- "createTime\x125\n" +
- "\x06status\x18\x03 \x01(\x0e2\x1d.bytebase.v1.Changelog.StatusR\x06status\x12\x16\n" +
- "\x06schema\x18\a \x01(\tR\x06schema\x12\x1f\n" +
- "\vschema_size\x18\b \x01(\x03R\n" +
- "schemaSize\x12\x19\n" +
- "\btask_run\x18\v \x01(\tR\ataskRun\x12\"\n" +
- "\n" +
- "plan_title\x18\x0f \x01(\tB\x03\xe0A\x03R\tplanTitle\"C\n" +
- "\x06Status\x12\x16\n" +
- "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +
- "\aPENDING\x10\x01\x12\b\n" +
- "\x04DONE\x10\x02\x12\n" +
- "\n" +
- "\x06FAILED\x10\x03:e\xeaAb\n" +
- "\x1ebytebase.com/DatabaseChangelog\x12@instances/{instance}/databases/{database}/changelogs/{changelog}\"\x97\x03\n" +
+ "\fcontent_type\x18\x02 \x01(\tB\x03\xe0A\x03R\vcontentType\"\x97\x03\n" +
"\x16GetSchemaStringRequest\x121\n" +
"\x04name\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
"\x15bytebase.com/DatabaseR\x04name\x12B\n" +
@@ -6286,11 +5846,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"\x17SYNC_STATUS_UNSPECIFIED\x10\x00\x12\x06\n" +
"\x02OK\x10\x01\x12\n" +
"\n" +
- "\x06FAILED\x10\x02*b\n" +
- "\rChangelogView\x12\x1e\n" +
- "\x1aCHANGELOG_VIEW_UNSPECIFIED\x10\x00\x12\x18\n" +
- "\x14CHANGELOG_VIEW_BASIC\x10\x01\x12\x17\n" +
- "\x13CHANGELOG_VIEW_FULL\x10\x022\xec\x14\n" +
+ "\x06FAILED\x10\x022\x90\x12\n" +
"\x0fDatabaseService\x12\x90\x01\n" +
"\vGetDatabase\x12\x1f.bytebase.v1.GetDatabaseRequest\x1a\x15.bytebase.v1.Database\"I\xdaA\x04name\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=instances/*/databases/*}\x12\xdd\x01\n" +
"\x11BatchGetDatabases\x12%.bytebase.v1.BatchGetDatabasesRequest\x1a&.bytebase.v1.BatchGetDatabasesResponse\"y\x8a\xea0\x10bb.databases.get\x90\xea0\x02\x82\xd3\xe4\x93\x02[Z-\x12+/v1/{parent=instances/*}/databases:batchGet\x12*/v1/{parent=projects/*}/databases:batchGet\x12\xeb\x01\n" +
@@ -6303,9 +5859,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"\x11GetDatabaseSchema\x12%.bytebase.v1.GetDatabaseSchemaRequest\x1a\x1b.bytebase.v1.DatabaseSchema\"O\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x02+\x12)/v1/{name=instances/*/databases/*/schema}\x12\xb4\x01\n" +
"\x14GetDatabaseSDLSchema\x12(.bytebase.v1.GetDatabaseSDLSchemaRequest\x1a\x1e.bytebase.v1.DatabaseSDLSchema\"R\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x02.\x12,/v1/{name=instances/*/databases/*/sdlSchema}\x12\xe1\x01\n" +
"\n" +
- "DiffSchema\x12\x1e.bytebase.v1.DiffSchemaRequest\x1a\x1f.bytebase.v1.DiffSchemaResponse\"\x91\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02s:\x01*Z?:\x01*\":/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema\"-/v1/{name=instances/*/databases/*}:diffSchema\x12\xb5\x01\n" +
- "\x0eListChangelogs\x12\".bytebase.v1.ListChangelogsRequest\x1a#.bytebase.v1.ListChangelogsResponse\"Z\xdaA\x06parent\x8a\xea0\x12bb.changelogs.list\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{parent=instances/*/databases/*}/changelogs\x12\xa1\x01\n" +
- "\fGetChangelog\x12 .bytebase.v1.GetChangelogRequest\x1a\x16.bytebase.v1.Changelog\"W\xdaA\x04name\x8a\xea0\x11bb.changelogs.get\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{name=instances/*/databases/*/changelogs/*}\x12\xba\x01\n" +
+ "DiffSchema\x12\x1e.bytebase.v1.DiffSchemaRequest\x1a\x1f.bytebase.v1.DiffSchemaResponse\"\x91\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02s:\x01*Z?:\x01*\":/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema\"-/v1/{name=instances/*/databases/*}:diffSchema\x12\xba\x01\n" +
"\x0fGetSchemaString\x12#.bytebase.v1.GetSchemaStringRequest\x1a$.bytebase.v1.GetSchemaStringResponse\"\\\xdaA\x04name\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{name=instances/*/databases/*/schemaString}B\xaa\x01\n" +
"\x0fcom.bytebase.v1B\x14DatabaseServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"
@@ -6321,185 +5875,170 @@ func file_v1_database_service_proto_rawDescGZIP() []byte {
return file_v1_database_service_proto_rawDescData
}
-var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 11)
-var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 60)
+var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)
+var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 56)
var file_v1_database_service_proto_goTypes = []any{
- (SyncStatus)(0), // 0: bytebase.v1.SyncStatus
- (ChangelogView)(0), // 1: bytebase.v1.ChangelogView
- (GetDatabaseSDLSchemaRequest_SDLFormat)(0), // 2: bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat
- (TablePartitionMetadata_Type)(0), // 3: bytebase.v1.TablePartitionMetadata.Type
- (ColumnMetadata_IdentityGeneration)(0), // 4: bytebase.v1.ColumnMetadata.IdentityGeneration
- (GenerationMetadata_Type)(0), // 5: bytebase.v1.GenerationMetadata.Type
- (TaskMetadata_State)(0), // 6: bytebase.v1.TaskMetadata.State
- (StreamMetadata_Type)(0), // 7: bytebase.v1.StreamMetadata.Type
- (StreamMetadata_Mode)(0), // 8: bytebase.v1.StreamMetadata.Mode
- (Changelog_Status)(0), // 9: bytebase.v1.Changelog.Status
- (GetSchemaStringRequest_ObjectType)(0), // 10: bytebase.v1.GetSchemaStringRequest.ObjectType
- (*GetDatabaseRequest)(nil), // 11: bytebase.v1.GetDatabaseRequest
- (*BatchGetDatabasesRequest)(nil), // 12: bytebase.v1.BatchGetDatabasesRequest
- (*BatchGetDatabasesResponse)(nil), // 13: bytebase.v1.BatchGetDatabasesResponse
- (*ListDatabasesRequest)(nil), // 14: bytebase.v1.ListDatabasesRequest
- (*ListDatabasesResponse)(nil), // 15: bytebase.v1.ListDatabasesResponse
- (*UpdateDatabaseRequest)(nil), // 16: bytebase.v1.UpdateDatabaseRequest
- (*BatchUpdateDatabasesRequest)(nil), // 17: bytebase.v1.BatchUpdateDatabasesRequest
- (*BatchUpdateDatabasesResponse)(nil), // 18: bytebase.v1.BatchUpdateDatabasesResponse
- (*BatchSyncDatabasesRequest)(nil), // 19: bytebase.v1.BatchSyncDatabasesRequest
- (*BatchSyncDatabasesResponse)(nil), // 20: bytebase.v1.BatchSyncDatabasesResponse
- (*SyncDatabaseRequest)(nil), // 21: bytebase.v1.SyncDatabaseRequest
- (*SyncDatabaseResponse)(nil), // 22: bytebase.v1.SyncDatabaseResponse
- (*GetDatabaseMetadataRequest)(nil), // 23: bytebase.v1.GetDatabaseMetadataRequest
- (*GetDatabaseSchemaRequest)(nil), // 24: bytebase.v1.GetDatabaseSchemaRequest
- (*GetDatabaseSDLSchemaRequest)(nil), // 25: bytebase.v1.GetDatabaseSDLSchemaRequest
- (*DiffSchemaRequest)(nil), // 26: bytebase.v1.DiffSchemaRequest
- (*DiffSchemaResponse)(nil), // 27: bytebase.v1.DiffSchemaResponse
- (*Database)(nil), // 28: bytebase.v1.Database
- (*DatabaseMetadata)(nil), // 29: bytebase.v1.DatabaseMetadata
- (*SchemaMetadata)(nil), // 30: bytebase.v1.SchemaMetadata
- (*EnumTypeMetadata)(nil), // 31: bytebase.v1.EnumTypeMetadata
- (*CompositeTypeMetadata)(nil), // 32: bytebase.v1.CompositeTypeMetadata
- (*CompositeTypeAttribute)(nil), // 33: bytebase.v1.CompositeTypeAttribute
- (*EventMetadata)(nil), // 34: bytebase.v1.EventMetadata
- (*SequenceMetadata)(nil), // 35: bytebase.v1.SequenceMetadata
- (*TriggerMetadata)(nil), // 36: bytebase.v1.TriggerMetadata
- (*ExternalTableMetadata)(nil), // 37: bytebase.v1.ExternalTableMetadata
- (*TableMetadata)(nil), // 38: bytebase.v1.TableMetadata
- (*CheckConstraintMetadata)(nil), // 39: bytebase.v1.CheckConstraintMetadata
- (*TablePartitionMetadata)(nil), // 40: bytebase.v1.TablePartitionMetadata
- (*ColumnMetadata)(nil), // 41: bytebase.v1.ColumnMetadata
- (*GenerationMetadata)(nil), // 42: bytebase.v1.GenerationMetadata
- (*ViewMetadata)(nil), // 43: bytebase.v1.ViewMetadata
- (*DependencyColumn)(nil), // 44: bytebase.v1.DependencyColumn
- (*MaterializedViewMetadata)(nil), // 45: bytebase.v1.MaterializedViewMetadata
- (*DependencyTable)(nil), // 46: bytebase.v1.DependencyTable
- (*FunctionMetadata)(nil), // 47: bytebase.v1.FunctionMetadata
- (*ProcedureMetadata)(nil), // 48: bytebase.v1.ProcedureMetadata
- (*PackageMetadata)(nil), // 49: bytebase.v1.PackageMetadata
- (*TaskMetadata)(nil), // 50: bytebase.v1.TaskMetadata
- (*StreamMetadata)(nil), // 51: bytebase.v1.StreamMetadata
- (*SpatialIndexConfig)(nil), // 52: bytebase.v1.SpatialIndexConfig
- (*TessellationConfig)(nil), // 53: bytebase.v1.TessellationConfig
- (*GridLevel)(nil), // 54: bytebase.v1.GridLevel
- (*BoundingBox)(nil), // 55: bytebase.v1.BoundingBox
- (*StorageConfig)(nil), // 56: bytebase.v1.StorageConfig
- (*DimensionalConfig)(nil), // 57: bytebase.v1.DimensionalConfig
- (*DimensionConstraint)(nil), // 58: bytebase.v1.DimensionConstraint
- (*IndexMetadata)(nil), // 59: bytebase.v1.IndexMetadata
- (*ExtensionMetadata)(nil), // 60: bytebase.v1.ExtensionMetadata
- (*ForeignKeyMetadata)(nil), // 61: bytebase.v1.ForeignKeyMetadata
- (*DatabaseSchema)(nil), // 62: bytebase.v1.DatabaseSchema
- (*DatabaseSDLSchema)(nil), // 63: bytebase.v1.DatabaseSDLSchema
- (*ListChangelogsRequest)(nil), // 64: bytebase.v1.ListChangelogsRequest
- (*ListChangelogsResponse)(nil), // 65: bytebase.v1.ListChangelogsResponse
- (*GetChangelogRequest)(nil), // 66: bytebase.v1.GetChangelogRequest
- (*Changelog)(nil), // 67: bytebase.v1.Changelog
- (*GetSchemaStringRequest)(nil), // 68: bytebase.v1.GetSchemaStringRequest
- (*GetSchemaStringResponse)(nil), // 69: bytebase.v1.GetSchemaStringResponse
- nil, // 70: bytebase.v1.Database.LabelsEntry
- (*fieldmaskpb.FieldMask)(nil), // 71: google.protobuf.FieldMask
- (State)(0), // 72: bytebase.v1.State
- (*timestamppb.Timestamp)(nil), // 73: google.protobuf.Timestamp
- (*InstanceResource)(nil), // 74: bytebase.v1.InstanceResource
+ (SyncStatus)(0), // 0: bytebase.v1.SyncStatus
+ (GetDatabaseSDLSchemaRequest_SDLFormat)(0), // 1: bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat
+ (TablePartitionMetadata_Type)(0), // 2: bytebase.v1.TablePartitionMetadata.Type
+ (ColumnMetadata_IdentityGeneration)(0), // 3: bytebase.v1.ColumnMetadata.IdentityGeneration
+ (GenerationMetadata_Type)(0), // 4: bytebase.v1.GenerationMetadata.Type
+ (TaskMetadata_State)(0), // 5: bytebase.v1.TaskMetadata.State
+ (StreamMetadata_Type)(0), // 6: bytebase.v1.StreamMetadata.Type
+ (StreamMetadata_Mode)(0), // 7: bytebase.v1.StreamMetadata.Mode
+ (GetSchemaStringRequest_ObjectType)(0), // 8: bytebase.v1.GetSchemaStringRequest.ObjectType
+ (*GetDatabaseRequest)(nil), // 9: bytebase.v1.GetDatabaseRequest
+ (*BatchGetDatabasesRequest)(nil), // 10: bytebase.v1.BatchGetDatabasesRequest
+ (*BatchGetDatabasesResponse)(nil), // 11: bytebase.v1.BatchGetDatabasesResponse
+ (*ListDatabasesRequest)(nil), // 12: bytebase.v1.ListDatabasesRequest
+ (*ListDatabasesResponse)(nil), // 13: bytebase.v1.ListDatabasesResponse
+ (*UpdateDatabaseRequest)(nil), // 14: bytebase.v1.UpdateDatabaseRequest
+ (*BatchUpdateDatabasesRequest)(nil), // 15: bytebase.v1.BatchUpdateDatabasesRequest
+ (*BatchUpdateDatabasesResponse)(nil), // 16: bytebase.v1.BatchUpdateDatabasesResponse
+ (*BatchSyncDatabasesRequest)(nil), // 17: bytebase.v1.BatchSyncDatabasesRequest
+ (*BatchSyncDatabasesResponse)(nil), // 18: bytebase.v1.BatchSyncDatabasesResponse
+ (*SyncDatabaseRequest)(nil), // 19: bytebase.v1.SyncDatabaseRequest
+ (*SyncDatabaseResponse)(nil), // 20: bytebase.v1.SyncDatabaseResponse
+ (*GetDatabaseMetadataRequest)(nil), // 21: bytebase.v1.GetDatabaseMetadataRequest
+ (*GetDatabaseSchemaRequest)(nil), // 22: bytebase.v1.GetDatabaseSchemaRequest
+ (*GetDatabaseSDLSchemaRequest)(nil), // 23: bytebase.v1.GetDatabaseSDLSchemaRequest
+ (*DiffSchemaRequest)(nil), // 24: bytebase.v1.DiffSchemaRequest
+ (*DiffSchemaResponse)(nil), // 25: bytebase.v1.DiffSchemaResponse
+ (*Database)(nil), // 26: bytebase.v1.Database
+ (*DatabaseMetadata)(nil), // 27: bytebase.v1.DatabaseMetadata
+ (*SchemaMetadata)(nil), // 28: bytebase.v1.SchemaMetadata
+ (*EnumTypeMetadata)(nil), // 29: bytebase.v1.EnumTypeMetadata
+ (*CompositeTypeMetadata)(nil), // 30: bytebase.v1.CompositeTypeMetadata
+ (*CompositeTypeAttribute)(nil), // 31: bytebase.v1.CompositeTypeAttribute
+ (*EventMetadata)(nil), // 32: bytebase.v1.EventMetadata
+ (*SequenceMetadata)(nil), // 33: bytebase.v1.SequenceMetadata
+ (*TriggerMetadata)(nil), // 34: bytebase.v1.TriggerMetadata
+ (*ExternalTableMetadata)(nil), // 35: bytebase.v1.ExternalTableMetadata
+ (*TableMetadata)(nil), // 36: bytebase.v1.TableMetadata
+ (*CheckConstraintMetadata)(nil), // 37: bytebase.v1.CheckConstraintMetadata
+ (*TablePartitionMetadata)(nil), // 38: bytebase.v1.TablePartitionMetadata
+ (*ColumnMetadata)(nil), // 39: bytebase.v1.ColumnMetadata
+ (*GenerationMetadata)(nil), // 40: bytebase.v1.GenerationMetadata
+ (*ViewMetadata)(nil), // 41: bytebase.v1.ViewMetadata
+ (*DependencyColumn)(nil), // 42: bytebase.v1.DependencyColumn
+ (*MaterializedViewMetadata)(nil), // 43: bytebase.v1.MaterializedViewMetadata
+ (*DependencyTable)(nil), // 44: bytebase.v1.DependencyTable
+ (*FunctionMetadata)(nil), // 45: bytebase.v1.FunctionMetadata
+ (*ProcedureMetadata)(nil), // 46: bytebase.v1.ProcedureMetadata
+ (*PackageMetadata)(nil), // 47: bytebase.v1.PackageMetadata
+ (*TaskMetadata)(nil), // 48: bytebase.v1.TaskMetadata
+ (*StreamMetadata)(nil), // 49: bytebase.v1.StreamMetadata
+ (*SpatialIndexConfig)(nil), // 50: bytebase.v1.SpatialIndexConfig
+ (*TessellationConfig)(nil), // 51: bytebase.v1.TessellationConfig
+ (*GridLevel)(nil), // 52: bytebase.v1.GridLevel
+ (*BoundingBox)(nil), // 53: bytebase.v1.BoundingBox
+ (*StorageConfig)(nil), // 54: bytebase.v1.StorageConfig
+ (*DimensionalConfig)(nil), // 55: bytebase.v1.DimensionalConfig
+ (*DimensionConstraint)(nil), // 56: bytebase.v1.DimensionConstraint
+ (*IndexMetadata)(nil), // 57: bytebase.v1.IndexMetadata
+ (*ExtensionMetadata)(nil), // 58: bytebase.v1.ExtensionMetadata
+ (*ForeignKeyMetadata)(nil), // 59: bytebase.v1.ForeignKeyMetadata
+ (*DatabaseSchema)(nil), // 60: bytebase.v1.DatabaseSchema
+ (*DatabaseSDLSchema)(nil), // 61: bytebase.v1.DatabaseSDLSchema
+ (*GetSchemaStringRequest)(nil), // 62: bytebase.v1.GetSchemaStringRequest
+ (*GetSchemaStringResponse)(nil), // 63: bytebase.v1.GetSchemaStringResponse
+ nil, // 64: bytebase.v1.Database.LabelsEntry
+ (*fieldmaskpb.FieldMask)(nil), // 65: google.protobuf.FieldMask
+ (State)(0), // 66: bytebase.v1.State
+ (*timestamppb.Timestamp)(nil), // 67: google.protobuf.Timestamp
+ (*InstanceResource)(nil), // 68: bytebase.v1.InstanceResource
}
var file_v1_database_service_proto_depIdxs = []int32{
- 28, // 0: bytebase.v1.BatchGetDatabasesResponse.databases:type_name -> bytebase.v1.Database
- 28, // 1: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database
- 28, // 2: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database
- 71, // 3: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
- 16, // 4: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest
- 28, // 5: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database
- 2, // 6: bytebase.v1.GetDatabaseSDLSchemaRequest.format:type_name -> bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat
- 72, // 7: bytebase.v1.Database.state:type_name -> bytebase.v1.State
- 73, // 8: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
- 70, // 9: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
- 74, // 10: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource
+ 26, // 0: bytebase.v1.BatchGetDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 26, // 1: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 26, // 2: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database
+ 65, // 3: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 14, // 4: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest
+ 26, // 5: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 1, // 6: bytebase.v1.GetDatabaseSDLSchemaRequest.format:type_name -> bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat
+ 66, // 7: bytebase.v1.Database.state:type_name -> bytebase.v1.State
+ 67, // 8: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
+ 64, // 9: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
+ 68, // 10: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource
0, // 11: bytebase.v1.Database.sync_status:type_name -> bytebase.v1.SyncStatus
- 30, // 12: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata
- 60, // 13: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata
- 38, // 14: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata
- 37, // 15: bytebase.v1.SchemaMetadata.external_tables:type_name -> bytebase.v1.ExternalTableMetadata
- 43, // 16: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata
- 47, // 17: bytebase.v1.SchemaMetadata.functions:type_name -> bytebase.v1.FunctionMetadata
- 48, // 18: bytebase.v1.SchemaMetadata.procedures:type_name -> bytebase.v1.ProcedureMetadata
- 51, // 19: bytebase.v1.SchemaMetadata.streams:type_name -> bytebase.v1.StreamMetadata
- 50, // 20: bytebase.v1.SchemaMetadata.tasks:type_name -> bytebase.v1.TaskMetadata
- 45, // 21: bytebase.v1.SchemaMetadata.materialized_views:type_name -> bytebase.v1.MaterializedViewMetadata
- 49, // 22: bytebase.v1.SchemaMetadata.packages:type_name -> bytebase.v1.PackageMetadata
- 35, // 23: bytebase.v1.SchemaMetadata.sequences:type_name -> bytebase.v1.SequenceMetadata
- 34, // 24: bytebase.v1.SchemaMetadata.events:type_name -> bytebase.v1.EventMetadata
- 31, // 25: bytebase.v1.SchemaMetadata.enum_types:type_name -> bytebase.v1.EnumTypeMetadata
- 32, // 26: bytebase.v1.SchemaMetadata.composite_types:type_name -> bytebase.v1.CompositeTypeMetadata
- 33, // 27: bytebase.v1.CompositeTypeMetadata.attributes:type_name -> bytebase.v1.CompositeTypeAttribute
- 41, // 28: bytebase.v1.ExternalTableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
- 41, // 29: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
- 59, // 30: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
- 61, // 31: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata
- 40, // 32: bytebase.v1.TableMetadata.partitions:type_name -> bytebase.v1.TablePartitionMetadata
- 39, // 33: bytebase.v1.TableMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
- 36, // 34: bytebase.v1.TableMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
- 3, // 35: bytebase.v1.TablePartitionMetadata.type:type_name -> bytebase.v1.TablePartitionMetadata.Type
- 40, // 36: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata
- 59, // 37: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
- 39, // 38: bytebase.v1.TablePartitionMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
- 42, // 39: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata
- 4, // 40: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration
- 5, // 41: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type
- 44, // 42: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
- 41, // 43: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
- 36, // 44: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
- 44, // 45: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
- 36, // 46: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
- 59, // 47: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
- 46, // 48: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable
- 6, // 49: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State
- 7, // 50: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type
- 8, // 51: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode
- 53, // 52: bytebase.v1.SpatialIndexConfig.tessellation:type_name -> bytebase.v1.TessellationConfig
- 56, // 53: bytebase.v1.SpatialIndexConfig.storage:type_name -> bytebase.v1.StorageConfig
- 57, // 54: bytebase.v1.SpatialIndexConfig.dimensional:type_name -> bytebase.v1.DimensionalConfig
- 54, // 55: bytebase.v1.TessellationConfig.grid_levels:type_name -> bytebase.v1.GridLevel
- 55, // 56: bytebase.v1.TessellationConfig.bounding_box:type_name -> bytebase.v1.BoundingBox
- 58, // 57: bytebase.v1.DimensionalConfig.constraints:type_name -> bytebase.v1.DimensionConstraint
- 52, // 58: bytebase.v1.IndexMetadata.spatial_config:type_name -> bytebase.v1.SpatialIndexConfig
- 1, // 59: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView
- 67, // 60: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog
- 1, // 61: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView
- 73, // 62: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp
- 9, // 63: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status
- 10, // 64: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType
- 29, // 65: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
- 11, // 66: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
- 12, // 67: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest
- 14, // 68: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
- 16, // 69: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
- 17, // 70: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
- 21, // 71: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest
- 19, // 72: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest
- 23, // 73: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
- 24, // 74: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
- 25, // 75: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:input_type -> bytebase.v1.GetDatabaseSDLSchemaRequest
- 26, // 76: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest
- 64, // 77: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest
- 66, // 78: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest
- 68, // 79: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest
- 28, // 80: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
- 13, // 81: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse
- 15, // 82: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
- 28, // 83: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
- 18, // 84: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
- 22, // 85: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse
- 20, // 86: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse
- 29, // 87: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
- 62, // 88: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
- 63, // 89: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:output_type -> bytebase.v1.DatabaseSDLSchema
- 27, // 90: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse
- 65, // 91: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse
- 67, // 92: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog
- 69, // 93: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse
- 80, // [80:94] is the sub-list for method output_type
- 66, // [66:80] is the sub-list for method input_type
- 66, // [66:66] is the sub-list for extension type_name
- 66, // [66:66] is the sub-list for extension extendee
- 0, // [0:66] is the sub-list for field type_name
+ 28, // 12: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata
+ 58, // 13: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata
+ 36, // 14: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata
+ 35, // 15: bytebase.v1.SchemaMetadata.external_tables:type_name -> bytebase.v1.ExternalTableMetadata
+ 41, // 16: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata
+ 45, // 17: bytebase.v1.SchemaMetadata.functions:type_name -> bytebase.v1.FunctionMetadata
+ 46, // 18: bytebase.v1.SchemaMetadata.procedures:type_name -> bytebase.v1.ProcedureMetadata
+ 49, // 19: bytebase.v1.SchemaMetadata.streams:type_name -> bytebase.v1.StreamMetadata
+ 48, // 20: bytebase.v1.SchemaMetadata.tasks:type_name -> bytebase.v1.TaskMetadata
+ 43, // 21: bytebase.v1.SchemaMetadata.materialized_views:type_name -> bytebase.v1.MaterializedViewMetadata
+ 47, // 22: bytebase.v1.SchemaMetadata.packages:type_name -> bytebase.v1.PackageMetadata
+ 33, // 23: bytebase.v1.SchemaMetadata.sequences:type_name -> bytebase.v1.SequenceMetadata
+ 32, // 24: bytebase.v1.SchemaMetadata.events:type_name -> bytebase.v1.EventMetadata
+ 29, // 25: bytebase.v1.SchemaMetadata.enum_types:type_name -> bytebase.v1.EnumTypeMetadata
+ 30, // 26: bytebase.v1.SchemaMetadata.composite_types:type_name -> bytebase.v1.CompositeTypeMetadata
+ 31, // 27: bytebase.v1.CompositeTypeMetadata.attributes:type_name -> bytebase.v1.CompositeTypeAttribute
+ 39, // 28: bytebase.v1.ExternalTableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 39, // 29: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 57, // 30: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 59, // 31: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata
+ 38, // 32: bytebase.v1.TableMetadata.partitions:type_name -> bytebase.v1.TablePartitionMetadata
+ 37, // 33: bytebase.v1.TableMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
+ 34, // 34: bytebase.v1.TableMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
+ 2, // 35: bytebase.v1.TablePartitionMetadata.type:type_name -> bytebase.v1.TablePartitionMetadata.Type
+ 38, // 36: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata
+ 57, // 37: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 37, // 38: bytebase.v1.TablePartitionMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
+ 40, // 39: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata
+ 3, // 40: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration
+ 4, // 41: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type
+ 42, // 42: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
+ 39, // 43: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 34, // 44: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
+ 42, // 45: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
+ 34, // 46: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
+ 57, // 47: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 44, // 48: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable
+ 5, // 49: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State
+ 6, // 50: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type
+ 7, // 51: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode
+ 51, // 52: bytebase.v1.SpatialIndexConfig.tessellation:type_name -> bytebase.v1.TessellationConfig
+ 54, // 53: bytebase.v1.SpatialIndexConfig.storage:type_name -> bytebase.v1.StorageConfig
+ 55, // 54: bytebase.v1.SpatialIndexConfig.dimensional:type_name -> bytebase.v1.DimensionalConfig
+ 52, // 55: bytebase.v1.TessellationConfig.grid_levels:type_name -> bytebase.v1.GridLevel
+ 53, // 56: bytebase.v1.TessellationConfig.bounding_box:type_name -> bytebase.v1.BoundingBox
+ 56, // 57: bytebase.v1.DimensionalConfig.constraints:type_name -> bytebase.v1.DimensionConstraint
+ 50, // 58: bytebase.v1.IndexMetadata.spatial_config:type_name -> bytebase.v1.SpatialIndexConfig
+ 8, // 59: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType
+ 27, // 60: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 9, // 61: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
+ 10, // 62: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest
+ 12, // 63: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
+ 14, // 64: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
+ 15, // 65: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
+ 19, // 66: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest
+ 17, // 67: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest
+ 21, // 68: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
+ 22, // 69: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
+ 23, // 70: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:input_type -> bytebase.v1.GetDatabaseSDLSchemaRequest
+ 24, // 71: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest
+ 62, // 72: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest
+ 26, // 73: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
+ 11, // 74: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse
+ 13, // 75: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
+ 26, // 76: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
+ 16, // 77: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
+ 20, // 78: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse
+ 18, // 79: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse
+ 27, // 80: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
+ 60, // 81: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
+ 61, // 82: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:output_type -> bytebase.v1.DatabaseSDLSchema
+ 25, // 83: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse
+ 63, // 84: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse
+ 73, // [73:85] is the sub-list for method output_type
+ 61, // [61:73] is the sub-list for method input_type
+ 61, // [61:61] is the sub-list for extension type_name
+ 61, // [61:61] is the sub-list for extension extendee
+ 0, // [0:61] is the sub-list for field type_name
}
func init() { file_v1_database_service_proto_init() }
@@ -6521,8 +6060,8 @@ func file_v1_database_service_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_database_service_proto_rawDesc), len(file_v1_database_service_proto_rawDesc)),
- NumEnums: 11,
- NumMessages: 60,
+ NumEnums: 9,
+ NumMessages: 56,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/database_service.pb.gw.go b/backend/generated-go/v1/database_service.pb.gw.go
index 0c37ffb519..55cbd92a4c 100644
--- a/backend/generated-go/v1/database_service.pb.gw.go
+++ b/backend/generated-go/v1/database_service.pb.gw.go
@@ -790,112 +790,6 @@ func local_request_DatabaseService_DiffSchema_1(ctx context.Context, marshaler r
return msg, metadata, err
}
-var filter_DatabaseService_ListChangelogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
-
-func request_DatabaseService_ListChangelogs_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq ListChangelogsRequest
- metadata runtime.ServerMetadata
- err error
- )
- if req.Body != nil {
- _, _ = io.Copy(io.Discard, req.Body)
- }
- val, ok := pathParams["parent"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
- }
- protoReq.Parent, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
- }
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_ListChangelogs_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := client.ListChangelogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_DatabaseService_ListChangelogs_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq ListChangelogsRequest
- metadata runtime.ServerMetadata
- err error
- )
- val, ok := pathParams["parent"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
- }
- protoReq.Parent, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
- }
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_ListChangelogs_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := server.ListChangelogs(ctx, &protoReq)
- return msg, metadata, err
-}
-
-var filter_DatabaseService_GetChangelog_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
-
-func request_DatabaseService_GetChangelog_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetChangelogRequest
- metadata runtime.ServerMetadata
- err error
- )
- if req.Body != nil {
- _, _ = io.Copy(io.Discard, req.Body)
- }
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_GetChangelog_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := client.GetChangelog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_DatabaseService_GetChangelog_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetChangelogRequest
- metadata runtime.ServerMetadata
- err error
- )
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_GetChangelog_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := server.GetChangelog(ctx, &protoReq)
- return msg, metadata, err
-}
-
var filter_DatabaseService_GetSchemaString_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
func request_DatabaseService_GetSchemaString_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
@@ -1255,46 +1149,6 @@ func RegisterDatabaseServiceHandlerServer(ctx context.Context, mux *runtime.Serv
}
forward_DatabaseService_DiffSchema_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_DatabaseService_ListChangelogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListChangelogs", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/changelogs"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_DatabaseService_ListChangelogs_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_ListChangelogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodGet, pattern_DatabaseService_GetChangelog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetChangelog", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/changelogs/*}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_DatabaseService_GetChangelog_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_GetChangelog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodGet, pattern_DatabaseService_GetSchemaString_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1610,40 +1464,6 @@ func RegisterDatabaseServiceHandlerClient(ctx context.Context, mux *runtime.Serv
}
forward_DatabaseService_DiffSchema_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_DatabaseService_ListChangelogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListChangelogs", runtime.WithHTTPPathPattern("/v1/{parent=instances/*/databases/*}/changelogs"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_DatabaseService_ListChangelogs_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_ListChangelogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodGet, pattern_DatabaseService_GetChangelog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetChangelog", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/changelogs/*}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_DatabaseService_GetChangelog_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_DatabaseService_GetChangelog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodGet, pattern_DatabaseService_GetSchemaString_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1680,8 +1500,6 @@ var (
pattern_DatabaseService_GetDatabaseSDLSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "instances", "databases", "sdlSchema", "name"}, ""))
pattern_DatabaseService_DiffSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "instances", "databases", "name"}, "diffSchema"))
pattern_DatabaseService_DiffSchema_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "changelogs", "name"}, "diffSchema"))
- pattern_DatabaseService_ListChangelogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "changelogs"}, ""))
- pattern_DatabaseService_GetChangelog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "changelogs", "name"}, ""))
pattern_DatabaseService_GetSchemaString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "instances", "databases", "schemaString", "name"}, ""))
)
@@ -1701,7 +1519,5 @@ var (
forward_DatabaseService_GetDatabaseSDLSchema_0 = runtime.ForwardResponseMessage
forward_DatabaseService_DiffSchema_0 = runtime.ForwardResponseMessage
forward_DatabaseService_DiffSchema_1 = runtime.ForwardResponseMessage
- forward_DatabaseService_ListChangelogs_0 = runtime.ForwardResponseMessage
- forward_DatabaseService_GetChangelog_0 = runtime.ForwardResponseMessage
forward_DatabaseService_GetSchemaString_0 = runtime.ForwardResponseMessage
)
diff --git a/backend/generated-go/v1/database_service_equal.pb.go b/backend/generated-go/v1/database_service_equal.pb.go
index 02cb874aea..ef477c8c26 100644
--- a/backend/generated-go/v1/database_service_equal.pb.go
+++ b/backend/generated-go/v1/database_service_equal.pb.go
@@ -1674,99 +1674,6 @@ func (x *DatabaseSDLSchema) Equal(y *DatabaseSDLSchema) bool {
return true
}
-func (x *ListChangelogsRequest) Equal(y *ListChangelogsRequest) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Parent != y.Parent {
- return false
- }
- if x.PageSize != y.PageSize {
- return false
- }
- if x.PageToken != y.PageToken {
- return false
- }
- if x.View != y.View {
- return false
- }
- if x.Filter != y.Filter {
- return false
- }
- return true
-}
-
-func (x *ListChangelogsResponse) Equal(y *ListChangelogsResponse) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if len(x.Changelogs) != len(y.Changelogs) {
- return false
- }
- for i := 0; i < len(x.Changelogs); i++ {
- if !x.Changelogs[i].Equal(y.Changelogs[i]) {
- return false
- }
- }
- if x.NextPageToken != y.NextPageToken {
- return false
- }
- return true
-}
-
-func (x *GetChangelogRequest) Equal(y *GetChangelogRequest) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Name != y.Name {
- return false
- }
- if x.View != y.View {
- return false
- }
- return true
-}
-
-func (x *Changelog) Equal(y *Changelog) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Name != y.Name {
- 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 x.Status != y.Status {
- return false
- }
- if x.Schema != y.Schema {
- return false
- }
- if x.SchemaSize != y.SchemaSize {
- return false
- }
- if x.TaskRun != y.TaskRun {
- return false
- }
- if x.PlanTitle != y.PlanTitle {
- return false
- }
- return true
-}
-
func (x *GetSchemaStringRequest) Equal(y *GetSchemaStringRequest) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/database_service_grpc.pb.go b/backend/generated-go/v1/database_service_grpc.pb.go
index 87e2be8d59..41b61b0afb 100644
--- a/backend/generated-go/v1/database_service_grpc.pb.go
+++ b/backend/generated-go/v1/database_service_grpc.pb.go
@@ -30,8 +30,6 @@ const (
DatabaseService_GetDatabaseSchema_FullMethodName = "/bytebase.v1.DatabaseService/GetDatabaseSchema"
DatabaseService_GetDatabaseSDLSchema_FullMethodName = "/bytebase.v1.DatabaseService/GetDatabaseSDLSchema"
DatabaseService_DiffSchema_FullMethodName = "/bytebase.v1.DatabaseService/DiffSchema"
- DatabaseService_ListChangelogs_FullMethodName = "/bytebase.v1.DatabaseService/ListChangelogs"
- DatabaseService_GetChangelog_FullMethodName = "/bytebase.v1.DatabaseService/GetChangelog"
DatabaseService_GetSchemaString_FullMethodName = "/bytebase.v1.DatabaseService/GetSchemaString"
)
@@ -74,12 +72,6 @@ type DatabaseServiceClient interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(ctx context.Context, in *DiffSchemaRequest, opts ...grpc.CallOption) (*DiffSchemaResponse, error)
- // Lists migration history for a database.
- // Permissions required: bb.changelogs.list
- ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error)
- // Retrieves a specific changelog entry.
- // Permissions required: bb.changelogs.get
- GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error)
@@ -203,26 +195,6 @@ func (c *databaseServiceClient) DiffSchema(ctx context.Context, in *DiffSchemaRe
return out, nil
}
-func (c *databaseServiceClient) ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(ListChangelogsResponse)
- err := c.cc.Invoke(ctx, DatabaseService_ListChangelogs_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *databaseServiceClient) GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(Changelog)
- err := c.cc.Invoke(ctx, DatabaseService_GetChangelog_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *databaseServiceClient) GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSchemaStringResponse)
@@ -272,12 +244,6 @@ type DatabaseServiceServer interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(context.Context, *DiffSchemaRequest) (*DiffSchemaResponse, error)
- // Lists migration history for a database.
- // Permissions required: bb.changelogs.list
- ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error)
- // Retrieves a specific changelog entry.
- // Permissions required: bb.changelogs.get
- GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error)
@@ -324,12 +290,6 @@ func (UnimplementedDatabaseServiceServer) GetDatabaseSDLSchema(context.Context,
func (UnimplementedDatabaseServiceServer) DiffSchema(context.Context, *DiffSchemaRequest) (*DiffSchemaResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DiffSchema not implemented")
}
-func (UnimplementedDatabaseServiceServer) ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error) {
- return nil, status.Error(codes.Unimplemented, "method ListChangelogs not implemented")
-}
-func (UnimplementedDatabaseServiceServer) GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error) {
- return nil, status.Error(codes.Unimplemented, "method GetChangelog not implemented")
-}
func (UnimplementedDatabaseServiceServer) GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetSchemaString not implemented")
}
@@ -552,42 +512,6 @@ func _DatabaseService_DiffSchema_Handler(srv interface{}, ctx context.Context, d
return interceptor(ctx, in, info, handler)
}
-func _DatabaseService_ListChangelogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListChangelogsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DatabaseServiceServer).ListChangelogs(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: DatabaseService_ListChangelogs_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DatabaseServiceServer).ListChangelogs(ctx, req.(*ListChangelogsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _DatabaseService_GetChangelog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetChangelogRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DatabaseServiceServer).GetChangelog(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: DatabaseService_GetChangelog_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DatabaseServiceServer).GetChangelog(ctx, req.(*GetChangelogRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _DatabaseService_GetSchemaString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSchemaStringRequest)
if err := dec(in); err != nil {
@@ -657,14 +581,6 @@ var DatabaseService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DiffSchema",
Handler: _DatabaseService_DiffSchema_Handler,
},
- {
- MethodName: "ListChangelogs",
- Handler: _DatabaseService_ListChangelogs_Handler,
- },
- {
- MethodName: "GetChangelog",
- Handler: _DatabaseService_GetChangelog_Handler,
- },
{
MethodName: "GetSchemaString",
Handler: _DatabaseService_GetSchemaString_Handler,
diff --git a/backend/generated-go/v1/v1connect/changelog_service.connect.go b/backend/generated-go/v1/v1connect/changelog_service.connect.go
new file mode 100644
index 0000000000..12bae2a19c
--- /dev/null
+++ b/backend/generated-go/v1/v1connect/changelog_service.connect.go
@@ -0,0 +1,146 @@
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: v1/changelog_service.proto
+
+package v1connect
+
+import (
+ connect "connectrpc.com/connect"
+ context "context"
+ errors "errors"
+ v1 "github.com/bytebase/bytebase/backend/generated-go/v1"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect.IsAtLeastVersion1_13_0
+
+const (
+ // ChangelogServiceName is the fully-qualified name of the ChangelogService service.
+ ChangelogServiceName = "bytebase.v1.ChangelogService"
+)
+
+// These constants are the fully-qualified names of the RPCs defined in this package. They're
+// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
+//
+// Note that these are different from the fully-qualified method names used by
+// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
+// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
+// period.
+const (
+ // ChangelogServiceListChangelogsProcedure is the fully-qualified name of the ChangelogService's
+ // ListChangelogs RPC.
+ ChangelogServiceListChangelogsProcedure = "/bytebase.v1.ChangelogService/ListChangelogs"
+ // ChangelogServiceGetChangelogProcedure is the fully-qualified name of the ChangelogService's
+ // GetChangelog RPC.
+ ChangelogServiceGetChangelogProcedure = "/bytebase.v1.ChangelogService/GetChangelog"
+)
+
+// ChangelogServiceClient is a client for the bytebase.v1.ChangelogService service.
+type ChangelogServiceClient interface {
+ // Lists migration history for a database.
+ // Permissions required: bb.changelogs.list
+ ListChangelogs(context.Context, *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error)
+ // Retrieves a specific changelog entry.
+ // Permissions required: bb.changelogs.get
+ GetChangelog(context.Context, *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error)
+}
+
+// NewChangelogServiceClient constructs a client for the bytebase.v1.ChangelogService service. By
+// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
+// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
+// connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewChangelogServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChangelogServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ changelogServiceMethods := v1.File_v1_changelog_service_proto.Services().ByName("ChangelogService").Methods()
+ return &changelogServiceClient{
+ listChangelogs: connect.NewClient[v1.ListChangelogsRequest, v1.ListChangelogsResponse](
+ httpClient,
+ baseURL+ChangelogServiceListChangelogsProcedure,
+ connect.WithSchema(changelogServiceMethods.ByName("ListChangelogs")),
+ connect.WithClientOptions(opts...),
+ ),
+ getChangelog: connect.NewClient[v1.GetChangelogRequest, v1.Changelog](
+ httpClient,
+ baseURL+ChangelogServiceGetChangelogProcedure,
+ connect.WithSchema(changelogServiceMethods.ByName("GetChangelog")),
+ connect.WithClientOptions(opts...),
+ ),
+ }
+}
+
+// changelogServiceClient implements ChangelogServiceClient.
+type changelogServiceClient struct {
+ listChangelogs *connect.Client[v1.ListChangelogsRequest, v1.ListChangelogsResponse]
+ getChangelog *connect.Client[v1.GetChangelogRequest, v1.Changelog]
+}
+
+// ListChangelogs calls bytebase.v1.ChangelogService.ListChangelogs.
+func (c *changelogServiceClient) ListChangelogs(ctx context.Context, req *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error) {
+ return c.listChangelogs.CallUnary(ctx, req)
+}
+
+// GetChangelog calls bytebase.v1.ChangelogService.GetChangelog.
+func (c *changelogServiceClient) GetChangelog(ctx context.Context, req *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error) {
+ return c.getChangelog.CallUnary(ctx, req)
+}
+
+// ChangelogServiceHandler is an implementation of the bytebase.v1.ChangelogService service.
+type ChangelogServiceHandler interface {
+ // Lists migration history for a database.
+ // Permissions required: bb.changelogs.list
+ ListChangelogs(context.Context, *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error)
+ // Retrieves a specific changelog entry.
+ // Permissions required: bb.changelogs.get
+ GetChangelog(context.Context, *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error)
+}
+
+// NewChangelogServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewChangelogServiceHandler(svc ChangelogServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
+ changelogServiceMethods := v1.File_v1_changelog_service_proto.Services().ByName("ChangelogService").Methods()
+ changelogServiceListChangelogsHandler := connect.NewUnaryHandler(
+ ChangelogServiceListChangelogsProcedure,
+ svc.ListChangelogs,
+ connect.WithSchema(changelogServiceMethods.ByName("ListChangelogs")),
+ connect.WithHandlerOptions(opts...),
+ )
+ changelogServiceGetChangelogHandler := connect.NewUnaryHandler(
+ ChangelogServiceGetChangelogProcedure,
+ svc.GetChangelog,
+ connect.WithSchema(changelogServiceMethods.ByName("GetChangelog")),
+ connect.WithHandlerOptions(opts...),
+ )
+ return "/bytebase.v1.ChangelogService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ switch r.URL.Path {
+ case ChangelogServiceListChangelogsProcedure:
+ changelogServiceListChangelogsHandler.ServeHTTP(w, r)
+ case ChangelogServiceGetChangelogProcedure:
+ changelogServiceGetChangelogHandler.ServeHTTP(w, r)
+ default:
+ http.NotFound(w, r)
+ }
+ })
+}
+
+// UnimplementedChangelogServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedChangelogServiceHandler struct{}
+
+func (UnimplementedChangelogServiceHandler) ListChangelogs(context.Context, *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelogService.ListChangelogs is not implemented"))
+}
+
+func (UnimplementedChangelogServiceHandler) GetChangelog(context.Context, *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelogService.GetChangelog is not implemented"))
+}
diff --git a/backend/generated-go/v1/v1connect/database_service.connect.go b/backend/generated-go/v1/v1connect/database_service.connect.go
index 842e4828f9..13f882b54d 100644
--- a/backend/generated-go/v1/v1connect/database_service.connect.go
+++ b/backend/generated-go/v1/v1connect/database_service.connect.go
@@ -66,12 +66,6 @@ const (
// DatabaseServiceDiffSchemaProcedure is the fully-qualified name of the DatabaseService's
// DiffSchema RPC.
DatabaseServiceDiffSchemaProcedure = "/bytebase.v1.DatabaseService/DiffSchema"
- // DatabaseServiceListChangelogsProcedure is the fully-qualified name of the DatabaseService's
- // ListChangelogs RPC.
- DatabaseServiceListChangelogsProcedure = "/bytebase.v1.DatabaseService/ListChangelogs"
- // DatabaseServiceGetChangelogProcedure is the fully-qualified name of the DatabaseService's
- // GetChangelog RPC.
- DatabaseServiceGetChangelogProcedure = "/bytebase.v1.DatabaseService/GetChangelog"
// DatabaseServiceGetSchemaStringProcedure is the fully-qualified name of the DatabaseService's
// GetSchemaString RPC.
DatabaseServiceGetSchemaStringProcedure = "/bytebase.v1.DatabaseService/GetSchemaString"
@@ -112,12 +106,6 @@ type DatabaseServiceClient interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(context.Context, *connect.Request[v1.DiffSchemaRequest]) (*connect.Response[v1.DiffSchemaResponse], error)
- // Lists migration history for a database.
- // Permissions required: bb.changelogs.list
- ListChangelogs(context.Context, *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error)
- // Retrieves a specific changelog entry.
- // Permissions required: bb.changelogs.get
- GetChangelog(context.Context, *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(context.Context, *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error)
@@ -200,18 +188,6 @@ func NewDatabaseServiceClient(httpClient connect.HTTPClient, baseURL string, opt
connect.WithSchema(databaseServiceMethods.ByName("DiffSchema")),
connect.WithClientOptions(opts...),
),
- listChangelogs: connect.NewClient[v1.ListChangelogsRequest, v1.ListChangelogsResponse](
- httpClient,
- baseURL+DatabaseServiceListChangelogsProcedure,
- connect.WithSchema(databaseServiceMethods.ByName("ListChangelogs")),
- connect.WithClientOptions(opts...),
- ),
- getChangelog: connect.NewClient[v1.GetChangelogRequest, v1.Changelog](
- httpClient,
- baseURL+DatabaseServiceGetChangelogProcedure,
- connect.WithSchema(databaseServiceMethods.ByName("GetChangelog")),
- connect.WithClientOptions(opts...),
- ),
getSchemaString: connect.NewClient[v1.GetSchemaStringRequest, v1.GetSchemaStringResponse](
httpClient,
baseURL+DatabaseServiceGetSchemaStringProcedure,
@@ -234,8 +210,6 @@ type databaseServiceClient struct {
getDatabaseSchema *connect.Client[v1.GetDatabaseSchemaRequest, v1.DatabaseSchema]
getDatabaseSDLSchema *connect.Client[v1.GetDatabaseSDLSchemaRequest, v1.DatabaseSDLSchema]
diffSchema *connect.Client[v1.DiffSchemaRequest, v1.DiffSchemaResponse]
- listChangelogs *connect.Client[v1.ListChangelogsRequest, v1.ListChangelogsResponse]
- getChangelog *connect.Client[v1.GetChangelogRequest, v1.Changelog]
getSchemaString *connect.Client[v1.GetSchemaStringRequest, v1.GetSchemaStringResponse]
}
@@ -294,16 +268,6 @@ func (c *databaseServiceClient) DiffSchema(ctx context.Context, req *connect.Req
return c.diffSchema.CallUnary(ctx, req)
}
-// ListChangelogs calls bytebase.v1.DatabaseService.ListChangelogs.
-func (c *databaseServiceClient) ListChangelogs(ctx context.Context, req *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error) {
- return c.listChangelogs.CallUnary(ctx, req)
-}
-
-// GetChangelog calls bytebase.v1.DatabaseService.GetChangelog.
-func (c *databaseServiceClient) GetChangelog(ctx context.Context, req *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error) {
- return c.getChangelog.CallUnary(ctx, req)
-}
-
// GetSchemaString calls bytebase.v1.DatabaseService.GetSchemaString.
func (c *databaseServiceClient) GetSchemaString(ctx context.Context, req *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error) {
return c.getSchemaString.CallUnary(ctx, req)
@@ -344,12 +308,6 @@ type DatabaseServiceHandler interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(context.Context, *connect.Request[v1.DiffSchemaRequest]) (*connect.Response[v1.DiffSchemaResponse], error)
- // Lists migration history for a database.
- // Permissions required: bb.changelogs.list
- ListChangelogs(context.Context, *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error)
- // Retrieves a specific changelog entry.
- // Permissions required: bb.changelogs.get
- GetChangelog(context.Context, *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(context.Context, *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error)
@@ -428,18 +386,6 @@ func NewDatabaseServiceHandler(svc DatabaseServiceHandler, opts ...connect.Handl
connect.WithSchema(databaseServiceMethods.ByName("DiffSchema")),
connect.WithHandlerOptions(opts...),
)
- databaseServiceListChangelogsHandler := connect.NewUnaryHandler(
- DatabaseServiceListChangelogsProcedure,
- svc.ListChangelogs,
- connect.WithSchema(databaseServiceMethods.ByName("ListChangelogs")),
- connect.WithHandlerOptions(opts...),
- )
- databaseServiceGetChangelogHandler := connect.NewUnaryHandler(
- DatabaseServiceGetChangelogProcedure,
- svc.GetChangelog,
- connect.WithSchema(databaseServiceMethods.ByName("GetChangelog")),
- connect.WithHandlerOptions(opts...),
- )
databaseServiceGetSchemaStringHandler := connect.NewUnaryHandler(
DatabaseServiceGetSchemaStringProcedure,
svc.GetSchemaString,
@@ -470,10 +416,6 @@ func NewDatabaseServiceHandler(svc DatabaseServiceHandler, opts ...connect.Handl
databaseServiceGetDatabaseSDLSchemaHandler.ServeHTTP(w, r)
case DatabaseServiceDiffSchemaProcedure:
databaseServiceDiffSchemaHandler.ServeHTTP(w, r)
- case DatabaseServiceListChangelogsProcedure:
- databaseServiceListChangelogsHandler.ServeHTTP(w, r)
- case DatabaseServiceGetChangelogProcedure:
- databaseServiceGetChangelogHandler.ServeHTTP(w, r)
case DatabaseServiceGetSchemaStringProcedure:
databaseServiceGetSchemaStringHandler.ServeHTTP(w, r)
default:
@@ -529,14 +471,6 @@ func (UnimplementedDatabaseServiceHandler) DiffSchema(context.Context, *connect.
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.DiffSchema is not implemented"))
}
-func (UnimplementedDatabaseServiceHandler) ListChangelogs(context.Context, *connect.Request[v1.ListChangelogsRequest]) (*connect.Response[v1.ListChangelogsResponse], error) {
- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.ListChangelogs is not implemented"))
-}
-
-func (UnimplementedDatabaseServiceHandler) GetChangelog(context.Context, *connect.Request[v1.GetChangelogRequest]) (*connect.Response[v1.Changelog], error) {
- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.GetChangelog is not implemented"))
-}
-
func (UnimplementedDatabaseServiceHandler) GetSchemaString(context.Context, *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.GetSchemaString is not implemented"))
}
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index dc535ce4ff..260b1f87ef 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -96,6 +96,7 @@ func configureGrpcRouters(
auditLogService := apiv1.NewAuditLogService(stores, licenseService)
authService := apiv1.NewAuthService(stores, secret, licenseService, profile, iamManager)
celService := apiv1.NewCelService()
+ changelogService := apiv1.NewChangelogService(stores)
databaseCatalogService := apiv1.NewDatabaseCatalogService(stores)
databaseGroupService := apiv1.NewDatabaseGroupService(stores, licenseService)
databaseService := apiv1.NewDatabaseService(stores, schemaSyncer, profile, iamManager, licenseService)
@@ -162,6 +163,9 @@ func configureGrpcRouters(
celPath, celHandler := v1connect.NewCelServiceHandler(celService, handlerOpts)
connectHandlers[celPath] = celHandler
+ changelogPath, changelogHandler := v1connect.NewChangelogServiceHandler(changelogService, handlerOpts)
+ connectHandlers[changelogPath] = changelogHandler
+
databaseCatalogPath, databaseCatalogHandler := v1connect.NewDatabaseCatalogServiceHandler(databaseCatalogService, handlerOpts)
connectHandlers[databaseCatalogPath] = databaseCatalogHandler
@@ -245,6 +249,7 @@ func configureGrpcRouters(
v1connect.AuditLogServiceName,
v1connect.AuthServiceName,
v1connect.CelServiceName,
+ v1connect.ChangelogServiceName,
v1connect.DatabaseCatalogServiceName,
v1connect.DatabaseGroupServiceName,
v1connect.DatabaseServiceName,
@@ -308,6 +313,9 @@ func configureGrpcRouters(
if err := v1pb.RegisterCelServiceHandler(ctx, mux, grpcConn); err != nil {
return err
}
+ if err := v1pb.RegisterChangelogServiceHandler(ctx, mux, grpcConn); err != nil {
+ return err
+ }
if err := v1pb.RegisterDatabaseCatalogServiceHandler(ctx, mux, grpcConn); err != nil {
return err
}
diff --git a/backend/tests/action_test.go b/backend/tests/action_test.go
index 9e8162bc19..726742df9a 100644
--- a/backend/tests/action_test.go
+++ b/backend/tests/action_test.go
@@ -751,7 +751,7 @@ func TestActionRolloutCommand(t *testing.T) {
a.Equal(release.Name, updatedDatabase.Msg.Release, "Database release should match the applied release")
// 6. Verify change history was recorded
- changelogs, err := ctl.databaseServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
+ changelogs, err := ctl.changelogServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
Parent: database.Name,
}))
a.NoError(err)
@@ -951,7 +951,7 @@ func TestActionRolloutCommand(t *testing.T) {
// 6. Verify change history was recorded
// Note: Versioned releases create one MIGRATE changelog for the entire release (not per file)
// Plus a BASELINE changelog if this is the first migration for the database
- changelogs, err := ctl.databaseServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
+ changelogs, err := ctl.changelogServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
Parent: database.Name,
}))
a.NoError(err)
diff --git a/backend/tests/schema_update_test.go b/backend/tests/schema_update_test.go
index b1a7cd9b28..9d745d9d2f 100644
--- a/backend/tests/schema_update_test.go
+++ b/backend/tests/schema_update_test.go
@@ -86,7 +86,7 @@ func TestSchemaAndDataUpdate(t *testing.T) {
err = ctl.changeDatabase(ctx, ctl.project, database, sheet, false)
a.NoError(err)
- resp, err := ctl.databaseServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
+ resp, err := ctl.changelogServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
Parent: database.Name,
View: v1pb.ChangelogView_CHANGELOG_VIEW_FULL,
}))
@@ -103,6 +103,14 @@ func TestSchemaAndDataUpdate(t *testing.T) {
a.Equal(dumpedSchema, changelogs[1].Schema)
// Third changelog should be the baseline
a.Equal(v1pb.Changelog_DONE, changelogs[2].Status)
+
+ getResp, err := ctl.changelogServiceClient.GetChangelog(ctx, connect.NewRequest(&v1pb.GetChangelogRequest{
+ Name: changelogs[0].Name,
+ View: v1pb.ChangelogView_CHANGELOG_VIEW_FULL,
+ }))
+ a.NoError(err)
+ a.Equal(changelogs[0].Name, getResp.Msg.Name)
+ a.Equal(v1pb.Changelog_DONE, getResp.Msg.Status)
}
func TestGetLatestSchema(t *testing.T) {
diff --git a/backend/tests/sync_schema_test.go b/backend/tests/sync_schema_test.go
index 53dc7a6ddc..e31a7b8a03 100644
--- a/backend/tests/sync_schema_test.go
+++ b/backend/tests/sync_schema_test.go
@@ -86,7 +86,7 @@ func TestSyncSchema(t *testing.T) {
err = ctl.changeDatabase(ctx, ctl.project, database, sheet, false)
a.NoError(err)
- resp, err := ctl.databaseServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
+ resp, err := ctl.changelogServiceClient.ListChangelogs(ctx, connect.NewRequest(&v1pb.ListChangelogsRequest{
Parent: database.Name,
View: v1pb.ChangelogView_CHANGELOG_VIEW_FULL,
}))
diff --git a/backend/tests/tests.go b/backend/tests/tests.go
index 46aef4f52b..8a83d5632c 100644
--- a/backend/tests/tests.go
+++ b/backend/tests/tests.go
@@ -98,6 +98,7 @@ type controller struct {
userServiceClient v1connect.UserServiceClient
settingServiceClient v1connect.SettingServiceClient
instanceServiceClient v1connect.InstanceServiceClient
+ changelogServiceClient v1connect.ChangelogServiceClient
databaseServiceClient v1connect.DatabaseServiceClient
databaseCatalogServiceClient v1connect.DatabaseCatalogServiceClient
sheetServiceClient v1connect.SheetServiceClient
@@ -290,6 +291,7 @@ func (ctl *controller) start(ctx context.Context, port int) (context.Context, er
ctl.userServiceClient = v1connect.NewUserServiceClient(ctl.client, baseURL, interceptors)
ctl.settingServiceClient = v1connect.NewSettingServiceClient(ctl.client, baseURL, interceptors)
ctl.instanceServiceClient = v1connect.NewInstanceServiceClient(ctl.client, baseURL, interceptors)
+ ctl.changelogServiceClient = v1connect.NewChangelogServiceClient(ctl.client, baseURL, interceptors)
ctl.databaseServiceClient = v1connect.NewDatabaseServiceClient(ctl.client, baseURL, interceptors)
ctl.databaseCatalogServiceClient = v1connect.NewDatabaseCatalogServiceClient(ctl.client, baseURL, interceptors)
ctl.sheetServiceClient = v1connect.NewSheetServiceClient(ctl.client, baseURL, interceptors)
diff --git a/docs/plans/saas/07.api-resource-patterns.md b/docs/plans/saas/07.api-resource-patterns.md
index 57bcb00907..64697a9bfa 100644
--- a/docs/plans/saas/07.api-resource-patterns.md
+++ b/docs/plans/saas/07.api-resource-patterns.md
@@ -111,9 +111,10 @@ These APIs are scoped to a database. ACL looks up the database with workspace fi
|---------|--------|-----------------|
| DatabaseService | GetDatabase, UpdateDatabase, SyncDatabase | name: `instances/{instance}/databases/{database}` |
| DatabaseService | GetDatabaseMetadata, GetDatabaseSchema, GetDatabaseSDLSchema, GetSchemaString | name: `instances/{instance}/databases/{database}/...` |
-| DatabaseService | ListChangelogs | parent: `instances/{instance}/databases/{database}` |
-| DatabaseService | GetChangelog, DiffSchema | name: `instances/{instance}/databases/{database}/changelogs/{changelog}` |
+| DatabaseService | DiffSchema | name: `instances/{instance}/databases/{database}[/changelogs/{changelog}]` |
| DatabaseService | BatchUpdateDatabases, BatchSyncDatabases | parent: `instances/{instance}` |
+| ChangelogService | ListChangelogs | parent: `instances/{instance}/databases/{database}` |
+| ChangelogService | GetChangelog | name: `instances/{instance}/databases/{database}/changelogs/{changelog}` |
| DatabaseCatalogService | GetDatabaseCatalog, UpdateDatabaseCatalog | name: `instances/{instance}/databases/{database}/catalog` |
| RevisionService | ListRevisions, BatchCreateRevisions | parent: `instances/{instance}/databases/{database}` |
| RevisionService | GetRevision, DeleteRevision | name: `instances/{instance}/databases/{database}/revisions/{revision}` |
diff --git a/docs/superpowers/specs/2026-07-29-changelog-service-extraction-design.md b/docs/superpowers/specs/2026-07-29-changelog-service-extraction-design.md
new file mode 100644
index 0000000000..904af1342d
--- /dev/null
+++ b/docs/superpowers/specs/2026-07-29-changelog-service-extraction-design.md
@@ -0,0 +1,142 @@
+# ChangelogService Extraction Design
+
+**Date**: 2026-07-29
+**Status**: Implemented
+**Ships in**: 3.21 (current release 3.20.1) as a clean cut — no compatibility aliases
+
+## Summary
+
+Extract `ListChangelogs` and `GetChangelog` from `DatabaseService` into a new
+standalone `ChangelogService`, following the established per-resource service
+pattern (`RevisionService` is the exact structural analog). The old
+`DatabaseService` method names are **removed in the same release**: an earlier
+revision of this design kept them for one release as deprecated delegating
+aliases, but after reviewing the blast radius (external gRPC/Connect callers
+only — REST, Terraform, bytebase-action, IAM, and page tokens are all
+unaffected) we chose the clean cut and deleted the aliases outright.
+
+## Goals
+
+- `ChangelogService` owns the changelog resource
+ (`instances/{instance}/databases/{database}/changelogs/{changelog}`).
+- Zero behavior change on the surviving surface: same permissions, same REST
+ paths, same wire format, same pagination semantics, same errors.
+
+## Non-goals
+
+- No store-layer changes (`backend/store/changelog.go` untouched).
+- No new RPCs (cross-database listing, export, etc. — future work that this
+ service gives a home to).
+- `DiffSchema` stays in `DatabaseService`: it accepts changelog names as diff
+ targets but is a schema operation, not changelog CRUD.
+- No permission or resource-name changes (`bb.changelogs.*`,
+ `bytebase.com/DatabaseChangelog` stay as-is).
+- No compatibility aliases (decision 2026-07-29, superseding the earlier
+ one-release-alias plan in this doc's first revision).
+
+## Background
+
+- `DatabaseService` had 14 RPCs; changelogs were the last child-resource
+ collection inside it. After extraction it holds the database resource plus
+ schema projections only.
+- The changelog messages (`Changelog`, `ChangelogView`, `ListChangelogsRequest`,
+ `ListChangelogsResponse`, `GetChangelogRequest`) were referenced by no other
+ proto file. Moving them between files does not change fully-qualified names
+ (`bytebase.v1.*`), so binary/JSON wire format is unaffected.
+- Authorization is annotation-driven: `backend/api/auth/auth.go` resolves the
+ method descriptor from the invoked full method name via
+ `protoregistry.GlobalFiles` and reads the `bytebase.v1.permission` extension,
+ so the moved RPCs are enforced with no auth code changes.
+
+## Design
+
+### 1. Proto: new `proto/v1/v1/changelog_service.proto`
+
+Modeled on `revision_service.proto`: `ChangelogService` with the two RPCs
+(HTTP bindings, `method_signature`, `bytebase.v1.permission`, and
+`auth_method = IAM` annotations carried over unchanged), plus the five
+changelog messages moved verbatim (field numbers, comments, resource
+annotations unchanged). `database_service.proto` loses the two RPCs and the
+message definitions entirely.
+
+### 2. Backend
+
+- `backend/api/v1/changelog_service.go`: `ChangelogService` struct (embeds
+ `v1connect.UnimplementedChangelogServiceHandler`, holds `store`),
+ `NewChangelogService(store)`. The implementation moved wholesale from the
+ old `database_service_changelog.go` (deleted): `ListChangelogs`,
+ `GetChangelog`, `parseChangelogFilter`, and the `convertToChangelog*`
+ helpers (converters became plain functions; unused ctx/receivers dropped).
+- Registration in `backend/server/grpc_routes.go` mirrors `RevisionService`,
+ four touchpoints: construct, Connect handler → `connectHandlers`, static
+ reflector list, and `v1pb.RegisterChangelogServiceHandler` for the gateway —
+ which is what serves the unchanged REST route.
+
+### 3. Frontend
+
+- `changelogServiceClientConnect` added in `frontend/src/api/index.ts`; the
+ changelog store (`frontend/src/stores/app/changelog.ts`) uses it.
+- Changelog type imports repointed from `proto-es/v1/database_service_pb` to
+ `proto-es/v1/changelog_service_pb` across the store, `stores/app/types.ts`,
+ `utils/v1/changelog.ts`, and the changelog route components/tests.
+
+### 4. Generated artifacts, MCP, and docs
+
+- `buf generate` regenerates `backend/generated-go`,
+ `frontend/src/types/proto-es`, `proto/gen/grpc-doc`, and
+ `backend/api/mcp/gen/openapi.yaml` (the MCP spec is a second
+ connect-openapi plugin output in `proto/buf.gen.yaml`).
+- The agent's API index generator
+ (`frontend/scripts/generate_openapi_index.js`) now skips
+ `deprecated: true` operations generically — kept even though the aliases are
+ gone, so any future deprecation is automatically hidden from agents. The
+ manually maintained `serviceDirectory` in
+ `frontend/src/modules/agent/logic/prompt.ts` gained a ChangelogService
+ entry.
+- Resource-pattern table updated in
+ `docs/plans/saas/07.api-resource-patterns.md`.
+
+## Compatibility (3.21)
+
+| Surface | Impact |
+|---|---|
+| REST `GET /v1/.../changelogs[/*]` | None — identical path, payload, auth; now served by ChangelogService's gateway registration |
+| gRPC/Connect `bytebase.v1.DatabaseService/ListChangelogs`, `GetChangelog` | **Removed — breaking.** External gRPC/Connect callers get unimplemented; they must switch to `bytebase.v1.ChangelogService/*` |
+| Terraform provider, bytebase-action | Unaffected (REST-only / no changelog usage, verified) |
+| IAM (`bb.changelogs.list/get`), resource names, page tokens | Unchanged |
+| Published OpenAPI operationIds | `DatabaseService_*` → `ChangelogService_*` — breaking for OpenAPI-generated SDKs; paths unchanged |
+| Audit log `method` field | New service name going forward; historical rows keep the old name |
+
+`buf breaking` (FILE rules) flags the message moves and RPC deletions. No CI
+job enforces it; accepted as part of the labeled breaking change.
+
+## Rollout
+
+Single phase: ships in 3.21 with `--label breaking` and a
+`## Breaking Changes` section covering the gRPC method-name removal and the
+OpenAPI operationId rename. Release notes call out the migration
+(`DatabaseService.ListChangelogs` → `ChangelogService.ListChangelogs`; REST
+users need no changes).
+
+## Testing
+
+- E2E tests migrated to the new `changelogServiceClient`
+ (`schema_update_test.go`, `sync_schema_test.go`, `action_test.go`,
+ client wiring in `tests.go`), including a `GetChangelog` e2e assertion that
+ did not previously exist.
+- Frontend store tests mock the new client; full suite green.
+- Standard gates: `buf lint`, `golangci-lint`, `go build`, targeted e2e,
+ `pnpm fix/check/type-check/test`.
+
+## Alternatives considered
+
+1. **One-release deprecated aliases + delegation** — implemented first, then
+ deliberately removed: the only protected population is external
+ gRPC/Connect callers of two read-only methods, and the REST surface (which
+ external integrations actually use) is unaffected. Not worth carrying the
+ shim, the duplicate docs entries, and a second breaking PR in 3.22.
+2. **Runtime route rewrite, no proto aliases** — rejected: per-protocol
+ plumbing, invisible in generated docs/SDKs, more code than the thing it
+ replaces.
+3. **Clean cut (chosen)** — one labeled breaking release; smallest permanent
+ surface.
diff --git a/frontend/scripts/generate_openapi_index.js b/frontend/scripts/generate_openapi_index.js
index 9a207e4190..07b13a72e5 100644
--- a/frontend/scripts/generate_openapi_index.js
+++ b/frontend/scripts/generate_openapi_index.js
@@ -157,6 +157,9 @@ const paths = spec.paths || {};
for (const [pathStr, pathItem] of Object.entries(paths)) {
const op = pathItem && pathItem.post;
if (!op) continue;
+ // Deprecated operations (e.g. compatibility aliases kept for one release)
+ // still serve, but agents should only discover the canonical surface.
+ if (op.deprecated) continue;
// /bytebase.v1.SQLService/Query -> service=SQLService, method=Query
const trimmed = pathStr.replace(/^\/bytebase\.v1\./, "");
diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts
index d483955142..a2b9569d7b 100644
--- a/frontend/src/api/index.ts
+++ b/frontend/src/api/index.ts
@@ -8,6 +8,7 @@ import { AuthService } from "@/types/proto-es/v1/auth_service_pb";
import { CelService } from "@/types/proto-es/v1/cel_service_pb";
import { DatabaseCatalogService } from "@/types/proto-es/v1/database_catalog_service_pb";
import { DatabaseGroupService } from "@/types/proto-es/v1/database_group_service_pb";
+import { ChangelogService } from "@/types/proto-es/v1/changelog_service_pb";
import { DatabaseService } from "@/types/proto-es/v1/database_service_pb";
import { GroupService } from "@/types/proto-es/v1/group_service_pb";
import { IdentityProviderService } from "@/types/proto-es/v1/idp_service_pb";
@@ -180,3 +181,8 @@ export const databaseServiceClientConnect = createClient(
DatabaseService,
transport
);
+
+export const changelogServiceClientConnect = createClient(
+ ChangelogService,
+ transport
+);
diff --git a/frontend/src/modules/agent/logic/prompt.ts b/frontend/src/modules/agent/logic/prompt.ts
index b62b064cbb..4d698c6567 100644
--- a/frontend/src/modules/agent/logic/prompt.ts
+++ b/frontend/src/modules/agent/logic/prompt.ts
@@ -1,7 +1,7 @@
const serviceDirectory = `API Directory — use search_api(service="...") to browse endpoints, search_api(operationId="...") for schemas.
Database Management:
-- DatabaseService: CRUD databases, list schemas/tables/columns, metadata, secrets, changelogs, slow queries, backups
+- DatabaseService: CRUD databases, list schemas/tables/columns, metadata, secrets, slow queries, backups
- DatabaseCatalogService: semantic types, column masking config, data classification
- DatabaseGroupService: database groups, matching databases by expression
@@ -14,6 +14,7 @@ Change Management:
- PlanService: create/update database change plans, plan checks, spec management
- IssueService: change tickets (issues), approval flow, issue status, comments, subscribers
- RolloutService: rollout stages, tasks, task runs, batch rollout execution
+- ChangelogService: database migration history (changelogs)
- RevisionService: schema revision snapshots
- ReleaseService: release bundles grouping multiple changes
diff --git a/frontend/src/routes/project/DatabaseChangelogDetailPage.tsx b/frontend/src/routes/project/DatabaseChangelogDetailPage.tsx
index 497fe4450a..caa4c6dce5 100644
--- a/frontend/src/routes/project/DatabaseChangelogDetailPage.tsx
+++ b/frontend/src/routes/project/DatabaseChangelogDetailPage.tsx
@@ -18,11 +18,11 @@ import { CopyButton } from "@/components/ui/copy-button";
import { Switch } from "@/components/ui/switch";
import { useAppStore } from "@/stores/app";
import { getTimeForPbTimestampProtoEs } from "@/types";
-import type { Changelog } from "@/types/proto-es/v1/database_service_pb";
import {
+ type Changelog,
Changelog_Status,
ChangelogView,
-} from "@/types/proto-es/v1/database_service_pb";
+} from "@/types/proto-es/v1/changelog_service_pb";
import {
GetTaskRunLogRequestSchema,
type TaskRunLogEntry,
diff --git a/frontend/src/routes/project/ProjectSyncSchemaPage.tsx b/frontend/src/routes/project/ProjectSyncSchemaPage.tsx
index 4489194985..7ba59b7a57 100644
--- a/frontend/src/routes/project/ProjectSyncSchemaPage.tsx
+++ b/frontend/src/routes/project/ProjectSyncSchemaPage.tsx
@@ -62,13 +62,13 @@ import {
type Language,
languageOfEngineV1,
} from "@/types";
-import { Engine } from "@/types/proto-es/v1/common_pb";
-import type { Database } from "@/types/proto-es/v1/database_service_pb";
import {
Changelog_Status,
ChangelogView,
- DiffSchemaRequestSchema,
-} from "@/types/proto-es/v1/database_service_pb";
+} from "@/types/proto-es/v1/changelog_service_pb";
+import { Engine } from "@/types/proto-es/v1/common_pb";
+import type { Database } from "@/types/proto-es/v1/database_service_pb";
+import { DiffSchemaRequestSchema } from "@/types/proto-es/v1/database_service_pb";
import type { Project } from "@/types/proto-es/v1/project_service_pb";
import {
databaseV1Url,
diff --git a/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx
index 1bba9ffa34..e4ea61b67a 100644
--- a/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx
+++ b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx
@@ -3,7 +3,7 @@ import type { ReactElement } from "react";
import { act } from "react";
import { createRoot } from "react-dom/client";
import { beforeEach, describe, expect, test, vi } from "vitest";
-import { ChangelogSchema } from "@/types/proto-es/v1/database_service_pb";
+import { ChangelogSchema } from "@/types/proto-es/v1/changelog_service_pb";
(
globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }
diff --git a/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsx b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsx
index 6554f4e3e7..6929e228fc 100644
--- a/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsx
+++ b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsx
@@ -15,7 +15,7 @@ import { getDateForPbTimestampProtoEs } from "@/types";
import {
type Changelog,
Changelog_Status,
-} from "@/types/proto-es/v1/database_service_pb";
+} from "@/types/proto-es/v1/changelog_service_pb";
import { changelogLink } from "@/utils/v1/changelog";
function ChangelogStatusIcon({ status }: { status: Changelog_Status }) {
diff --git a/frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsx
index 39337c8083..a69b171daa 100644
--- a/frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsx
+++ b/frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsx
@@ -1,10 +1,8 @@
import { useCallback } from "react";
import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";
import { useAppStore } from "@/stores/app";
-import type {
- Changelog,
- Database,
-} from "@/types/proto-es/v1/database_service_pb";
+import type { Changelog } from "@/types/proto-es/v1/changelog_service_pb";
+import type { Database } from "@/types/proto-es/v1/database_service_pb";
import { DatabaseChangelogTable } from "../changelog/DatabaseChangelogTable";
export function DatabaseChangelogPanel({ database }: { database: Database }) {
diff --git a/frontend/src/stores/app/changelog.ts b/frontend/src/stores/app/changelog.ts
index 6f65c19da3..d9ff15b0ab 100644
--- a/frontend/src/stores/app/changelog.ts
+++ b/frontend/src/stores/app/changelog.ts
@@ -1,11 +1,11 @@
import { create as createProto } from "@bufbuild/protobuf";
-import { databaseServiceClientConnect } from "@/api";
+import { changelogServiceClientConnect } from "@/api";
import { UNKNOWN_ID } from "@/types";
import {
ChangelogView,
GetChangelogRequestSchema,
ListChangelogsRequestSchema,
-} from "@/types/proto-es/v1/database_service_pb";
+} from "@/types/proto-es/v1/changelog_service_pb";
import { extractChangelogUID } from "@/utils/v1/changelog";
import type { AppSliceCreator, ChangelogSlice } from "./types";
@@ -63,7 +63,7 @@ export const createChangelogSlice: AppSliceCreator<ChangelogSlice> = (
view,
filter: params.filter,
});
- const response = await databaseServiceClientConnect.listChangelogs(
+ const response = await changelogServiceClientConnect.listChangelogs(
createProto(ListChangelogsRequestSchema, {
parent,
pageSize: params.pageSize,
@@ -125,7 +125,7 @@ export const createChangelogSlice: AppSliceCreator<ChangelogSlice> = (
fetchChangelog: async (params) => {
if (!params.name) return undefined;
const view = normalizeView(params.view);
- const changelog = await databaseServiceClientConnect.getChangelog(
+ const changelog = await changelogServiceClientConnect.getChangelog(
createProto(GetChangelogRequestSchema, {
name: params.name,
view,
diff --git a/frontend/src/stores/app/index.test.ts b/frontend/src/stores/app/index.test.ts
index 60d4231a3e..2104475ebc 100644
--- a/frontend/src/stores/app/index.test.ts
+++ b/frontend/src/stores/app/index.test.ts
@@ -8,16 +8,16 @@ import {
AccessGrantSchema,
} from "@/types/proto-es/v1/access_grant_service_pb";
import { ActuatorInfoSchema } from "@/types/proto-es/v1/actuator_service_pb";
+import {
+ ChangelogSchema,
+ ChangelogView,
+} from "@/types/proto-es/v1/changelog_service_pb";
import { State } from "@/types/proto-es/v1/common_pb";
import {
DatabaseGroupSchema,
DatabaseGroupView,
} from "@/types/proto-es/v1/database_group_service_pb";
-import {
- ChangelogSchema,
- ChangelogView,
- DatabaseSchema$,
-} from "@/types/proto-es/v1/database_service_pb";
+import { DatabaseSchema$ } from "@/types/proto-es/v1/database_service_pb";
import { GroupSchema } from "@/types/proto-es/v1/group_service_pb";
import {
BindingSchema,
@@ -194,12 +194,14 @@ vi.mock("@/api", () => ({
instanceServiceClientConnect: {
getInstance: mocks.getInstance,
},
+ changelogServiceClientConnect: {
+ listChangelogs: mocks.listChangelogs,
+ getChangelog: mocks.getChangelog,
+ },
databaseServiceClientConnect: {
getDatabase: mocks.getDatabase,
batchGetDatabases: mocks.batchGetDatabases,
listDatabases: mocks.listDatabases,
- listChangelogs: mocks.listChangelogs,
- getChangelog: mocks.getChangelog,
getDatabaseMetadata: mocks.getDatabaseMetadata,
},
databaseGroupServiceClientConnect: {
diff --git a/frontend/src/stores/app/types.ts b/frontend/src/stores/app/types.ts
index 25f2214c45..9b13682b8f 100644
--- a/frontend/src/stores/app/types.ts
+++ b/frontend/src/stores/app/types.ts
@@ -8,6 +8,12 @@ import type { NotificationCreate } from "@/types/notification";
import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";
import type { ActuatorInfo } from "@/types/proto-es/v1/actuator_service_pb";
import type { LoginRequest } from "@/types/proto-es/v1/auth_service_pb";
+import type {
+ Changelog,
+ ChangelogView,
+ GetChangelogRequest,
+ ListChangelogsRequest,
+} from "@/types/proto-es/v1/changelog_service_pb";
import type { Engine, State } from "@/types/proto-es/v1/common_pb";
import type { DatabaseCatalog } from "@/types/proto-es/v1/database_catalog_service_pb";
import type {
@@ -16,8 +22,6 @@ import type {
} from "@/types/proto-es/v1/database_group_service_pb";
import type {
BatchUpdateDatabasesRequest,
- Changelog,
- ChangelogView,
Database,
DatabaseMetadata,
DatabaseSchema,
@@ -26,8 +30,6 @@ import type {
ExtensionMetadata,
ExternalTableMetadata,
FunctionMetadata,
- GetChangelogRequest,
- ListChangelogsRequest,
SchemaMetadata,
TableMetadata,
UpdateDatabaseRequest,
diff --git a/frontend/src/types/proto-es/v1/changelog_service_pb.d.ts b/frontend/src/types/proto-es/v1/changelog_service_pb.d.ts
new file mode 100644
index 0000000000..269e896c9f
--- /dev/null
+++ b/frontend/src/types/proto-es/v1/changelog_service_pb.d.ts
@@ -0,0 +1,265 @@
+// @generated by protoc-gen-es v2.12.0
+// @generated from file v1/changelog_service.proto (package bytebase.v1, syntax proto3)
+/* eslint-disable */
+
+import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
+import type { Message } from "@bufbuild/protobuf";
+import type { Timestamp } from "@bufbuild/protobuf/wkt";
+
+/**
+ * Describes the file v1/changelog_service.proto.
+ */
+export declare const file_v1_changelog_service: GenFile;
+
+/**
+ * @generated from message bytebase.v1.ListChangelogsRequest
+ */
+export declare type ListChangelogsRequest = Message<"bytebase.v1.ListChangelogsRequest"> & {
+ /**
+ * The parent of the changelogs.
+ * Format: instances/{instance}/databases/{database}
+ *
+ * @generated from field: string parent = 1;
+ */
+ parent: string;
+
+ /**
+ * The maximum number of changelogs to return. The service may return fewer
+ * than this value. If unspecified, at most 10 changelogs will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ *
+ * @generated from field: int32 page_size = 2;
+ */
+ pageSize: number;
+
+ /**
+ * A page token, received from the previous call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided must match
+ * the call that provided the page token.
+ *
+ * @generated from field: string page_token = 3;
+ */
+ pageToken: string;
+
+ /**
+ * @generated from field: bytebase.v1.ChangelogView view = 4;
+ */
+ view: ChangelogView;
+
+ /**
+ * Filter is used to filter changelogs returned in the list.
+ * The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ *
+ * Supported filter:
+ * - status: the changelog status, support "==" operation. check Changelog.Status for available values.
+ * - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
+ *
+ * Example:
+ * status == "DONE"
+ * status == "FAILED" && type == "SDL"
+ * create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"
+ *
+ * @generated from field: string filter = 5;
+ */
+ filter: string;
+};
+
+/**
+ * Describes the message bytebase.v1.ListChangelogsRequest.
+ * Use `create(ListChangelogsRequestSchema)` to create a new message.
+ */
+export declare const ListChangelogsRequestSchema: GenMessage<ListChangelogsRequest>;
+
+/**
+ * @generated from message bytebase.v1.ListChangelogsResponse
+ */
+export declare type ListChangelogsResponse = Message<"bytebase.v1.ListChangelogsResponse"> & {
+ /**
+ * The list of changelogs.
+ *
+ * @generated from field: repeated bytebase.v1.Changelog changelogs = 1;
+ */
+ changelogs: Changelog[];
+
+ /**
+ * A token, which can be sent as `page_token` to retrieve the next page.
+ * If this field is omitted, there are no subsequent pages.
+ *
+ * @generated from field: string next_page_token = 2;
+ */
+ nextPageToken: string;
+};
+
+/**
+ * Describes the message bytebase.v1.ListChangelogsResponse.
+ * Use `create(ListChangelogsResponseSchema)` to create a new message.
+ */
+export declare const ListChangelogsResponseSchema: GenMessage<ListChangelogsResponse>;
+
+/**
+ * @generated from message bytebase.v1.GetChangelogRequest
+ */
+export declare type GetChangelogRequest = Message<"bytebase.v1.GetChangelogRequest"> & {
+ /**
+ * The name of the changelog to retrieve.
+ * Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+
+ /**
+ * @generated from field: bytebase.v1.ChangelogView view = 2;
+ */
+ view: ChangelogView;
+};
+
+/**
+ * Describes the message bytebase.v1.GetChangelogRequest.
+ * Use `create(GetChangelogRequestSchema)` to create a new message.
+ */
+export declare const GetChangelogRequestSchema: GenMessage<GetChangelogRequest>;
+
+/**
+ * @generated from message bytebase.v1.Changelog
+ */
+export declare type Changelog = Message<"bytebase.v1.Changelog"> & {
+ /**
+ * Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+
+ /**
+ * @generated from field: google.protobuf.Timestamp create_time = 2;
+ */
+ createTime?: Timestamp | undefined;
+
+ /**
+ * @generated from field: bytebase.v1.Changelog.Status status = 3;
+ */
+ status: Changelog_Status;
+
+ /**
+ * @generated from field: string schema = 7;
+ */
+ schema: string;
+
+ /**
+ * @generated from field: int64 schema_size = 8;
+ */
+ schemaSize: bigint;
+
+ /**
+ * Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ *
+ * @generated from field: string task_run = 11;
+ */
+ taskRun: string;
+
+ /**
+ * The title of the plan associated with this changelog's task run.
+ * This field is populated by deriving the plan from task_run for display purposes.
+ *
+ * @generated from field: string plan_title = 15;
+ */
+ planTitle: string;
+};
+
+/**
+ * Describes the message bytebase.v1.Changelog.
+ * Use `create(ChangelogSchema)` to create a new message.
+ */
+export declare const ChangelogSchema: GenMessage<Changelog>;
+
+/**
+ * @generated from enum bytebase.v1.Changelog.Status
+ */
+export enum Changelog_Status {
+ /**
+ * @generated from enum value: STATUS_UNSPECIFIED = 0;
+ */
+ STATUS_UNSPECIFIED = 0,
+
+ /**
+ * @generated from enum value: PENDING = 1;
+ */
+ PENDING = 1,
+
+ /**
+ * @generated from enum value: DONE = 2;
+ */
+ DONE = 2,
+
+ /**
+ * @generated from enum value: FAILED = 3;
+ */
+ FAILED = 3,
+}
+
+/**
+ * Describes the enum bytebase.v1.Changelog.Status.
+ */
+export declare const Changelog_StatusSchema: GenEnum<Changelog_Status>;
+
+/**
+ * @generated from enum bytebase.v1.ChangelogView
+ */
+export enum ChangelogView {
+ /**
+ * The default / unset value.
+ * The API will default to the BASIC view.
+ *
+ * @generated from enum value: CHANGELOG_VIEW_UNSPECIFIED = 0;
+ */
+ UNSPECIFIED = 0,
+
+ /**
+ * @generated from enum value: CHANGELOG_VIEW_BASIC = 1;
+ */
+ BASIC = 1,
+
+ /**
+ * @generated from enum value: CHANGELOG_VIEW_FULL = 2;
+ */
+ FULL = 2,
+}
+
+/**
+ * Describes the enum bytebase.v1.ChangelogView.
+ */
+export declare const ChangelogViewSchema: GenEnum<ChangelogView>;
+
+/**
+ * ChangelogService manages database migration history.
+ *
+ * @generated from service bytebase.v1.ChangelogService
+ */
+export declare const ChangelogService: GenService<{
+ /**
+ * Lists migration history for a database.
+ * Permissions required: bb.changelogs.list
+ *
+ * @generated from rpc bytebase.v1.ChangelogService.ListChangelogs
+ */
+ listChangelogs: {
+ methodKind: "unary";
+ input: typeof ListChangelogsRequestSchema;
+ output: typeof ListChangelogsResponseSchema;
+ },
+ /**
+ * Retrieves a specific changelog entry.
+ * Permissions required: bb.changelogs.get
+ *
+ * @generated from rpc bytebase.v1.ChangelogService.GetChangelog
+ */
+ getChangelog: {
+ methodKind: "unary";
+ input: typeof GetChangelogRequestSchema;
+ output: typeof ChangelogSchema;
+ },
+}>;
+
diff --git a/frontend/src/types/proto-es/v1/changelog_service_pb.js b/frontend/src/types/proto-es/v1/changelog_service_pb.js
new file mode 100644
index 0000000000..cbb6f3723a
--- /dev/null
+++ b/frontend/src/types/proto-es/v1/changelog_service_pb.js
@@ -0,0 +1,78 @@
+// @generated by protoc-gen-es v2.12.0
+// @generated from file v1/changelog_service.proto (package bytebase.v1, syntax proto3)
+/* eslint-disable */
+
+import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
+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/changelog_service.proto.
+ */
+export const file_v1_changelog_service = /*@__PURE__*/
+ fileDesc("Chp2MS9jaGFuZ2Vsb2dfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEipwEKFUxpc3RDaGFuZ2Vsb2dzUmVxdWVzdBItCgZwYXJlbnQYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlEhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEigKBHZpZXcYBCABKA4yGi5ieXRlYmFzZS52MS5DaGFuZ2Vsb2dWaWV3Eg4KBmZpbHRlchgFIAEoCSJdChZMaXN0Q2hhbmdlbG9nc1Jlc3BvbnNlEioKCmNoYW5nZWxvZ3MYASADKAsyFi5ieXRlYmFzZS52MS5DaGFuZ2Vsb2cSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJInUKE0dldENoYW5nZWxvZ1JlcXVlc3QSNAoEbmFtZRgBIAEoCUIm4EEC+kEgCh5ieXRlYmFzZS5jb20vRGF0YWJhc2VDaGFuZ2Vsb2cSKAoEdmlldxgCIAEoDjIaLmJ5dGViYXNlLnYxLkNoYW5nZWxvZ1ZpZXci9QIKCUNoYW5nZWxvZxIMCgRuYW1lGAEgASgJEi8KC2NyZWF0ZV90aW1l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2VzLyovY2hhbmdlbG9ncy8qfUKrAQoPY29tLmJ5dGViYXNlLnYxQhVDaGFuZ2Vsb2dTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation]);
+
+/**
+ * Describes the message bytebase.v1.ListChangelogsRequest.
+ * Use `create(ListChangelogsRequestSchema)` to create a new message.
+ */
+export const ListChangelogsRequestSchema = /*@__PURE__*/
+ messageDesc(file_v1_changelog_service, 0);
+
+/**
+ * Describes the message bytebase.v1.ListChangelogsResponse.
+ * Use `create(ListChangelogsResponseSchema)` to create a new message.
+ */
+export const ListChangelogsResponseSchema = /*@__PURE__*/
+ messageDesc(file_v1_changelog_service, 1);
+
+/**
+ * Describes the message bytebase.v1.GetChangelogRequest.
+ * Use `create(GetChangelogRequestSchema)` to create a new message.
+ */
+export const GetChangelogRequestSchema = /*@__PURE__*/
+ messageDesc(file_v1_changelog_service, 2);
+
+/**
+ * Describes the message bytebase.v1.Changelog.
+ * Use `create(ChangelogSchema)` to create a new message.
+ */
+export const ChangelogSchema = /*@__PURE__*/
+ messageDesc(file_v1_changelog_service, 3);
+
+/**
+ * Describes the enum bytebase.v1.Changelog.Status.
+ */
+export const Changelog_StatusSchema = /*@__PURE__*/
+ enumDesc(file_v1_changelog_service, 3, 0);
+
+/**
+ * @generated from enum bytebase.v1.Changelog.Status
+ */
+export const Changelog_Status = /*@__PURE__*/
+ tsEnum(Changelog_StatusSchema);
+
+/**
+ * Describes the enum bytebase.v1.ChangelogView.
+ */
+export const ChangelogViewSchema = /*@__PURE__*/
+ enumDesc(file_v1_changelog_service, 0);
+
+/**
+ * @generated from enum bytebase.v1.ChangelogView
+ */
+export const ChangelogView = /*@__PURE__*/
+ tsEnum(ChangelogViewSchema);
+
+/**
+ * ChangelogService manages database migration history.
+ *
+ * @generated from service bytebase.v1.ChangelogService
+ */
+export const ChangelogService = /*@__PURE__*/
+ serviceDesc(file_v1_changelog_service, 0);
+
diff --git a/frontend/src/types/proto-es/v1/database_service_pb.d.ts b/frontend/src/types/proto-es/v1/database_service_pb.d.ts
index 884acab5b8..493643682f 100644
--- a/frontend/src/types/proto-es/v1/database_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/database_service_pb.d.ts
@@ -3014,200 +3014,6 @@ export declare type DatabaseSDLSchema = Message<"bytebase.v1.DatabaseSDLSchema">
*/
export declare const DatabaseSDLSchemaSchema: GenMessage<DatabaseSDLSchema>;
-/**
- * @generated from message bytebase.v1.ListChangelogsRequest
- */
-export declare type ListChangelogsRequest = Message<"bytebase.v1.ListChangelogsRequest"> & {
- /**
- * The parent of the changelogs.
- * Format: instances/{instance}/databases/{database}
- *
- * @generated from field: string parent = 1;
- */
- parent: string;
-
- /**
- * The maximum number of changelogs to return. The service may return fewer
- * than this value. If unspecified, at most 10 changelogs will be returned.
- * The maximum value is 1000; values above 1000 will be coerced to 1000.
- *
- * @generated from field: int32 page_size = 2;
- */
- pageSize: number;
-
- /**
- * A page token, received from the previous call.
- * Provide this to retrieve the subsequent page.
- *
- * When paginating, all other parameters provided must match
- * the call that provided the page token.
- *
- * @generated from field: string page_token = 3;
- */
- pageToken: string;
-
- /**
- * @generated from field: bytebase.v1.ChangelogView view = 4;
- */
- view: ChangelogView;
-
- /**
- * Filter is used to filter changelogs returned in the list.
- * The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
- *
- * Supported filter:
- * - status: the changelog status, support "==" operation. check Changelog.Status for available values.
- * - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
- *
- * Example:
- * status == "DONE"
- * status == "FAILED" && type == "SDL"
- * create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"
- *
- * @generated from field: string filter = 5;
- */
- filter: string;
-};
-
-/**
- * Describes the message bytebase.v1.ListChangelogsRequest.
- * Use `create(ListChangelogsRequestSchema)` to create a new message.
- */
-export declare const ListChangelogsRequestSchema: GenMessage<ListChangelogsRequest>;
-
-/**
- * @generated from message bytebase.v1.ListChangelogsResponse
- */
-export declare type ListChangelogsResponse = Message<"bytebase.v1.ListChangelogsResponse"> & {
- /**
- * The list of changelogs.
- *
- * @generated from field: repeated bytebase.v1.Changelog changelogs = 1;
- */
- changelogs: Changelog[];
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * @generated from field: string next_page_token = 2;
- */
- nextPageToken: string;
-};
-
-/**
- * Describes the message bytebase.v1.ListChangelogsResponse.
- * Use `create(ListChangelogsResponseSchema)` to create a new message.
- */
-export declare const ListChangelogsResponseSchema: GenMessage<ListChangelogsResponse>;
-
-/**
- * @generated from message bytebase.v1.GetChangelogRequest
- */
-export declare type GetChangelogRequest = Message<"bytebase.v1.GetChangelogRequest"> & {
- /**
- * The name of the changelog to retrieve.
- * Format: instances/{instance}/databases/{database}/changelogs/{changelog}
- *
- * @generated from field: string name = 1;
- */
- name: string;
-
- /**
- * @generated from field: bytebase.v1.ChangelogView view = 2;
- */
- view: ChangelogView;
-};
-
-/**
- * Describes the message bytebase.v1.GetChangelogRequest.
- * Use `create(GetChangelogRequestSchema)` to create a new message.
- */
-export declare const GetChangelogRequestSchema: GenMessage<GetChangelogRequest>;
-
-/**
- * @generated from message bytebase.v1.Changelog
- */
-export declare type Changelog = Message<"bytebase.v1.Changelog"> & {
- /**
- * Format: instances/{instance}/databases/{database}/changelogs/{changelog}
- *
- * @generated from field: string name = 1;
- */
- name: string;
-
- /**
- * @generated from field: google.protobuf.Timestamp create_time = 2;
- */
- createTime?: Timestamp | undefined;
-
- /**
- * @generated from field: bytebase.v1.Changelog.Status status = 3;
- */
- status: Changelog_Status;
-
- /**
- * @generated from field: string schema = 7;
- */
- schema: string;
-
- /**
- * @generated from field: int64 schema_size = 8;
- */
- schemaSize: bigint;
-
- /**
- * Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
- *
- * @generated from field: string task_run = 11;
- */
- taskRun: string;
-
- /**
- * The title of the plan associated with this changelog's task run.
- * This field is populated by deriving the plan from task_run for display purposes.
- *
- * @generated from field: string plan_title = 15;
- */
- planTitle: string;
-};
-
-/**
- * Describes the message bytebase.v1.Changelog.
- * Use `create(ChangelogSchema)` to create a new message.
- */
-export declare const ChangelogSchema: GenMessage<Changelog>;
-
-/**
- * @generated from enum bytebase.v1.Changelog.Status
- */
-export enum Changelog_Status {
- /**
- * @generated from enum value: STATUS_UNSPECIFIED = 0;
- */
- STATUS_UNSPECIFIED = 0,
-
- /**
- * @generated from enum value: PENDING = 1;
- */
- PENDING = 1,
-
- /**
- * @generated from enum value: DONE = 2;
- */
- DONE = 2,
-
- /**
- * @generated from enum value: FAILED = 3;
- */
- FAILED = 3,
-}
-
-/**
- * Describes the enum bytebase.v1.Changelog.Status.
- */
-export declare const Changelog_StatusSchema: GenEnum<Changelog_Status>;
-
/**
* @generated from message bytebase.v1.GetSchemaStringRequest
*/
@@ -3356,34 +3162,6 @@ export enum SyncStatus {
*/
export declare const SyncStatusSchema: GenEnum<SyncStatus>;
-/**
- * @generated from enum bytebase.v1.ChangelogView
- */
-export enum ChangelogView {
- /**
- * The default / unset value.
- * The API will default to the BASIC view.
- *
- * @generated from enum value: CHANGELOG_VIEW_UNSPECIFIED = 0;
- */
- UNSPECIFIED = 0,
-
- /**
- * @generated from enum value: CHANGELOG_VIEW_BASIC = 1;
- */
- BASIC = 1,
-
- /**
- * @generated from enum value: CHANGELOG_VIEW_FULL = 2;
- */
- FULL = 2,
-}
-
-/**
- * Describes the enum bytebase.v1.ChangelogView.
- */
-export declare const ChangelogViewSchema: GenEnum<ChangelogView>;
-
/**
* DatabaseService manages databases and their schemas.
*
@@ -3511,28 +3289,6 @@ export declare const DatabaseService: GenService<{
input: typeof DiffSchemaRequestSchema;
output: typeof DiffSchemaResponseSchema;
},
- /**
- * Lists migration history for a database.
- * Permissions required: bb.changelogs.list
- *
- * @generated from rpc bytebase.v1.DatabaseService.ListChangelogs
- */
- listChangelogs: {
- methodKind: "unary";
- input: typeof ListChangelogsRequestSchema;
- output: typeof ListChangelogsResponseSchema;
- },
- /**
- * Retrieves a specific changelog entry.
- * Permissions required: bb.changelogs.get
- *
- * @generated from rpc bytebase.v1.DatabaseService.GetChangelog
- */
- getChangelog: {
- methodKind: "unary";
- input: typeof GetChangelogRequestSchema;
- output: typeof ChangelogSchema;
- },
/**
* Generates schema DDL for a database object.
* Permissions required: bb.databases.getSchema
diff --git a/frontend/src/types/proto-es/v1/database_service_pb.js b/frontend/src/types/proto-es/v1/database_service_pb.js
index 58ca8f38d8..a35179f505 100644
--- a/frontend/src/types/proto-es/v1/database_service_pb.js
+++ b/frontend/src/types/proto-es/v1/database_service_pb.js
@@ -16,7 +16,7 @@ import { file_v1_instance_service } from "./instance_service_pb";
* Describes the file v1/database_service.proto.
*/
export const file_v1_database_service = /*@__PURE__*/
- fileDesc("Chl2MS9kYXRhYmFzZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXREYXRhYmFzZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2UidwoYQmF0Y2hHZXREYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USLAoFbmFtZXMYAiADKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlIkUKGUJhdGNoR2V0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2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uZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_service]);
+ fileDesc("Chl2MS9kYXRhYmFzZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXREYXRhYmFzZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2UidwoYQmF0Y2hHZXREYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USLAoFbmFtZXMYAiADKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlIkUKGUJhdGNoR2V0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuRGF0YWJhc2UipAEKFExpc3REYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJEhQKDHNob3dfZGVsZXRlZBgFIAEoCBIQCghvcmRlcl9ieRgGIAEoCSJaChVMaXN0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuRGF0YWJhc2USFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIo0BChVVcGRhdGVEYXRhYmFzZVJlcXVlc3QSLAoIZGF0YWJhc2UYASABKAsyFS5ieXRlYmFzZS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ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_service]);
/**
* Describes the message bytebase.v1.GetDatabaseRequest.
@@ -483,58 +483,18 @@ export const DatabaseSchemaSchema = /*@__PURE__*/
export const DatabaseSDLSchemaSchema = /*@__PURE__*/
messageDesc(file_v1_database_service, 52);
-/**
- * Describes the message bytebase.v1.ListChangelogsRequest.
- * Use `create(ListChangelogsRequestSchema)` to create a new message.
- */
-export const ListChangelogsRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 53);
-
-/**
- * Describes the message bytebase.v1.ListChangelogsResponse.
- * Use `create(ListChangelogsResponseSchema)` to create a new message.
- */
-export const ListChangelogsResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 54);
-
-/**
- * Describes the message bytebase.v1.GetChangelogRequest.
- * Use `create(GetChangelogRequestSchema)` to create a new message.
- */
-export const GetChangelogRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 55);
-
-/**
- * Describes the message bytebase.v1.Changelog.
- * Use `create(ChangelogSchema)` to create a new message.
- */
-export const ChangelogSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 56);
-
-/**
- * Describes the enum bytebase.v1.Changelog.Status.
- */
-export const Changelog_StatusSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 56, 0);
-
-/**
- * @generated from enum bytebase.v1.Changelog.Status
- */
-export const Changelog_Status = /*@__PURE__*/
- tsEnum(Changelog_StatusSchema);
-
/**
* Describes the message bytebase.v1.GetSchemaStringRequest.
* Use `create(GetSchemaStringRequestSchema)` to create a new message.
*/
export const GetSchemaStringRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 57);
+ messageDesc(file_v1_database_service, 53);
/**
* Describes the enum bytebase.v1.GetSchemaStringRequest.ObjectType.
*/
export const GetSchemaStringRequest_ObjectTypeSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 57, 0);
+ enumDesc(file_v1_database_service, 53, 0);
/**
* @generated from enum bytebase.v1.GetSchemaStringRequest.ObjectType
@@ -547,7 +507,7 @@ export const GetSchemaStringRequest_ObjectType = /*@__PURE__*/
* Use `create(GetSchemaStringResponseSchema)` to create a new message.
*/
export const GetSchemaStringResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 58);
+ messageDesc(file_v1_database_service, 54);
/**
* Describes the enum bytebase.v1.SyncStatus.
@@ -563,18 +523,6 @@ export const SyncStatusSchema = /*@__PURE__*/
export const SyncStatus = /*@__PURE__*/
tsEnum(SyncStatusSchema);
-/**
- * Describes the enum bytebase.v1.ChangelogView.
- */
-export const ChangelogViewSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 1);
-
-/**
- * @generated from enum bytebase.v1.ChangelogView
- */
-export const ChangelogView = /*@__PURE__*/
- tsEnum(ChangelogViewSchema);
-
/**
* DatabaseService manages databases and their schemas.
*
diff --git a/frontend/src/utils/v1/changelog.ts b/frontend/src/utils/v1/changelog.ts
index 19ba23e580..5a1554db5c 100644
--- a/frontend/src/utils/v1/changelog.ts
+++ b/frontend/src/utils/v1/changelog.ts
@@ -1,11 +1,9 @@
import { create } from "@bufbuild/protobuf";
import { getDatabaseByName } from "@/stores/app/databaseAccess";
import { UNKNOWN_ID } from "@/types";
-import type {
- Changelog,
- Database,
-} from "@/types/proto-es/v1/database_service_pb";
-import { ChangelogSchema } from "@/types/proto-es/v1/database_service_pb";
+import type { Changelog } from "@/types/proto-es/v1/changelog_service_pb";
+import { ChangelogSchema } from "@/types/proto-es/v1/changelog_service_pb";
+import type { Database } from "@/types/proto-es/v1/database_service_pb";
import { databaseV1Url, extractDatabaseResourceName } from "./database";
export const extractChangelogUID = (name: string) => {
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 15e7356b9d..0c9c2d9e51 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -2501,12 +2501,12 @@ paths:
/v1/instances/{instance}/databases/{database}/changelogs:
get:
tags:
- - DatabaseService
+ - ChangelogService
summary: ListChangelogs
description: |-
Lists migration history for a database.
Permissions required: bb.changelogs.list
- operationId: DatabaseService_ListChangelogs
+ operationId: ChangelogService_ListChangelogs
parameters:
- name: instance
in: path
@@ -2573,12 +2573,12 @@ paths:
/v1/instances/{instance}/databases/{database}/changelogs/{changelog}:
get:
tags:
- - DatabaseService
+ - ChangelogService
summary: GetChangelog
description: |-
Retrieves a specific changelog entry.
Permissions required: bb.changelogs.get
- operationId: DatabaseService_GetChangelog
+ operationId: ChangelogService_GetChangelog
parameters:
- name: instance
in: path
@@ -30944,6 +30944,8 @@ tags:
description: AuthService handles user authentication operations.
- name: CelService
description: CelService manages CEL (Common Expression Language) parsing and formatting operations.
+ - name: ChangelogService
+ description: ChangelogService manages database migration history.
- name: DatabaseCatalogService
description: DatabaseCatalogService manages database schema metadata and classification.
- name: DatabaseGroupService
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 700194b5c2..6ebfe66a9b 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -156,7 +156,6 @@
- [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest)
- [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse)
- [BoundingBox](#bytebase-v1-BoundingBox)
- - [Changelog](#bytebase-v1-Changelog)
- [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata)
- [ColumnMetadata](#bytebase-v1-ColumnMetadata)
- [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute)
@@ -179,7 +178,6 @@
- [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata)
- [FunctionMetadata](#bytebase-v1-FunctionMetadata)
- [GenerationMetadata](#bytebase-v1-GenerationMetadata)
- - [GetChangelogRequest](#bytebase-v1-GetChangelogRequest)
- [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest)
- [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)
- [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest)
@@ -188,8 +186,6 @@
- [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)
- [GridLevel](#bytebase-v1-GridLevel)
- [IndexMetadata](#bytebase-v1-IndexMetadata)
- - [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest)
- - [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse)
- [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)
- [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)
- [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata)
@@ -210,8 +206,6 @@
- [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest)
- [ViewMetadata](#bytebase-v1-ViewMetadata)
- - [Changelog.Status](#bytebase-v1-Changelog-Status)
- - [ChangelogView](#bytebase-v1-ChangelogView)
- [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration)
- [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type)
- [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat)
@@ -477,6 +471,17 @@
- [CelService](#bytebase-v1-CelService)
+- [v1/changelog_service.proto](#v1_changelog_service-proto)
+ - [Changelog](#bytebase-v1-Changelog)
+ - [GetChangelogRequest](#bytebase-v1-GetChangelogRequest)
+ - [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest)
+ - [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse)
+
+ - [Changelog.Status](#bytebase-v1-Changelog-Status)
+ - [ChangelogView](#bytebase-v1-ChangelogView)
+
+ - [ChangelogService](#bytebase-v1-ChangelogService)
+
- [v1/database_catalog_service.proto](#v1_database_catalog_service-proto)
- [ColumnCatalog](#bytebase-v1-ColumnCatalog)
- [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry)
@@ -3123,27 +3128,6 @@ BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.
-<a name="bytebase-v1-Changelog"></a>
-
-### Changelog
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |
-| schema | [string](#string) | | |
-| schema_size | [int64](#int64) | | |
-| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-| plan_title | [string](#string) | | The title of the plan associated with this changelog&#39;s task run. This field is populated by deriving the plan from task_run for display purposes. |
-
-
-
-
-
-
<a name="bytebase-v1-CheckConstraintMetadata"></a>
### CheckConstraintMetadata
@@ -3570,22 +3554,6 @@ FunctionMetadata is the metadata for functions.
-<a name="bytebase-v1-GetChangelogRequest"></a>
-
-### GetChangelogRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-
-
-
-
-
-
<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>
### GetDatabaseMetadataRequest
@@ -3734,47 +3702,6 @@ IndexMetadata is the metadata for indexes.
-<a name="bytebase-v1-ListChangelogsRequest"></a>
-
-### ListChangelogsRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} |
-| page_size | [int32](#int32) | | The maximum number of changelogs to return. The service may return fewer than this value. If unspecified, at most 10 changelogs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from the previous call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided must match the call that provided the page token. |
-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-| filter | [string](#string) | | Filter is used to filter changelogs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values. - create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-
-Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34; create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; |
-
-
-
-
-
-
-<a name="bytebase-v1-ListChangelogsResponse"></a>
-
-### ListChangelogsResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-
-
-
-
-
<a name="bytebase-v1-ListDatabasesRequest"></a>
### ListDatabasesRequest
@@ -4195,33 +4122,6 @@ ViewMetadata is the metadata for views.
-<a name="bytebase-v1-Changelog-Status"></a>
-
-### Changelog.Status
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
-
-
-
-<a name="bytebase-v1-ChangelogView"></a>
-
-### ChangelogView
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| CHANGELOG_VIEW_BASIC | 1 | |
-| CHANGELOG_VIEW_FULL | 2 | |
-
-
-
<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>
### ColumnMetadata.IdentityGeneration
@@ -4379,8 +4279,6 @@ DatabaseService manages databases and their schemas.
| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |
| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |
| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |
-| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |
-| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |
| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |
@@ -8205,6 +8103,138 @@ CelService manages CEL (Common Expression Language) parsing and formatting opera
+<a name="v1_changelog_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/changelog_service.proto
+
+
+
+<a name="bytebase-v1-Changelog"></a>
+
+### Changelog
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |
+| schema | [string](#string) | | |
+| schema_size | [int64](#int64) | | |
+| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| plan_title | [string](#string) | | The title of the plan associated with this changelog&#39;s task run. This field is populated by deriving the plan from task_run for display purposes. |
+
+
+
+
+
+
+<a name="bytebase-v1-GetChangelogRequest"></a>
+
+### GetChangelogRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-ListChangelogsRequest"></a>
+
+### ListChangelogsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} |
+| page_size | [int32](#int32) | | The maximum number of changelogs to return. The service may return fewer than this value. If unspecified, at most 10 changelogs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from the previous call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided must match the call that provided the page token. |
+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
+| filter | [string](#string) | | Filter is used to filter changelogs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter: - status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values. - create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+
+Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34; create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; |
+
+
+
+
+
+
+<a name="bytebase-v1-ListChangelogsResponse"></a>
+
+### ListChangelogsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-Changelog-Status"></a>
+
+### Changelog.Status
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+
+
+
+<a name="bytebase-v1-ChangelogView"></a>
+
+### ChangelogView
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| CHANGELOG_VIEW_BASIC | 1 | |
+| CHANGELOG_VIEW_FULL | 2 | |
+
+
+
+
+
+
+
+<a name="bytebase-v1-ChangelogService"></a>
+
+### ChangelogService
+ChangelogService manages database migration history.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |
+| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |
+
+
+
+
+
<a name="v1_database_catalog_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 0be056c412..10fbe9e62e 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -768,10 +768,6 @@
<a href="#bytebase.v1.BoundingBox"><span class="badge">M</span>BoundingBox</a>
</li>
- <li>
- <a href="#bytebase.v1.Changelog"><span class="badge">M</span>Changelog</a>
- </li>
-
<li>
<a href="#bytebase.v1.CheckConstraintMetadata"><span class="badge">M</span>CheckConstraintMetadata</a>
</li>
@@ -860,10 +856,6 @@
<a href="#bytebase.v1.GenerationMetadata"><span class="badge">M</span>GenerationMetadata</a>
</li>
- <li>
- <a href="#bytebase.v1.GetChangelogRequest"><span class="badge">M</span>GetChangelogRequest</a>
- </li>
-
<li>
<a href="#bytebase.v1.GetDatabaseMetadataRequest"><span class="badge">M</span>GetDatabaseMetadataRequest</a>
</li>
@@ -896,14 +888,6 @@
<a href="#bytebase.v1.IndexMetadata"><span class="badge">M</span>IndexMetadata</a>
</li>
- <li>
- <a href="#bytebase.v1.ListChangelogsRequest"><span class="badge">M</span>ListChangelogsRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListChangelogsResponse"><span class="badge">M</span>ListChangelogsResponse</a>
- </li>
-
<li>
<a href="#bytebase.v1.ListDatabasesRequest"><span class="badge">M</span>ListDatabasesRequest</a>
</li>
@@ -981,14 +965,6 @@
</li>
- <li>
- <a href="#bytebase.v1.Changelog.Status"><span class="badge">E</span>Changelog.Status</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ChangelogView"><span class="badge">E</span>ChangelogView</a>
- </li>
-
<li>
<a href="#bytebase.v1.ColumnMetadata.IdentityGeneration"><span class="badge">E</span>ColumnMetadata.IdentityGeneration</a>
</li>
@@ -2012,6 +1988,45 @@
</li>
+ <li>
+ <a href="#v1%2fchangelog_service.proto">v1/changelog_service.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.v1.Changelog"><span class="badge">M</span>Changelog</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.GetChangelogRequest"><span class="badge">M</span>GetChangelogRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListChangelogsRequest"><span class="badge">M</span>ListChangelogsRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ListChangelogsResponse"><span class="badge">M</span>ListChangelogsResponse</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.v1.Changelog.Status"><span class="badge">E</span>Changelog.Status</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.ChangelogView"><span class="badge">E</span>ChangelogView</a>
+ </li>
+
+
+
+ <li>
+ <a href="#bytebase.v1.ChangelogService"><span class="badge">S</span>ChangelogService</a>
+ </li>
+
+ </ul>
+ </li>
+
+
<li>
<a href="#v1%2fdatabase_catalog_service.proto">v1/database_catalog_service.proto</a>
<ul>
@@ -9562,73 +9577,6 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
- <h3 id="bytebase.v1.Changelog">Changelog</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>schema_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>task_run</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
- </tr>
-
- <tr>
- <td>plan_title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The title of the plan associated with this changelog&#39;s task run.
-This field is populated by deriving the plan from task_run for display purposes. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>
<p>CheckConstraintMetadata is the metadata for check constraints.</p>
@@ -10813,38 +10761,6 @@ For PostgreSQL, it&#39;s the list of tables that the function depends on the ret
- <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the changelog to retrieve.
-Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- </tr>
-
- <tr>
- <td>view</td>
- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</h3>
<p></p>
@@ -11231,7 +11147,7 @@ Name of the operator class for each column. (PostgreSQL specific). </p></td>
- <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3>
+ <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>
<p></p>
@@ -11245,16 +11161,18 @@ Name of the operator class for each column. (PostgreSQL specific). </p></td>
<td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent of the changelogs.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>- projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission.
+- workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission.
+- instances/{instances}: list databases in a instance, require &#34;bb.instances.get&#34; permission </p></td>
</tr>
<tr>
<td>page_size</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The maximum number of changelogs to return. The service may return fewer
-than this value. If unspecified, at most 10 changelogs will be returned.
+ <td><p>The maximum number of databases to return. The service may return fewer
+than this value.
+If unspecified, at most 10 databases will be returned.
The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
@@ -11262,35 +11180,67 @@ The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
<td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from the previous call.
+ <td><p>A page token, received from a previous `ListDatabases` call.
Provide this to retrieve the subsequent page.
-When paginating, all other parameters provided must match
-the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>view</td>
- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
- <td></td>
- <td><p> </p></td>
+When paginating, all other parameters provided to `ListDatabases` must
+match the call that provided the page token. </p></td>
</tr>
<tr>
<td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter changelogs returned in the list.
+ <td><p>Filter is used to filter databases returned in the list.
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
-- status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values.
-- create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
+- name: the database name, support &#34;.contains()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
+- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
+- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
+- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-Example:
-status == &#34;DONE&#34;
-status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34;
-create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; </p></td>
+For example:
+environment == &#34;environments/{environment resource id}&#34;
+environment == &#34;&#34; (find databases which environment is not set)
+project == &#34;projects/{project resource id}&#34;
+instance == &#34;instances/{instance resource id}&#34;
+name.contains(&#34;database name&#34;)
+engine == &#34;MYSQL&#34;
+engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
+!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
+exclude_unassigned == true
+table == &#34;sample&#34;
+table.contains(&#34;sam&#34;)
+labels.environment == &#34;production&#34;
+labels.region == &#34;asia&#34;
+labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+
+You can combine filter conditions like:
+environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
+ </tr>
+
+ <tr>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Show deleted database if specified. </p></td>
+ </tr>
+
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of databases.
+Support name, project, instance. The default sorting order is ascending.
+For example:
+- order_by = &#34;name&#34; - order by name ascending
+- order_by = &#34;name desc&#34;
+- order_by = &#34;name desc, project asc&#34; </p></td>
</tr>
</tbody>
@@ -11300,7 +11250,7 @@ create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#
- <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>
+ <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>
<p></p>
@@ -11311,10 +11261,10 @@ create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#
<tbody>
<tr>
- <td>changelogs</td>
- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
<td>repeated</td>
- <td><p>The list of changelogs. </p></td>
+ <td><p>The databases from the specified request. </p></td>
</tr>
<tr>
@@ -11332,8 +11282,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>
+ <p>MaterializedViewMetadata is the metadata for materialized views.</p>
<table class="field-table">
@@ -11343,145 +11293,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>- projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission.
-- workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission.
-- instances/{instances}: list databases in a instance, require &#34;bb.instances.get&#34; permission </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of databases to return. The service may return fewer
-than this value.
-If unspecified, at most 10 databases will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListDatabases` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListDatabases` must
-match the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter databases returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
-- name: the database name, support &#34;.contains()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
-- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
-- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example:
-environment == &#34;environments/{environment resource id}&#34;
-environment == &#34;&#34; (find databases which environment is not set)
-project == &#34;projects/{project resource id}&#34;
-instance == &#34;instances/{instance resource id}&#34;
-name.contains(&#34;database name&#34;)
-engine == &#34;MYSQL&#34;
-engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
-!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
-exclude_unassigned == true
-table == &#34;sample&#34;
-table.contains(&#34;sam&#34;)
-labels.environment == &#34;production&#34;
-labels.region == &#34;asia&#34;
-labels.region in [&#34;asia&#34;, &#34;europe&#34;]
-
-You can combine filter conditions like:
-environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Show deleted database if specified. </p></td>
- </tr>
-
- <tr>
- <td>order_by</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The order by of databases.
-Support name, project, instance. The default sorting order is ascending.
-For example:
-- order_by = &#34;name&#34; - order by name ascending
-- order_by = &#34;name desc&#34;
-- order_by = &#34;name desc, project asc&#34; </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td>repeated</td>
- <td><p>The databases from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>
- <p>MaterializedViewMetadata is the metadata for materialized views.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a materialized view. </p></td>
+ <td><p>The name is the name of a materialized view. </p></td>
</tr>
<tr>
@@ -12742,71 +12557,6 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.Changelog.Status">Changelog.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CHANGELOG_VIEW_UNSPECIFIED</td>
- <td>0</td>
- <td><p>The default / unset value.
-The API will default to the BASIC view.</p></td>
- </tr>
-
- <tr>
- <td>CHANGELOG_VIEW_BASIC</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CHANGELOG_VIEW_FULL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
<h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>
<p></p>
<table class="enum-table">
@@ -13241,22 +12991,6 @@ Permissions required: bb.databases.getSchema</p></td>
Permissions required: bb.databases.get</p></td>
</tr>
- <tr>
- <td>ListChangelogs</td>
- <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
- <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>
- <td><p>Lists migration history for a database.
-Permissions required: bb.changelogs.list</p></td>
- </tr>
-
- <tr>
- <td>GetChangelog</td>
- <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>
- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
- <td><p>Retrieves a specific changelog entry.
-Permissions required: bb.changelogs.get</p></td>
- </tr>
-
<tr>
<td>GetSchemaString</td>
<td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>
@@ -13423,26 +13157,6 @@ Permissions required: bb.databases.getSchema</p></td>
- <tr>
- <td>ListChangelogs</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*/databases/*}/changelogs</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetChangelog</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>
- <td></td>
- </tr>
-
-
-
-
<tr>
<td>GetSchemaString</td>
<td>GET</td>
@@ -23551,6 +23265,351 @@ Permissions required: None</p></td>
+ <div class="file-heading">
+ <h2 id="v1/changelog_service.proto">v1/changelog_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.Changelog">Changelog</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>schema</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>schema_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>task_run</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ </tr>
+
+ <tr>
+ <td>plan_title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The title of the plan associated with this changelog&#39;s task run.
+This field is populated by deriving the plan from task_run for display purposes. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the changelog to retrieve.
+Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ </tr>
+
+ <tr>
+ <td>view</td>
+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent of the changelogs.
+Format: instances/{instance}/databases/{database} </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of changelogs to return. The service may return fewer
+than this value. If unspecified, at most 10 changelogs will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from the previous call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided must match
+the call that provided the page token. </p></td>
+ </tr>
+
+ <tr>
+ <td>view</td>
+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter is used to filter changelogs returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values.
+- create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+
+Example:
+status == &#34;DONE&#34;
+status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34;
+create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>changelogs</td>
+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td>repeated</td>
+ <td><p>The list of changelogs. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.Changelog.Status">Changelog.Status</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DONE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CHANGELOG_VIEW_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>The default / unset value.
+The API will default to the BASIC view.</p></td>
+ </tr>
+
+ <tr>
+ <td>CHANGELOG_VIEW_BASIC</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CHANGELOG_VIEW_FULL</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ChangelogService">ChangelogService</h3>
+ <p>ChangelogService manages database migration history.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListChangelogs</td>
+ <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
+ <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>
+ <td><p>Lists migration history for a database.
+Permissions required: bb.changelogs.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetChangelog</td>
+ <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>
+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td><p>Retrieves a specific changelog entry.
+Permissions required: bb.changelogs.get</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>ListChangelogs</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*/databases/*}/changelogs</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetChangelog</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>
+ <td></td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
<div class="file-heading">
<h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>
</div>
diff --git a/proto/v1/v1/changelog_service.proto b/proto/v1/v1/changelog_service.proto
new file mode 100644
index 0000000000..fa24d3dab1
--- /dev/null
+++ b/proto/v1/v1/changelog_service.proto
@@ -0,0 +1,127 @@
+syntax = "proto3";
+
+package bytebase.v1;
+
+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";
+
+// ChangelogService manages database migration history.
+service ChangelogService {
+ // Lists migration history for a database.
+ // Permissions required: bb.changelogs.list
+ rpc ListChangelogs(ListChangelogsRequest) returns (ListChangelogsResponse) {
+ option (google.api.http) = {get: "/v1/{parent=instances/*/databases/*}/changelogs"};
+ option (google.api.method_signature) = "parent";
+ option (bytebase.v1.permission) = "bb.changelogs.list";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+
+ // Retrieves a specific changelog entry.
+ // Permissions required: bb.changelogs.get
+ rpc GetChangelog(GetChangelogRequest) returns (Changelog) {
+ option (google.api.http) = {get: "/v1/{name=instances/*/databases/*/changelogs/*}"};
+ option (google.api.method_signature) = "name";
+ option (bytebase.v1.permission) = "bb.changelogs.get";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+}
+
+enum ChangelogView {
+ // The default / unset value.
+ // The API will default to the BASIC view.
+ CHANGELOG_VIEW_UNSPECIFIED = 0;
+ CHANGELOG_VIEW_BASIC = 1;
+ CHANGELOG_VIEW_FULL = 2;
+}
+
+message ListChangelogsRequest {
+ // The parent of the changelogs.
+ // Format: instances/{instance}/databases/{database}
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Database"}
+ ];
+
+ // The maximum number of changelogs to return. The service may return fewer
+ // than this value. If unspecified, at most 10 changelogs will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 2;
+
+ // A page token, received from the previous call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided must match
+ // the call that provided the page token.
+ string page_token = 3;
+
+ ChangelogView view = 4;
+
+ // Filter is used to filter changelogs returned in the list.
+ // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ //
+ // Supported filter:
+ // - status: the changelog status, support "==" operation. check Changelog.Status for available values.
+ // - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
+ //
+ // Example:
+ // status == "DONE"
+ // status == "FAILED" && type == "SDL"
+ // create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"
+ string filter = 5;
+}
+
+message ListChangelogsResponse {
+ // The list of changelogs.
+ repeated Changelog changelogs = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+message GetChangelogRequest {
+ // The name of the changelog to retrieve.
+ // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/DatabaseChangelog"}
+ ];
+
+ ChangelogView view = 2;
+}
+
+message Changelog {
+ option (google.api.resource) = {
+ type: "bytebase.com/DatabaseChangelog"
+ pattern: "instances/{instance}/databases/{database}/changelogs/{changelog}"
+ };
+
+ // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
+ string name = 1;
+
+ google.protobuf.Timestamp create_time = 2;
+
+ enum Status {
+ STATUS_UNSPECIFIED = 0;
+ PENDING = 1;
+ DONE = 2;
+ FAILED = 3;
+ }
+ Status status = 3;
+
+ string schema = 7;
+ int64 schema_size = 8;
+
+ // Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
+ string task_run = 11;
+
+ // The title of the plan associated with this changelog's task run.
+ // This field is populated by deriving the plan from task_run for display purposes.
+ string plan_title = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
diff --git a/proto/v1/v1/database_service.proto b/proto/v1/v1/database_service.proto
index f73d84ac18..6dc369f55c 100644
--- a/proto/v1/v1/database_service.proto
+++ b/proto/v1/v1/database_service.proto
@@ -139,24 +139,6 @@ service DatabaseService {
option (bytebase.v1.auth_method) = IAM;
}
- // Lists migration history for a database.
- // Permissions required: bb.changelogs.list
- rpc ListChangelogs(ListChangelogsRequest) returns (ListChangelogsResponse) {
- option (google.api.http) = {get: "/v1/{parent=instances/*/databases/*}/changelogs"};
- option (google.api.method_signature) = "parent";
- option (bytebase.v1.permission) = "bb.changelogs.list";
- option (bytebase.v1.auth_method) = IAM;
- }
-
- // Retrieves a specific changelog entry.
- // Permissions required: bb.changelogs.get
- rpc GetChangelog(GetChangelogRequest) returns (Changelog) {
- option (google.api.http) = {get: "/v1/{name=instances/*/databases/*/changelogs/*}"};
- option (google.api.method_signature) = "name";
- option (bytebase.v1.permission) = "bb.changelogs.get";
- option (bytebase.v1.auth_method) = IAM;
- }
-
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
rpc GetSchemaString(GetSchemaStringRequest) returns (GetSchemaStringResponse) {
@@ -1402,100 +1384,6 @@ message DatabaseSDLSchema {
string content_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
-enum ChangelogView {
- // The default / unset value.
- // The API will default to the BASIC view.
- CHANGELOG_VIEW_UNSPECIFIED = 0;
- CHANGELOG_VIEW_BASIC = 1;
- CHANGELOG_VIEW_FULL = 2;
-}
-
-message ListChangelogsRequest {
- // The parent of the changelogs.
- // Format: instances/{instance}/databases/{database}
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/Database"}
- ];
-
- // The maximum number of changelogs to return. The service may return fewer
- // than this value. If unspecified, at most 10 changelogs will be returned.
- // The maximum value is 1000; values above 1000 will be coerced to 1000.
- int32 page_size = 2;
-
- // A page token, received from the previous call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided must match
- // the call that provided the page token.
- string page_token = 3;
-
- ChangelogView view = 4;
-
- // Filter is used to filter changelogs returned in the list.
- // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
- //
- // Supported filter:
- // - status: the changelog status, support "==" operation. check Changelog.Status for available values.
- // - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.
- //
- // Example:
- // status == "DONE"
- // status == "FAILED" && type == "SDL"
- // create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"
- string filter = 5;
-}
-
-message ListChangelogsResponse {
- // The list of changelogs.
- repeated Changelog changelogs = 1;
-
- // A token, which can be sent as `page_token` to retrieve the next page.
- // If this field is omitted, there are no subsequent pages.
- string next_page_token = 2;
-}
-
-message GetChangelogRequest {
- // The name of the changelog to retrieve.
- // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {type: "bytebase.com/DatabaseChangelog"}
- ];
-
- ChangelogView view = 2;
-}
-
-message Changelog {
- option (google.api.resource) = {
- type: "bytebase.com/DatabaseChangelog"
- pattern: "instances/{instance}/databases/{database}/changelogs/{changelog}"
- };
-
- // Format: instances/{instance}/databases/{database}/changelogs/{changelog}
- string name = 1;
-
- google.protobuf.Timestamp create_time = 2;
-
- enum Status {
- STATUS_UNSPECIFIED = 0;
- PENDING = 1;
- DONE = 2;
- FAILED = 3;
- }
- Status status = 3;
-
- string schema = 7;
- int64 schema_size = 8;
-
- // Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}
- string task_run = 11;
-
- // The title of the plan associated with this changelog's task run.
- // This field is populated by deriving the plan from task_run for display purposes.
- string plan_title = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
-}
-
message GetSchemaStringRequest {
// The name of the database.
// Format: instances/{instance}/databases/{database}