Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: deprecate changelist feature (#17985)
boojack435c931711e3
diff --git a/backend/api/auth/auth_test.go b/backend/api/auth/auth_test.goindex 69731814c8..b125c7e003 100644--- a/backend/api/auth/auth_test.go+++ b/backend/api/auth/auth_test.go@@ -37,12 +37,6 @@ func TestGetAllowMissingRequiredPermission(t *testing.T) {wantPerm: "bb.identityProviders.create",wantErr: false,},- {- name: "ChangelistService.UpdateChangelist has annotation",- fullMethod: "/bytebase.v1.ChangelistService/UpdateChangelist",- wantPerm: "bb.changelists.create",- wantErr: false,- },{name: "DatabaseGroupService.UpdateDatabaseGroup has annotation",fullMethod: "/bytebase.v1.DatabaseGroupService/UpdateDatabaseGroup",diff --git a/backend/api/v1/acl_test.go b/backend/api/v1/acl_test.goindex 8869472150..fd825fd33c 100644--- a/backend/api/v1/acl_test.go+++ b/backend/api/v1/acl_test.go@@ -272,13 +272,6 @@ func TestHasAllowMissingEnabled(t *testing.T) {},want: false,},- {- name: "UpdateChangelistRequest with AllowMissing true",- request: &v1pb.UpdateChangelistRequest{- AllowMissing: true,- },- want: true,- },{name: "UpdateRiskRequest with AllowMissing true",request: &v1pb.UpdateRiskRequest{diff --git a/backend/api/v1/changelist_service.go b/backend/api/v1/changelist_service.godeleted file mode 100644index 6e0c1999a9..0000000000--- a/backend/api/v1/changelist_service.go+++ /dev/null@@ -1,303 +0,0 @@-package v1--import (- "context"- "fmt"-- "connectrpc.com/connect"- "github.com/pkg/errors"- "google.golang.org/protobuf/types/known/emptypb"- "google.golang.org/protobuf/types/known/timestamppb"-- "github.com/bytebase/bytebase/backend/common"- "github.com/bytebase/bytebase/backend/component/config"- "github.com/bytebase/bytebase/backend/component/iam"- storepb "github.com/bytebase/bytebase/backend/generated-go/store"- v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"- "github.com/bytebase/bytebase/backend/generated-go/v1/v1connect"- "github.com/bytebase/bytebase/backend/store"-)--// ChangelistService implements the changelist service.-type ChangelistService struct {- v1connect.UnimplementedChangelistServiceHandler- store *store.Store- profile *config.Profile- iamManager *iam.Manager-}--// NewChangelistService creates a new ChangelistService.-func NewChangelistService(store *store.Store, profile *config.Profile, iamManager *iam.Manager) *ChangelistService {- return &ChangelistService{- store: store,- profile: profile,- iamManager: iamManager,- }-}--// CreateChangelist creates a changelist.-func (s *ChangelistService) CreateChangelist(ctx context.Context, req *connect.Request[v1pb.CreateChangelistRequest]) (*connect.Response[v1pb.Changelist], error) {- if req.Msg.Changelist == nil {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("changelist must be set"))- }- user, ok := GetUserFromContext(ctx)- if !ok {- return nil, connect.NewError(connect.CodeInternal, errors.New("user not found"))- }-- projectResourceID, err := common.GetProjectID(req.Msg.Parent)- if err != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, err)- }- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: &projectResourceID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get project with resource id %q", projectResourceID))- }- if project == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project with resource id %q not found", projectResourceID))- }- if project.Deleted {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project with resource id %q had deleted", projectResourceID))- }-- changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &req.Msg.ChangelistId})- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if changelist != nil {- return nil, connect.NewError(connect.CodeAlreadyExists, errors.Errorf("changelist %q already exists", req.Msg.ChangelistId))- }-- changelist, err = s.store.CreateChangelist(ctx, &store.ChangelistMessage{- ProjectID: project.ResourceID,- ResourceID: req.Msg.ChangelistId,- Payload: convertV1ChangelistPayload(req.Msg.Changelist),- CreatorID: user.ID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- v1Changelist, err := s.convertStoreChangelist(ctx, changelist)- if err != nil {- return nil, err- }- return connect.NewResponse(v1Changelist), nil-}--// GetChangelist gets a changelist.-func (s *ChangelistService) GetChangelist(ctx context.Context, req *connect.Request[v1pb.GetChangelistRequest]) (*connect.Response[v1pb.Changelist], error) {- projectID, changelistID, err := common.GetProjectIDChangelistID(req.Msg.Name)- if err != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, err)- }- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: &projectID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if project == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project %q not found", projectID))- }-- changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if changelist == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("changelist %q not found", changelistID))- }- v1Changelist, err := s.convertStoreChangelist(ctx, changelist)- if err != nil {- return nil, err- }- return connect.NewResponse(v1Changelist), nil-}--// GetChangelist gets a changelist.-func (s *ChangelistService) ListChangelists(ctx context.Context, req *connect.Request[v1pb.ListChangelistsRequest]) (*connect.Response[v1pb.ListChangelistsResponse], error) {- projectResourceID, err := common.GetProjectID(req.Msg.Parent)- if err != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, err)- }- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: &projectResourceID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get project with resource id %q", projectResourceID))- }- if project == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project with resource id %q not found", projectResourceID))- }- if project.Deleted {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project with resource id %q had deleted", projectResourceID))- }-- changelists, err := s.store.ListChangelists(ctx, &store.FindChangelistMessage{- ProjectID: &projectResourceID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }-- resp := &v1pb.ListChangelistsResponse{}- for _, changelist := range changelists {- v1Changelist, err := s.convertStoreChangelist(ctx, changelist)- if err != nil {- return nil, err- }- resp.Changelists = append(resp.Changelists, v1Changelist)- }- return connect.NewResponse(resp), nil-}--// UpdateChangelist updates a changelist.-func (s *ChangelistService) UpdateChangelist(ctx context.Context, req *connect.Request[v1pb.UpdateChangelistRequest]) (*connect.Response[v1pb.Changelist], error) {- if req.Msg.Changelist == nil {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("changelist must be set"))- }- if req.Msg.UpdateMask == nil {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("update_mask must be set"))- }-- projectID, changelistID, err := common.GetProjectIDChangelistID(req.Msg.Changelist.Name)- if err != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, err)- }- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: &projectID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if project == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project %q not found", projectID))- }-- user, ok := GetUserFromContext(ctx)- if !ok {- return nil, connect.NewError(connect.CodeInternal, errors.New("user not found"))- }-- changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if changelist == nil {- if req.Msg.AllowMissing {- ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionChangelistsCreate, user, project.ResourceID)- if err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to check permission"))- }- if !ok {- return nil, connect.NewError(connect.CodePermissionDenied, errors.Errorf("user does not have permission %q", iam.PermissionChangelistsCreate))- }- return s.CreateChangelist(ctx, connect.NewRequest(&v1pb.CreateChangelistRequest{- Parent: common.FormatProject(project.ResourceID),- ChangelistId: changelistID,- Changelist: req.Msg.Changelist,- }))- }- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("changelist %q not found", changelistID))- }- update := &store.UpdateChangelistMessage{- UpdaterID: user.ID,- ProjectID: project.ResourceID,- ResourceID: changelistID,- }- newChangelist := convertV1ChangelistPayload(req.Msg.Changelist)-- for _, path := range req.Msg.UpdateMask.Paths {- switch path {- case "description":- changelist.Payload.Description = newChangelist.Description- case "changes":- changelist.Payload.Changes = newChangelist.Changes- default:- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf(`unsupport update_mask "%s"`, path))- }- }- update.Payload = newChangelist- if err := s.store.UpdateChangelist(ctx, update); err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- changelist, err = s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})- if err != nil {- return nil, err- }-- v1Changelist, err := s.convertStoreChangelist(ctx, changelist)- if err != nil {- return nil, err- }- return connect.NewResponse(v1Changelist), nil-}--// DeleteChangelist deletes a changelist.-func (s *ChangelistService) DeleteChangelist(ctx context.Context, req *connect.Request[v1pb.DeleteChangelistRequest]) (*connect.Response[emptypb.Empty], error) {- projectID, changelistID, err := common.GetProjectIDChangelistID(req.Msg.Name)- if err != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, err)- }- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{- ResourceID: &projectID,- })- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if project == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project %q not found", projectID))- }- changelist, err := s.store.GetChangelist(ctx, &store.FindChangelistMessage{ProjectID: &project.ResourceID, ResourceID: &changelistID})- if err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }- if changelist == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("changelist %q not found", changelistID))- }-- if err := s.store.DeleteChangelist(ctx, project.ResourceID, changelistID); err != nil {- return nil, connect.NewError(connect.CodeInternal, err)- }-- return connect.NewResponse(&emptypb.Empty{}), nil-}--func convertV1ChangelistPayload(changelist *v1pb.Changelist) *storepb.Changelist {- storeChangelist := &storepb.Changelist{- Description: changelist.Description,- }- for _, change := range changelist.Changes {- storeChangelist.Changes = append(storeChangelist.Changes, &storepb.Changelist_Change{- Sheet: change.Sheet,- Source: change.Source,- })- }- return storeChangelist-}--func (s *ChangelistService) convertStoreChangelist(ctx context.Context, changelist *store.ChangelistMessage) (*v1pb.Changelist, error) {- creator, err := s.store.GetUserByID(ctx, changelist.CreatorID)- if err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to get creator"))- }- if creator == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("cannot find the creator: %d", changelist.CreatorID))- }-- v1Changelist := &v1pb.Changelist{- Name: fmt.Sprintf("projects/%s/changelists/%s", changelist.ProjectID, changelist.ResourceID),- Description: changelist.Payload.Description,- UpdateTime: timestamppb.New(changelist.UpdatedAt),- Creator: fmt.Sprintf("users/%s", creator.Email),- }- for _, change := range changelist.Payload.Changes {- v1Changelist.Changes = append(v1Changelist.Changes, &v1pb.Changelist_Change{- Sheet: change.Sheet,- Source: change.Source,- })- }- return v1Changelist, nil-}diff --git a/backend/api/v1/database_group_service.go b/backend/api/v1/database_group_service.goindex 2e173a8889..e35e29e875 100644--- a/backend/api/v1/database_group_service.go+++ b/backend/api/v1/database_group_service.go@@ -27,7 +27,7 @@ type DatabaseGroupService struct {licenseService *enterprise.LicenseService}-// NewDatabaseGroupService creates a new ChangelistService.+// NewDatabaseGroupService creates a new DatabaseGroupService.func NewDatabaseGroupService(store *store.Store, profile *config.Profile, iamManager *iam.Manager, licenseService *enterprise.LicenseService) *DatabaseGroupService {return &DatabaseGroupService{store: store,diff --git a/backend/common/resource_name.go b/backend/common/resource_name.goindex 40a783ea49..c3569d6676 100644--- a/backend/common/resource_name.go+++ b/backend/common/resource_name.go@@ -42,7 +42,6 @@ const (LogNamePrefix = "logs/"BranchPrefix = "branches/"DeploymentConfigPrefix = "deploymentConfigs/"- ChangelistsPrefix = "changelists/"AuditLogPrefix = "auditLogs/"GroupPrefix = "groups/"ReviewConfigPrefix = "reviewConfigs/"@@ -98,14 +97,6 @@ func GetProjectIDWebhookID(name string) (string, string, error) {return tokens[0], tokens[1], nil}-func GetProjectIDChangelistID(name string) (string, string, error) {- tokens, err := GetNameParentTokens(name, ProjectNamePrefix, ChangelistsPrefix)- if err != nil {- return "", "", err- }- return tokens[0], tokens[1], nil-}-// GetUIDFromName returns the UID from a resource name.func GetUIDFromName(name, prefix string) (int, error) {tokens, err := GetNameParentTokens(name, prefix)diff --git a/backend/component/iam/acl.yaml b/backend/component/iam/acl.yamlindex 741882ca12..fba05d82e8 100644--- a/backend/component/iam/acl.yaml+++ b/backend/component/iam/acl.yaml@@ -4,11 +4,6 @@ roles:permissions:- bb.auditLogs.export- bb.auditLogs.search- - bb.changelists.create- - bb.changelists.delete- - bb.changelists.get- - bb.changelists.list- - bb.changelists.update- bb.changelogs.get- bb.changelogs.list- bb.databaseCatalogs.get@@ -121,11 +116,6 @@ roles:permissions:- bb.auditLogs.export- bb.auditLogs.search- - bb.changelists.create- - bb.changelists.delete- - bb.changelists.get- - bb.changelists.list- - bb.changelists.update- bb.changelogs.get- bb.changelogs.list- bb.databaseCatalogs.get@@ -246,11 +236,6 @@ roles:permissions:- bb.auditLogs.export- bb.auditLogs.search- - bb.changelists.create- - bb.changelists.delete- - bb.changelists.get- - bb.changelists.list- - bb.changelists.update- bb.changelogs.get- bb.changelogs.list- bb.databaseCatalogs.get@@ -312,10 +297,6 @@ roles:title: Project developerpermissions:- bb.auditLogs.search- - bb.changelists.create- - bb.changelists.get- - bb.changelists.list- - bb.changelists.update- bb.changelogs.get- bb.changelogs.list- bb.databaseCatalogs.getdiff --git a/backend/component/iam/permission.go b/backend/component/iam/permission.goindex f08c70c6ea..9268285250 100644--- a/backend/component/iam/permission.go+++ b/backend/component/iam/permission.go@@ -5,11 +5,6 @@ type Permission = stringconst (PermissionAuditLogsExport Permission = "bb.auditLogs.export"PermissionAuditLogsSearch Permission = "bb.auditLogs.search"- PermissionChangelistsCreate Permission = "bb.changelists.create"- PermissionChangelistsDelete Permission = "bb.changelists.delete"- PermissionChangelistsGet Permission = "bb.changelists.get"- PermissionChangelistsList Permission = "bb.changelists.list"- PermissionChangelistsUpdate Permission = "bb.changelists.update"PermissionChangelogsGet Permission = "bb.changelogs.get"PermissionChangelogsList Permission = "bb.changelogs.list"PermissionDatabaseCatalogsGet Permission = "bb.databaseCatalogs.get"@@ -122,11 +117,6 @@ const (var allPermissions = []Permission{PermissionAuditLogsExport,PermissionAuditLogsSearch,- PermissionChangelistsCreate,- PermissionChangelistsDelete,- PermissionChangelistsGet,- PermissionChangelistsList,- PermissionChangelistsUpdate,PermissionChangelogsGet,PermissionChangelogsList,PermissionDatabaseCatalogsGet,diff --git a/backend/component/iam/permission.yaml b/backend/component/iam/permission.yamlindex ceaa1fbc5e..d08015e038 100644--- a/backend/component/iam/permission.yaml+++ b/backend/component/iam/permission.yaml@@ -1,11 +1,6 @@permissions:- bb.auditLogs.export- bb.auditLogs.search- - bb.changelists.create- - bb.changelists.delete- - bb.changelists.get- - bb.changelists.list- - bb.changelists.update- bb.changelogs.get- bb.changelogs.list- bb.databaseCatalogs.getdiff --git a/backend/enterprise/plan.yaml b/backend/enterprise/plan.yamlindex 8c2ab7080a..58eb4a67ce 100644--- a/backend/enterprise/plan.yaml+++ b/backend/enterprise/plan.yaml@@ -17,7 +17,6 @@ plans:- FEATURE_SCHEDULED_ROLLOUT_TIME- FEATURE_DATABASE_CHANGELOG- FEATURE_SCHEMA_DRIFT_DETECTION- - FEATURE_CHANGELIST- FEATURE_SCHEMA_TEMPLATE- FEATURE_ROLLOUT_POLICY# SQL Editor & Development@@ -62,7 +61,6 @@ plans:- FEATURE_SCHEDULED_ROLLOUT_TIME- FEATURE_DATABASE_CHANGELOG- FEATURE_SCHEMA_DRIFT_DETECTION- - FEATURE_CHANGELIST- FEATURE_SCHEMA_TEMPLATE- FEATURE_ROLLOUT_POLICY# SQL Editor & Development@@ -115,7 +113,6 @@ plans:- FEATURE_SCHEDULED_ROLLOUT_TIME- FEATURE_DATABASE_CHANGELOG- FEATURE_SCHEMA_DRIFT_DETECTION- - FEATURE_CHANGELIST- FEATURE_SCHEMA_TEMPLATE- FEATURE_ROLLOUT_POLICY# SQL Editor & Developmentdiff --git a/backend/generated-go/store/changelist.pb.go b/backend/generated-go/store/changelist.pb.godeleted file mode 100644index 6bfe5b54c7..0000000000--- a/backend/generated-go/store/changelist.pb.go+++ /dev/null@@ -1,198 +0,0 @@-// Code generated by protoc-gen-go. DO NOT EDIT.-// versions:-// protoc-gen-go v1.36.10-// protoc (unknown)-// source: store/changelist.proto--package store--import (- protoreflect "google.golang.org/protobuf/reflect/protoreflect"- protoimpl "google.golang.org/protobuf/runtime/protoimpl"- 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)-)--// Changelist represents a collection of database changes that can be applied together.-type Changelist struct {- state protoimpl.MessageState `protogen:"open.v1"`- // Human-readable description of this changelist.- Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`- // The list of changes in this changelist.- Changes []*Changelist_Change `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *Changelist) Reset() {- *x = Changelist{}- mi := &file_store_changelist_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *Changelist) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*Changelist) ProtoMessage() {}--func (x *Changelist) ProtoReflect() protoreflect.Message {- mi := &file_store_changelist_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 Changelist.ProtoReflect.Descriptor instead.-func (*Changelist) Descriptor() ([]byte, []int) {- return file_store_changelist_proto_rawDescGZIP(), []int{0}-}--func (x *Changelist) GetDescription() string {- if x != nil {- return x.Description- }- return ""-}--func (x *Changelist) GetChanges() []*Changelist_Change {- if x != nil {- return x.Changes- }- return nil-}--// Change represents a single database modification within the changelist.-type Changelist_Change struct {- state protoimpl.MessageState `protogen:"open.v1"`- // Resource name of the sheet containing the SQL statements.- Sheet string `protobuf:"bytes,1,opt,name=sheet,proto3" json:"sheet,omitempty"`- // The source where this change originated from.- // Format: instances/{instance}/databases/{database}/changelogs/{changelog} for changes from changelog.- // Empty for raw SQL changes.- Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *Changelist_Change) Reset() {- *x = Changelist_Change{}- mi := &file_store_changelist_proto_msgTypes[1]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *Changelist_Change) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*Changelist_Change) ProtoMessage() {}--func (x *Changelist_Change) ProtoReflect() protoreflect.Message {- mi := &file_store_changelist_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 Changelist_Change.ProtoReflect.Descriptor instead.-func (*Changelist_Change) Descriptor() ([]byte, []int) {- return file_store_changelist_proto_rawDescGZIP(), []int{0, 0}-}--func (x *Changelist_Change) GetSheet() string {- if x != nil {- return x.Sheet- }- return ""-}--func (x *Changelist_Change) GetSource() string {- if x != nil {- return x.Source- }- return ""-}--var File_store_changelist_proto protoreflect.FileDescriptor--const file_store_changelist_proto_rawDesc = "" +- "\n" +- "\x16store/changelist.proto\x12\x0ebytebase.store\"\xa3\x01\n" +- "\n" +- "Changelist\x12 \n" +- "\vdescription\x18\x01 \x01(\tR\vdescription\x12;\n" +- "\achanges\x18\x02 \x03(\v2!.bytebase.store.Changelist.ChangeR\achanges\x1a6\n" +- "\x06Change\x12\x14\n" +- "\x05sheet\x18\x01 \x01(\tR\x05sheet\x12\x16\n" +- "\x06source\x18\x02 \x01(\tR\x06sourceB\x92\x01\n" +- "\x12com.bytebase.storeB\x0fChangelistProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"--var (- file_store_changelist_proto_rawDescOnce sync.Once- file_store_changelist_proto_rawDescData []byte-)--func file_store_changelist_proto_rawDescGZIP() []byte {- file_store_changelist_proto_rawDescOnce.Do(func() {- file_store_changelist_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_changelist_proto_rawDesc), len(file_store_changelist_proto_rawDesc)))- })- return file_store_changelist_proto_rawDescData-}--var file_store_changelist_proto_msgTypes = make([]protoimpl.MessageInfo, 2)-var file_store_changelist_proto_goTypes = []any{- (*Changelist)(nil), // 0: bytebase.store.Changelist- (*Changelist_Change)(nil), // 1: bytebase.store.Changelist.Change-}-var file_store_changelist_proto_depIdxs = []int32{- 1, // 0: bytebase.store.Changelist.changes:type_name -> bytebase.store.Changelist.Change- 1, // [1:1] is the sub-list for method output_type- 1, // [1:1] is the sub-list for method input_type- 1, // [1:1] is the sub-list for extension type_name- 1, // [1:1] is the sub-list for extension extendee- 0, // [0:1] is the sub-list for field type_name-}--func init() { file_store_changelist_proto_init() }-func file_store_changelist_proto_init() {- if File_store_changelist_proto != nil {- return- }- type x struct{}- out := protoimpl.TypeBuilder{- File: protoimpl.DescBuilder{- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),- RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_changelist_proto_rawDesc), len(file_store_changelist_proto_rawDesc)),- NumEnums: 0,- NumMessages: 2,- NumExtensions: 0,- NumServices: 0,- },- GoTypes: file_store_changelist_proto_goTypes,- DependencyIndexes: file_store_changelist_proto_depIdxs,- MessageInfos: file_store_changelist_proto_msgTypes,- }.Build()- File_store_changelist_proto = out.File- file_store_changelist_proto_goTypes = nil- file_store_changelist_proto_depIdxs = nil-}diff --git a/backend/generated-go/store/changelist_equal.pb.go b/backend/generated-go/store/changelist_equal.pb.godeleted file mode 100644index 4e84da1dcc..0000000000--- a/backend/generated-go/store/changelist_equal.pb.go+++ /dev/null@@ -1,41 +0,0 @@-// Code generated by protoc-gen-equal-go. DO NOT EDIT.-// source: store/changelist.proto--package store--func (x *Changelist_Change) Equal(y *Changelist_Change) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Sheet != y.Sheet {- return false- }- if x.Source != y.Source {- return false- }- return true-}--func (x *Changelist) Equal(y *Changelist) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Description != y.Description {- return false- }- if len(x.Changes) != len(y.Changes) {- return false- }- for i := 0; i < len(x.Changes); i++ {- if !x.Changes[i].Equal(y.Changes[i]) {- return false- }- }- return true-}diff --git a/backend/generated-go/v1/changelist_service.pb.go b/backend/generated-go/v1/changelist_service.pb.godeleted file mode 100644index c7b7416b04..0000000000--- a/backend/generated-go/v1/changelist_service.pb.go+++ /dev/null@@ -1,621 +0,0 @@-// Code generated by protoc-gen-go. DO NOT EDIT.-// versions:-// protoc-gen-go v1.36.10-// protoc (unknown)-// source: v1/changelist_service.proto--package v1--import (- _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"- _ "google.golang.org/genproto/googleapis/api/annotations"- protoreflect "google.golang.org/protobuf/reflect/protoreflect"- protoimpl "google.golang.org/protobuf/runtime/protoimpl"- emptypb "google.golang.org/protobuf/types/known/emptypb"- fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"- 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)-)--// Request message for creating a changelist.-type CreateChangelistRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The parent resource where this changelist will be created.- // Format: projects/{project}- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`- // The changelist to create.- Changelist *Changelist `protobuf:"bytes,2,opt,name=changelist,proto3" json:"changelist,omitempty"`- // The ID to use for the changelist, which will become the final component of- // the changelist's resource name.- //- // This value should be 4-63 characters, and valid characters- // are /[a-z][0-9]-/.- ChangelistId string `protobuf:"bytes,3,opt,name=changelist_id,json=changelistId,proto3" json:"changelist_id,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *CreateChangelistRequest) Reset() {- *x = CreateChangelistRequest{}- mi := &file_v1_changelist_service_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *CreateChangelistRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*CreateChangelistRequest) ProtoMessage() {}--func (x *CreateChangelistRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_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 CreateChangelistRequest.ProtoReflect.Descriptor instead.-func (*CreateChangelistRequest) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{0}-}--func (x *CreateChangelistRequest) GetParent() string {- if x != nil {- return x.Parent- }- return ""-}--func (x *CreateChangelistRequest) GetChangelist() *Changelist {- if x != nil {- return x.Changelist- }- return nil-}--func (x *CreateChangelistRequest) GetChangelistId() string {- if x != nil {- return x.ChangelistId- }- return ""-}--// Request message for getting a changelist.-type GetChangelistRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The name of the changelist to retrieve.- // Format: projects/{project}/changelists/{changelist}- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *GetChangelistRequest) Reset() {- *x = GetChangelistRequest{}- mi := &file_v1_changelist_service_proto_msgTypes[1]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *GetChangelistRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*GetChangelistRequest) ProtoMessage() {}--func (x *GetChangelistRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_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 GetChangelistRequest.ProtoReflect.Descriptor instead.-func (*GetChangelistRequest) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{1}-}--func (x *GetChangelistRequest) GetName() string {- if x != nil {- return x.Name- }- return ""-}--// Request message for listing changelists.-type ListChangelistsRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The parent, which owns this collection of changelists.- // Format: projects/{project}- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *ListChangelistsRequest) Reset() {- *x = ListChangelistsRequest{}- mi := &file_v1_changelist_service_proto_msgTypes[2]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *ListChangelistsRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ListChangelistsRequest) ProtoMessage() {}--func (x *ListChangelistsRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_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 ListChangelistsRequest.ProtoReflect.Descriptor instead.-func (*ListChangelistsRequest) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{2}-}--func (x *ListChangelistsRequest) GetParent() string {- if x != nil {- return x.Parent- }- return ""-}--// Response message for listing changelists.-type ListChangelistsResponse struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The changelists from the specified request.- Changelists []*Changelist `protobuf:"bytes,1,rep,name=changelists,proto3" json:"changelists,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *ListChangelistsResponse) Reset() {- *x = ListChangelistsResponse{}- mi := &file_v1_changelist_service_proto_msgTypes[3]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *ListChangelistsResponse) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*ListChangelistsResponse) ProtoMessage() {}--func (x *ListChangelistsResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_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 ListChangelistsResponse.ProtoReflect.Descriptor instead.-func (*ListChangelistsResponse) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{3}-}--func (x *ListChangelistsResponse) GetChangelists() []*Changelist {- if x != nil {- return x.Changelists- }- return nil-}--// Request message for updating a changelist.-type UpdateChangelistRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The changelist to update.- //- // The changelist's `name` field is used to identify the changelist to update.- // Format: projects/{project}/changelists/{changelist}- Changelist *Changelist `protobuf:"bytes,1,opt,name=changelist,proto3" json:"changelist,omitempty"`- // The list of fields to be updated.- UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`- // If set to true, and the changelist is not found, a new changelist will be created.- // In this situation, `update_mask` is ignored.- AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *UpdateChangelistRequest) Reset() {- *x = UpdateChangelistRequest{}- mi := &file_v1_changelist_service_proto_msgTypes[4]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *UpdateChangelistRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*UpdateChangelistRequest) ProtoMessage() {}--func (x *UpdateChangelistRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_service_proto_msgTypes[4]- 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 UpdateChangelistRequest.ProtoReflect.Descriptor instead.-func (*UpdateChangelistRequest) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{4}-}--func (x *UpdateChangelistRequest) GetChangelist() *Changelist {- if x != nil {- return x.Changelist- }- return nil-}--func (x *UpdateChangelistRequest) GetUpdateMask() *fieldmaskpb.FieldMask {- if x != nil {- return x.UpdateMask- }- return nil-}--func (x *UpdateChangelistRequest) GetAllowMissing() bool {- if x != nil {- return x.AllowMissing- }- return false-}--// Request message for deleting a changelist.-type DeleteChangelistRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The name of the changelist to delete.- // Format: projects/{project}/changelists/{changelist}- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *DeleteChangelistRequest) Reset() {- *x = DeleteChangelistRequest{}- mi := &file_v1_changelist_service_proto_msgTypes[5]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *DeleteChangelistRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*DeleteChangelistRequest) ProtoMessage() {}--func (x *DeleteChangelistRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_service_proto_msgTypes[5]- 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 DeleteChangelistRequest.ProtoReflect.Descriptor instead.-func (*DeleteChangelistRequest) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{5}-}--func (x *DeleteChangelistRequest) GetName() string {- if x != nil {- return x.Name- }- return ""-}--// A changelist groups multiple database changes together.-type Changelist struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The name of the changelist resource.- // Canonical parent is project.- // Format: projects/{project}/changelists/{changelist}- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- // The description of the changelist.- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`- // The creator of the changelist.- // Format: users/{email}- Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`- // The last time the changelist was updated.- UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`- // The list of changes in this changelist.- Changes []*Changelist_Change `protobuf:"bytes,7,rep,name=changes,proto3" json:"changes,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *Changelist) Reset() {- *x = Changelist{}- mi := &file_v1_changelist_service_proto_msgTypes[6]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *Changelist) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*Changelist) ProtoMessage() {}--func (x *Changelist) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_service_proto_msgTypes[6]- 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 Changelist.ProtoReflect.Descriptor instead.-func (*Changelist) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{6}-}--func (x *Changelist) GetName() string {- if x != nil {- return x.Name- }- return ""-}--func (x *Changelist) GetDescription() string {- if x != nil {- return x.Description- }- return ""-}--func (x *Changelist) GetCreator() string {- if x != nil {- return x.Creator- }- return ""-}--func (x *Changelist) GetUpdateTime() *timestamppb.Timestamp {- if x != nil {- return x.UpdateTime- }- return nil-}--func (x *Changelist) GetChanges() []*Changelist_Change {- if x != nil {- return x.Changes- }- return nil-}--// A single change in a changelist.-type Changelist_Change struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The sheet containing the SQL statement.- // Format: projects/{project}/sheets/{sheet}- Sheet string `protobuf:"bytes,1,opt,name=sheet,proto3" json:"sheet,omitempty"`- // The source of this change.- // Format: instances/{instance}/databases/{database}/changelogs/{changelog}- // If empty, the change is from raw SQL.- Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *Changelist_Change) Reset() {- *x = Changelist_Change{}- mi := &file_v1_changelist_service_proto_msgTypes[7]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *Changelist_Change) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*Changelist_Change) ProtoMessage() {}--func (x *Changelist_Change) ProtoReflect() protoreflect.Message {- mi := &file_v1_changelist_service_proto_msgTypes[7]- 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 Changelist_Change.ProtoReflect.Descriptor instead.-func (*Changelist_Change) Descriptor() ([]byte, []int) {- return file_v1_changelist_service_proto_rawDescGZIP(), []int{6, 0}-}--func (x *Changelist_Change) GetSheet() string {- if x != nil {- return x.Sheet- }- return ""-}--func (x *Changelist_Change) GetSource() string {- if x != nil {- return x.Source- }- return ""-}--var File_v1_changelist_service_proto protoreflect.FileDescriptor--const file_v1_changelist_service_proto_rawDesc = "" +- "\n" +- "\x1bv1/changelist_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\xb7\x01\n" +- "\x17CreateChangelistRequest\x124\n" +- "\x06parent\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +- "\x14bytebase.com/ProjectR\x06parent\x12<\n" +- "\n" +- "changelist\x18\x02 \x01(\v2\x17.bytebase.v1.ChangelistB\x03\xe0A\x02R\n" +- "changelist\x12(\n" +- "\rchangelist_id\x18\x03 \x01(\tB\x03\xe0A\x02R\fchangelistId\"K\n" +- "\x14GetChangelistRequest\x123\n" +- "\x04name\x18\x01 \x01(\tB\x1f\xe0A\x02\xfaA\x19\n" +- "\x17bytebase.com/ChangelistR\x04name\"N\n" +- "\x16ListChangelistsRequest\x124\n" +- "\x06parent\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +- "\x14bytebase.com/ProjectR\x06parent\"T\n" +- "\x17ListChangelistsResponse\x129\n" +- "\vchangelists\x18\x01 \x03(\v2\x17.bytebase.v1.ChangelistR\vchangelists\"\xb9\x01\n" +- "\x17UpdateChangelistRequest\x12<\n" +- "\n" +- "changelist\x18\x01 \x01(\v2\x17.bytebase.v1.ChangelistB\x03\xe0A\x02R\n" +- "changelist\x12;\n" +- "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" +- "updateMask\x12#\n" +- "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"N\n" +- "\x17DeleteChangelistRequest\x123\n" +- "\x04name\x18\x01 \x01(\tB\x1f\xe0A\x02\xfaA\x19\n" +- "\x17bytebase.com/ChangelistR\x04name\"\xf2\x02\n" +- "\n" +- "Changelist\x12\x1a\n" +- "\x04name\x18\x01 \x01(\tB\x06\xe0A\x02\xe0A\x05R\x04name\x12*\n" +- "\vdescription\x18\x02 \x01(\tB\b\xbaH\x05r\x03\x18\xe8\aR\vdescription\x12\x1d\n" +- "\acreator\x18\x03 \x01(\tB\x03\xe0A\x03R\acreator\x12@\n" +- "\vupdate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +- "updateTime\x128\n" +- "\achanges\x18\a \x03(\v2\x1e.bytebase.v1.Changelist.ChangeR\achanges\x1a6\n" +- "\x06Change\x12\x14\n" +- "\x05sheet\x18\x01 \x01(\tR\x05sheet\x12\x16\n" +- "\x06source\x18\x02 \x01(\tR\x06source:I\xeaAF\n" +- "\x17bytebase.com/Changelist\x12+projects/{project}/changelists/{changelist}2\xa9\a\n" +- "\x11ChangelistService\x12\xbb\x01\n" +- "\x10CreateChangelist\x12$.bytebase.v1.CreateChangelistRequest\x1a\x17.bytebase.v1.Changelist\"h\xdaA\x11parent,changelist\x8a\xea0\x15bb.changelists.create\x90\xea0\x01\x82\xd3\xe4\x93\x021:\n" +- "changelist\"#/v1/{parent=projects/*}/changelists\x12\x99\x01\n" +- "\rGetChangelist\x12!.bytebase.v1.GetChangelistRequest\x1a\x17.bytebase.v1.Changelist\"L\xdaA\x04name\x8a\xea0\x12bb.changelists.get\x90\xea0\x01\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/changelists/*}\x12\xad\x01\n" +- "\x0fListChangelists\x12#.bytebase.v1.ListChangelistsRequest\x1a$.bytebase.v1.ListChangelistsResponse\"O\xdaA\x06parent\x8a\xea0\x13bb.changelists.list\x90\xea0\x01\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=projects/*}/changelists\x12\xe5\x01\n" +- "\x10UpdateChangelist\x12$.bytebase.v1.UpdateChangelistRequest\x1a\x17.bytebase.v1.Changelist\"\x91\x01\xdaA\x16changelist,update_mask\x8a\xea0\x15bb.changelists.update\x90\xea0\x01\xa2\xea0\x15bb.changelists.create\x82\xd3\xe4\x93\x02<:\n" +- "changelist2./v1/{changelist.name=projects/*/changelists/*}\x12\xa1\x01\n" +- "\x10DeleteChangelist\x12$.bytebase.v1.DeleteChangelistRequest\x1a\x16.google.protobuf.Empty\"O\xdaA\x04name\x8a\xea0\x15bb.changelists.delete\x90\xea0\x01\x82\xd3\xe4\x93\x02%*#/v1/{name=projects/*/changelists/*}B\xac\x01\n" +- "\x0fcom.bytebase.v1B\x16ChangelistServiceProtoP\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_changelist_service_proto_rawDescOnce sync.Once- file_v1_changelist_service_proto_rawDescData []byte-)--func file_v1_changelist_service_proto_rawDescGZIP() []byte {- file_v1_changelist_service_proto_rawDescOnce.Do(func() {- file_v1_changelist_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_changelist_service_proto_rawDesc), len(file_v1_changelist_service_proto_rawDesc)))- })- return file_v1_changelist_service_proto_rawDescData-}--var file_v1_changelist_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)-var file_v1_changelist_service_proto_goTypes = []any{- (*CreateChangelistRequest)(nil), // 0: bytebase.v1.CreateChangelistRequest- (*GetChangelistRequest)(nil), // 1: bytebase.v1.GetChangelistRequest- (*ListChangelistsRequest)(nil), // 2: bytebase.v1.ListChangelistsRequest- (*ListChangelistsResponse)(nil), // 3: bytebase.v1.ListChangelistsResponse- (*UpdateChangelistRequest)(nil), // 4: bytebase.v1.UpdateChangelistRequest- (*DeleteChangelistRequest)(nil), // 5: bytebase.v1.DeleteChangelistRequest- (*Changelist)(nil), // 6: bytebase.v1.Changelist- (*Changelist_Change)(nil), // 7: bytebase.v1.Changelist.Change- (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp- (*emptypb.Empty)(nil), // 10: google.protobuf.Empty-}-var file_v1_changelist_service_proto_depIdxs = []int32{- 6, // 0: bytebase.v1.CreateChangelistRequest.changelist:type_name -> bytebase.v1.Changelist- 6, // 1: bytebase.v1.ListChangelistsResponse.changelists:type_name -> bytebase.v1.Changelist- 6, // 2: bytebase.v1.UpdateChangelistRequest.changelist:type_name -> bytebase.v1.Changelist- 8, // 3: bytebase.v1.UpdateChangelistRequest.update_mask:type_name -> google.protobuf.FieldMask- 9, // 4: bytebase.v1.Changelist.update_time:type_name -> google.protobuf.Timestamp- 7, // 5: bytebase.v1.Changelist.changes:type_name -> bytebase.v1.Changelist.Change- 0, // 6: bytebase.v1.ChangelistService.CreateChangelist:input_type -> bytebase.v1.CreateChangelistRequest- 1, // 7: bytebase.v1.ChangelistService.GetChangelist:input_type -> bytebase.v1.GetChangelistRequest- 2, // 8: bytebase.v1.ChangelistService.ListChangelists:input_type -> bytebase.v1.ListChangelistsRequest- 4, // 9: bytebase.v1.ChangelistService.UpdateChangelist:input_type -> bytebase.v1.UpdateChangelistRequest- 5, // 10: bytebase.v1.ChangelistService.DeleteChangelist:input_type -> bytebase.v1.DeleteChangelistRequest- 6, // 11: bytebase.v1.ChangelistService.CreateChangelist:output_type -> bytebase.v1.Changelist- 6, // 12: bytebase.v1.ChangelistService.GetChangelist:output_type -> bytebase.v1.Changelist- 3, // 13: bytebase.v1.ChangelistService.ListChangelists:output_type -> bytebase.v1.ListChangelistsResponse- 6, // 14: bytebase.v1.ChangelistService.UpdateChangelist:output_type -> bytebase.v1.Changelist- 10, // 15: bytebase.v1.ChangelistService.DeleteChangelist:output_type -> google.protobuf.Empty- 11, // [11:16] is the sub-list for method output_type- 6, // [6:11] is the sub-list for method input_type- 6, // [6:6] is the sub-list for extension type_name- 6, // [6:6] is the sub-list for extension extendee- 0, // [0:6] is the sub-list for field type_name-}--func init() { file_v1_changelist_service_proto_init() }-func file_v1_changelist_service_proto_init() {- if File_v1_changelist_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_changelist_service_proto_rawDesc), len(file_v1_changelist_service_proto_rawDesc)),- NumEnums: 0,- NumMessages: 8,- NumExtensions: 0,- NumServices: 1,- },- GoTypes: file_v1_changelist_service_proto_goTypes,- DependencyIndexes: file_v1_changelist_service_proto_depIdxs,- MessageInfos: file_v1_changelist_service_proto_msgTypes,- }.Build()- File_v1_changelist_service_proto = out.File- file_v1_changelist_service_proto_goTypes = nil- file_v1_changelist_service_proto_depIdxs = nil-}diff --git a/backend/generated-go/v1/changelist_service.pb.gw.go b/backend/generated-go/v1/changelist_service.pb.gw.godeleted file mode 100644index 828763741f..0000000000--- a/backend/generated-go/v1/changelist_service.pb.gw.go+++ /dev/null@@ -1,543 +0,0 @@-// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.-// source: v1/changelist_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_ChangelistService_CreateChangelist_0 = &utilities.DoubleArray{Encoding: map[string]int{"changelist": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}--func request_ChangelistService_CreateChangelist_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelistServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq CreateChangelistRequest- metadata runtime.ServerMetadata- err error- )- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Changelist); err != nil && !errors.Is(err, io.EOF) {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- 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_ChangelistService_CreateChangelist_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- msg, err := client.CreateChangelist(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_ChangelistService_CreateChangelist_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelistServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq CreateChangelistRequest- metadata runtime.ServerMetadata- err error- )- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Changelist); err != nil && !errors.Is(err, io.EOF) {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- 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_ChangelistService_CreateChangelist_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- msg, err := server.CreateChangelist(ctx, &protoReq)- return msg, metadata, err-}--func request_ChangelistService_GetChangelist_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelistServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetChangelistRequest- 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)- }- msg, err := client.GetChangelist(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_ChangelistService_GetChangelist_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelistServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq GetChangelistRequest- 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)- }- msg, err := server.GetChangelist(ctx, &protoReq)- return msg, metadata, err-}--func request_ChangelistService_ListChangelists_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelistServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq ListChangelistsRequest- 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)- }- msg, err := client.ListChangelists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_ChangelistService_ListChangelists_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelistServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq ListChangelistsRequest- 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)- }- msg, err := server.ListChangelists(ctx, &protoReq)- return msg, metadata, err-}--var filter_ChangelistService_UpdateChangelist_0 = &utilities.DoubleArray{Encoding: map[string]int{"changelist": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}--func request_ChangelistService_UpdateChangelist_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelistServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq UpdateChangelistRequest- metadata runtime.ServerMetadata- err error- )- newReader, berr := utilities.IOReaderFactory(req.Body)- if berr != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)- }- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Changelist); err != nil && !errors.Is(err, io.EOF) {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if req.Body != nil {- _, _ = io.Copy(io.Discard, req.Body)- }- if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {- if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Changelist); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- } else {- protoReq.UpdateMask = fieldMask- }- }- val, ok := pathParams["changelist.name"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "changelist.name")- }- err = runtime.PopulateFieldFromPath(&protoReq, "changelist.name", val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "changelist.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_ChangelistService_UpdateChangelist_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- msg, err := client.UpdateChangelist(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_ChangelistService_UpdateChangelist_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelistServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq UpdateChangelistRequest- metadata runtime.ServerMetadata- err error- )- newReader, berr := utilities.IOReaderFactory(req.Body)- if berr != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)- }- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Changelist); err != nil && !errors.Is(err, io.EOF) {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {- if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Changelist); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- } else {- protoReq.UpdateMask = fieldMask- }- }- val, ok := pathParams["changelist.name"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "changelist.name")- }- err = runtime.PopulateFieldFromPath(&protoReq, "changelist.name", val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "changelist.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_ChangelistService_UpdateChangelist_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- msg, err := server.UpdateChangelist(ctx, &protoReq)- return msg, metadata, err-}--func request_ChangelistService_DeleteChangelist_0(ctx context.Context, marshaler runtime.Marshaler, client ChangelistServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq DeleteChangelistRequest- 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)- }- msg, err := client.DeleteChangelist(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_ChangelistService_DeleteChangelist_0(ctx context.Context, marshaler runtime.Marshaler, server ChangelistServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq DeleteChangelistRequest- 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)- }- msg, err := server.DeleteChangelist(ctx, &protoReq)- return msg, metadata, err-}--// RegisterChangelistServiceHandlerServer registers the http handlers for service ChangelistService to "mux".-// UnaryRPC :call ChangelistServiceServer 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 RegisterChangelistServiceHandlerFromEndpoint 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 RegisterChangelistServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChangelistServiceServer) error {- mux.Handle(http.MethodPost, pattern_ChangelistService_CreateChangelist_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.ChangelistService/CreateChangelist", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/changelists"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_ChangelistService_CreateChangelist_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_ChangelistService_CreateChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodGet, pattern_ChangelistService_GetChangelist_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.ChangelistService/GetChangelist", runtime.WithHTTPPathPattern("/v1/{name=projects/*/changelists/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_ChangelistService_GetChangelist_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_ChangelistService_GetChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodGet, pattern_ChangelistService_ListChangelists_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.ChangelistService/ListChangelists", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/changelists"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_ChangelistService_ListChangelists_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_ChangelistService_ListChangelists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodPatch, pattern_ChangelistService_UpdateChangelist_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.ChangelistService/UpdateChangelist", runtime.WithHTTPPathPattern("/v1/{changelist.name=projects/*/changelists/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_ChangelistService_UpdateChangelist_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_ChangelistService_UpdateChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodDelete, pattern_ChangelistService_DeleteChangelist_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.ChangelistService/DeleteChangelist", runtime.WithHTTPPathPattern("/v1/{name=projects/*/changelists/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_ChangelistService_DeleteChangelist_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_ChangelistService_DeleteChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })-- return nil-}--// RegisterChangelistServiceHandlerFromEndpoint is same as RegisterChangelistServiceHandler but-// automatically dials to "endpoint" and closes the connection when "ctx" gets done.-func RegisterChangelistServiceHandlerFromEndpoint(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 RegisterChangelistServiceHandler(ctx, mux, conn)-}--// RegisterChangelistServiceHandler registers the http handlers for service ChangelistService to "mux".-// The handlers forward requests to the grpc endpoint over "conn".-func RegisterChangelistServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {- return RegisterChangelistServiceHandlerClient(ctx, mux, NewChangelistServiceClient(conn))-}--// RegisterChangelistServiceHandlerClient registers the http handlers for service ChangelistService-// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChangelistServiceClient".-// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChangelistServiceClient"-// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in-// "ChangelistServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.-func RegisterChangelistServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChangelistServiceClient) error {- mux.Handle(http.MethodPost, pattern_ChangelistService_CreateChangelist_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.ChangelistService/CreateChangelist", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/changelists"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_ChangelistService_CreateChangelist_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ChangelistService_CreateChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodGet, pattern_ChangelistService_GetChangelist_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.ChangelistService/GetChangelist", runtime.WithHTTPPathPattern("/v1/{name=projects/*/changelists/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_ChangelistService_GetChangelist_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ChangelistService_GetChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodGet, pattern_ChangelistService_ListChangelists_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.ChangelistService/ListChangelists", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/changelists"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_ChangelistService_ListChangelists_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ChangelistService_ListChangelists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodPatch, pattern_ChangelistService_UpdateChangelist_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.ChangelistService/UpdateChangelist", runtime.WithHTTPPathPattern("/v1/{changelist.name=projects/*/changelists/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_ChangelistService_UpdateChangelist_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ChangelistService_UpdateChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- mux.Handle(http.MethodDelete, pattern_ChangelistService_DeleteChangelist_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.ChangelistService/DeleteChangelist", runtime.WithHTTPPathPattern("/v1/{name=projects/*/changelists/*}"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_ChangelistService_DeleteChangelist_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_ChangelistService_DeleteChangelist_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })- return nil-}--var (- pattern_ChangelistService_CreateChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "changelists"}, ""))- pattern_ChangelistService_GetChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "changelists", "name"}, ""))- pattern_ChangelistService_ListChangelists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "changelists"}, ""))- pattern_ChangelistService_UpdateChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "changelists", "changelist.name"}, ""))- pattern_ChangelistService_DeleteChangelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "changelists", "name"}, ""))-)--var (- forward_ChangelistService_CreateChangelist_0 = runtime.ForwardResponseMessage- forward_ChangelistService_GetChangelist_0 = runtime.ForwardResponseMessage- forward_ChangelistService_ListChangelists_0 = runtime.ForwardResponseMessage- forward_ChangelistService_UpdateChangelist_0 = runtime.ForwardResponseMessage- forward_ChangelistService_DeleteChangelist_0 = runtime.ForwardResponseMessage-)diff --git a/backend/generated-go/v1/changelist_service_equal.pb.go b/backend/generated-go/v1/changelist_service_equal.pb.godeleted file mode 100644index e770ec1660..0000000000--- a/backend/generated-go/v1/changelist_service_equal.pb.go+++ /dev/null@@ -1,154 +0,0 @@-// Code generated by protoc-gen-equal-go. DO NOT EDIT.-// source: v1/changelist_service.proto--package v1--import (- proto "google.golang.org/protobuf/proto"- fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"-)--func (x *CreateChangelistRequest) Equal(y *CreateChangelistRequest) 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.Changelist.Equal(y.Changelist) {- return false- }- if x.ChangelistId != y.ChangelistId {- return false- }- return true-}--func (x *GetChangelistRequest) Equal(y *GetChangelistRequest) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Name != y.Name {- return false- }- return true-}--func (x *ListChangelistsRequest) Equal(y *ListChangelistsRequest) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Parent != y.Parent {- return false- }- return true-}--func (x *ListChangelistsResponse) Equal(y *ListChangelistsResponse) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if len(x.Changelists) != len(y.Changelists) {- return false- }- for i := 0; i < len(x.Changelists); i++ {- if !x.Changelists[i].Equal(y.Changelists[i]) {- return false- }- }- return true-}--func (x *UpdateChangelistRequest) Equal(y *UpdateChangelistRequest) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if !x.Changelist.Equal(y.Changelist) {- return false- }- if equal, ok := interface{}(x.UpdateMask).(interface {- Equal(*fieldmaskpb.FieldMask) bool- }); !ok || !equal.Equal(y.UpdateMask) {- return false- } else if !proto.Equal(x.UpdateMask, y.UpdateMask) {- return false- }- if x.AllowMissing != y.AllowMissing {- return false- }- return true-}--func (x *DeleteChangelistRequest) Equal(y *DeleteChangelistRequest) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Name != y.Name {- return false- }- return true-}--func (x *Changelist_Change) Equal(y *Changelist_Change) bool {- if x == y {- return true- }- if x == nil || y == nil {- return x == nil && y == nil- }- if x.Sheet != y.Sheet {- return false- }- if x.Source != y.Source {- return false- }- return true-}--func (x *Changelist) Equal(y *Changelist) 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.Description != y.Description {- return false- }- if x.Creator != y.Creator {- return false- }- if p, q := x.UpdateTime, y.UpdateTime; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {- return false- }- if len(x.Changes) != len(y.Changes) {- return false- }- for i := 0; i < len(x.Changes); i++ {- if !x.Changes[i].Equal(y.Changes[i]) {- return false- }- }- return true-}diff --git a/backend/generated-go/v1/changelist_service_grpc.pb.go b/backend/generated-go/v1/changelist_service_grpc.pb.godeleted file mode 100644index 9efa7d4d7c..0000000000--- a/backend/generated-go/v1/changelist_service_grpc.pb.go+++ /dev/null@@ -1,300 +0,0 @@-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.-// versions:-// - protoc-gen-go-grpc v1.5.1-// - protoc (unknown)-// source: v1/changelist_service.proto--package v1--import (- context "context"- grpc "google.golang.org/grpc"- codes "google.golang.org/grpc/codes"- status "google.golang.org/grpc/status"- emptypb "google.golang.org/protobuf/types/known/emptypb"-)--// 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 (- ChangelistService_CreateChangelist_FullMethodName = "/bytebase.v1.ChangelistService/CreateChangelist"- ChangelistService_GetChangelist_FullMethodName = "/bytebase.v1.ChangelistService/GetChangelist"- ChangelistService_ListChangelists_FullMethodName = "/bytebase.v1.ChangelistService/ListChangelists"- ChangelistService_UpdateChangelist_FullMethodName = "/bytebase.v1.ChangelistService/UpdateChangelist"- ChangelistService_DeleteChangelist_FullMethodName = "/bytebase.v1.ChangelistService/DeleteChangelist"-)--// ChangelistServiceClient is the client API for ChangelistService 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.-//-// ChangelistService manages changelists for grouping and organizing database changes.-type ChangelistServiceClient interface {- // Creates a new changelist in a project.- // Permissions required: bb.changelists.create- CreateChangelist(ctx context.Context, in *CreateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error)- // Gets a changelist by name.- // Permissions required: bb.changelists.get- GetChangelist(ctx context.Context, in *GetChangelistRequest, opts ...grpc.CallOption) (*Changelist, error)- // Lists changelists in a project.- // Permissions required: bb.changelists.list- ListChangelists(ctx context.Context, in *ListChangelistsRequest, opts ...grpc.CallOption) (*ListChangelistsResponse, error)- // Updates a changelist.- // Permissions required: bb.changelists.update- // When allow_missing=true, also requires: bb.changelists.create- UpdateChangelist(ctx context.Context, in *UpdateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error)- // Deletes a changelist.- // Permissions required: bb.changelists.delete- DeleteChangelist(ctx context.Context, in *DeleteChangelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)-}--type changelistServiceClient struct {- cc grpc.ClientConnInterface-}--func NewChangelistServiceClient(cc grpc.ClientConnInterface) ChangelistServiceClient {- return &changelistServiceClient{cc}-}--func (c *changelistServiceClient) CreateChangelist(ctx context.Context, in *CreateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(Changelist)- err := c.cc.Invoke(ctx, ChangelistService_CreateChangelist_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}--func (c *changelistServiceClient) GetChangelist(ctx context.Context, in *GetChangelistRequest, opts ...grpc.CallOption) (*Changelist, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(Changelist)- err := c.cc.Invoke(ctx, ChangelistService_GetChangelist_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}--func (c *changelistServiceClient) ListChangelists(ctx context.Context, in *ListChangelistsRequest, opts ...grpc.CallOption) (*ListChangelistsResponse, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(ListChangelistsResponse)- err := c.cc.Invoke(ctx, ChangelistService_ListChangelists_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}--func (c *changelistServiceClient) UpdateChangelist(ctx context.Context, in *UpdateChangelistRequest, opts ...grpc.CallOption) (*Changelist, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(Changelist)- err := c.cc.Invoke(ctx, ChangelistService_UpdateChangelist_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}--func (c *changelistServiceClient) DeleteChangelist(ctx context.Context, in *DeleteChangelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(emptypb.Empty)- err := c.cc.Invoke(ctx, ChangelistService_DeleteChangelist_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}--// ChangelistServiceServer is the server API for ChangelistService service.-// All implementations must embed UnimplementedChangelistServiceServer-// for forward compatibility.-//-// ChangelistService manages changelists for grouping and organizing database changes.-type ChangelistServiceServer interface {- // Creates a new changelist in a project.- // Permissions required: bb.changelists.create- CreateChangelist(context.Context, *CreateChangelistRequest) (*Changelist, error)- // Gets a changelist by name.- // Permissions required: bb.changelists.get- GetChangelist(context.Context, *GetChangelistRequest) (*Changelist, error)- // Lists changelists in a project.- // Permissions required: bb.changelists.list- ListChangelists(context.Context, *ListChangelistsRequest) (*ListChangelistsResponse, error)- // Updates a changelist.- // Permissions required: bb.changelists.update- // When allow_missing=true, also requires: bb.changelists.create- UpdateChangelist(context.Context, *UpdateChangelistRequest) (*Changelist, error)- // Deletes a changelist.- // Permissions required: bb.changelists.delete- DeleteChangelist(context.Context, *DeleteChangelistRequest) (*emptypb.Empty, error)- mustEmbedUnimplementedChangelistServiceServer()-}--// UnimplementedChangelistServiceServer 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 UnimplementedChangelistServiceServer struct{}--func (UnimplementedChangelistServiceServer) CreateChangelist(context.Context, *CreateChangelistRequest) (*Changelist, error) {- return nil, status.Errorf(codes.Unimplemented, "method CreateChangelist not implemented")-}-func (UnimplementedChangelistServiceServer) GetChangelist(context.Context, *GetChangelistRequest) (*Changelist, error) {- return nil, status.Errorf(codes.Unimplemented, "method GetChangelist not implemented")-}-func (UnimplementedChangelistServiceServer) ListChangelists(context.Context, *ListChangelistsRequest) (*ListChangelistsResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method ListChangelists not implemented")-}-func (UnimplementedChangelistServiceServer) UpdateChangelist(context.Context, *UpdateChangelistRequest) (*Changelist, error) {- return nil, status.Errorf(codes.Unimplemented, "method UpdateChangelist not implemented")-}-func (UnimplementedChangelistServiceServer) DeleteChangelist(context.Context, *DeleteChangelistRequest) (*emptypb.Empty, error) {- return nil, status.Errorf(codes.Unimplemented, "method DeleteChangelist not implemented")-}-func (UnimplementedChangelistServiceServer) mustEmbedUnimplementedChangelistServiceServer() {}-func (UnimplementedChangelistServiceServer) testEmbeddedByValue() {}--// UnsafeChangelistServiceServer may be embedded to opt out of forward compatibility for this service.-// Use of this interface is not recommended, as added methods to ChangelistServiceServer will-// result in compilation errors.-type UnsafeChangelistServiceServer interface {- mustEmbedUnimplementedChangelistServiceServer()-}--func RegisterChangelistServiceServer(s grpc.ServiceRegistrar, srv ChangelistServiceServer) {- // If the following call pancis, it indicates UnimplementedChangelistServiceServer 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(&ChangelistService_ServiceDesc, srv)-}--func _ChangelistService_CreateChangelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(CreateChangelistRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(ChangelistServiceServer).CreateChangelist(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: ChangelistService_CreateChangelist_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(ChangelistServiceServer).CreateChangelist(ctx, req.(*CreateChangelistRequest))- }- return interceptor(ctx, in, info, handler)-}--func _ChangelistService_GetChangelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(GetChangelistRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(ChangelistServiceServer).GetChangelist(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: ChangelistService_GetChangelist_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(ChangelistServiceServer).GetChangelist(ctx, req.(*GetChangelistRequest))- }- return interceptor(ctx, in, info, handler)-}--func _ChangelistService_ListChangelists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(ListChangelistsRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(ChangelistServiceServer).ListChangelists(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: ChangelistService_ListChangelists_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(ChangelistServiceServer).ListChangelists(ctx, req.(*ListChangelistsRequest))- }- return interceptor(ctx, in, info, handler)-}--func _ChangelistService_UpdateChangelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(UpdateChangelistRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(ChangelistServiceServer).UpdateChangelist(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: ChangelistService_UpdateChangelist_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(ChangelistServiceServer).UpdateChangelist(ctx, req.(*UpdateChangelistRequest))- }- return interceptor(ctx, in, info, handler)-}--func _ChangelistService_DeleteChangelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(DeleteChangelistRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(ChangelistServiceServer).DeleteChangelist(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: ChangelistService_DeleteChangelist_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(ChangelistServiceServer).DeleteChangelist(ctx, req.(*DeleteChangelistRequest))- }- return interceptor(ctx, in, info, handler)-}--// ChangelistService_ServiceDesc is the grpc.ServiceDesc for ChangelistService service.-// It's only intended for direct use with grpc.RegisterService,-// and not to be introspected or modified (even as a copy)-var ChangelistService_ServiceDesc = grpc.ServiceDesc{- ServiceName: "bytebase.v1.ChangelistService",- HandlerType: (*ChangelistServiceServer)(nil),- Methods: []grpc.MethodDesc{- {- MethodName: "CreateChangelist",- Handler: _ChangelistService_CreateChangelist_Handler,- },- {- MethodName: "GetChangelist",- Handler: _ChangelistService_GetChangelist_Handler,- },- {- MethodName: "ListChangelists",- Handler: _ChangelistService_ListChangelists_Handler,- },- {- MethodName: "UpdateChangelist",- Handler: _ChangelistService_UpdateChangelist_Handler,- },- {- MethodName: "DeleteChangelist",- Handler: _ChangelistService_DeleteChangelist_Handler,- },- },- Streams: []grpc.StreamDesc{},- Metadata: "v1/changelist_service.proto",-}diff --git a/backend/generated-go/v1/subscription_service.pb.go b/backend/generated-go/v1/subscription_service.pb.goindex 412c48aa61..c1b2305f91 100644--- a/backend/generated-go/v1/subscription_service.pb.go+++ b/backend/generated-go/v1/subscription_service.pb.go@@ -98,7 +98,6 @@ const (PlanFeature_FEATURE_SCHEDULED_ROLLOUT_TIME PlanFeature = 11PlanFeature_FEATURE_DATABASE_CHANGELOG PlanFeature = 12PlanFeature_FEATURE_SCHEMA_DRIFT_DETECTION PlanFeature = 13- PlanFeature_FEATURE_CHANGELIST PlanFeature = 14PlanFeature_FEATURE_SCHEMA_TEMPLATE PlanFeature = 15PlanFeature_FEATURE_ROLLOUT_POLICY PlanFeature = 16// SQL Editor & Development@@ -179,7 +178,6 @@ var (11: "FEATURE_SCHEDULED_ROLLOUT_TIME",12: "FEATURE_DATABASE_CHANGELOG",13: "FEATURE_SCHEMA_DRIFT_DETECTION",- 14: "FEATURE_CHANGELIST",15: "FEATURE_SCHEMA_TEMPLATE",16: "FEATURE_ROLLOUT_POLICY",17: "FEATURE_WEB_BASED_SQL_EDITOR",@@ -254,7 +252,6 @@ var ("FEATURE_SCHEDULED_ROLLOUT_TIME": 11,"FEATURE_DATABASE_CHANGELOG": 12,"FEATURE_SCHEMA_DRIFT_DETECTION": 13,- "FEATURE_CHANGELIST": 14,"FEATURE_SCHEMA_TEMPLATE": 15,"FEATURE_ROLLOUT_POLICY": 16,"FEATURE_WEB_BASED_SQL_EDITOR": 17,@@ -678,7 +675,7 @@ const file_v1_subscription_service_proto_rawDesc = "" +"\x04FREE\x10\x01\x12\b\n" +"\x04TEAM\x10\x02\x12\x0e\n" +"\n" +- "ENTERPRISE\x10\x03*\x88\x13\n" ++ "ENTERPRISE\x10\x03*\xf0\x12\n" +"\vPlanFeature\x12\x17\n" +"\x13FEATURE_UNSPECIFIED\x10\x00\x12\x1b\n" +"\x17FEATURE_DATABASE_CHANGE\x10\x01\x12,\n" +@@ -694,8 +691,7 @@ const file_v1_subscription_service_proto_rawDesc = "" +"\x12\"\n" +"\x1eFEATURE_SCHEDULED_ROLLOUT_TIME\x10\v\x12\x1e\n" +"\x1aFEATURE_DATABASE_CHANGELOG\x10\f\x12\"\n" +- "\x1eFEATURE_SCHEMA_DRIFT_DETECTION\x10\r\x12\x16\n" +- "\x12FEATURE_CHANGELIST\x10\x0e\x12\x1b\n" ++ "\x1eFEATURE_SCHEMA_DRIFT_DETECTION\x10\r\x12\x1b\n" +"\x17FEATURE_SCHEMA_TEMPLATE\x10\x0f\x12\x1a\n" +"\x16FEATURE_ROLLOUT_POLICY\x10\x10\x12 \n" +"\x1cFEATURE_WEB_BASED_SQL_EDITOR\x10\x11\x12!\n" +diff --git a/backend/generated-go/v1/v1connect/changelist_service.connect.go b/backend/generated-go/v1/v1connect/changelist_service.connect.godeleted file mode 100644index 9384628acd..0000000000--- a/backend/generated-go/v1/v1connect/changelist_service.connect.go+++ /dev/null@@ -1,248 +0,0 @@-// Code generated by protoc-gen-connect-go. DO NOT EDIT.-//-// Source: v1/changelist_service.proto--package v1connect--import (- connect "connectrpc.com/connect"- context "context"- errors "errors"- v1 "github.com/bytebase/bytebase/backend/generated-go/v1"- emptypb "google.golang.org/protobuf/types/known/emptypb"- 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 (- // ChangelistServiceName is the fully-qualified name of the ChangelistService service.- ChangelistServiceName = "bytebase.v1.ChangelistService"-)--// 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 (- // ChangelistServiceCreateChangelistProcedure is the fully-qualified name of the ChangelistService's- // CreateChangelist RPC.- ChangelistServiceCreateChangelistProcedure = "/bytebase.v1.ChangelistService/CreateChangelist"- // ChangelistServiceGetChangelistProcedure is the fully-qualified name of the ChangelistService's- // GetChangelist RPC.- ChangelistServiceGetChangelistProcedure = "/bytebase.v1.ChangelistService/GetChangelist"- // ChangelistServiceListChangelistsProcedure is the fully-qualified name of the ChangelistService's- // ListChangelists RPC.- ChangelistServiceListChangelistsProcedure = "/bytebase.v1.ChangelistService/ListChangelists"- // ChangelistServiceUpdateChangelistProcedure is the fully-qualified name of the ChangelistService's- // UpdateChangelist RPC.- ChangelistServiceUpdateChangelistProcedure = "/bytebase.v1.ChangelistService/UpdateChangelist"- // ChangelistServiceDeleteChangelistProcedure is the fully-qualified name of the ChangelistService's- // DeleteChangelist RPC.- ChangelistServiceDeleteChangelistProcedure = "/bytebase.v1.ChangelistService/DeleteChangelist"-)--// ChangelistServiceClient is a client for the bytebase.v1.ChangelistService service.-type ChangelistServiceClient interface {- // Creates a new changelist in a project.- // Permissions required: bb.changelists.create- CreateChangelist(context.Context, *connect.Request[v1.CreateChangelistRequest]) (*connect.Response[v1.Changelist], error)- // Gets a changelist by name.- // Permissions required: bb.changelists.get- GetChangelist(context.Context, *connect.Request[v1.GetChangelistRequest]) (*connect.Response[v1.Changelist], error)- // Lists changelists in a project.- // Permissions required: bb.changelists.list- ListChangelists(context.Context, *connect.Request[v1.ListChangelistsRequest]) (*connect.Response[v1.ListChangelistsResponse], error)- // Updates a changelist.- // Permissions required: bb.changelists.update- // When allow_missing=true, also requires: bb.changelists.create- UpdateChangelist(context.Context, *connect.Request[v1.UpdateChangelistRequest]) (*connect.Response[v1.Changelist], error)- // Deletes a changelist.- // Permissions required: bb.changelists.delete- DeleteChangelist(context.Context, *connect.Request[v1.DeleteChangelistRequest]) (*connect.Response[emptypb.Empty], error)-}--// NewChangelistServiceClient constructs a client for the bytebase.v1.ChangelistService 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 NewChangelistServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChangelistServiceClient {- baseURL = strings.TrimRight(baseURL, "/")- changelistServiceMethods := v1.File_v1_changelist_service_proto.Services().ByName("ChangelistService").Methods()- return &changelistServiceClient{- createChangelist: connect.NewClient[v1.CreateChangelistRequest, v1.Changelist](- httpClient,- baseURL+ChangelistServiceCreateChangelistProcedure,- connect.WithSchema(changelistServiceMethods.ByName("CreateChangelist")),- connect.WithClientOptions(opts...),- ),- getChangelist: connect.NewClient[v1.GetChangelistRequest, v1.Changelist](- httpClient,- baseURL+ChangelistServiceGetChangelistProcedure,- connect.WithSchema(changelistServiceMethods.ByName("GetChangelist")),- connect.WithClientOptions(opts...),- ),- listChangelists: connect.NewClient[v1.ListChangelistsRequest, v1.ListChangelistsResponse](- httpClient,- baseURL+ChangelistServiceListChangelistsProcedure,- connect.WithSchema(changelistServiceMethods.ByName("ListChangelists")),- connect.WithClientOptions(opts...),- ),- updateChangelist: connect.NewClient[v1.UpdateChangelistRequest, v1.Changelist](- httpClient,- baseURL+ChangelistServiceUpdateChangelistProcedure,- connect.WithSchema(changelistServiceMethods.ByName("UpdateChangelist")),- connect.WithClientOptions(opts...),- ),- deleteChangelist: connect.NewClient[v1.DeleteChangelistRequest, emptypb.Empty](- httpClient,- baseURL+ChangelistServiceDeleteChangelistProcedure,- connect.WithSchema(changelistServiceMethods.ByName("DeleteChangelist")),- connect.WithClientOptions(opts...),- ),- }-}--// changelistServiceClient implements ChangelistServiceClient.-type changelistServiceClient struct {- createChangelist *connect.Client[v1.CreateChangelistRequest, v1.Changelist]- getChangelist *connect.Client[v1.GetChangelistRequest, v1.Changelist]- listChangelists *connect.Client[v1.ListChangelistsRequest, v1.ListChangelistsResponse]- updateChangelist *connect.Client[v1.UpdateChangelistRequest, v1.Changelist]- deleteChangelist *connect.Client[v1.DeleteChangelistRequest, emptypb.Empty]-}--// CreateChangelist calls bytebase.v1.ChangelistService.CreateChangelist.-func (c *changelistServiceClient) CreateChangelist(ctx context.Context, req *connect.Request[v1.CreateChangelistRequest]) (*connect.Response[v1.Changelist], error) {- return c.createChangelist.CallUnary(ctx, req)-}--// GetChangelist calls bytebase.v1.ChangelistService.GetChangelist.-func (c *changelistServiceClient) GetChangelist(ctx context.Context, req *connect.Request[v1.GetChangelistRequest]) (*connect.Response[v1.Changelist], error) {- return c.getChangelist.CallUnary(ctx, req)-}--// ListChangelists calls bytebase.v1.ChangelistService.ListChangelists.-func (c *changelistServiceClient) ListChangelists(ctx context.Context, req *connect.Request[v1.ListChangelistsRequest]) (*connect.Response[v1.ListChangelistsResponse], error) {- return c.listChangelists.CallUnary(ctx, req)-}--// UpdateChangelist calls bytebase.v1.ChangelistService.UpdateChangelist.-func (c *changelistServiceClient) UpdateChangelist(ctx context.Context, req *connect.Request[v1.UpdateChangelistRequest]) (*connect.Response[v1.Changelist], error) {- return c.updateChangelist.CallUnary(ctx, req)-}--// DeleteChangelist calls bytebase.v1.ChangelistService.DeleteChangelist.-func (c *changelistServiceClient) DeleteChangelist(ctx context.Context, req *connect.Request[v1.DeleteChangelistRequest]) (*connect.Response[emptypb.Empty], error) {- return c.deleteChangelist.CallUnary(ctx, req)-}--// ChangelistServiceHandler is an implementation of the bytebase.v1.ChangelistService service.-type ChangelistServiceHandler interface {- // Creates a new changelist in a project.- // Permissions required: bb.changelists.create- CreateChangelist(context.Context, *connect.Request[v1.CreateChangelistRequest]) (*connect.Response[v1.Changelist], error)- // Gets a changelist by name.- // Permissions required: bb.changelists.get- GetChangelist(context.Context, *connect.Request[v1.GetChangelistRequest]) (*connect.Response[v1.Changelist], error)- // Lists changelists in a project.- // Permissions required: bb.changelists.list- ListChangelists(context.Context, *connect.Request[v1.ListChangelistsRequest]) (*connect.Response[v1.ListChangelistsResponse], error)- // Updates a changelist.- // Permissions required: bb.changelists.update- // When allow_missing=true, also requires: bb.changelists.create- UpdateChangelist(context.Context, *connect.Request[v1.UpdateChangelistRequest]) (*connect.Response[v1.Changelist], error)- // Deletes a changelist.- // Permissions required: bb.changelists.delete- DeleteChangelist(context.Context, *connect.Request[v1.DeleteChangelistRequest]) (*connect.Response[emptypb.Empty], error)-}--// NewChangelistServiceHandler 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 NewChangelistServiceHandler(svc ChangelistServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {- changelistServiceMethods := v1.File_v1_changelist_service_proto.Services().ByName("ChangelistService").Methods()- changelistServiceCreateChangelistHandler := connect.NewUnaryHandler(- ChangelistServiceCreateChangelistProcedure,- svc.CreateChangelist,- connect.WithSchema(changelistServiceMethods.ByName("CreateChangelist")),- connect.WithHandlerOptions(opts...),- )- changelistServiceGetChangelistHandler := connect.NewUnaryHandler(- ChangelistServiceGetChangelistProcedure,- svc.GetChangelist,- connect.WithSchema(changelistServiceMethods.ByName("GetChangelist")),- connect.WithHandlerOptions(opts...),- )- changelistServiceListChangelistsHandler := connect.NewUnaryHandler(- ChangelistServiceListChangelistsProcedure,- svc.ListChangelists,- connect.WithSchema(changelistServiceMethods.ByName("ListChangelists")),- connect.WithHandlerOptions(opts...),- )- changelistServiceUpdateChangelistHandler := connect.NewUnaryHandler(- ChangelistServiceUpdateChangelistProcedure,- svc.UpdateChangelist,- connect.WithSchema(changelistServiceMethods.ByName("UpdateChangelist")),- connect.WithHandlerOptions(opts...),- )- changelistServiceDeleteChangelistHandler := connect.NewUnaryHandler(- ChangelistServiceDeleteChangelistProcedure,- svc.DeleteChangelist,- connect.WithSchema(changelistServiceMethods.ByName("DeleteChangelist")),- connect.WithHandlerOptions(opts...),- )- return "/bytebase.v1.ChangelistService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {- switch r.URL.Path {- case ChangelistServiceCreateChangelistProcedure:- changelistServiceCreateChangelistHandler.ServeHTTP(w, r)- case ChangelistServiceGetChangelistProcedure:- changelistServiceGetChangelistHandler.ServeHTTP(w, r)- case ChangelistServiceListChangelistsProcedure:- changelistServiceListChangelistsHandler.ServeHTTP(w, r)- case ChangelistServiceUpdateChangelistProcedure:- changelistServiceUpdateChangelistHandler.ServeHTTP(w, r)- case ChangelistServiceDeleteChangelistProcedure:- changelistServiceDeleteChangelistHandler.ServeHTTP(w, r)- default:- http.NotFound(w, r)- }- })-}--// UnimplementedChangelistServiceHandler returns CodeUnimplemented from all methods.-type UnimplementedChangelistServiceHandler struct{}--func (UnimplementedChangelistServiceHandler) CreateChangelist(context.Context, *connect.Request[v1.CreateChangelistRequest]) (*connect.Response[v1.Changelist], error) {- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelistService.CreateChangelist is not implemented"))-}--func (UnimplementedChangelistServiceHandler) GetChangelist(context.Context, *connect.Request[v1.GetChangelistRequest]) (*connect.Response[v1.Changelist], error) {- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelistService.GetChangelist is not implemented"))-}--func (UnimplementedChangelistServiceHandler) ListChangelists(context.Context, *connect.Request[v1.ListChangelistsRequest]) (*connect.Response[v1.ListChangelistsResponse], error) {- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelistService.ListChangelists is not implemented"))-}--func (UnimplementedChangelistServiceHandler) UpdateChangelist(context.Context, *connect.Request[v1.UpdateChangelistRequest]) (*connect.Response[v1.Changelist], error) {- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelistService.UpdateChangelist is not implemented"))-}--func (UnimplementedChangelistServiceHandler) DeleteChangelist(context.Context, *connect.Request[v1.DeleteChangelistRequest]) (*connect.Response[emptypb.Empty], error) {- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ChangelistService.DeleteChangelist is not implemented"))-}diff --git a/backend/migrator/migration/3.12/0003##drop_changelist.sql b/backend/migrator/migration/3.12/0003##drop_changelist.sqlnew file mode 100644index 0000000000..861b8a5090--- /dev/null+++ b/backend/migrator/migration/3.12/0003##drop_changelist.sql@@ -0,0 +1,17 @@+-- Remove changelist permissions from existing roles+UPDATE role+SET permissions = jsonb_set(permissions, '{permissions}',+ (permissions->'permissions')::jsonb+ - 'bb.changelists.create'+ - 'bb.changelists.delete'+ - 'bb.changelists.get'+ - 'bb.changelists.list'+ - 'bb.changelists.update'+);++-- Drop the changelist table and related objects.+DROP INDEX IF EXISTS idx_changelist_project_name;++DROP TABLE IF EXISTS changelist;++DROP SEQUENCE IF EXISTS changelist_id_seq;diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sqlindex 90ba8463b9..3aa176f330 100644--- a/backend/migrator/migration/LATEST.sql+++ b/backend/migrator/migration/LATEST.sql@@ -453,21 +453,6 @@ CREATE UNIQUE INDEX idx_db_group_unique_project_resource_id ON db_group(project,ALTER SEQUENCE db_group_id_seq RESTART WITH 101;--- changelist table stores project changelists.-CREATE TABLE changelist (- id serial PRIMARY KEY,- creator_id integer NOT NULL REFERENCES principal (id),- updated_at timestamptz NOT NULL DEFAULT now(),- project text NOT NULL REFERENCES project(resource_id),- name text NOT NULL,- -- Stored as Changelist (proto/store/store/changelist.proto)- payload jsonb NOT NULL DEFAULT '{}'-);--CREATE UNIQUE INDEX idx_changelist_project_name ON changelist(project, name);--ALTER SEQUENCE changelist_id_seq RESTART WITH 101;-CREATE TABLE export_archive (id serial PRIMARY KEY,created_at timestamptz NOT NULL DEFAULT now(),diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 78eae77bf2..431f90f733 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -12,7 +12,7 @@ import (func TestLatestVersion(t *testing.T) {files, err := getSortedVersionedFiles()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.12.2"), *files[len(files)-1].version)+ require.Equal(t, semver.MustParse("3.12.3"), *files[len(files)-1].version)}func TestVersionUnique(t *testing.T) {diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.goindex ccd95ce2de..baa455c38e 100644--- a/backend/server/grpc_routes.go+++ b/backend/server/grpc_routes.go@@ -75,7 +75,6 @@ func configureGrpcRouters(auditLogService := apiv1.NewAuditLogService(stores, iamManager, licenseService)authService := apiv1.NewAuthService(stores, secret, licenseService, metricReporter, profile, stateCfg, iamManager)celService := apiv1.NewCelService()- changelistService := apiv1.NewChangelistService(stores, profile, iamManager)databaseCatalogService := apiv1.NewDatabaseCatalogService(stores, licenseService)databaseGroupService := apiv1.NewDatabaseGroupService(stores, profile, iamManager, licenseService)databaseService := apiv1.NewDatabaseService(stores, schemaSyncer, licenseService, profile, iamManager)@@ -136,9 +135,6 @@ func configureGrpcRouters(celPath, celHandler := v1connect.NewCelServiceHandler(celService, handlerOpts)connectHandlers[celPath] = celHandler- changelistPath, changelistHandler := v1connect.NewChangelistServiceHandler(changelistService, handlerOpts)- connectHandlers[changelistPath] = changelistHandler-databaseCatalogPath, databaseCatalogHandler := v1connect.NewDatabaseCatalogServiceHandler(databaseCatalogService, handlerOpts)connectHandlers[databaseCatalogPath] = databaseCatalogHandler@@ -217,7 +213,6 @@ func configureGrpcRouters(v1connect.AuditLogServiceName,v1connect.AuthServiceName,v1connect.CelServiceName,- v1connect.ChangelistServiceName,v1connect.DatabaseCatalogServiceName,v1connect.DatabaseGroupServiceName,v1connect.DatabaseServiceName,@@ -274,9 +269,6 @@ func configureGrpcRouters(if err := v1pb.RegisterCelServiceHandler(ctx, mux, grpcConn); err != nil {return err}- if err := v1pb.RegisterChangelistServiceHandler(ctx, mux, grpcConn); err != nil {- return err- }if err := v1pb.RegisterDatabaseCatalogServiceHandler(ctx, mux, grpcConn); err != nil {return err}diff --git a/backend/store/changelist.go b/backend/store/changelist.godeleted file mode 100644index 252f79238b..0000000000--- a/backend/store/changelist.go+++ /dev/null@@ -1,217 +0,0 @@-package store--import (- "context"- "database/sql"- "time"-- "github.com/pkg/errors"- "google.golang.org/protobuf/encoding/protojson"-- "github.com/bytebase/bytebase/backend/common"- "github.com/bytebase/bytebase/backend/common/qb"- storepb "github.com/bytebase/bytebase/backend/generated-go/store"-)--// ChangelistMessage is the message for a changelist.-type ChangelistMessage struct {- ProjectID string- ResourceID string-- Payload *storepb.Changelist-- CreatorID int- UpdatedAt time.Time-}--// FindChangelistMessage is the API message for finding changelists.-type FindChangelistMessage struct {- ProjectID *string- ResourceID *string-}--// UpdateChangelistMessage is the message to update a changelist.-type UpdateChangelistMessage struct {- ProjectID string- ResourceID string- UpdaterID int- Payload *storepb.Changelist-}--// GetChangelist gets a changelist.-func (s *Store) GetChangelist(ctx context.Context, find *FindChangelistMessage) (*ChangelistMessage, error) {- changelists, err := s.ListChangelists(ctx, find)- if err != nil {- return nil, err- }- if len(changelists) == 0 {- return nil, nil- }- if len(changelists) > 1 {- return nil, errors.Errorf("expected 1 changelist, got %d", len(changelists))- }- return changelists[0], nil-}--// ListChangelists returns a list of changelists.-func (s *Store) ListChangelists(ctx context.Context, find *FindChangelistMessage) ([]*ChangelistMessage, error) {- q := qb.Q().Space(`- SELECT- creator_id,- updated_at,- project,- name,- payload- FROM changelist- WHERE TRUE- `)-- if v := find.ProjectID; v != nil {- q.And("changelist.project = ?", *v)- }- if v := find.ResourceID; v != nil {- q.And("changelist.name = ?", *v)- }-- query, args, err := q.ToSQL()- if err != nil {- return nil, errors.Wrapf(err, "failed to build sql")- }-- tx, err := s.GetDB().BeginTx(ctx, &sql.TxOptions{ReadOnly: true})- if err != nil {- return nil, err- }- defer tx.Rollback()-- rows, err := tx.QueryContext(ctx, query, args...)- if err != nil {- return nil, err- }- defer rows.Close()-- var changelists []*ChangelistMessage- for rows.Next() {- var changelist ChangelistMessage- var payload []byte- if err := rows.Scan(- &changelist.CreatorID,- &changelist.UpdatedAt,- &changelist.ProjectID,- &changelist.ResourceID,- &payload,- ); err != nil {- return nil, err- }- changelistPayload := &storepb.Changelist{}- if err := common.ProtojsonUnmarshaler.Unmarshal(payload, changelistPayload); err != nil {- return nil, err- }- changelist.Payload = changelistPayload-- changelists = append(changelists, &changelist)- }- if err := rows.Err(); err != nil {- return nil, err- }- if err := tx.Commit(); err != nil {- return nil, err- }-- return changelists, nil-}--// CreateChangelist creates a changelist.-func (s *Store) CreateChangelist(ctx context.Context, create *ChangelistMessage) (*ChangelistMessage, error) {- if create.Payload == nil {- create.Payload = &storepb.Changelist{}- }- payload, err := protojson.Marshal(create.Payload)- if err != nil {- return nil, err- }-- q := qb.Q().Space(`- INSERT INTO changelist (- creator_id,- project,- name,- payload- )- VALUES (?, ?, ?, ?)- RETURNING updated_at- `, create.CreatorID, create.ProjectID, create.ResourceID, payload)-- query, args, err := q.ToSQL()- if err != nil {- return nil, errors.Wrapf(err, "failed to build sql")- }-- tx, err := s.GetDB().BeginTx(ctx, nil)- if err != nil {- return nil, err- }- defer tx.Rollback()- if err := tx.QueryRowContext(ctx, query, args...).Scan(&create.UpdatedAt); err != nil {- return nil, err- }- if err := tx.Commit(); err != nil {- return nil, err- }-- return create, nil-}--// UpdateChangelist updates a changelist.-func (s *Store) UpdateChangelist(ctx context.Context, update *UpdateChangelistMessage) error {- q := qb.Q().Space("UPDATE changelist SET updated_at = ?", time.Now())- if v := update.Payload; v != nil {- payload, err := protojson.Marshal(update.Payload)- if err != nil {- return err- }- q.Comma("payload = ?", payload)- }- q.Space("WHERE project = ? AND name = ?", update.ProjectID, update.ResourceID)-- query, args, err := q.ToSQL()- if err != nil {- return errors.Wrapf(err, "failed to build sql")- }-- tx, err := s.GetDB().BeginTx(ctx, nil)- if err != nil {- return errors.Wrapf(err, "failed to begin transaction")- }-- if _, err := tx.ExecContext(ctx, query, args...); err != nil {- return err- }-- return tx.Commit()-}--// DeleteChangelist deletes a changelist.-func (s *Store) DeleteChangelist(ctx context.Context, projectID, resourceID string) error {- q := qb.Q().Space(`- DELETE FROM changelist- WHERE changelist.project = ? AND changelist.name = ?- `, projectID, resourceID)-- query, args, err := q.ToSQL()- if err != nil {- return errors.Wrapf(err, "failed to build sql")- }-- tx, err := s.GetDB().BeginTx(ctx, nil)- if err != nil {- return err- }- defer tx.Rollback()-- if _, err := tx.ExecContext(ctx, query, args...); err != nil {- return err- }-- return tx.Commit()-}diff --git a/backend/store/project.go b/backend/store/project.goindex 05da63c97f..62017fbef2 100644--- a/backend/store/project.go+++ b/backend/store/project.go@@ -511,16 +511,6 @@ func (s *Store) DeleteProject(ctx context.Context, resourceID string) error {return errors.Wrapf(err, "failed to delete releases for project %s", resourceID)}- // Delete changelists associated with this project- q = qb.Q().Space("DELETE FROM changelist WHERE project = ?", resourceID)- sql, args, err = q.ToSQL()- if err != nil {- return errors.Wrap(err, "failed to build changelist delete query")- }- if _, err := tx.ExecContext(ctx, sql, args...); err != nil {- return errors.Wrapf(err, "failed to delete changelists for project %s", resourceID)- }-// Delete db_groups associated with this projectq = qb.Q().Space("DELETE FROM db_group WHERE project = ?", resourceID)sql, args, err = q.ToSQL()diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vuedeleted file mode 100644index 2f7cb15be1..0000000000--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDashboard.vue+++ /dev/null@@ -1,71 +0,0 @@-<template>- <div class="flex flex-col gap-y-4">- <NavBar :allow-create="allowCreate" />- <ChangelistDataTable- :changelists="filteredChangelists"- :loading="isFetching"- :show-project="!project"- />- <CreateChangelistPanel- :project="project"- :disable-project-select="!!project"- />- </div>-</template>--<script lang="ts" setup>-import { computed, onMounted, ref } from "vue";-import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";-import { useChangelistStore } from "@/store";-import type { Changelist } from "@/types/proto-es/v1/changelist_service_pb";-import type { Project } from "@/types/proto-es/v1/project_service_pb";-import { hasProjectPermissionV2 } from "@/utils";-import ChangelistDataTable from "./ChangelistDataTable.vue";-import CreateChangelistPanel from "./CreateChangelistPanel.vue";-import NavBar from "./NavBar.vue";-import { provideChangelistDashboardContext } from "./context";--const props = defineProps<{- project: Project;-}>();--const { filter, events } = provideChangelistDashboardContext(- computed(() => props.project.name)-);--const isFetching = ref(false);-const changelists = ref<Changelist[]>([]);--const filteredChangelists = computed(() => {- let list = changelists.value;- const keyword = filter.value.keyword.trim();- if (keyword) {- list = list.filter((changelist) => {- return changelist.description- .toLowerCase()- .includes(keyword.toLowerCase());- });- }- return list;-});--const fetchChangelists = async () => {- isFetching.value = true;- try {- const response = await useChangelistStore().fetchChangelists({- parent: filter.value.project,- });-- changelists.value = response.changelists;- } finally {- isFetching.value = false;- }-};--useEmitteryEventListener(events, "refresh", fetchChangelists);-onMounted(fetchChangelists);--const allowCreate = computed(() => {- return hasProjectPermissionV2(props.project, "bb.changelists.create");-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vue b/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vuedeleted file mode 100644index 3c12c2dd58..0000000000--- a/frontend/src/components/Changelist/ChangelistDashboard/ChangelistDataTable.vue+++ /dev/null@@ -1,119 +0,0 @@-<template>- <NDataTable- key="change-list-table"- size="small"- :columns="columnList"- :data="changelists"- :striped="true"- :bordered="bordered"- :loading="loading"- :row-key="(data: Changelist) => data.name"- :row-props="rowProps"- :pagination="pagination"- :paginate-single-page="false"- />-</template>--<script setup lang="tsx">-import { NDataTable } from "naive-ui";-import type { DataTableColumn, PaginationProps } from "naive-ui";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";-import { BBAvatar } from "@/bbkit";-import HumanizeDate from "@/components/misc/HumanizeDate.vue";-import { useUserStore } from "@/store";-import { getDateForPbTimestampProtoEs } from "@/types";-import type { Changelist } from "@/types/proto-es/v1/changelist_service_pb";-import { extractChangelistResourceName } from "@/utils";-import { projectForChangelist } from "../ChangelistDetail/common";--type ChangelistDataTableColumn = DataTableColumn<Changelist> & {- hide?: boolean;-};--const props = withDefaults(- defineProps<{- changelists: Changelist[];- bordered?: boolean;- loading?: boolean;- pagination?: false | PaginationProps;- showProject: boolean;- }>(),- {- bordered: true,- showProject: true,- pagination: () => ({ pageSize: 20 }) as PaginationProps,- }-);--const { t } = useI18n();-const router = useRouter();-const userStore = useUserStore();--const columnList = computed((): ChangelistDataTableColumn[] => {- return (- [- {- key: "name",- title: t("changelist.self"),- render: (changelist) => {- return changelist.description;- },- },- {- key: "project",- title: t("common.project"),- width: 256,- hide: !props.showProject,- render: (changelist) => {- return projectForChangelist(changelist).title;- },- },- {- key: "updated-at",- title: t("common.updated-at"),- width: 256,- render: (changelist) => {- return (- <HumanizeDate- date={getDateForPbTimestampProtoEs(changelist.updateTime)}- />- );- },- },- {- key: "creator",- title: t("common.creator"),- width: 256,- render: (changelist) => {- const creator = userStore.getUserByIdentifier(changelist.creator);- if (!creator) return null;- return (- <div class="flex flex-row items-center overflow-hidden gap-x-1">- <BBAvatar size="SMALL" username={creator.title} />- <span class="truncate">{creator.title}</span>- </div>- );- },- },- ] as ChangelistDataTableColumn[]- ).filter((column) => !column.hide);-});--const rowProps = (changelist: Changelist) => {- return {- style: "cursor: pointer;",- onClick: (e: MouseEvent) => {- const route = router.resolve({- path: `changelists/${extractChangelistResourceName(changelist.name)}`,- });- if (e.ctrlKey || e.metaKey) {- window.open(route.fullPath, "_blank");- } else {- router.push(route);- }- },- };-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue b/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vuedeleted file mode 100644index c895229277..0000000000--- a/frontend/src/components/Changelist/ChangelistDashboard/CreateChangelistPanel.vue+++ /dev/null@@ -1,347 +0,0 @@-<template>- <Drawer :show="showCreatePanel" @close="showCreatePanel = false">- <DrawerContent- :title="$t('changelist.new')"- class="w-[40rem] max-w-[100vw] relative"- >- <template #default>- <div- class="grid items-center gap-y-4 gap-x-4"- style="grid-template-columns: minmax(6rem, auto) 1fr"- >- <div v-if="!disableProjectSelect" class="contents">- <div class="textlabel">- {{ $t("common.project") }}- <span class="ml-0.5 text-error">*</span>- </div>- <div>- <ProjectSelect- v-model:project-name="projectName"- :include-all="false"- style="width: 14rem"- />- </div>- </div>- <div class="contents">- <div class="textlabel">- {{ $t("changelist.name") }}- <span class="ml-0.5 text-error">*</span>- </div>- <div>- <NInput- v-model:value="title"- :placeholder="$t('changelist.name-placeholder')"- style="width: 14rem"- />- </div>- </div>- <div class="contents">- <div class="col-span-2">- <ResourceIdField- ref="resourceIdField"- v-model:value="resourceId"- resource-type="changelist"- :resource-title="title"- :fetch-resource="- (resourceId: ResourceId) =>- changelistStore.getOrFetchChangelistByName(- `${projectName}/changelists/${resourceId}`,- true /* silent */- )- "- />- </div>- </div>- <div class="contents file-upload">- <div class="col-span-2 flex flex-col gap-1">- <NUpload- v-model:file-list="uploadFileList"- abstract- accept="application/x-zip,.zip,application/sql,.sql"- :multiple="false"- @change="uploadFileList = [$event.file]"- >- <div- class="w-full flex flex-row justify-start items-center gap-2"- >- <NUploadTrigger #="{ handleClick }" abstract>- <NButton- icon- style="--n-padding: 0 10px"- class="self-start"- :loading="isParsingUploadFile"- @click="handleClick"- >- <template #icon>- <UploadIcon class="w-4 h-4" />- </template>- {{- $t("changelist.import.optional-upload-sql-or-zip-file")- }}- </NButton>- </NUploadTrigger>- <NSelect- v-if="uploadFileList.length > 0"- v-model:value="state.encoding"- class="w-24!"- filterable- :options="encodingOptions"- :consistent-menu-width="false"- />- </div>- <div class="flex flex-col gap-1">- <NUploadFileList />- </div>- </NUpload>- <div class="flex flex-col gap-1 pl-7 text-xs">- <div v-for="(file, i) in files" :key="`${file.name}-${i}`">- {{ file.name }}- </div>- </div>- </div>- </div>- </div>-- <div- v-if="isLoading"- v-zindexable="{ enabled: true }"- class="absolute bg-white/50 inset-0 flex flex-col items-center justify-center"- >- <BBSpin />- </div>- </template>-- <template #footer>- <div class="flex items-center justify-end gap-x-3">- <NButton @click="showCreatePanel = false">{{- $t("common.cancel")- }}</NButton>- <NTooltip :disabled="errors.length === 0">- <template #trigger>- <NButton- type="primary"- tag="div"- :disabled="errors.length > 0"- @click="doCreate"- >- {{ $t("common.add") }}- </NButton>- </template>- <template #default>- <ErrorList :errors="errors" />- </template>- </NTooltip>- </div>- </template>- </DrawerContent>- </Drawer>-</template>--<script setup lang="ts">-import { create as createProto } from "@bufbuild/protobuf";-import { asyncComputed } from "@vueuse/core";-import { UploadIcon } from "lucide-vue-next";-import {- NButton,- NInput,- NTooltip,- NUpload,- NUploadFileList,- NUploadTrigger,- type UploadFileInfo,- NSelect,-} from "naive-ui";-import { zindexable as vZindexable } from "vdirs";-import { computed, reactive, ref, watch } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";-import { BBSpin } from "@/bbkit";-import ErrorList from "@/components/misc/ErrorList.vue";-import {- Drawer,- DrawerContent,- ProjectSelect,- ResourceIdField,-} from "@/components/v2";-import { pushNotification, useChangelistStore, useSheetV1Store } from "@/store";-import type { ResourceId } from "@/types";-import {- ChangelistSchema,- Changelist_ChangeSchema as ChangeSchema,- CreateChangelistRequestSchema,-} from "@/types/proto-es/v1/changelist_service_pb";-import { Engine } from "@/types/proto-es/v1/common_pb";-import type { Project } from "@/types/proto-es/v1/project_service_pb";-import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";-import {- ENCODINGS,- extractChangelistResourceName,- setSheetStatement,- type Encoding,-} from "@/utils";-import { readUpload, type ParsedFile } from "../import";-import { useChangelistDashboardContext } from "./context";--interface LocalState {- encoding: Encoding;-}--const props = defineProps<{- project: Project;- disableProjectSelect?: boolean;-}>();--const router = useRouter();-const { t } = useI18n();-const { showCreatePanel, events } = useChangelistDashboardContext();-const state = reactive<LocalState>({- encoding: "utf-8",-});--const title = ref("");-const projectName = ref<string>(props.project.name);-const isLoading = ref(false);-const resourceId = ref("");-const resourceIdField = ref<InstanceType<typeof ResourceIdField>>();-const changelistStore = useChangelistStore();--const encodingOptions = computed(() =>- ENCODINGS.map((encoding) => ({- label: encoding,- value: encoding,- }))-);--const errors = asyncComputed(() => {- const errors: string[] = [];- if (!title.value.trim()) {- errors.push(t("changelist.error.name-is-required"));- }- if (resourceIdField.value && !resourceIdField.value.isValidated) {- errors.push(t("changelist.error.invalid-resource-id"));- }-- return errors;-}, []);--const uploadFileList = ref<UploadFileInfo[]>([]);-const files = ref<ParsedFile[]>([]);-const isParsingUploadFile = ref(false);--watch(uploadFileList, async (fileList) => {- const file = fileList[0];- if (!file) {- files.value = [];- return;- }- const cleanup = () => {- isParsingUploadFile.value = false;- };-- try {- files.value = [];- isParsingUploadFile.value = true;- files.value = await readUpload(file);-- if (files.value.length === 0) {- pushNotification({- module: "bytebase",- style: "WARN",- title: t("changelist.import.no-file-to-upload"),- });- return cleanup();- }-- if (!title.value) {- title.value = file.name;- }- } finally {- cleanup();- }-});--const doCreate = async () => {- if (errors.value.length > 0) return;- if (!resourceIdField.value) return;-- isLoading.value = true;- try {- const createdSheets = await Promise.all(- files.value.map(async (f) => {- const { name, arrayBuffer } = f;- const sheet = createProto(SheetSchema, {- title: name,- engine: Engine.ENGINE_UNSPECIFIED,- });- const content = new TextDecoder(state.encoding).decode(arrayBuffer);- setSheetStatement(sheet, content);- const created = await useSheetV1Store().createSheet(- projectName.value,- sheet- );- return created;- })- );- const changes = createdSheets.map((sheet) =>- createProto(ChangeSchema, {- sheet: sheet.name,- })- );-- const created = await useChangelistStore().createChangelist(- createProto(CreateChangelistRequestSchema, {- parent: projectName.value,- changelist: createProto(ChangelistSchema, {- description: title.value,- changes,- }),- changelistId: resourceId.value,- })- );- showCreatePanel.value = false;- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.created"),- });-- router.push(- `/${projectName.value}/changelists/${extractChangelistResourceName(- created.name- )}`- );- events.emit("refresh");- } finally {- isLoading.value = false;- }-};--const reset = () => {- title.value = "";- projectName.value = props.project?.name;-};--watch(showCreatePanel, (show) => {- if (show) {- reset();- }-});-</script>--<style scoped lang="postcss">-.file-upload :deep(.n-upload-file-list .n-upload-file .n-upload-file-info) {- align-items: center;-}-.file-upload- :deep(- .n-upload-file-list- .n-upload-file- .n-upload-file-info- .n-upload-file-info__thumbnail- ) {- display: flex;- align-items: center;- justify-content: center;- margin-right: 0.125rem;-}-</style>diff --git a/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue b/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vuedeleted file mode 100644index 39e39c6126..0000000000--- a/frontend/src/components/Changelist/ChangelistDashboard/NavBar.vue+++ /dev/null@@ -1,25 +0,0 @@-<template>- <div class="flex flex-row items-center gap-x-2">- <SearchBox- v-model:value="filter.keyword"- style="max-width: 100%"- :placeholder="$t('common.filter-by-name')"- />- <NButton v-if="allowCreate" type="primary" @click="showCreatePanel = true">- <heroicons-solid:plus class="w-4 h-auto mr-0.5" />- {{ $t("changelist.new") }}- </NButton>- </div>-</template>--<script setup lang="ts">-import { NButton } from "naive-ui";-import { SearchBox } from "@/components/v2";-import { useChangelistDashboardContext } from "./context";--defineProps<{- allowCreate: boolean;-}>();--const { filter, showCreatePanel } = useChangelistDashboardContext();-</script>diff --git a/frontend/src/components/Changelist/ChangelistDashboard/context.ts b/frontend/src/components/Changelist/ChangelistDashboard/context.tsdeleted file mode 100644index f345d37683..0000000000--- a/frontend/src/components/Changelist/ChangelistDashboard/context.ts+++ /dev/null@@ -1,43 +0,0 @@-import Emittery from "emittery";-import type { InjectionKey, Ref } from "vue";-import { inject, provide, ref } from "vue";--export type ChangelistDashboardFilter = {- project: string;- keyword: string;-};--export type ChangelistDashboardEvents = Emittery<{- refresh: undefined;-}>;--export type ChangelistDashboardContext = {- filter: Ref<ChangelistDashboardFilter>;- showCreatePanel: Ref<boolean>;- events: ChangelistDashboardEvents;-};--export const KEY = Symbol(- "bb.changelist.dashboard"-) as InjectionKey<ChangelistDashboardContext>;--export const useChangelistDashboardContext = () => {- return inject(KEY)!;-};--export const provideChangelistDashboardContext = (- project: Ref<string> = ref("projects/-")-) => {- const context: ChangelistDashboardContext = {- filter: ref({- project,- keyword: "",- }),- showCreatePanel: ref(false),- events: new Emittery(),- };-- provide(KEY, context);-- return context;-};diff --git a/frontend/src/components/Changelist/ChangelistDashboard/index.ts b/frontend/src/components/Changelist/ChangelistDashboard/index.tsdeleted file mode 100644index 987ba1c614..0000000000--- a/frontend/src/components/Changelist/ChangelistDashboard/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import ChangelistDashboard from "./ChangelistDashboard.vue";--export default ChangelistDashboard;diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vuedeleted file mode 100644index bb256e6ad8..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue+++ /dev/null@@ -1,201 +0,0 @@-<template>- <Drawer- :show="showAddChangePanel"- :close-on-esc="false"- @close="showAddChangePanel = false"- >- <DrawerContent- :title="$t('changelist.add-change.self')"- class="w-[80vw] max-w-[100vw] relative"- style="max-width: calc(100vw - 8rem)"- >- <template #default>- <div class="flex flex-col gap-y-4 min-h-full">- <div class="flex items-center gap-x-8">- <div class="textlabel">- {{ $t("changelist.change-source.self") }}- </div>- <NRadioGroup v-model:value="changeSource">- <NRadio value="CHANGELOG">- <div class="flex items-center">- <HistoryIcon :size="16" class="mr-1" />- {{ $t("common.changelog") }}- </div>- </NRadio>- <NRadio value="RAW_SQL">- <div class="flex items-center">- <FileIcon :size="16" class="mr-1" />- {{ $t("changelist.change-source.raw-sql") }}- </div>- </NRadio>- </NRadioGroup>- </div>-- <ChangelogForm v-if="changeSource === 'CHANGELOG'" />- <RawSQLForm v-if="changeSource === 'RAW_SQL'" />- </div>-- <div- v-if="isLoading"- v-zindexable="{ enabled: true }"- class="absolute bg-white/50 inset-0 flex flex-col items-center justify-center"- >- <BBSpin />- </div>- </template>-- <template #footer>- <div class="flex items-center justify-end gap-x-3">- <NButton @click="showAddChangePanel = false">- {{ $t("common.cancel") }}- </NButton>-- <ErrorTipsButton- :errors="errors"- :button-props="{- type: 'primary',- }"- @click="doAddChange"- >- <span>{{ $t("common.add") }}</span>- <span- v-if="changeSource !== 'RAW_SQL' && pendingAddChanges.length > 0"- class="ml-1"- >- ({{ pendingAddChanges.length }})- </span>- </ErrorTipsButton>- </div>- </template>- </DrawerContent>- </Drawer>-</template>--<script setup lang="ts">-import { create } from "@bufbuild/protobuf";-import { asyncComputed } from "@vueuse/core";-import { FileIcon, HistoryIcon } from "lucide-vue-next";-import { NButton, NRadio, NRadioGroup } from "naive-ui";-import { zindexable as vZindexable } from "vdirs";-import { computed, ref, watch } from "vue";-import { useI18n } from "vue-i18n";-import { BBSpin } from "@/bbkit";-import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";-import {- pushNotification,- useChangelistStore,- useChangelogStore,- useLocalSheetStore,-} from "@/store";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { ChangelistSchema } from "@/types/proto-es/v1/changelist_service_pb";-import { ChangelogView } from "@/types/proto-es/v1/database_service_pb";-import {- getChangelistChangeSourceType,- getSheetStatement,- isLocalSheet,- setSheetStatement,-} from "@/utils";-import { useChangelistDetailContext } from "../context";-import { provideAddChangeContext } from "./context";-import { ChangelogForm, RawSQLForm } from "./form";-import { emptyRawSQLChange } from "./utils";--const { t } = useI18n();-const { project, changelist, showAddChangePanel } =- useChangelistDetailContext();-const { changeSource, changesFromChangelog, changeFromRawSQL } =- provideAddChangeContext();-const isLoading = ref(false);--const pendingAddChanges = computed(() => {- switch (changeSource.value) {- case "CHANGELOG":- return changesFromChangelog.value;- case "RAW_SQL":- return [changeFromRawSQL.value];- }- console.warn("should never reach this line");- return [];-});--const errors = asyncComputed(() => {- const errors: string[] = [];-- if (pendingAddChanges.value.length === 0) {- errors.push(t("changelist.error.select-at-least-one-change"));- }- if (changeSource.value === "RAW_SQL") {- const name = changeFromRawSQL.value.sheet;- const sheet = useLocalSheetStore().getOrCreateSheetByName(name);- const statement = getSheetStatement(sheet);- if (statement.trim().length === 0) {- errors.push(t("changelist.error.sql-cannot-be-empty"));- }- }-- return errors;-}, []);--const doAddChange = async () => {- if (errors.value.length > 0) return;-- isLoading.value = true;- const createSheetForPendingAddChange = async (pendingAddChange: Change) => {- const change = { ...pendingAddChange };- if (isLocalSheet(change.sheet)) {- const localSheetStore = useLocalSheetStore();- const sheet = localSheetStore.getOrCreateSheetByName(change.sheet);- const sourceType = getChangelistChangeSourceType(change);- if (sourceType === "CHANGELOG") {- const changelog = await useChangelogStore().getOrFetchChangelogByName(- change.source,- ChangelogView.FULL- );- setSheetStatement(sheet, changelog?.statement || "");- }- const created = await localSheetStore.saveLocalSheetToRemote(sheet);- change.sheet = created.name;- }-- const sourceType = getChangelistChangeSourceType(change);- if (sourceType === "CHANGELOG") {- await useChangelogStore().getOrFetchChangelogByName(change.source);- }- return change;- };- try {- const newChanges: Change[] = [];- for (let i = 0; i < pendingAddChanges.value.length; i++) {- newChanges.push(- await createSheetForPendingAddChange(pendingAddChanges.value[i])- );- }- const changelistPatch = create(ChangelistSchema, {- ...changelist.value,- changes: [...changelist.value.changes, ...newChanges],- });- await useChangelistStore().patchChangelist(changelistPatch, ["changes"]);- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.added"),- });- showAddChangePanel.value = false;- } finally {- isLoading.value = false;- }-};--const reset = () => {- changeSource.value = "CHANGELOG";- changesFromChangelog.value = [];- changeFromRawSQL.value = emptyRawSQLChange(project.value.name);-};--watch(showAddChangePanel, (show) => {- if (show) {- reset();- }-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.tsdeleted file mode 100644index 68ef10afa5..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/context.ts+++ /dev/null@@ -1,42 +0,0 @@-import Emittery from "emittery";-import type { InjectionKey, Ref } from "vue";-import { inject, provide, ref } from "vue";-import type { Changelist_Change_Source as ChangeSource } from "@/types";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { useChangelistDetailContext } from "../context";-import { emptyRawSQLChange } from "./utils";--// eslint-disable-next-line @typescript-eslint/no-empty-object-type-export type AddChangeEvents = Emittery<{}>;--export type AddChangeContext = {- changeSource: Ref<ChangeSource>;- changesFromChangelog: Ref<Change[]>;- changeFromRawSQL: Ref<Change>;-- events: AddChangeEvents;-};--export const KEY = Symbol(- "bb.changelist.add-change"-) as InjectionKey<AddChangeContext>;--export const useAddChangeContext = () => {- return inject(KEY)!;-};--export const provideAddChangeContext = () => {- const { project } = useChangelistDetailContext();-- const context: AddChangeContext = {- changeSource: ref("CHANGELOG"),- changesFromChangelog: ref([]),- changeFromRawSQL: ref(emptyRawSQLChange(project.value.name)),-- events: new Emittery(),- };-- provide(KEY, context);-- return context;-};diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogChangeItem.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogChangeItem.vuedeleted file mode 100644index cb6967e4c6..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogChangeItem.vue+++ /dev/null@@ -1,85 +0,0 @@-<template>- <div class="flex flex-row items-center justify-between gap-x-2 group">- <div class="flex flex-row items-center gap-x-2">- <NTag>- <span class="inline-block w-[30px] text-center">- {{ getChangelogChangeType(changelog.type, changelog.migrationType) }}- </span>- </NTag>- <div- class="flex flex-row items-center gap-x-1 border-b border-transparent group-hover:border-control-border cursor-pointer"- @click="$emit('click-item', change)"- >- <RichDatabaseName- :database="database"- :show-instance="false"- :show-arrow="false"- :show-production-environment-icon="false"- tooltip="instance"- />- <span>@</span>- <span class="text-sm">{{ changelog.version }}</span>- <router-link- :to="{- path: `/${changelog.issue}`,- }"- class="normal-link text-sm hover:no-underline!"- target="_blank"- @click.stop- >- #{{ extractIssueUID(changelog.issue) }}- </router-link>- </div>- </div>- <div- class="flex flex-row items-center justify-end gap-x-1 invisible group-hover:visible"- >- <NButton- size="small"- quaternary- style="--n-padding: 0 6px"- @click.stop="$emit('remove-item', change)"- >- <template #icon>- <heroicons:x-mark />- </template>- </NButton>- </div>- </div>-</template>--<script setup lang="ts">-import { create } from "@bufbuild/protobuf";-import { NButton, NTag } from "naive-ui";-import { computed } from "vue";-import { RichDatabaseName } from "@/components/v2";-import { useChangelogStore, useDatabaseV1ByName } from "@/store";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { ChangelogSchema } from "@/types/proto-es/v1/database_service_pb";-import { extractDatabaseResourceName, extractIssueUID } from "@/utils";-import { getChangelogChangeType } from "@/utils/v1/changelog";--const props = defineProps<{- change: Change;-}>();--defineEmits<{- (event: "click-item", change: Change): void;- (event: "remove-item", change: Change): void;-}>();--const changelog = computed(() => {- const name = props.change.source;- return (- useChangelogStore().getChangelogByName(name) ??- create(ChangelogSchema, {- name,- version: "<<Unknown Changelog>>",- })- );-});--const { database } = useDatabaseV1ByName(- computed(() => extractDatabaseResourceName(changelog.value.name).database)-);-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vuedeleted file mode 100644index d090ddbdb2..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangelogForm.vue+++ /dev/null@@ -1,197 +0,0 @@-<template>- <div class="flex flex-col items-stretch gap-y-4 overflow-x-hidden">- <div class="flex flex-col gap-y-2 max-w-max">- <div- v-if="changes.length === 0"- class="text-control-placeholder text-sm leading-[28px]"- >- {{- $t(- "changelist.add-change.changelog.select-at-least-one-changelog-below"- )- }}- </div>- <ChangelogChangeItem- v-for="change in changes"- :key="change.source"- :change="change"- @click-item="handleClickChange($event)"- @remove-item="handleRemoveChange($event)"- />- </div>- <div class="flex flex-row items-center justify-start gap-x-2">- <DatabaseSelect- v-model:database-name="state.databaseName"- :project-name="project.name"- style="max-width: max-content"- />- <NCheckboxGroup v-model:value="state.migrationTypes">- <NCheckbox :value="Changelog_MigrationType.DDL">DDL</NCheckbox>- <NCheckbox :value="Changelog_MigrationType.DML">DML</NCheckbox>- </NCheckboxGroup>- </div>- <ChangelogDataTable- v-model:selected-changelogs="selectedChangelogList"- :changelogs="filteredChangelogList"- :show-selection="true"- :custom-click="true"- @row-click="state.detailChangelogName = $event.name"- />- <ChangelogDetailPanel- :changelog-name="state.detailChangelogName"- @close="state.detailChangelogName = undefined"- />- </div>-</template>--<script setup lang="ts">-import { create } from "@bufbuild/protobuf";-import { orderBy } from "lodash-es";-import { NCheckbox, NCheckboxGroup } from "naive-ui";-import { computed, reactive, watch } from "vue";-import { ChangelogDataTable } from "@/components/Changelog";-import { DatabaseSelect } from "@/components/v2";-import {- useChangelogStore,- useDBSchemaV1Store,- useDatabaseV1Store,-} from "@/store";-import {- isValidDatabaseName,- type AffectedTable,- EmptyAffectedTable,-} from "@/types";-import {- Changelist_ChangeSchema,- type Changelist_Change as Change,-} from "@/types/proto-es/v1/changelist_service_pb";-import type { Changelog } from "@/types/proto-es/v1/database_service_pb";-import {- Changelog_MigrationType,- Changelog_Status,- Changelog_Type,-} from "@/types/proto-es/v1/database_service_pb";-import { extractDatabaseResourceName, extractIssueUID } from "@/utils";-import ChangelogDetailPanel from "../../ChangelogDetailPanel";-import { useChangelistDetailContext } from "../../context";-import { useAddChangeContext } from "../context";-import ChangelogChangeItem from "./ChangelogChangeItem.vue";--type LocalState = {- isLoading: boolean;- databaseName: string | undefined;- changelogList: Changelog[];- affectedTable: AffectedTable;- migrationTypes: Changelog_MigrationType[];- detailChangelogName: string | undefined;-};--const changelogStore = useChangelogStore();-const databaseStore = useDatabaseV1Store();-const { project } = useChangelistDetailContext();-const { changesFromChangelog: changes } = useAddChangeContext();--const state = reactive<LocalState>({- isLoading: false,- databaseName: undefined,- changelogList: [],- affectedTable: EmptyAffectedTable,- migrationTypes: [Changelog_MigrationType.DML, Changelog_MigrationType.DDL],- detailChangelogName: undefined,-});--const database = computed(() => {- const name = state.databaseName;- if (!isValidDatabaseName(name)) return undefined;- return databaseStore.getDatabaseByName(name);-});--const filteredChangelogList = computed(() => {- return state.changelogList.filter((changelog) => {- return (- changelog.type === Changelog_Type.MIGRATE &&- state.migrationTypes.includes(changelog.migrationType) &&- changelog.status === Changelog_Status.DONE- );- });-});--const selectedChangelogList = computed<string[]>({- get() {- return changes.value.map((change) => {- return change.source;- });- },- set(selected) {- const changelogs: Changelog[] = [];- for (let i = 0; i < selected.length; i++) {- const name = selected[i];- const changelog = changelogStore.getChangelogByName(name);- if (changelog) {- changelogs.push(changelog);- }- }-- const updatedChanges = orderBy(- changelogs,- [(c) => parseInt(extractIssueUID(c.issue), 10)],- ["asc"]- ).map<Change>((changelog) =>- create(Changelist_ChangeSchema, {- sheet: changelog.statementSheet,- source: changelog.name,- })- );- changes.value = updatedChanges;- },-});--const fetchChangelogList = async () => {- const db = database.value;- if (!db) {- state.changelogList = [];- return;- }-- state.isLoading = true;- const name = db.name;- await useDBSchemaV1Store().getOrFetchDatabaseMetadata({- database: name,- skipCache: false,- silent: true,- });- const changelogList =- await changelogStore.getOrFetchChangelogListOfDatabase(name);- // Check if the state is still valid- if (name === database.value?.name) {- state.changelogList = changelogList;- }- state.isLoading = false;-};--const handleRemoveChange = (change: Change) => {- const index = changes.value.findIndex((c) => c.source === change.source);- if (index >= 0) {- changes.value.splice(index, 1);- }-};--const handleClickChange = (change: Change) => {- const changelogName = change.source;- const database = databaseStore.getDatabaseByName(- extractDatabaseResourceName(changelogName).database- );- state.databaseName = database.name;- state.detailChangelogName = changelogName;-};--watch(() => database.value?.name, fetchChangelogList, { immediate: true });--watch(- () => state.changelogList,- () => {- state.affectedTable = EmptyAffectedTable;- },- { immediate: true }-);-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vuedeleted file mode 100644index 5a2b5e34ba..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/RawSQLForm.vue+++ /dev/null@@ -1,33 +0,0 @@-<template>- <div class="flex flex-col gap-y-4 flex-1 overflow-hidden">- <RawSQLEditor- v-if="sheet"- v-model:statement="statement"- :readonly="false"- class="flex-1 overflow-hidden relative"- />- </div>-</template>--<script setup lang="ts">-import { computed } from "vue";-import { useLocalSheetStore } from "@/store";-import { getSheetStatement, setSheetStatement } from "@/utils";-import RawSQLEditor from "../../RawSQLEditor";-import { useAddChangeContext } from "../context";--const { changeFromRawSQL: change } = useAddChangeContext();--const sheet = computed(() => {- return useLocalSheetStore().getOrCreateSheetByName(change.value.sheet);-});--const statement = computed({- get() {- return getSheetStatement(sheet.value);- },- set(statement) {- setSheetStatement(sheet.value, statement);- },-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/index.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/index.tsdeleted file mode 100644index 9f498750c1..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/index.ts+++ /dev/null@@ -1,4 +0,0 @@-import ChangelogForm from "./ChangelogForm.vue";-import RawSQLForm from "./RawSQLForm.vue";--export { ChangelogForm, RawSQLForm };diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/utils.tsdeleted file mode 100644index e69de29bb2..0000000000diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/index.tsdeleted file mode 100644index 00e8d44acc..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import AddChangePanel from "./AddChangePanel.vue";--export default AddChangePanel;diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.ts b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.tsdeleted file mode 100644index b3048c9367..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/utils.ts+++ /dev/null@@ -1,13 +0,0 @@-import { create } from "@bufbuild/protobuf";-import { reactive } from "vue";-import { useLocalSheetStore } from "@/store";-import { Changelist_ChangeSchema } from "@/types/proto-es/v1/changelist_service_pb";--export const emptyRawSQLChange = (project: string) => {- return reactive(- create(Changelist_ChangeSchema, {- sheet: `${project}/sheets/${useLocalSheetStore().nextUID()}`,- source: "",- })- );-};diff --git a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vuedeleted file mode 100644index f2462b6158..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue+++ /dev/null@@ -1,168 +0,0 @@-<template>- <Drawer v-model:show="show">- <DrawerContent :title="$t('changelist.apply-to-database')">- <template #default>- <div- class="w-[calc(100vw-8rem)] lg:w-240 max-w-[calc(100vw-8rem)] overflow-x-auto"- >- <div class="flex flex-col">- <div class="mb-4 flex flex-row justify-start items-center gap-2">- <span class="textlabel">{{ t("changelist.change-type") }}:</span>- <NRadioGroup v-model:value="state.changeType">- <NRadio :value="'DDL'" :label="t('issue.title.edit-schema')" />- <NRadio :value="'DML'" :label="t('issue.title.change-data')" />- </NRadioGroup>- </div>- <DatabaseAndGroupSelector- :project="project"- v-model:value="state.targetSelectState"- />- </div>- <div- v-if="state.isGenerating"- v-zindexable="{ enabled: true }"- class="absolute inset-0 flex flex-col items-center justify-center bg-white/50"- >- <BBSpin />- </div>- </div>- </template>-- <template #footer>- <div class="flex-1 flex items-center justify-between">- <div>- <div- v-if="- state.targetSelectState?.changeSource === 'DATABASE' &&- state.targetSelectState?.selectedDatabaseNameList.length > 0- "- class="textinfolabel"- >- {{- $t("database.selected-n-databases", {- n: state.targetSelectState?.selectedDatabaseNameList.length,- })- }}- </div>- </div>-- <div class="flex items-center justify-end gap-x-3">- <NButton @click.prevent="show = false">- {{ $t("common.cancel") }}- </NButton>-- <ErrorTipsButton- style="--n-padding: 0 10px"- :errors="nextButtonErrors"- :button-props="{- type: 'primary',- }"- @click="handleClickNext"- >- {{ $t("common.next") }}- </ErrorTipsButton>- </div>- </div>- </template>- </DrawerContent>- </Drawer>-</template>--<script lang="ts" setup>-import { NButton } from "naive-ui";-import { NRadioGroup, NRadio } from "naive-ui";-import { zindexable as vZindexable } from "vdirs";-import { computed, reactive } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter, type LocationQueryRaw } from "vue-router";-import { BBSpin } from "@/bbkit";-import DatabaseAndGroupSelector, {- type DatabaseSelectState,-} from "@/components/DatabaseAndGroupSelector/";-import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";-import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";-import { useDatabaseV1Store, useDBGroupStore } from "@/store";-import { extractProjectResourceName, generateIssueTitle } from "@/utils";-import { useChangelistDetailContext } from "../context";--type LocalState = {- changeType: "DDL" | "DML";- isGenerating: boolean;- targetSelectState?: DatabaseSelectState;-};--const { t } = useI18n();-const router = useRouter();-const databaseStore = useDatabaseV1Store();-const dbGroupStore = useDBGroupStore();-const {- changelist,- project,- showApplyToDatabasePanel: show,-} = useChangelistDetailContext();--const state = reactive<LocalState>({- changeType: "DDL",- isGenerating: false,-});--const nextButtonErrors = computed(() => {- const errors: string[] = [];- if (- !state.targetSelectState ||- (state.targetSelectState.changeSource === "DATABASE" &&- state.targetSelectState.selectedDatabaseNameList.length === 0) ||- (state.targetSelectState.changeSource === "GROUP" &&- !state.targetSelectState.selectedDatabaseGroup)- ) {- errors.push("Please select at least one database");- }- return errors;-});--const handleClickNext = async () => {- if (!state.targetSelectState) {- return;- }-- state.isGenerating = true;- try {- const databaseList = state.targetSelectState.selectedDatabaseNameList.map(- (name) => databaseStore.getDatabaseByName(name)- );- const databaseGroup = dbGroupStore.getDBGroupByName(- state.targetSelectState.selectedDatabaseGroup || ""- );- const query: LocationQueryRaw = {- template:- state.changeType === "DDL"- ? "bb.issue.database.schema.update"- : "bb.issue.database.data.update",- name: generateIssueTitle(- "bb.issue.database.schema.update",- state.targetSelectState.changeSource === "DATABASE"- ? databaseList.map((db) => db.databaseName)- : [databaseGroup?.title ?? ""]- ),- changelist: changelist.value.name,- description: `Apply changelist [${changelist.value.description}]`,- };- if (state.targetSelectState.changeSource === "DATABASE") {- query.databaseList = databaseList.map((db) => db.name).join(",");- } else {- query.databaseGroupName = state.targetSelectState.selectedDatabaseGroup;- }-- router.push({- name: PROJECT_V1_ROUTE_ISSUE_DETAIL,- params: {- projectId: extractProjectResourceName(project.value.name),- issueSlug: "create",- },- query,- });- } catch {- state.isGenerating = false;- }-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.tsdeleted file mode 100644index 54841d2b76..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import ApplyToDatabasePanel from "./ApplyToDatabasePanel.vue";--export default ApplyToDatabasePanel;diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vuedeleted file mode 100644index 7f8164b697..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ChangeTable.vue+++ /dev/null@@ -1,96 +0,0 @@-<template>- <NDataTable- size="small"- :columns="columns"- :data="changes"- :striped="true"- :bordered="true"- :row-props="getRowProps"- />-</template>--<script setup lang="tsx">-import { NDataTable } from "naive-ui";-import type { DataTableColumn } from "naive-ui";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import DatabaseForChange from "./DatabaseForChange.vue";-import RemoveChangeButton from "./RemoveChangeButton.vue";-import ReorderButtons from "./ReorderButtons.vue";-import SQL from "./SQL.vue";-import Source from "./Source.vue";--const props = defineProps<{- changes: Change[];- reorderMode: boolean;-}>();--const emit = defineEmits<{- (event: "select-change", change: Change): void;- (event: "remove-change", change: Change): void;- (event: "reorder-move", row: number, delta: -1 | 1): void;-}>();--const { t } = useI18n();--const columns = computed((): DataTableColumn<Change>[] => {- const cols: DataTableColumn<Change>[] = [];-- if (props.reorderMode) {- cols.push({- title: "",- key: "reorder",- width: 64,- align: "center",- render: (change, index) => (- <div class="flex justify-center gap-x-1">- <ReorderButtons- row={index}- changes={props.changes}- onMove={(delta: -1 | 1) => emit("reorder-move", index, delta)}- />- </div>- ),- });- }-- cols.push(- {- title: t("changelist.change-source.source"),- key: "source",- width: 160,- render: (change) => <Source change={change} />,- },- {- title: t("common.database"),- key: "database",- render: (change) => <DatabaseForChange change={change} />,- },- {- title: t("common.sql"),- key: "sql",- render: (change) => <SQL change={change} />,- },- {- title: "",- key: "operations",- width: 96,- render: (change) => (- <RemoveChangeButton onClick={() => emit("remove-change", change)} />- ),- }- );-- return cols;-});--const getRowProps = (change: Change) => {- return {- style: "cursor: pointer;",- onClick: () => {- emit("select-change", change);- },- };-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vuedeleted file mode 100644index 292da541ca..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue+++ /dev/null@@ -1,34 +0,0 @@-<template>- <RichDatabaseName- v-if="database"- :database="database!"- :show-instance="false"- :show-arrow="false"- :show-production-environment-icon="false"- tooltip="instance"- />-</template>--<script setup lang="ts">-import { asyncComputed } from "@vueuse/core";-import { RichDatabaseName } from "@/components/v2";-import { useDatabaseV1Store } from "@/store";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { extractDatabaseResourceName, isChangelogChangeSource } from "@/utils";--const props = defineProps<{- change: Change;-}>();--const database = asyncComputed(async () => {- const { change } = props;- const { source } = change;- if (isChangelogChangeSource(change)) {- const { database } = extractDatabaseResourceName(source);- return useDatabaseV1Store().getOrFetchDatabaseByName(database);- } else {- // Raw SQL- return undefined;- }-}, undefined);-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vuedeleted file mode 100644index f7758ebc24..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/RemoveChangeButton.vue+++ /dev/null@@ -1,58 +0,0 @@-<template>- <NTooltip :disabled="errors.length === 0">- <template #trigger>- <NPopconfirm- :disabled="errors.length > 0"- @positive-click="$emit('click')"- >- <template #trigger>- <NButton- quaternary- size="small"- style="--n-padding: 0 6px"- :disabled="errors.length > 0"- @click.stop- >- <template #icon>- <heroicons:trash />- </template>- </NButton>- </template>-- <template #default>- <div>{{ $t("changelist.confirm-remove-change") }}</div>- </template>- </NPopconfirm>- </template>-- <template #default>- <ErrorList :errors="errors" />- </template>- </NTooltip>-</template>--<script setup lang="ts">-import { NButton, NPopconfirm, NTooltip } from "naive-ui";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import ErrorList from "@/components/misc/ErrorList.vue";-import { useChangelistDetailContext } from "../context";--defineEmits<{- (event: "click"): void;-}>();--const { t } = useI18n();-const { allowEdit } = useChangelistDetailContext();--const errors = computed(() => {- const errors: string[] = [];- if (!allowEdit.value) {- errors.push(- t("changelist.error.you-are-not-allowed-to-perform-this-action")- );- return errors;- }- return errors;-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vuedeleted file mode 100644index 0c10c802b2..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/ReorderButtons.vue+++ /dev/null@@ -1,43 +0,0 @@-<template>- <NButton- size="tiny"- style="--n-padding: 0 6px"- :disabled="!allowMoveUp"- @click.stop="$emit('move', -1)"- >- <template #icon>- <heroicons:arrow-up />- </template>- </NButton>- <NButton- size="tiny"- style="--n-padding: 0 6px"- :disabled="!allowMoveDown"- @click.stop="$emit('move', 1)"- >- <template #icon>- <heroicons:arrow-down />- </template>- </NButton>-</template>--<script lang="ts" setup>-import { NButton } from "naive-ui";-import { computed } from "vue";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";--const props = defineProps<{- changes: Change[];- row: number;-}>();-defineEmits<{- (event: "move", delta: -1 | 1): void;-}>();--const allowMoveUp = computed(() => {- return props.row > 0;-});-const allowMoveDown = computed(() => {- return props.row < props.changes.length - 1;-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vuedeleted file mode 100644index 17b13acd45..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/SQL.vue+++ /dev/null@@ -1,31 +0,0 @@-<template>- <TextOverflowPopover- :content="statement"- :max-length="100"- :max-popover-content-length="1000"- :line-wrap="false"- content-class="line-clamp-1 flex-1"- placement="bottom"- />-</template>--<script setup lang="ts">-import { computed } from "vue";-import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";-import { useSheetV1Store } from "@/store";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { getSheetStatement } from "@/utils";--const props = defineProps<{- change: Change;-}>();--const sheet = computed(() => {- return useSheetV1Store().getSheetByName(props.change.sheet);-});--const statement = computed(() => {- if (!sheet.value) return "";- return getSheetStatement(sheet.value);-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vuedeleted file mode 100644index af10914568..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue+++ /dev/null@@ -1,60 +0,0 @@-<template>- <div>- <template v-if="type === 'CHANGELOG' && changelog">- <div class="flex items-center gap-x-1">- <HistoryIcon :size="16" />- <span>{{ $t("common.changelog") }}</span>- <span v-if="changelog.version" class="textinfolabel">- {{ changelog.version }}- </span>- <router-link- :to="{- path: `/${changelog.issue}`,- }"- class="normal-link text-sm hover:no-underline!"- target="_blank"- @click.stop- >- #{{ extractIssueUID(changelog.issue) }}- </router-link>- </div>- </template>- <template v-else-if="type === 'RAW_SQL'">- <div class="flex items-center gap-x-1">- <FileIcon :size="16" />- <span>{{ $t("changelist.change-source.raw-sql") }}</span>- </div>- </template>- <!-- Fallback -->- <template v-else>- <div class="flex items-center gap-x-1">- <FileIcon :size="16" />- <span>Unknown change type</span>- </div>- </template>- </div>-</template>--<script setup lang="ts">-import { computedAsync } from "@vueuse/core";-import { FileIcon, HistoryIcon } from "lucide-vue-next";-import { computed } from "vue";-import { useChangelogStore } from "@/store";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { extractIssueUID, getChangelistChangeSourceType } from "@/utils";--const props = defineProps<{- change: Change;-}>();--const type = computed(() => {- return getChangelistChangeSourceType(props.change);-});--const changelog = computedAsync(async () => {- if (type.value !== "CHANGELOG") return undefined;- return await useChangelogStore().getOrFetchChangelogByName(- props.change.source- );-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/index.ts b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/index.tsdeleted file mode 100644index 4bbbdaecfb..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import ChangeTable from "./ChangeTable.vue";--export default ChangeTable;diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vuedeleted file mode 100644index f884a60336..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangelistDetail.vue+++ /dev/null@@ -1,151 +0,0 @@-<template>- <div class="flex flex-col items-stretch gap-y-4 relative">- <NavBar />-- <ChangeTable- :changes="state.changes"- :reorder-mode="reorderMode"- @remove-change="handleRemoveChange($event)"- @select-change="handleSelectChange($event)"- @reorder-move="(row, delta) => handleReorderMove(row, delta)"- />-- <div v-if="allowDelete" class="flex flex-row">- <DeleteChangelistButton />- </div>-- <AddChangePanel />-- <div- v-if="isUpdating"- class="absolute inset-0 bg-white/50 flex flex-col items-center justify-center"- >- <BBSpin />- </div>-- <ChangelogDetailPanel- :changelog-name="state.detailChangelogName"- @close="state.detailChangelogName = undefined"- />- <RawSQLPanel- :sheet-name="state.detailRawSQLSheetName"- @close="state.detailRawSQLSheetName = undefined"- />-- <ApplyToDatabasePanel />- </div>-</template>--<script lang="ts" setup>-import { create } from "@bufbuild/protobuf";-import { computed, reactive, watch } from "vue";-import { useI18n } from "vue-i18n";-import { useRoute } from "vue-router";-import { BBSpin } from "@/bbkit";-import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";-import { PROJECT_V1_ROUTE_CHANGELIST_DETAIL } from "@/router/dashboard/projectV1";-import { pushNotification, useChangelistStore } from "@/store";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { ChangelistSchema } from "@/types/proto-es/v1/changelist_service_pb";-import { getChangelistChangeSourceType } from "@/utils";-import AddChangePanel from "./AddChangePanel";-import ApplyToDatabasePanel from "./ApplyToDatabasePanel";-import ChangeTable from "./ChangeTable";-import ChangelogDetailPanel from "./ChangelogDetailPanel/";-import DeleteChangelistButton from "./DeleteChangelistButton.vue";-import NavBar from "./NavBar";-import RawSQLPanel from "./RawSQLPanel";-import { provideChangelistDetailContext } from "./context";--const { t } = useI18n();-const route = useRoute();-const { changelist, reorderMode, isUpdating, events, allowDelete } =- provideChangelistDetailContext();--const state = reactive({- changes: [] as Change[],- detailChangelogName: undefined as string | undefined,- detailRawSQLSheetName: undefined as string | undefined,-});--const patchChanges = async (changes: Change[]) => {- const patch = create(ChangelistSchema, {- ...changelist.value,- changes,- });- try {- isUpdating.value = true;- await useChangelistStore().patchChangelist(patch, ["changes"]);- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.updated"),- });- } finally {- isUpdating.value = false;- }-};--const handleRemoveChange = async (change: Change) => {- const changes = [...changelist.value.changes];- const index = changes.indexOf(change);- if (index < 0) {- return;- }- changes.splice(index, 1);- await patchChanges(changes);-};-const handleSelectChange = async (change: Change) => {- const sourceType = getChangelistChangeSourceType(change);- if (sourceType === "CHANGELOG") {- state.detailChangelogName = change.source;- }- if (sourceType === "RAW_SQL") {- state.detailRawSQLSheetName = change.sheet;- }-};-const handleReorderMove = (row: number, delta: -1 | 1) => {- const target = row + delta;- const { changes } = state;- if (target < 0 || target >= changes.length) {- return;- }- const temp = changes[row];- changes[row] = changes[target];- changes[target] = temp;-};--const documentTitle = computed(() => {- if (route.name !== PROJECT_V1_ROUTE_CHANGELIST_DETAIL) {- return undefined;- }- return changelist.value.description;-});-watch(- documentTitle,- (title) => {- if (title) {- document.title = title;- }- },- { immediate: true }-);--useEmitteryEventListener(events, "reorder-cancel", () => {- state.changes = [...changelist.value.changes];- reorderMode.value = false;-});-useEmitteryEventListener(events, "reorder-confirm", async () => {- const changes = [...state.changes];- await patchChanges(changes);- reorderMode.value = false;-});--watch(- () => changelist.value.changes,- (changes) => {- state.changes = [...changes];- },- { immediate: true }-);-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangelogDetailPanel/ChangelogDetailPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangelogDetailPanel/ChangelogDetailPanel.vuedeleted file mode 100644index 1bed518786..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangelogDetailPanel/ChangelogDetailPanel.vue+++ /dev/null@@ -1,57 +0,0 @@-<template>- <Drawer :show="show" @close="$emit('close')">- <DrawerContent- style="width: 75vw; max-width: calc(100vw - 8rem)"- :title="$t('common.changelog')"- >- <ChangelogDetail v-if="detailBindings" v-bind="detailBindings" />- </DrawerContent>- </Drawer>-</template>--<script setup lang="ts">-import { computed } from "vue";-import { Drawer, DrawerContent } from "@/components/v2";-import { useChangelogStore } from "@/store";-import { extractDatabaseResourceName } from "@/utils";-import { extractChangelogUID } from "@/utils/v1/changelog";-import ChangelogDetail from "@/views/DatabaseDetail/ChangelogDetail.vue";-import { provideChangelistDetailContext } from "../context";--const props = defineProps<{- changelogName?: string;-}>();--defineEmits<{- (event: "close"): void;-}>();--const { project } = provideChangelistDetailContext();--const changelog = computed(() => {- const { changelogName } = props;- if (!changelogName) {- return undefined;- }- return useChangelogStore().getChangelogByName(changelogName);-});--const detailBindings = computed(() => {- if (!changelog.value) {- return undefined;- }- const { instance, database } = extractDatabaseResourceName(- changelog.value.name- );- return {- project: project.value.name,- instance,- database,- changelogId: extractChangelogUID(changelog.value.name),- };-});--const show = computed(() => {- return changelog.value !== undefined;-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangelogDetailPanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/ChangelogDetailPanel/index.tsdeleted file mode 100644index 3f9715c676..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/ChangelogDetailPanel/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import ChangelogDetailPanel from "./ChangelogDetailPanel.vue";--export default ChangelogDetailPanel;diff --git a/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vue b/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vuedeleted file mode 100644index d1e8a358a8..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/DeleteChangelistButton.vue+++ /dev/null@@ -1,76 +0,0 @@-<template>- <NTooltip :disabled="errors.length === 0">- <template #trigger>- <NPopconfirm :disabled="errors.length > 0" @positive-click="handleDelete">- <template #trigger>- <NButton- quaternary- size="small"- type="error"- style="--n-padding: 0 6px"- :disabled="errors.length > 0"- @click.stop- >- <template #icon>- <heroicons:trash />- </template>- <template #default>- {{ $t("changelist.delete-this-changelist") }}- </template>- </NButton>- </template>-- <template #default>- <div>{{ $t("changelist.confirm-delete-changelist") }}</div>- </template>- </NPopconfirm>- </template>-- <template #default>- <ErrorList :errors="errors" />- </template>- </NTooltip>-</template>--<script setup lang="ts">-import { NButton, NPopconfirm, NTooltip } from "naive-ui";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";-import ErrorList from "@/components/misc/ErrorList.vue";-import { PROJECT_V1_ROUTE_CHANGELISTS } from "@/router/dashboard/projectV1";-import { pushNotification, useChangelistStore } from "@/store";-import { useChangelistDetailContext } from "./context";--const router = useRouter();-const { t } = useI18n();-const { allowEdit, changelist, isUpdating } = useChangelistDetailContext();--const errors = computed(() => {- const errors: string[] = [];- if (!allowEdit.value) {- errors.push(- t("changelist.error.you-are-not-allowed-to-perform-this-action")- );- return errors;- }- return errors;-});--const handleDelete = async () => {- isUpdating.value = true;- try {- await useChangelistStore().deleteChangelist(changelist.value.name);- router.replace({- name: PROJECT_V1_ROUTE_CHANGELISTS,- });- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.deleted"),- });- } catch {- isUpdating.value = false;- }-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/AddChangeButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/AddChangeButton.vuedeleted file mode 100644index df24d37954..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/AddChangeButton.vue+++ /dev/null@@ -1,33 +0,0 @@-<template>- <ErrorTipsButton- icon- style="--n-padding: 0 10px"- :errors="errors"- @click="showAddChangePanel = true"- >- <template #icon>- <heroicons:plus />- </template>- </ErrorTipsButton>-</template>--<script setup lang="ts">-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { ErrorTipsButton } from "@/components/v2";-import { useChangelistDetailContext } from "../context";--const { t } = useI18n();-const { allowEdit, showAddChangePanel } = useChangelistDetailContext();--const errors = computed(() => {- const errors: string[] = [];- if (!allowEdit.value) {- errors.push(- t("changelist.error.you-are-not-allowed-to-perform-this-action")- );- return errors;- }- return errors;-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vuedeleted file mode 100644index a4629cfaba..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ApplyToDatabaseButton.vue+++ /dev/null@@ -1,30 +0,0 @@-<template>- <ErrorTipsButton- style="--n-padding: 0 10px"- :errors="errors"- :button-props="{- type: 'primary',- }"- @click="showApplyToDatabasePanel = true"- >- {{ $t("changelist.apply-to-database") }}- </ErrorTipsButton>-</template>--<script setup lang="ts">-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { ErrorTipsButton } from "@/components/v2";-import { useChangelistDetailContext } from "../context";--const { t } = useI18n();-const { changelist, showApplyToDatabasePanel } = useChangelistDetailContext();--const errors = computed(() => {- const errors: string[] = [];- if (changelist.value.changes.length === 0) {- errors.push(t("changelist.error.add-at-least-one-change"));- }- return errors;-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ExportButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ExportButton.vuedeleted file mode 100644index 4843a20ac6..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ExportButton.vue+++ /dev/null@@ -1,67 +0,0 @@-<template>- <ErrorTipsButton- icon- style="--n-padding: 0 10px"- :errors="errors"- :button-props="{- loading: isExporting,- }"- :disabled="isExporting"- @click="handleExport"- >- <template #icon>- <DownloadIcon class="w-4 h-4" />- </template>- </ErrorTipsButton>-</template>--<script setup lang="ts">-import dayjs from "dayjs";-import saveAs from "file-saver";-import JSZip from "jszip";-import { DownloadIcon } from "lucide-vue-next";-import { computed, ref } from "vue";-import { useI18n } from "vue-i18n";-import { ErrorTipsButton } from "@/components/v2";-import { escapeFilename } from "@/utils";-import { useChangelistDetailContext } from "../context";-import { zipFileForChange } from "./export";--const { t } = useI18n();-const { changelist } = useChangelistDetailContext();-const isExporting = ref(false);--const errors = computed(() => {- const errors: string[] = [];- if (changelist.value.changes.length === 0) {- errors.push(t("changelist.error.select-at-least-one-change-to-export"));- }- return errors;-});--const handleExport = async () => {- if (isExporting.value) {- return;- }-- isExporting.value = true;- const zip = new JSZip();- const { changes } = changelist.value;- for (let i = 0; i < changes.length; i++) {- await zipFileForChange(zip, changes[i], i);- }-- try {- const content = await zip.generateAsync({ type: "blob" });- const basename = `${changelist.value.description}_${dayjs().format(- "YYYYMMDD"- )}`;- const fileName = `${escapeFilename(basename)}.zip`;- saveAs(content, fileName);- } catch (error) {- console.error(error);- }-- isExporting.value = false;-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ImportButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ImportButton.vuedeleted file mode 100644index 2fbd0c2ae9..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ImportButton.vue+++ /dev/null@@ -1,72 +0,0 @@-<template>- <UploadFilesButton @update="onUploadFiles">- <template #trigger="{ onClick }">- <NTooltip>- <template #trigger>- <NButton icon style="--n-padding: 0 10px" @click="onClick">- <template #icon>- <UploadIcon class="w-4 h-4" />- </template>- </NButton>- </template>- <template #default>- <div class="whitespace-nowrap">- {{ $t("changelist.import.upload-sql-or-zip-file") }}- </div>- </template>- </NTooltip>- </template>- </UploadFilesButton>-</template>--<script setup lang="ts">-import { create } from "@bufbuild/protobuf";-import { UploadIcon } from "lucide-vue-next";-import { NButton, NTooltip } from "naive-ui";-import { useI18n } from "vue-i18n";-import UploadFilesButton from "@/components/UploadFilesButton.vue";-import { pushNotification, useChangelistStore, useSheetV1Store } from "@/store";-import {- Changelist_ChangeSchema,- ChangelistSchema,-} from "@/types/proto-es/v1/changelist_service_pb";-import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";-import { setSheetStatement } from "@/utils";-import { useChangelistDetailContext } from "../context";--const { t } = useI18n();-const { changelist, project } = useChangelistDetailContext();--const onUploadFiles = async (- statementMap: { filename: string; statement: string }[]-) => {- const createdSheets = await Promise.all(- statementMap.map(async (m) => {- const sheet = create(SheetSchema, {- title: m.filename,- });- setSheetStatement(sheet, m.statement);- const created = await useSheetV1Store().createSheet(- project.value.name,- sheet- );- return created;- })- );- const newChanges = createdSheets.map((sheet) =>- create(Changelist_ChangeSchema, {- sheet: sheet.name,- })- );- const changelistPatch = create(ChangelistSchema, {- ...changelist.value,- changes: [...changelist.value.changes, ...newChanges],- });- await useChangelistStore().patchChangelist(changelistPatch, ["changes"]);- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.updated"),- });-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/NavBar.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/NavBar.vuedeleted file mode 100644index f5dee0f8e9..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/NavBar.vue+++ /dev/null@@ -1,45 +0,0 @@-<template>- <div class="flex flex-row items-center justify-between gap-x-4">- <div class="flex-1 p-0.5 overflow-hidden truncate">- <TitleEditor />- </div>- <div class="flex items-center justify-end gap-x-3">- <template v-if="!reorderMode">- <ReorderButton v-if="allowEdit" @click="beginReorder" />- <ExportButton />- <ImportButton v-if="allowEdit" />- <AddChangeButton v-if="allowEdit" />- <ApplyToDatabaseButton v-if="allowApply" />- </template>-- <template v-if="reorderMode">- <NButton @click="cancelReorder">- {{ $t("common.cancel") }}- </NButton>- <NButton type="primary" @click="confirmReorder">- {{ $t("common.confirm") }}- </NButton>- </template>- </div>- </div>-</template>--<script setup lang="ts">-import { NButton } from "naive-ui";-import { useChangelistDetailContext } from "../context";-import AddChangeButton from "./AddChangeButton.vue";-import ApplyToDatabaseButton from "./ApplyToDatabaseButton.vue";-import ExportButton from "./ExportButton.vue";-import ImportButton from "./ImportButton.vue";-import ReorderButton from "./ReorderButton.vue";-import TitleEditor from "./TitleEditor.vue";-import { useReorderChangelist } from "./reorder";--const { reorderMode, allowEdit, allowApply } = useChangelistDetailContext();--const {- begin: beginReorder,- cancel: cancelReorder,- confirm: confirmReorder,-} = useReorderChangelist();-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ReorderButton.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/ReorderButton.vuedeleted file mode 100644index 6591384310..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/ReorderButton.vue+++ /dev/null@@ -1,31 +0,0 @@-<template>- <ErrorTipsButton icon style="--n-padding: 0 10px" :errors="errors">- <template #icon>- <heroicons:arrows-up-down />- </template>- </ErrorTipsButton>-</template>--<script setup lang="ts">-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { ErrorTipsButton } from "@/components/v2";-import { useChangelistDetailContext } from "../context";--const { t } = useI18n();-const { allowEdit, changelist } = useChangelistDetailContext();--const errors = computed(() => {- const errors: string[] = [];- if (!allowEdit.value) {- errors.push(- t("changelist.error.you-are-not-allowed-to-perform-this-action")- );- return errors;- }- if (changelist.value.changes.length === 0) {- errors.push(t("changelist.error.add-at-least-one-change"));- }- return errors;-});-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vue b/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vuedeleted file mode 100644index ed6ba27b17..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/TitleEditor.vue+++ /dev/null@@ -1,97 +0,0 @@-<template>- <span v-if="!allowEdit" class="text-xl font-bold ml-2 py-1 leading-[34px]">- {{ state.title }}- </span>- <NInput- v-else- :value="state.title"- :style="style"- :loading="state.isUpdating"- :disabled="!allowEdit || state.isUpdating"- autosize- required- @focus="state.isEditing = true"- @blur="onBlur"- @keyup.enter="onEnter"- @update:value="onUpdateValue"- />-</template>--<script setup lang="ts">-import { create } from "@bufbuild/protobuf";-import { NInput } from "naive-ui";-import type { CSSProperties } from "vue";-import { computed, reactive, watch } from "vue";-import { useI18n } from "vue-i18n";-import { pushNotification, useChangelistStore } from "@/store";-import { ChangelistSchema } from "@/types/proto-es/v1/changelist_service_pb";-import { useChangelistDetailContext } from "../context";--const { t } = useI18n();-const { changelist, allowEdit } = useChangelistDetailContext();--const state = reactive({- isEditing: false,- isUpdating: false,- title: changelist.value.description,-});--const style = computed(() => {- const style: CSSProperties = {- cursor: "default",- minWidth: "10rem",- "--n-color-disabled": "transparent",- "--n-font-size": "20px",- };- const border = state.isEditing- ? "1px solid rgb(var(--color-control-border))"- : "none";- style["--n-border"] = border;- style["--n-border-disabled"] = border;-- return style;-});--const onBlur = async () => {- const cleanup = () => {- state.isEditing = false;- state.isUpdating = false;- };-- if (state.title === changelist.value.description) {- cleanup();- return;- }- try {- state.isUpdating = true;- const patch = create(ChangelistSchema, {- ...changelist.value,- description: state.title,- });- useChangelistStore().patchChangelist(patch, ["description"]);- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.updated"),- });- } finally {- cleanup();- }-};--const onEnter = (e: Event) => {- const input = e.target as HTMLInputElement;- input.blur();-};--const onUpdateValue = (title: string) => {- state.title = title;-};--watch(- () => changelist.value.description,- (title) => {- state.title = title;- }-);-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.tsdeleted file mode 100644index 9efa459d53..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts+++ /dev/null@@ -1,79 +0,0 @@-import dayjs from "dayjs";-import type JSZip from "jszip";-import { padStart } from "lodash-es";-import { useChangelogStore, useSheetV1Store } from "@/store";-import {- getDateForPbTimestampProtoEs,- type Changelist_Change_Source as ChangeSource,-} from "@/types";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { ChangelogView } from "@/types/proto-es/v1/database_service_pb";-import {- escapeFilename,- getChangelistChangeSourceType,- getSheetStatement,-} from "@/utils";--const buildFileName = (type: ChangeSource, name: string, index: number) => {- const parts = [padStart(String(index + 1), 2, "0")];- parts.push(type);- if (name) {- parts.push(escapeFilename(name));- }- const basename = parts.join("-");- return `${basename}.sql`;-};--const zipFileForChangelog = async (- zip: JSZip,- change: Change,- index: number-) => {- const sheet = await useSheetV1Store().fetchSheetByName(change.sheet, "FULL");- if (!sheet) {- return;- }- const changelog = await useChangelogStore().getOrFetchChangelogByName(- change.source,- ChangelogView.FULL- );- if (!changelog) {- return;- }-- const parts: string[] = [- dayjs(getDateForPbTimestampProtoEs(changelog.createTime)).format(- "YYYY-MM-DD HH:mm:ss"- ),- ];- if (changelog.version) {- parts.push(changelog.version);- }-- const filename = buildFileName("CHANGELOG", parts.join("-"), index);- zip.file(filename, getSheetStatement(sheet));-};--const zipFileForRawSQL = async (zip: JSZip, change: Change, index: number) => {- const sheet = await useSheetV1Store().fetchSheetByName(change.sheet, "FULL");- if (!sheet) {- return;- }-- const filename = buildFileName("RAW_SQL", "", index);- zip.file(filename, getSheetStatement(sheet));-};--export const zipFileForChange = async (- zip: JSZip,- change: Change,- index: number-) => {- const type = getChangelistChangeSourceType(change);- if (type === "CHANGELOG") {- await zipFileForChangelog(zip, change, index);- }- if (type === "RAW_SQL") {- await zipFileForRawSQL(zip, change, index);- }-};diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/index.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/index.tsdeleted file mode 100644index 0a296d688c..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import NavBar from "./NavBar.vue";--export default NavBar;diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/reorder.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/reorder.tsdeleted file mode 100644index c61477c529..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/reorder.ts+++ /dev/null@@ -1,20 +0,0 @@-import { useChangelistDetailContext } from "../context";--export const useReorderChangelist = () => {- const { reorderMode, events } = useChangelistDetailContext();-- const begin = () => {- reorderMode.value = true;- };- const cancel = () => {- events.emit("reorder-cancel");- };- const confirm = () => {- events.emit("reorder-confirm");- };- return {- begin,- cancel,- confirm,- };-};diff --git a/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vue b/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vuedeleted file mode 100644index 6dd06977b7..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/RawSQLEditor.vue+++ /dev/null@@ -1,81 +0,0 @@-<template>- <div class="flex flex-col gap-y-2">- <div v-if="!readonly" class="flex justify-end">- <SQLUploadButton- :loading="state.isUploadingFile"- @update:sql="handleUpdateStatement"- >- {{ $t("issue.upload-sql") }}- </SQLUploadButton>- </div>-- <div- ref="editorWrapperRef"- class="flex-1 overflow-hidden relative"- :data-height="editorWrapperHeight"- >- <MonacoEditor- :content="statement"- :readonly="readonly || isSheetOversize"- class="border w-full h-full"- @update:content="$emit('update:statement', $event)"- @ready="handleEditorReady"- />- </div>- </div>-</template>--<script setup lang="ts">-import { useElementSize } from "@vueuse/core";-import { reactive, ref, watch } from "vue";-import {- type IStandaloneCodeEditor,- type MonacoModule,- MonacoEditor,-} from "@/components/MonacoEditor";-import SQLUploadButton from "@/components/misc/SQLUploadButton.vue";--interface LocalState {- isUploadingFile: boolean;-}--defineProps<{- statement: string;- readonly: boolean;- isSheetOversize?: boolean;-}>();--const emit = defineEmits<{- (event: "update:statement", statement: string): void;- (event: "upload", e: Event): void;-}>();--const state = reactive<LocalState>({- isUploadingFile: false,-});-const editorWrapperRef = ref<HTMLDivElement>();-const { height: editorWrapperHeight } = useElementSize(editorWrapperRef);--const handleUpdateStatement = async (statement: string) => {- try {- state.isUploadingFile = true;- emit("update:statement", statement);- } finally {- state.isUploadingFile = false;- }-};--const handleEditorReady = (- monaco: MonacoModule,- editor: IStandaloneCodeEditor-) => {- watch(- editorWrapperHeight,- () => {- const container = editor.getContainerDomNode();- container.style.height = `${editorWrapperHeight.value}px`;- },- { immediate: true }- );-};-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/index.ts b/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/index.tsdeleted file mode 100644index 426f84c794..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/RawSQLEditor/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import RawSQLEditor from "./RawSQLEditor.vue";--export default RawSQLEditor;diff --git a/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vuedeleted file mode 100644index 4497f7e06f..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/RawSQLPanel.vue+++ /dev/null@@ -1,176 +0,0 @@-<template>- <Drawer :show="show" :close-on-esc="!dirty" @close="$emit('close')">- <DrawerContent- :title="title"- class="relative"- style="width: 75vw; max-width: calc(100vw - 8rem)"- >- <template #default>- <div class="h-full flex flex-col gap-y-4 flex-1 overflow-hidden">- <BBAttention- v-if="isSheetOversize"- type="warning"- :title="$t('issue.statement-from-sheet-warning')"- >- <template #action>- <DownloadSheetButton- v-if="sheetName"- :sheet="sheetName"- size="small"- />- </template>- </BBAttention>- <RawSQLEditor- v-if="sheet"- v-model:statement="statement"- :readonly="!allowEdit"- :is-sheet-oversize="isSheetOversize"- class="flex-1 overflow-hidden relative"- />- </div>- <div- v-if="isUpdating"- v-zindexable="{ enabled: true }"- class="absolute bg-white/50 inset-0 flex flex-col items-center justify-center"- >- <BBSpin />- </div>- </template>-- <template #footer>- <div class="flex items-center justify-end gap-x-3">- <NButton @click="$emit('close')">- {{ $t("common.cancel") }}- </NButton>-- <ErrorTipsButton- v-if="allowEdit"- :errors="errors"- :button-props="{- type: 'primary',- }"- @click="doSaveChange"- >- {{ $t("common.save") }}- </ErrorTipsButton>- </div>- </template>- </DrawerContent>- </Drawer>-</template>--<script setup lang="ts">-import { create as createProto } from "@bufbuild/protobuf";-import { computedAsync } from "@vueuse/core";-import { NButton } from "naive-ui";-import { zindexable as vZindexable } from "vdirs";-import { computed, ref, watch } from "vue";-import { useI18n } from "vue-i18n";-import { BBAttention, BBSpin } from "@/bbkit";-import DownloadSheetButton from "@/components/Sheet/DownloadSheetButton.vue";-import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";-import { pushNotification, useSheetV1Store } from "@/store";-import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";-import {- getSheetStatement,- setSheetStatement,- getStatementSize,-} from "@/utils";-import RawSQLEditor from "../RawSQLEditor";-import { useChangelistDetailContext } from "../context";--const props = defineProps<{- sheetName?: string;-}>();--const emit = defineEmits<{- (event: "close"): void;-}>();--const sheetStore = useSheetV1Store();-const { t } = useI18n();-const { allowEdit } = useChangelistDetailContext();-const title = ref(t("changelist.change-source.raw-sql"));-const statement = ref("");-const isUpdating = ref(false);--const sheet = computedAsync(async () => {- const { sheetName } = props;- if (!sheetName) return undefined;- return sheetStore.getOrFetchSheetByName(sheetName, "FULL");-}, undefined);--const show = computed(() => {- return sheet.value !== undefined;-});--const isSheetOversize = computed(() => {- if (!sheet.value) return false;- return (- getStatementSize(getSheetStatement(sheet.value)) < sheet.value.contentSize- );-});--const dirty = computed(() => {- if (!sheet.value) return false;- return statement.value !== getSheetStatement(sheet.value);-});--const errors = computed(() => {- const errors: string[] = [];- if (statement.value.trim().length === 0) {- errors.push(t("changelist.error.sql-cannot-be-empty"));- }- if (!dirty.value) {- errors.push(t("changelist.error.nothing-changed"));- }- return errors;-});--const reset = () => {- if (!sheet.value) {- statement.value = "";- } else {- statement.value = getSheetStatement(sheet.value);- }-};--const doSaveChange = async () => {- if (!sheet.value) {- return;- }- if (errors.value.length > 0) {- return;- }-- try {- isUpdating.value = true;- const patch = createProto(SheetSchema, {- name: sheet.value.name,- });- setSheetStatement(patch, statement.value);- await sheetStore.patchSheetContent(patch);-- pushNotification({- module: "bytebase",- style: "SUCCESS",- title: t("common.updated"),- });- emit("close");- } finally {- isUpdating.value = false;- }-};--watch(sheet, reset, { immediate: true });--watch(- show,- (show) => {- if (show) {- reset();- }- },- { immediate: true }-);-</script>diff --git a/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/index.ts b/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/index.tsdeleted file mode 100644index f79ca16ca0..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/RawSQLPanel/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import RawSQLPanel from "./RawSQLPanel.vue";--export default RawSQLPanel;diff --git a/frontend/src/components/Changelist/ChangelistDetail/common.ts b/frontend/src/components/Changelist/ChangelistDetail/common.tsdeleted file mode 100644index af3b71a8f2..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/common.ts+++ /dev/null@@ -1,9 +0,0 @@-import { useProjectV1Store } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";-import type { Changelist } from "@/types/proto-es/v1/changelist_service_pb";-import { extractProjectResourceName } from "@/utils";--export const projectForChangelist = (changelist: Changelist) => {- const proj = extractProjectResourceName(changelist.name);- return useProjectV1Store().getProjectByName(`${projectNamePrefix}${proj}`);-};diff --git a/frontend/src/components/Changelist/ChangelistDetail/context.ts b/frontend/src/components/Changelist/ChangelistDetail/context.tsdeleted file mode 100644index abce850672..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/context.ts+++ /dev/null@@ -1,130 +0,0 @@-import { computedAsync } from "@vueuse/core";-import Emittery from "emittery";-import type { InjectionKey, Ref } from "vue";-import { computed, inject, provide, ref, watchEffect } from "vue";-import { useRoute } from "vue-router";-import {- useChangelistStore,- useCurrentUserV1,- useProjectV1Store,- extractUserId,-} from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";-import { unknownProject, unknownChangelist, isValidProjectName } from "@/types";-import type { Permission } from "@/types";-import type {- Changelist,- Changelist_Change as Change,-} from "@/types/proto-es/v1/changelist_service_pb";-import type { Project } from "@/types/proto-es/v1/project_service_pb";-import {- hasPermissionToCreateChangeDatabaseIssueInProject,- hasProjectPermissionV2,-} from "@/utils";--export type ChangelistDetailEvents = Emittery<{- "reorder-cancel": undefined;- "reorder-confirm": undefined;-}>;--export type ChangelistDetailContext = {- changelist: Ref<Changelist>;- project: Ref<Project>;- allowEdit: Ref<boolean>;- allowDelete: Ref<boolean>;- allowApply: Ref<boolean>;- reorderMode: Ref<boolean>;- selectedChanges: Ref<Change[]>;- showAddChangePanel: Ref<boolean>;- showApplyToDatabasePanel: Ref<boolean>;- isUpdating: Ref<boolean>;-- events: ChangelistDetailEvents;-};--export const KEY = Symbol(- "bb.changelist.detail"-) as InjectionKey<ChangelistDetailContext>;--export const useChangelistDetailContext = () => {- return inject(KEY)!;-};--export const provideChangelistDetailContext = () => {- const me = useCurrentUserV1();- const route = useRoute();- const projectV1Store = useProjectV1Store();-- const project = computedAsync(async () => {- const projectId = route.params.projectId as string;- if (!projectId) {- return unknownProject();- }-- const proj = await projectV1Store.getOrFetchProjectByName(- `${projectNamePrefix}${projectId}`- );- return proj;- }, unknownProject());-- const changelistName = computed(() => {- if (!isValidProjectName(project.value.name)) {- return;- }- return `${project.value.name}/changelists/${route.params.changelistName}`;- });-- watchEffect(async () => {- if (changelistName.value) {- await useChangelistStore().getOrFetchChangelistByName(- changelistName.value- );- }- });-- const changelist = computed(() => {- if (!changelistName.value) {- return unknownChangelist();- }- return (- useChangelistStore().getChangelistByName(changelistName.value) ??- unknownChangelist()- );- });-- const checkPermission = (permission: Permission): boolean => {- return (- hasProjectPermissionV2(project.value, permission) ||- extractUserId(changelist.value.creator) === me.value.email- );- };-- const allowDelete = computed(() => {- return checkPermission("bb.changelists.delete");- });- const allowApply = computed(() => {- return hasPermissionToCreateChangeDatabaseIssueInProject(project.value);- });- const allowEdit = computed(() => {- return checkPermission("bb.changelists.update");- });-- const context: ChangelistDetailContext = {- changelist,- project,- allowEdit,- allowDelete,- allowApply,- reorderMode: ref(false),- selectedChanges: ref([]),- showAddChangePanel: ref(false),- showApplyToDatabasePanel: ref(false),- isUpdating: ref(false),-- events: new Emittery(),- };-- provide(KEY, context);-- return context;-};diff --git a/frontend/src/components/Changelist/ChangelistDetail/index.ts b/frontend/src/components/Changelist/ChangelistDetail/index.tsdeleted file mode 100644index 55ba44e63d..0000000000--- a/frontend/src/components/Changelist/ChangelistDetail/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import ChangelistDetail from "./ChangelistDetail.vue";--export default ChangelistDetail;diff --git a/frontend/src/components/Changelist/import.ts b/frontend/src/components/Changelist/import.tsdeleted file mode 100644index f21694ebe7..0000000000--- a/frontend/src/components/Changelist/import.ts+++ /dev/null@@ -1,48 +0,0 @@-import JSZip from "jszip";-import { orderBy } from "lodash-es";-import type { UploadFileInfo } from "naive-ui";--export type ParsedFile = {- name: string;- arrayBuffer: ArrayBuffer;-};--const unzip = async (file: File) => {- const zip = await JSZip.loadAsync(file);- const files = orderBy(zip.files, (f) => f.name, "asc").filter(- (f) => !f.dir && f.name.toLowerCase().endsWith(".sql")- );- const results = await Promise.all(- files.map<Promise<ParsedFile>>(async (f) => {- const arrayBuffer = await f.async("arraybuffer");- return {- name: f.name,- arrayBuffer,- };- })- );- return results;-};--export const readUpload = async (fileInfo: UploadFileInfo) => {- if (!fileInfo.file) {- return [];- }-- const files: ParsedFile[] = [];- if (fileInfo.name.toLowerCase().endsWith(".sql")) {- if (!fileInfo.file) {- // Should not reach here.- return [];- }- const arrayBuffer = await fileInfo.file.arrayBuffer();- files.push({- name: fileInfo.file.name,- arrayBuffer: arrayBuffer,- });- } else {- const results = await unzip(fileInfo.file);- files.push(...results);- }- return files;-};diff --git a/frontend/src/components/Plan/logic/initialize/create.ts b/frontend/src/components/Plan/logic/initialize/create.tsindex d3ae8dbca1..3028cd6eee 100644--- a/frontend/src/components/Plan/logic/initialize/create.ts+++ b/frontend/src/components/Plan/logic/initialize/create.ts@@ -2,11 +2,7 @@ import { create as createProto } from "@bufbuild/protobuf";import { cloneDeep, head, includes } from "lodash-es";import { v4 as uuidv4 } from "uuid";import { useRoute } from "vue-router";-import {- useChangelistStore,- useProjectV1Store,- useSheetV1Store,-} from "@/store";+import { useProjectV1Store, useSheetV1Store } from "@/store";import { projectNamePrefix } from "@/store/modules/v1/common";import type { IssueType } from "@/types";import {@@ -22,12 +18,7 @@ import {Plan_SpecSchema,} from "@/types/proto-es/v1/plan_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";-import {- extractSheetUID,- generateSQLForChangeToDatabase,- getSheetStatement,- setSheetStatement,-} from "@/utils";+import { extractSheetUID, getSheetStatement, setSheetStatement } from "@/utils";import { sheetNameForSpec, targetsForSpec } from "../plan";import { getLocalSheetByName, getNextLocalSheetUID } from "../sheet";import { extractInitialSQLFromQuery } from "./util";@@ -98,32 +89,24 @@ export const buildPlan = async (params: CreatePlanParams) => {title: query.name,description: query.description,});- if (query.changelist) {- plan.specs = await buildSpecsViaChangelist(- databaseNameList,- query.changelist,- params- );- } else {- const targets = query.databaseGroupName- ? [query.databaseGroupName]- : databaseNameList;- // If initialSQL.sqlMap is provided, we will use it to build multiple specs.- // Mainly used for sync schema.- const shouldUseMultiSpecs =- params.initialSQL.sqlMap &&- Object.keys(params.initialSQL.sqlMap).length > 0;- if (shouldUseMultiSpecs) {- for (const target of targets) {- const spec = await buildSpecForTargetsV1([target], params);- maybeSetInitialSQLForSpec(spec, params);- plan.specs.push(spec);- }- } else {- const spec = await buildSpecForTargetsV1(targets, params);+ const targets = query.databaseGroupName+ ? [query.databaseGroupName]+ : databaseNameList;+ // If initialSQL.sqlMap is provided, we will use it to build multiple specs.+ // Mainly used for sync schema.+ const shouldUseMultiSpecs =+ params.initialSQL.sqlMap &&+ Object.keys(params.initialSQL.sqlMap).length > 0;+ if (shouldUseMultiSpecs) {+ for (const target of targets) {+ const spec = await buildSpecForTargetsV1([target], params);maybeSetInitialSQLForSpec(spec, params);- plan.specs = [spec];+ plan.specs.push(spec);}+ } else {+ const spec = await buildSpecForTargetsV1(targets, params);+ maybeSetInitialSQLForSpec(spec, params);+ plan.specs = [spec];}return plan;};@@ -191,30 +174,6 @@ const buildSpecForTargetsV1 = async (return spec;};-const buildSpecsViaChangelist = async (- databaseNameList: string[],- changelistResourceName: string,- params: CreatePlanParams-) => {- const changelist = await useChangelistStore().getOrFetchChangelistByName(- changelistResourceName- );- const { changes } = changelist;- const specs: Plan_Spec[] = [];- for (const db of databaseNameList) {- for (const change of changes) {- const statement = await generateSQLForChangeToDatabase(change);- const sheetUID = getNextLocalSheetUID();- const sheetName = `${params.project.name}/sheets/${sheetUID}`;- const sheet = getLocalSheetByName(sheetName);- setSheetStatement(sheet, statement);- const spec = await buildSpecForTargetsV1([db], params, sheetUID);- specs.push(spec);- }- }- return specs;-};-const maybeSetInitialSQLForSpec = (spec: Plan_Spec,params: CreatePlanParamsdiff --git a/frontend/src/components/Project/useProjectSidebar.ts b/frontend/src/components/Project/useProjectSidebar.tsindex 345dcf44c5..4dbe2de436 100644--- a/frontend/src/components/Project/useProjectSidebar.ts+++ b/frontend/src/components/Project/useProjectSidebar.ts@@ -3,7 +3,6 @@ import {CircleDot,Users,Settings,- PencilRuler,DownloadIcon,PackageIcon,LayoutList,@@ -23,7 +22,6 @@ import projectV1Routes, {PROJECT_V1_ROUTE_MEMBERS,PROJECT_V1_ROUTE_SETTINGS,PROJECT_V1_ROUTE_WEBHOOKS,- PROJECT_V1_ROUTE_CHANGELISTS,PROJECT_V1_ROUTE_DATABASE_GROUPS,PROJECT_V1_ROUTE_EXPORT_CENTER,PROJECT_V1_ROUTE_AUDIT_LOGS,@@ -102,13 +100,6 @@ export const useProjectSidebar = (project: MaybeRef<Project>) => {},]: [- {- title: t("changelist.changelists"),- path: PROJECT_V1_ROUTE_CHANGELISTS,- icon: () => h(PencilRuler),- type: "div",- hide: isDefaultProject.value,- },{title: t("release.releases"),path: PROJECT_V1_ROUTE_RELEASES,diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vueindex faef61e75d..1409a795c7 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue@@ -1,6 +1,6 @@<template><NButton @click="state.showApplyToDatabasePanel = true">- {{ $t("changelist.apply-to-database") }}+ {{ $t("common.apply-to-database") }}</NButton><ApplyToDatabasePaneldiff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vueindex 94acf37c2d..55b0f1ce8a 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue@@ -1,6 +1,6 @@<template><Drawer v-bind="$attrs" @close="emit('close')">- <DrawerContent :title="$t('changelist.apply-to-database')">+ <DrawerContent :title="$t('common.apply-to-database')"><template #default><div class="w-[calc(100vw-8rem)] lg:w-240 max-w-[calc(100vw-8rem)]"><DatabaseAndGroupSelectordiff --git a/frontend/src/components/UploadFilesButton.vue b/frontend/src/components/UploadFilesButton.vuedeleted file mode 100644index e066111c5a..0000000000--- a/frontend/src/components/UploadFilesButton.vue+++ /dev/null@@ -1,126 +0,0 @@-<template>- <NUpload- v-model:file-list="uploadFileList"- abstract- accept="application/x-zip,.zip,application/sql,.sql"- :multiple="false"- v-bind="$attrs"- @change="handleFileChange"- >- <NUploadTrigger #="{ handleClick }" abstract>- <slot name="trigger" @click="handleClick" />- </NUploadTrigger>- </NUpload>-- <BBModal- :show="state.showModal"- :title="$t('sql-editor.select-encoding')"- @close="closeModal"- >- <div class="w-96">- <div class="w-full flex flex-row justify-start items-center gap-2">- <span class="textlabel">{{ $t("common.encoding") }}</span>- <NSelect- v-model:value="state.encoding"- size="small"- filterable- :options="encodingOptions"- :consistent-menu-width="false"- />- </div>- <NUpload :file-list="uploadFileList" disabled trigger-class="hidden!">- </NUpload>- </div>- <div class="w-full flex items-center justify-end mt-4 gap-x-2">- <NButton quaternary @click="closeModal">- {{ $t("common.cancel") }}- </NButton>- <NButton type="primary" @click="onConfirm">- {{ $t("common.confirm") }}- </NButton>- </div>- </BBModal>-</template>--<script setup lang="ts">-import {- NButton,- NSelect,- NUpload,- NUploadTrigger,- type UploadFileInfo,-} from "naive-ui";-import { computed, reactive, ref } from "vue";-import { useI18n } from "vue-i18n";-import BBModal from "@/bbkit/BBModal.vue";-import { readUpload } from "@/components/Changelist/import";-import { pushNotification } from "@/store";-import { ENCODINGS, type Encoding } from "@/utils";--type ParsedFile = {- name: string;- arrayBuffer: ArrayBuffer;-};--interface LocalState {- encoding: Encoding;- files: ParsedFile[];- showModal: boolean;-}--const emit = defineEmits<{- (event: "update", value: { filename: string; statement: string }[]): void;-}>();--const { t } = useI18n();-const state = reactive<LocalState>({- encoding: "utf-8",- files: [],- showModal: false,-});-const uploadFileList = ref<UploadFileInfo[]>([]);--const encodingOptions = computed(() =>- ENCODINGS.map((encoding) => ({- label: encoding,- value: encoding,- }))-);--const cleanup = () => {- uploadFileList.value = [];- state.files = [];-};--const handleFileChange = async (options: { file: UploadFileInfo }) => {- const files = await readUpload(options.file);- if (files.length === 0) {- pushNotification({- module: "bytebase",- style: "WARN",- title: t("changelist.import.no-file-to-upload"),- });- uploadFileList.value = [];- }- state.files = files;- state.showModal = true;-};--const onConfirm = async () => {- emit(- "update",- state.files.map((f) => {- return {- filename: f.name,- statement: new TextDecoder(state.encoding).decode(f.arrayBuffer),- };- })- );- closeModal();-};--const closeModal = () => {- state.showModal = false;- cleanup();-};-</script>diff --git a/frontend/src/components/v2/Form/ResourceIdField.vue b/frontend/src/components/v2/Form/ResourceIdField.vueindex c17e843094..ebea9221a0 100644--- a/frontend/src/components/v2/Form/ResourceIdField.vue+++ b/frontend/src/components/v2/Form/ResourceIdField.vue@@ -100,7 +100,6 @@ type ResourceType =| "idp"| "role"| "database-group"- | "changelist"| "review-config";const props = withDefaults(diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.tsindex 5a9749125c..a70c62fb7e 100644--- a/frontend/src/grpcweb/index.ts+++ b/frontend/src/grpcweb/index.ts@@ -4,7 +4,6 @@ import { ActuatorService } from "@/types/proto-es/v1/actuator_service_pb";import { AuditLogService } from "@/types/proto-es/v1/audit_log_service_pb";import { AuthService } from "@/types/proto-es/v1/auth_service_pb";import { CelService } from "@/types/proto-es/v1/cel_service_pb";-import { ChangelistService } from "@/types/proto-es/v1/changelist_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 { DatabaseService } from "@/types/proto-es/v1/database_service_pb";@@ -108,11 +107,6 @@ export const orgPolicyServiceClientConnect = createClient(transport);-export const changelistServiceClientConnect = createClient(- ChangelistService,- transport-);-export const reviewConfigServiceClientConnect = createClient(ReviewConfigService,transportdiff --git a/frontend/src/grpcweb/methods.ts b/frontend/src/grpcweb/methods.tsindex ccd08a3a96..e335644075 100644--- a/frontend/src/grpcweb/methods.ts+++ b/frontend/src/grpcweb/methods.ts@@ -4,7 +4,6 @@ import { audit } from "@/types/proto-es/v1/annotation_pb";import { AuditLogService } from "@/types/proto-es/v1/audit_log_service_pb";import { AuthService } from "@/types/proto-es/v1/auth_service_pb";import { CelService } from "@/types/proto-es/v1/cel_service_pb";-import { ChangelistService } from "@/types/proto-es/v1/changelist_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 { DatabaseService } from "@/types/proto-es/v1/database_service_pb";@@ -37,7 +36,6 @@ export const ALL_METHODS_WITH_AUDIT = [AuditLogService,AuthService,CelService,- ChangelistService,DatabaseCatalogService,DatabaseGroupService,DatabaseService,diff --git a/frontend/src/locales/dynamic/en-US.json b/frontend/src/locales/dynamic/en-US.jsonindex 966b88d913..d7d1cc8fcc 100644--- a/frontend/src/locales/dynamic/en-US.json+++ b/frontend/src/locales/dynamic/en-US.json@@ -115,10 +115,6 @@"title": "Schema drift detection","desc": "Detect out-of-band schema changes and report discrepancies."},- "FEATURE_CHANGELIST": {- "title": "Changelist",- "desc": "Group and manage multiple database changes together."- },"FEATURE_SCHEMA_TEMPLATE": {"title": "Schema template","desc": "Create reusable field templates for consistent schema design."@@ -359,8 +355,7 @@"project": "Project","idp": "Identity Provider","database-group": "Database Group",- "changelist": "Changelist","review-config": "Review Config","role": "Role"}-}+}\ No newline at end of filediff --git a/frontend/src/locales/dynamic/es-ES.json b/frontend/src/locales/dynamic/es-ES.jsonindex 6b679de057..e5b56bd115 100644--- a/frontend/src/locales/dynamic/es-ES.json+++ b/frontend/src/locales/dynamic/es-ES.json@@ -115,10 +115,6 @@"title": "Detección de desviación de esquema","desc": "Detecte cambios de esquema fuera de banda e informe discrepancias."},- "FEATURE_CHANGELIST": {- "title": "Lista de cambios",- "desc": "Agrupe y gestione múltiples cambios de base de datos juntos."- },"FEATURE_SCHEMA_TEMPLATE": {"title": "Plantilla de esquema","desc": "Cree plantillas de campos reutilizables para un diseño de esquema consistente."@@ -359,7 +355,6 @@"project": "Proyecto","idp": "Proveedor de Identidad","database-group": "grupo de bases de datos",- "changelist": "Lista de cambios","review-config": "Revisar configuración","role": "Rol"}diff --git a/frontend/src/locales/dynamic/ja-JP.json b/frontend/src/locales/dynamic/ja-JP.jsonindex ea432cc379..21ccc9e9e1 100644--- a/frontend/src/locales/dynamic/ja-JP.json+++ b/frontend/src/locales/dynamic/ja-JP.json@@ -115,10 +115,6 @@"title": "スキーマドリフト検出","desc": "帯域外のスキーマ変更を検出し、不一致を報告します。"},- "FEATURE_CHANGELIST": {- "title": "変更リスト",- "desc": "複数のデータベース変更をまとめてグループ化し管理します。"- },"FEATURE_SCHEMA_TEMPLATE": {"title": "スキーマテンプレート","desc": "一貫したスキーマ設計のための再利用可能なフィールドテンプレートを作成します。"@@ -359,7 +355,6 @@"project": "プロジェクト","idp": "アイデンティティプロバイダー","database-group": "データベースのグループ化",- "changelist": "変更リスト","review-config": "設定を確認する","role": "役割"}diff --git a/frontend/src/locales/dynamic/vi-VN.json b/frontend/src/locales/dynamic/vi-VN.jsonindex 1cba510ae6..45b9484539 100644--- a/frontend/src/locales/dynamic/vi-VN.json+++ b/frontend/src/locales/dynamic/vi-VN.json@@ -115,10 +115,6 @@"title": "Phát hiện độ lệch schema","desc": "Phát hiện các thay đổi schema ngoài luồng và báo cáo sự khác biệt."},- "FEATURE_CHANGELIST": {- "title": "Danh sách thay đổi",- "desc": "Nhóm và quản lý nhiều thay đổi cơ sở dữ liệu cùng nhau."- },"FEATURE_SCHEMA_TEMPLATE": {"title": "Mẫu schema","desc": "Tạo mẫu trường có thể tái sử dụng cho thiết kế schema nhất quán."@@ -359,7 +355,6 @@"project": "Dự án","idp": "Nhà cung cấp danh tính","database-group": "Nhóm cơ sở dữ liệu",- "changelist": "Danh sách thay đổi","review-config": "Cấu hình đánh giá","role": "Vai trò"}diff --git a/frontend/src/locales/dynamic/zh-CN.json b/frontend/src/locales/dynamic/zh-CN.jsonindex 28788901ef..1bb3e97356 100644--- a/frontend/src/locales/dynamic/zh-CN.json+++ b/frontend/src/locales/dynamic/zh-CN.json@@ -115,10 +115,6 @@"title": "Schema 偏差检测","desc": "检测带外 schema 更改并报告差异。"},- "FEATURE_CHANGELIST": {- "title": "变更列表",- "desc": "将多个数据库更改分组并一起管理。"- },"FEATURE_SCHEMA_TEMPLATE": {"title": "Schema 模板","desc": "创建可重用的字段模板以实现一致的 schema 设计。"@@ -359,7 +355,6 @@"project": "项目","idp": "身份提供商","database-group": "数据库分组",- "changelist": "变更列表","review-config": "审查配置","role": "角色"}diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 4fa0327aa6..970d856e0d 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -225,7 +225,6 @@"n-rows": "{n} rows"},"back-to-workspace": "Back to workspace",- "encoding": "Encoding","finish": "Finish","title": "Title","text-wrap": "Text Wrap",@@ -246,7 +245,8 @@},"collapse": "Collapse","line": "Line",- "column": "Column"+ "column": "Column",+ "apply-to-database": "Apply to database"},"error-page": {"go-back-home": "Go back home"@@ -2818,44 +2818,6 @@"add-root-condition-placeholder": "Click \"Add condition\" or \"Add condition group\" to add condition"}},- "changelist": {- "self": "Changelist",- "changelists": "Changelists",- "new": "New Changelist",- "name": "Changelist name",- "name-placeholder": "My changelist",- "error": {- "name-is-required": "Changelist name is required",- "invalid-resource-id": "Invalid resource Id",- "nothing-changed": "Nothing changed",- "sql-cannot-be-empty": "SQL is required",- "select-at-least-one-change": "Select at least one change",- "select-at-least-one-change-to-export": "Select at least one change to export",- "add-at-least-one-change": "Add at least one change",- "you-are-not-allowed-to-perform-this-action": "You are not allowed to perform this action"- },- "apply-to-database": "Apply to database",- "add-change": {- "self": "Add Change",- "changelog": {- "select-at-least-one-changelog-below": "Select at least one changelog below"- }- },- "change-source": {- "self": "Change source",- "raw-sql": "Raw SQL",- "source": "Source"- },- "confirm-remove-change": "Remove this change?",- "delete-this-changelist": "Delete this changelist",- "confirm-delete-changelist": "Delete this changelist?",- "import": {- "no-file-to-upload": "No file to upload",- "upload-sql-or-zip-file": "Upload .sql or .zip file",- "optional-upload-sql-or-zip-file": "(Optional) Upload .sql or .zip file"- },- "change-type": "Change type"- },"release": {"title": "Release","releases": "Releases",@@ -2948,4 +2910,4 @@"last-visit": "Last visit","changelog-for-version": "Changelog for {version}"}-}+}\ No newline at end of filediff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 3104b2bdfa..46fa3d3447 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1,5 +1,6 @@{"common": {+ "apply-to-database": "Aplicar a la base de datos","view": "Ver","you": "tu","general": "General",@@ -225,7 +226,6 @@"n-rows": "{n} filas"},"back-to-workspace": "Volver al espacio de trabajo",- "encoding": "Codificación","finish": "Finalizar","title": "Título","text-wrap": "Ajuste de texto",@@ -2818,44 +2818,6 @@"add-root-condition-placeholder": "Haga clic en \"Agregar condición\" o \"Agregar grupo de condiciones\" para agregar una condición"}},- "changelist": {- "self": "Lista de cambios",- "changelists": "Listas de cambios",- "new": "Nueva lista de cambios",- "name": "Nombre de la lista de cambios",- "name-placeholder": "Mi lista de cambios",- "error": {- "name-is-required": "El nombre de la lista de cambios es obligatorio",- "invalid-resource-id": "ID de recurso no válido",- "nothing-changed": "nada ha cambiado",- "sql-cannot-be-empty": "Se requiere SQL",- "select-at-least-one-change": "Seleccione al menos un cambio",- "select-at-least-one-change-to-export": "Seleccione al menos un cambio para exportar",- "add-at-least-one-change": "Añade al menos un cambio",- "you-are-not-allowed-to-perform-this-action": "No tienes permiso para realizar esta acción."- },- "apply-to-database": "Aplicar a la base de datos",- "add-change": {- "self": "Agregar cambio",- "changelog": {- "select-at-least-one-changelog-below": "Seleccione al menos un historial a continuación"- }- },- "change-source": {- "self": "Cambiar fuente",- "raw-sql": "SQL sin formato",- "source": "Fuente"- },- "confirm-remove-change": "¿Eliminar este cambio?",- "delete-this-changelist": "Eliminar esta lista de cambios",- "confirm-delete-changelist": "¿Eliminar esta lista de cambios?",- "import": {- "no-file-to-upload": "No hay archivos para subir",- "upload-sql-or-zip-file": "Cargue el archivo .sql o .zip",- "optional-upload-sql-or-zip-file": "(Opcional) Cargue el archivo .sql o .zip"- },- "change-type": "Cambiar tipo"- },"release": {"title": "Liberar","releases": "Lanzamientos",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 41168e6a78..6d31265fd4 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1,5 +1,6 @@{"common": {+ "apply-to-database": "データベースに適用","view": "チェック","you": "あなた","general": "全般",@@ -225,7 +226,6 @@"n-rows": "{n} 行"},"back-to-workspace": "ワークスペースに戻る",- "encoding": "エンコーディング","finish": "仕上げる","title": "タイトル","text-wrap": "テキストの折り返し",@@ -2818,44 +2818,6 @@"add-root-condition-placeholder": "「条件を追加」または「条件グループを追加」をクリックして条件を追加します。"}},- "changelist": {- "self": "変更リスト",- "changelists": "変更リスト",- "new": "新しい変更リスト",- "name": "リスト名の変更",- "name-placeholder": "私の変更リスト",- "error": {- "name-is-required": "変更リスト名を空にすることはできません",- "invalid-resource-id": "無効なリソース ID",- "nothing-changed": "変化なし",- "sql-cannot-be-empty": "SQL を空にすることはできません",- "select-at-least-one-change": "少なくとも 1 つの変更を選択してください",- "select-at-least-one-change-to-export": "エクスポートする変更を少なくとも 1 つ選択してください",- "add-at-least-one-change": "少なくとも 1 つの変更を追加する",- "you-are-not-allowed-to-perform-this-action": "このアクションを実行する権限がありません"- },- "apply-to-database": "データベースに適用する",- "add-change": {- "self": "変更を追加",- "changelog": {- "select-at-least-one-changelog-below": "以下から少なくとも 1 つのレコードを選択してください"- }- },- "change-source": {- "self": "ソースを変更する",- "raw-sql": "SQL文",- "source": "ソース"- },- "confirm-remove-change": "この変更を削除しますか?",- "delete-this-changelist": "この変更リストを削除します",- "confirm-delete-changelist": "変更リストを削除しますか?",- "import": {- "no-file-to-upload": "アップロードするファイルがありません",- "upload-sql-or-zip-file": ".sql または .zip ファイルをアップロードする",- "optional-upload-sql-or-zip-file": "(オプション) .sql または .zip ファイルをアップロードします"- },- "change-type": "タイプを変更"- },"release": {"title": "リリース","releases": "リリース",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex e609f541b0..39ce3ec024 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1,5 +1,6 @@{"common": {+ "apply-to-database": "Áp dụng cho cơ sở dữ liệu","view": "Xem","you": "bạn","general": "Chung",@@ -225,7 +226,6 @@"n-rows": "{n} dòng"},"back-to-workspace": "Quay lại không gian làm việc",- "encoding": "Mã hóa","finish": "Hoàn tất","title": "Tiêu đề","text-wrap": "Ngắt dòng văn bản",@@ -2818,44 +2818,6 @@"add-root-condition-placeholder": "Nhấp vào \"Thêm điều kiện\" hoặc \"Thêm nhóm điều kiện\" để thêm điều kiện"}},- "changelist": {- "self": "Danh sách thay đổi",- "changelists": "Danh sách thay đổi",- "new": "Danh sách thay đổi mới",- "name": "Tên danh sách thay đổi",- "name-placeholder": "Danh sách thay đổi của tôi",- "error": {- "name-is-required": "Tên danh sách thay đổi là bắt buộc",- "invalid-resource-id": "ID tài nguyên không hợp lệ",- "nothing-changed": "Không có gì thay đổi",- "sql-cannot-be-empty": "SQL là bắt buộc",- "select-at-least-one-change": "Chọn ít nhất một thay đổi",- "select-at-least-one-change-to-export": "Chọn ít nhất một thay đổi để xuất",- "add-at-least-one-change": "Thêm ít nhất một thay đổi",- "you-are-not-allowed-to-perform-this-action": "Bạn không được phép thực hiện hành động này"- },- "apply-to-database": "Áp dụng cho cơ sở dữ liệu",- "add-change": {- "self": "Thêm thay đổi",- "changelog": {- "select-at-least-one-changelog-below": "Chọn ít nhất một nhật ký thay đổi bên dưới"- }- },- "change-source": {- "self": "Nguồn thay đổi",- "raw-sql": "SQL thô",- "source": "Nguồn"- },- "confirm-remove-change": "Xóa thay đổi này?",- "delete-this-changelist": "Xóa danh sách thay đổi này",- "confirm-delete-changelist": "Xóa danh sách thay đổi này?",- "import": {- "no-file-to-upload": "Không có tệp nào để tải lên",- "upload-sql-or-zip-file": "Tải lên tệp .sql hoặc .zip",- "optional-upload-sql-or-zip-file": "(Tùy chọn) Tải lên tệp .sql hoặc .zip"- },- "change-type": "Loại thay đổi"- },"release": {"title": "Giải phóng","releases": "Bản phát hành",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 934a27f0c2..3083074cc5 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1,5 +1,6 @@{"common": {+ "apply-to-database": "应用到数据库","view": "查看","you": "您","general": "通用",@@ -225,7 +226,6 @@"n-rows": "{n} 行"},"back-to-workspace": "返回工作空间",- "encoding": "编码","finish": "完成","title": "标题","text-wrap": "文本折行",@@ -2818,44 +2818,6 @@"add-root-condition-placeholder": "点击「添加条件」或「添加条件组」以添加条件"}},- "changelist": {- "self": "变更列表",- "changelists": "变更列表",- "new": "新建变更列表",- "name": "变更列表名称",- "name-placeholder": "我的变更列表",- "error": {- "name-is-required": "变更列表名称不能为空",- "invalid-resource-id": "无效的资源 ID",- "nothing-changed": "无任何改变",- "sql-cannot-be-empty": "SQL 不能为空",- "select-at-least-one-change": "选择至少一条变更",- "select-at-least-one-change-to-export": "至少选择一项要导出的变更",- "add-at-least-one-change": "添加至少一项变更",- "you-are-not-allowed-to-perform-this-action": "你无权执行此操作"- },- "apply-to-database": "应用到数据库",- "add-change": {- "self": "添加变更",- "changelog": {- "select-at-least-one-changelog-below": "请在下方选择至少一条记录"- }- },- "change-source": {- "self": "变更来源",- "raw-sql": "SQL 语句",- "source": "来源"- },- "confirm-remove-change": "移除这项变更?",- "delete-this-changelist": "删除这个变更列表",- "confirm-delete-changelist": "删除变更列表?",- "import": {- "no-file-to-upload": "没有可以上传的文件",- "upload-sql-or-zip-file": "上传 .sql 或 .zip 文件",- "optional-upload-sql-or-zip-file": "(可选)上传 .sql 或 .zip 文件"- },- "change-type": "更改类型"- },"release": {"title": "发布包","releases": "发布包",diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.tsindex 66a806e25a..da9956c920 100644--- a/frontend/src/router/dashboard/projectV1.ts+++ b/frontend/src/router/dashboard/projectV1.ts@@ -20,8 +20,6 @@ export const PROJECT_V1_ROUTE_PLANS = `${PROJECT_V1_ROUTE_DASHBOARD}.plan`;export const PROJECT_V1_ROUTE_PLAN_DETAIL = `${PROJECT_V1_ROUTE_DASHBOARD}.plan.detail`;export const PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS = `${PROJECT_V1_ROUTE_PLAN_DETAIL}.specs`;export const PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL = `${PROJECT_V1_ROUTE_PLAN_DETAIL}.spec.detail`;-export const PROJECT_V1_ROUTE_CHANGELISTS = `${PROJECT_V1_ROUTE_DASHBOARD}.changelist`;-export const PROJECT_V1_ROUTE_CHANGELIST_DETAIL = `${PROJECT_V1_ROUTE_DASHBOARD}.changelist.detail`;export const PROJECT_V1_ROUTE_SYNC_SCHEMA = `${PROJECT_V1_ROUTE_DASHBOARD}.sync-schema`;export const PROJECT_V1_ROUTE_AUDIT_LOGS = `${PROJECT_V1_ROUTE_DASHBOARD}.audit-logs`;export const PROJECT_V1_ROUTE_WEBHOOKS = `${PROJECT_V1_ROUTE_DASHBOARD}.webhook`;@@ -258,35 +256,6 @@ const projectV1Routes: RouteRecordRaw[] = [component: () => import("@/views/project/ProjectRolloutDashboard.vue"),props: true,},- {- path: "changelists",- meta: {- title: () => t("changelist.changelists"),- },- props: true,- children: [- {- path: "",- name: PROJECT_V1_ROUTE_CHANGELISTS,- meta: {- requiredPermissionList: () => ["bb.changelists.list"],- },- component: () =>- import("@/views/project/ProjectChangelistDashboard.vue"),- props: true,- },- {- path: ":changelistName",- name: PROJECT_V1_ROUTE_CHANGELIST_DETAIL,- meta: {- requiredPermissionList: () => ["bb.changelists.get"],- },- component: () =>- import("@/components/Changelist/ChangelistDetail/"),- props: true,- },- ],- },{path: "sync-schema",name: PROJECT_V1_ROUTE_SYNC_SCHEMA,diff --git a/frontend/src/store/modules/v1/changelist.ts b/frontend/src/store/modules/v1/changelist.tsdeleted file mode 100644index 2ae8cac3c0..0000000000--- a/frontend/src/store/modules/v1/changelist.ts+++ /dev/null@@ -1,133 +0,0 @@-import { create } from "@bufbuild/protobuf";-import { createContextValues } from "@connectrpc/connect";-import { defineStore } from "pinia";-import { reactive } from "vue";-import { changelistServiceClientConnect } from "@/grpcweb";-import { silentContextKey } from "@/grpcweb/context-key";-import type {- Changelist,- Changelist_Change as Change,- CreateChangelistRequest,- ListChangelistsRequest,-} from "@/types/proto-es/v1/changelist_service_pb";-import {- GetChangelistRequestSchema,- ListChangelistsRequestSchema,- UpdateChangelistRequestSchema,- DeleteChangelistRequestSchema,-} from "@/types/proto-es/v1/changelist_service_pb";-import { ResourceComposer, isChangelogChangeSource } from "@/utils";-import { useUserStore } from "../user";-import { useChangelogStore } from "./changelog";-import { useSheetV1Store } from "./sheet";--export const useChangelistStore = defineStore("changelist", () => {- const changelistMapByName = reactive(new Map<string, Changelist>());-- const upsertChangelistMap = async (- changelists: Changelist[],- compose: boolean- ) => {- await useUserStore().batchGetUsers(- changelists.map((changelist) => changelist.creator)- );- for (let i = 0; i < changelists.length; i++) {- const changelist = changelists[i];- if (compose) {- await composeChangelist(changelist);- }- changelistMapByName.set(changelist.name, changelist);- }- };-- const getChangelistByName = (name: string) => {- return changelistMapByName.get(name);- };-- const fetchChangelistByName = async (name: string, silent = false) => {- const request = create(GetChangelistRequestSchema, { name });- const changelist = await changelistServiceClientConnect.getChangelist(- request,- { contextValues: createContextValues().set(silentContextKey, silent) }- );- await upsertChangelistMap([changelist], true /* compose */);- return changelist;- };-- const getOrFetchChangelistByName = async (name: string, silent = false) => {- const cachedData = changelistMapByName.get(name);- if (cachedData) {- return cachedData;- }-- return fetchChangelistByName(name, silent);- };-- const createChangelist = async (request: CreateChangelistRequest) => {- const created =- await changelistServiceClientConnect.createChangelist(request);- await upsertChangelistMap([created], true /* compose */);- return created;- };-- const fetchChangelists = async (request: Partial<ListChangelistsRequest>) => {- const connectRequest = create(ListChangelistsRequestSchema, request as any);- const response =- await changelistServiceClientConnect.listChangelists(connectRequest);- await upsertChangelistMap(response.changelists, false /* !compose */);- return response;- };-- const patchChangelist = async (- changelist: Changelist,- updateMask: string[]- ) => {- const connectRequest = create(UpdateChangelistRequestSchema, {- changelist: changelist,- updateMask: { paths: updateMask },- });- const updated =- await changelistServiceClientConnect.updateChangelist(connectRequest);- await upsertChangelistMap([updated], true /* compose */);- return updated;- };-- const deleteChangelist = async (name: string) => {- const connectRequest = create(DeleteChangelistRequestSchema, { name });- await changelistServiceClientConnect.deleteChangelist(connectRequest);- changelistMapByName.delete(name);- };-- const composeChangelist = async (changelist: Changelist) => {- const composer = new ResourceComposer();- const { changes } = changelist;- for (let i = 0; i < changes.length; i++) {- composeChange(changes[i], composer);- }-- await composer.compose();- };- const composeChange = (change: Change, composer: ResourceComposer) => {- const { sheet, source } = change;- if (isChangelogChangeSource(change)) {- composer.collect(source, () =>- useChangelogStore().getOrFetchChangelogByName(source)- );- } else {- // Raw SQL, no need to compose- }- composer.collect(sheet, () =>- // Use any (basic or full) view of sheets here to save data size- useSheetV1Store().getOrFetchSheetByName(sheet)- );- };-- return {- getChangelistByName,- getOrFetchChangelistByName,- createChangelist,- fetchChangelists,- patchChangelist,- deleteChangelist,- };-});diff --git a/frontend/src/store/modules/v1/index.ts b/frontend/src/store/modules/v1/index.tsindex 2326502d39..75f1c10ea5 100644--- a/frontend/src/store/modules/v1/index.ts+++ b/frontend/src/store/modules/v1/index.ts@@ -1,7 +1,6 @@export * from "./actuator";export * from "./auth";export * from "./auditLog";-export * from "./changelist";export * from "./changelog";export * from "./common";export * from "./database";diff --git a/frontend/src/types/iam/permission.ts b/frontend/src/types/iam/permission.tsindex 91cf0b047b..265606f1d7 100644--- a/frontend/src/types/iam/permission.ts+++ b/frontend/src/types/iam/permission.ts@@ -3,11 +3,6 @@ import type { PickLiteral } from "../utils";export type Permission =| "bb.auditLogs.export"| "bb.auditLogs.search"- | "bb.changelists.create"- | "bb.changelists.delete"- | "bb.changelists.get"- | "bb.changelists.list"- | "bb.changelists.update"| "bb.changelogs.get"| "bb.changelogs.list"| "bb.databaseCatalogs.get"diff --git a/frontend/src/types/proto-es/v1/changelist_service_pb.d.ts b/frontend/src/types/proto-es/v1/changelist_service_pb.d.tsdeleted file mode 100644index e37b4df2b9..0000000000--- a/frontend/src/types/proto-es/v1/changelist_service_pb.d.ts+++ /dev/null@@ -1,318 +0,0 @@-// @generated by protoc-gen-es v2.5.2-// @generated from file v1/changelist_service.proto (package bytebase.v1, syntax proto3)-/* eslint-disable */--import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";-import type { Message } from "@bufbuild/protobuf";-import type { EmptySchema, FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";--/**- * Describes the file v1/changelist_service.proto.- */-export declare const file_v1_changelist_service: GenFile;--/**- * Request message for creating a changelist.- *- * @generated from message bytebase.v1.CreateChangelistRequest- */-export declare type CreateChangelistRequest = Message<"bytebase.v1.CreateChangelistRequest"> & {- /**- * The parent resource where this changelist will be created.- * Format: projects/{project}- *- * @generated from field: string parent = 1;- */- parent: string;-- /**- * The changelist to create.- *- * @generated from field: bytebase.v1.Changelist changelist = 2;- */- changelist?: Changelist;-- /**- * The ID to use for the changelist, which will become the final component of- * the changelist's resource name.- *- * This value should be 4-63 characters, and valid characters- * are /[a-z][0-9]-/.- *- * @generated from field: string changelist_id = 3;- */- changelistId: string;-};--/**- * Describes the message bytebase.v1.CreateChangelistRequest.- * Use `create(CreateChangelistRequestSchema)` to create a new message.- */-export declare const CreateChangelistRequestSchema: GenMessage<CreateChangelistRequest>;--/**- * Request message for getting a changelist.- *- * @generated from message bytebase.v1.GetChangelistRequest- */-export declare type GetChangelistRequest = Message<"bytebase.v1.GetChangelistRequest"> & {- /**- * The name of the changelist to retrieve.- * Format: projects/{project}/changelists/{changelist}- *- * @generated from field: string name = 1;- */- name: string;-};--/**- * Describes the message bytebase.v1.GetChangelistRequest.- * Use `create(GetChangelistRequestSchema)` to create a new message.- */-export declare const GetChangelistRequestSchema: GenMessage<GetChangelistRequest>;--/**- * Request message for listing changelists.- *- * @generated from message bytebase.v1.ListChangelistsRequest- */-export declare type ListChangelistsRequest = Message<"bytebase.v1.ListChangelistsRequest"> & {- /**- * The parent, which owns this collection of changelists.- * Format: projects/{project}- *- * @generated from field: string parent = 1;- */- parent: string;-};--/**- * Describes the message bytebase.v1.ListChangelistsRequest.- * Use `create(ListChangelistsRequestSchema)` to create a new message.- */-export declare const ListChangelistsRequestSchema: GenMessage<ListChangelistsRequest>;--/**- * Response message for listing changelists.- *- * @generated from message bytebase.v1.ListChangelistsResponse- */-export declare type ListChangelistsResponse = Message<"bytebase.v1.ListChangelistsResponse"> & {- /**- * The changelists from the specified request.- *- * @generated from field: repeated bytebase.v1.Changelist changelists = 1;- */- changelists: Changelist[];-};--/**- * Describes the message bytebase.v1.ListChangelistsResponse.- * Use `create(ListChangelistsResponseSchema)` to create a new message.- */-export declare const ListChangelistsResponseSchema: GenMessage<ListChangelistsResponse>;--/**- * Request message for updating a changelist.- *- * @generated from message bytebase.v1.UpdateChangelistRequest- */-export declare type UpdateChangelistRequest = Message<"bytebase.v1.UpdateChangelistRequest"> & {- /**- * The changelist to update.- *- * The changelist's `name` field is used to identify the changelist to update.- * Format: projects/{project}/changelists/{changelist}- *- * @generated from field: bytebase.v1.Changelist changelist = 1;- */- changelist?: Changelist;-- /**- * The list of fields to be updated.- *- * @generated from field: google.protobuf.FieldMask update_mask = 2;- */- updateMask?: FieldMask;-- /**- * If set to true, and the changelist is not found, a new changelist will be created.- * In this situation, `update_mask` is ignored.- *- * @generated from field: bool allow_missing = 3;- */- allowMissing: boolean;-};--/**- * Describes the message bytebase.v1.UpdateChangelistRequest.- * Use `create(UpdateChangelistRequestSchema)` to create a new message.- */-export declare const UpdateChangelistRequestSchema: GenMessage<UpdateChangelistRequest>;--/**- * Request message for deleting a changelist.- *- * @generated from message bytebase.v1.DeleteChangelistRequest- */-export declare type DeleteChangelistRequest = Message<"bytebase.v1.DeleteChangelistRequest"> & {- /**- * The name of the changelist to delete.- * Format: projects/{project}/changelists/{changelist}- *- * @generated from field: string name = 1;- */- name: string;-};--/**- * Describes the message bytebase.v1.DeleteChangelistRequest.- * Use `create(DeleteChangelistRequestSchema)` to create a new message.- */-export declare const DeleteChangelistRequestSchema: GenMessage<DeleteChangelistRequest>;--/**- * A changelist groups multiple database changes together.- *- * @generated from message bytebase.v1.Changelist- */-export declare type Changelist = Message<"bytebase.v1.Changelist"> & {- /**- * The name of the changelist resource.- * Canonical parent is project.- * Format: projects/{project}/changelists/{changelist}- *- * @generated from field: string name = 1;- */- name: string;-- /**- * The description of the changelist.- *- * @generated from field: string description = 2;- */- description: string;-- /**- * The creator of the changelist.- * Format: users/{email}- *- * @generated from field: string creator = 3;- */- creator: string;-- /**- * The last time the changelist was updated.- *- * @generated from field: google.protobuf.Timestamp update_time = 6;- */- updateTime?: Timestamp;-- /**- * The list of changes in this changelist.- *- * @generated from field: repeated bytebase.v1.Changelist.Change changes = 7;- */- changes: Changelist_Change[];-};--/**- * Describes the message bytebase.v1.Changelist.- * Use `create(ChangelistSchema)` to create a new message.- */-export declare const ChangelistSchema: GenMessage<Changelist>;--/**- * A single change in a changelist.- *- * @generated from message bytebase.v1.Changelist.Change- */-export declare type Changelist_Change = Message<"bytebase.v1.Changelist.Change"> & {- /**- * The sheet containing the SQL statement.- * Format: projects/{project}/sheets/{sheet}- *- * @generated from field: string sheet = 1;- */- sheet: string;-- /**- * The source of this change.- * Format: instances/{instance}/databases/{database}/changelogs/{changelog}- * If empty, the change is from raw SQL.- *- * @generated from field: string source = 2;- */- source: string;-};--/**- * Describes the message bytebase.v1.Changelist.Change.- * Use `create(Changelist_ChangeSchema)` to create a new message.- */-export declare const Changelist_ChangeSchema: GenMessage<Changelist_Change>;--/**- * ChangelistService manages changelists for grouping and organizing database changes.- *- * @generated from service bytebase.v1.ChangelistService- */-export declare const ChangelistService: GenService<{- /**- * Creates a new changelist in a project.- * Permissions required: bb.changelists.create- *- * @generated from rpc bytebase.v1.ChangelistService.CreateChangelist- */- createChangelist: {- methodKind: "unary";- input: typeof CreateChangelistRequestSchema;- output: typeof ChangelistSchema;- },- /**- * Gets a changelist by name.- * Permissions required: bb.changelists.get- *- * @generated from rpc bytebase.v1.ChangelistService.GetChangelist- */- getChangelist: {- methodKind: "unary";- input: typeof GetChangelistRequestSchema;- output: typeof ChangelistSchema;- },- /**- * Lists changelists in a project.- * Permissions required: bb.changelists.list- *- * @generated from rpc bytebase.v1.ChangelistService.ListChangelists- */- listChangelists: {- methodKind: "unary";- input: typeof ListChangelistsRequestSchema;- output: typeof ListChangelistsResponseSchema;- },- /**- * Updates a changelist.- * Permissions required: bb.changelists.update- * When allow_missing=true, also requires: bb.changelists.create- *- * @generated from rpc bytebase.v1.ChangelistService.UpdateChangelist- */- updateChangelist: {- methodKind: "unary";- input: typeof UpdateChangelistRequestSchema;- output: typeof ChangelistSchema;- },- /**- * Deletes a changelist.- * Permissions required: bb.changelists.delete- *- * @generated from rpc bytebase.v1.ChangelistService.DeleteChangelist- */- deleteChangelist: {- methodKind: "unary";- input: typeof DeleteChangelistRequestSchema;- output: typeof EmptySchema;- },-}>;-diff --git a/frontend/src/types/proto-es/v1/changelist_service_pb.js b/frontend/src/types/proto-es/v1/changelist_service_pb.jsdeleted file mode 100644index c735d2c426..0000000000--- a/frontend/src/types/proto-es/v1/changelist_service_pb.js+++ /dev/null@@ -1,83 +0,0 @@-// @generated by protoc-gen-es v2.5.2-// @generated from file v1/changelist_service.proto (package bytebase.v1, syntax proto3)-/* eslint-disable */--import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";-import { file_buf_validate_validate } from "../buf/validate/validate_pb";-import { file_google_api_annotations } from "../google/api/annotations_pb";-import { file_google_api_client } from "../google/api/client_pb";-import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";-import { file_google_api_resource } from "../google/api/resource_pb";-import { file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";-import { file_v1_annotation } from "./annotation_pb";--/**- * Describes the file v1/changelist_service.proto.- */-export const file_v1_changelist_service = /*@__PURE__*/- fileDesc("Cht2MS9jaGFuZ2VsaXN0X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpUBChdDcmVhdGVDaGFuZ2VsaXN0UmVxdWVzdBIsCgZwYXJlbnQYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1Byb2plY3QSMAoKY2hhbmdlbGlzdBgCIAEoCzIXLmJ5dGViYXNlLnYxLkNoYW5nZWxpc3RCA+BBAhIaCg1jaGFuZ2VsaXN0X2lkGAMgASgJQgPgQQIiRQoUR2V0Q2hhbmdlbGlzdFJlcXVlc3QSLQoEbmFtZRgBIAEoCUIf4EEC+kEZChdieXRlYmFzZS5jb20vQ2hhbmdlbGlzdCJGChZMaXN0Q2hhbmdlbGlzdHNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdCJHChdMaXN0Q2hhbmdlbGlzdHNSZXNwb25zZRIsCgtjaGFuZ2VsaXN0cxgBIAMoCzIXLmJ5dGViYXNlLnYxLkNoYW5nZWxpc3QikwEKF1VwZGF0ZUNoYW5nZWxpc3RSZXF1ZXN0EjAKCmNoYW5nZWxpc3QYASABKAsyFy5ieXRlYmFzZS52MS5DaGFuZ2VsaXN0QgPgQQISLwoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrEhUKDWFsbG93X21pc3NpbmcYAyABKAgiSAoXRGVsZXRlQ2hhbmdlbGlzdFJlcXVlc3QSLQoEbmFtZRgBIAEoCUIf4EEC+kEZChdieXRlYmFzZS5jb20vQ2hhbmdlbGlzdCKyAgoKQ2hhbmdlbGlzdBIUCgRuYW1lGAEgASgJQgbgQQLgQQUSHQoLZGVzY3JpcHRpb24YAiABKAlCCLpIBXIDGOgHEhQKB2NyZWF0b3IYAyABKAlCA+BBAxI0Cgt1cGRhdGVfdGltZRgGIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIvCgdjaGFuZ2VzGAcgAygLMh4uYnl0ZWJhc2UudjEuQ2hhbmdlbGlzdC5DaGFuZ2UaJwoGQ2hhbmdlEg0KBXNoZWV0GAEgASgJEg4KBnNvdXJjZRgCIAEoCTpJ6kFGChdieXRlYmFzZS5jb20vQ2hhbmdlbGlzdBIrcHJvamVjdHMve3Byb2plY3R9L2NoYW5nZWxpc3RzL3tjaGFuZ2VsaXN0fTKpBwoRQ2hhbmdlbGlzdFNlcnZpY2USuwEKEENyZWF0ZUNoYW5nZWxpc3QSJC5ieXRlYmFzZS52MS5DcmVhdGVDaGFuZ2VsaXN0UmVxdWVzdBoXLmJ5dGViYXNlLnYxLkNoYW5nZWxpc3QiaNpBEXBhcmVudCxjaGFuZ2VsaXN0iuowFWJiLmNoYW5nZWxpc3RzLmNyZWF0ZZDqMAGC0+STAjE6CmNoYW5nZWxpc3QiIy92MS97cGFyZW50PXByb2plY3RzLyp9L2NoYW5nZWxpc3RzEpkBCg1HZXRDaGFuZ2VsaXN0EiEuYnl0ZWJhc2UudjEuR2V0Q2hhbmdlbGlzdFJlcXVlc3QaFy5ieXRlYmFzZS52MS5DaGFuZ2VsaXN0IkzaQQRuYW1liuowEmJiLmNoYW5nZWxpc3RzLmdldJDqMAGC0+STAiUSIy92MS97bmFtZT1wcm9qZWN0cy8qL2NoYW5nZWxpc3RzLyp9Eq0BCg9MaXN0Q2hhbmdlbGlzdHMSIy5ieXRlYmFzZS52MS5MaXN0Q2hhbmdlbGlzdHNSZXF1ZXN0GiQuYnl0ZWJhc2UudjEuTGlzdENoYW5nZWxpc3RzUmVzcG9uc2UiT9pBBnBhcmVudIrqMBNiYi5jaGFuZ2VsaXN0cy5saXN0kOowAYLT5JMCJRIjL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vY2hhbmdlbGlzdHMS5QEKEFVwZGF0ZUNoYW5nZWxpc3QSJC5ieXRlYmFzZS52MS5VcGRhdGVDaGFuZ2VsaXN0UmVxdWVzdBoXLmJ5dGViYXNlLnYxLkNoYW5nZWxpc3QikQHaQRZjaGFuZ2VsaXN0LHVwZGF0ZV9tYXNriuowFWJiLmNoYW5nZWxpc3RzLnVwZGF0ZZDqMAGi6jAVYmIuY2hhbmdlbGlzdHMuY3JlYXRlgtPkkwI8OgpjaGFuZ2VsaXN0Mi4vdjEve2NoYW5nZWxpc3QubmFtZT1wcm9qZWN0cy8qL2NoYW5nZWxpc3RzLyp9EqEBChBEZWxldGVDaGFuZ2VsaXN0EiQuYnl0ZWJhc2UudjEuRGVsZXRlQ2hhbmdlbGlzdFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiT9pBBG5hbWWK6jAVYmIuY2hhbmdlbGlzdHMuZGVsZXRlkOowAYLT5JMCJSojL3YxL3tuYW1lPXByb2plY3RzLyovY2hhbmdlbGlzdHMvKn1CrAEKD2NvbS5ieXRlYmFzZS52MUIWQ2hhbmdlbGlzdFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation]);--/**- * Describes the message bytebase.v1.CreateChangelistRequest.- * Use `create(CreateChangelistRequestSchema)` to create a new message.- */-export const CreateChangelistRequestSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 0);--/**- * Describes the message bytebase.v1.GetChangelistRequest.- * Use `create(GetChangelistRequestSchema)` to create a new message.- */-export const GetChangelistRequestSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 1);--/**- * Describes the message bytebase.v1.ListChangelistsRequest.- * Use `create(ListChangelistsRequestSchema)` to create a new message.- */-export const ListChangelistsRequestSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 2);--/**- * Describes the message bytebase.v1.ListChangelistsResponse.- * Use `create(ListChangelistsResponseSchema)` to create a new message.- */-export const ListChangelistsResponseSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 3);--/**- * Describes the message bytebase.v1.UpdateChangelistRequest.- * Use `create(UpdateChangelistRequestSchema)` to create a new message.- */-export const UpdateChangelistRequestSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 4);--/**- * Describes the message bytebase.v1.DeleteChangelistRequest.- * Use `create(DeleteChangelistRequestSchema)` to create a new message.- */-export const DeleteChangelistRequestSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 5);--/**- * Describes the message bytebase.v1.Changelist.- * Use `create(ChangelistSchema)` to create a new message.- */-export const ChangelistSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 6);--/**- * Describes the message bytebase.v1.Changelist.Change.- * Use `create(Changelist_ChangeSchema)` to create a new message.- */-export const Changelist_ChangeSchema = /*@__PURE__*/- messageDesc(file_v1_changelist_service, 6, 0);--/**- * ChangelistService manages changelists for grouping and organizing database changes.- *- * @generated from service bytebase.v1.ChangelistService- */-export const ChangelistService = /*@__PURE__*/- serviceDesc(file_v1_changelist_service, 0);-diff --git a/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts b/frontend/src/types/proto-es/v1/subscription_service_pb.d.tsindex 331f192ed6..1bd30c4587 100644--- a/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts@@ -265,11 +265,6 @@ export enum PlanFeature {*/FEATURE_SCHEMA_DRIFT_DETECTION = 13,- /**- * @generated from enum value: FEATURE_CHANGELIST = 14;- */- FEATURE_CHANGELIST = 14,-/*** @generated from enum value: FEATURE_SCHEMA_TEMPLATE = 15;*/diff --git a/frontend/src/types/proto-es/v1/subscription_service_pb.js b/frontend/src/types/proto-es/v1/subscription_service_pb.jsindex c990ca46d2..6dcadbbd79 100644--- a/frontend/src/types/proto-es/v1/subscription_service_pb.js+++ b/frontend/src/types/proto-es/v1/subscription_service_pb.js@@ -13,7 +13,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/subscription_service.proto.*/export const file_v1_subscription_service = /*@__PURE__*/- fileDesc("Ch12MS9zdWJzY3JpcHRpb25fc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiGAoWR2V0U3Vic2NyaXB0aW9uUmVxdWVzdCJDChlVcGRhdGVTdWJzY3JpcHRpb25SZXF1ZXN0Eg8KB2xpY2Vuc2UYASABKAkSFQoNYWxsb3dfbWlzc2luZxgCIAEoCCLoAQoMU3Vic2NyaXB0aW9uEigKBHBsYW4YASABKA4yFS5ieXRlYmFzZS52MS5QbGFuVHlwZUID4EEDEhIKBXNlYXRzGAIgASgFQgPgQQMSFgoJaW5zdGFuY2VzGAMgASgFQgPgQQMSHQoQYWN0aXZlX2luc3RhbmNlcxgEIAEoBUID4EEDEjUKDGV4cGlyZXNfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIVCgh0cmlhbGluZxgGIAEoCEID4EEDEhUKCG9yZ19uYW1lGAcgASgJQgPgQQMibgoKUGxhbkNvbmZpZxIrCgVwbGFucxgBIAMoCzIcLmJ5dGViYXNlLnYxLlBsYW5MaW1pdENvbmZpZxIzChFpbnN0YW5jZV9mZWF0dXJlcxgCIAMoDjIYLmJ5dGViYXNlLnYxLlBsYW5GZWF0dXJlIp4BCg9QbGFuTGltaXRDb25maWcSIwoEdHlwZRgBIAEoDjIVLmJ5dGViYXNlLnYxLlBsYW5UeXBlEh4KFm1heGltdW1faW5zdGFuY2VfY291bnQYAiABKAUSGgoSbWF4aW11bV9zZWF0X2NvdW50GAMgASgFEioKCGZlYXR1cmVzGAQgAygOMhguYnl0ZWJhc2UudjEuUGxhbkZlYXR1cmUqSQoIUGxhblR5cGUSGQoVUExBTl9UWVBFX1VOU1BFQ0lGSUVEEAASCAoERlJFRRABEggKBFRFQU0QAhIOCgpFTlRFUlBSSVNFEAMqiBMKC1BsYW5GZWF0dXJlEhcKE0ZFQVRVUkVfVU5TUEVDSUZJRUQQABIbChdGRUFUVVJFX0RBVEFCQVNFX0NIQU5HRRABEiwKKEZFQVRVUkVfR0lUX0JBU0VEX1NDSEVNQV9WRVJTSU9OX0NPTlRST0wQAhIoCiRGRUFUVVJFX0RFQ0xBUkFUSVZFX1NDSEVNQV9NSUdSQVRJT04QAxIjCh9GRUFUVVJFX0NPTVBBUkVfQU5EX1NZTkNfU0NIRU1BEAQSIAocRkVBVFVSRV9PTkxJTkVfU0NIRU1BX0NIQU5HRRAFEiUKIUZFQVRVUkVfUFJFX0RFUExPWU1FTlRfU1FMX1JFVklFVxAGEjAKLEZFQVRVUkVfQVVUT01BVElDX0JBQ0tVUF9CRUZPUkVfREFUQV9DSEFOR0VTEAcSIwofRkVBVFVSRV9PTkVfQ0xJQ0tfREFUQV9ST0xMQkFDSxAIEigKJEZFQVRVUkVfTVVMVElfREFUQUJBU0VfQkFUQ0hfQ0hBTkdFUxAJEi4KKkZFQVRVUkVfUFJPR1JFU1NJVkVfRU5WSVJPTk1FTlRfREVQTE9ZTUVOVBAKEiIKHkZFQVRVUkVfU0NIRURVTEVEX1JPTExPVVRfVElNRRALEh4KGkZFQVRVUkVfREFUQUJBU0VfQ0hBTkdFTE9HEAwSIgoeRkVBVFVSRV9TQ0hFTUFfRFJJRlRfREVURUNUSU9OEA0SFgoSRkVBVFVSRV9DSEFOR0VMSVNUEA4SGwoXRkVBVFVSRV9TQ0hFTUFfVEVNUExBVEUQDxIaChZGRUFUVVJFX1JPTExPVVRfUE9MSUNZEBASIAocRkVBVFVSRV9XRUJfQkFTRURfU1FMX0VESVRPUhAREiEKHUZFQVRVUkVfU1FMX0VESVRPUl9BRE1JTl9NT0RFEBISIwofRkVBVFVSRV9OQVRVUkFMX0xBTkdVQUdFX1RPX1NRTBATEiAKHEZFQVRVUkVfQUlfUVVFUllfRVhQTEFOQVRJT04QFBIgChxGRUFUVVJFX0FJX1FVRVJZX1NVR0dFU1RJT05TEBUSGQoVRkVBVFVSRV9BVVRPX0NPTVBMRVRFEBYSGgoWRkVBVFVSRV9TQ0hFTUFfRElBR1JBTRAXEhkKFUZFQVRVUkVfU0NIRU1BX0VESVRPUhAYEhcKE0ZFQVRVUkVfREFUQV9FWFBPUlQQGRIfChtGRUFUVVJFX0RBVEFfT0ZGTElORV9FWFBPUlQQGhIZChVGRUFUVVJFX1FVRVJZX0hJU1RPUlkQGxIoCiRGRUFUVVJFX1NBVkVEX0FORF9TSEFSRURfU1FMX1NDUklQVFMQHBIXChNGRUFUVVJFX0JBVENIX1FVRVJZEB0SKQolRkVBVFVSRV9JTlNUQU5DRV9SRUFEX09OTFlfQ09OTkVDVElPThAeEhgKFEZFQVRVUkVfUVVFUllfUE9MSUNZEB8SIQodRkVBVFVSRV9SRVNUUklDVF9DT1BZSU5HX0RBVEEQIBIPCgtGRUFUVVJFX0lBTRAhEiMKH0ZFQVRVUkVfSU5TVEFOQ0VfU1NMX0NPTk5FQ1RJT04QIhIvCitGRUFUVVJFX0lOU1RBTkNFX0NPTk5FQ1RJT05fT1ZFUl9TU0hfVFVOTkVMECMSMgouRkVBVFVSRV9JTlNUQU5DRV9DT05ORUNUSU9OX0lBTV9BVVRIRU5USUNBVElPThAkEiEKHUZFQVRVUkVfR09PR0xFX0FORF9HSVRIVUJfU1NPECUSFwoTRkVBVFVSRV9VU0VSX0dST1VQUxAmEigKJEZFQVRVUkVfRElTQUxMT1dfU0VMRl9TRVJWSUNFX1NJR05VUBAnEiUKIUZFQVRVUkVfQ1VTVE9NX0lOU1RBTkNFX1NZTkNfVElNRRApEiwKKEZFQVRVUkVfQ1VTVE9NX0lOU1RBTkNFX0NPTk5FQ1RJT05fTElNSVQQKhIbChdGRUFUVVJFX1JJU0tfQVNTRVNTTUVOVBArEh0KGUZFQVRVUkVfQVBQUk9WQUxfV09SS0ZMT1cQLBIVChFGRUFUVVJFX0FVRElUX0xPRxAtEhoKFkZFQVRVUkVfRU5URVJQUklTRV9TU08QLhISCg5GRUFUVVJFX1RXT19GQRAvEiEKHUZFQVRVUkVfUEFTU1dPUkRfUkVTVFJJQ1RJT05TEDASJAogRkVBVFVSRV9ESVNBTExPV19QQVNTV09SRF9TSUdOSU4QMRIYChRGRUFUVVJFX0NVU1RPTV9ST0xFUxAyEiEKHUZFQVRVUkVfUkVRVUVTVF9ST0xFX1dPUktGTE9XEDMSGAoURkVBVFVSRV9EQVRBX01BU0tJTkcQNBIfChtGRUFUVVJFX0RBVEFfQ0xBU1NJRklDQVRJT04QNRIQCgxGRUFUVVJFX1NDSU0QNhIaChZGRUFUVVJFX0RJUkVDVE9SWV9TWU5DEDcSJQohRkVBVFVSRV9TSUdOX0lOX0ZSRVFVRU5DWV9DT05UUk9MEDgSIwofRkVBVFVSRV9FWFRFUk5BTF9TRUNSRVRfTUFOQUdFUhA5EikKJUZFQVRVUkVfVVNFUl9FTUFJTF9ET01BSU5fUkVTVFJJQ1RJT04QOhIeChpGRUFUVVJFX1BST0pFQ1RfTUFOQUdFTUVOVBA7EiIKHkZFQVRVUkVfRU5WSVJPTk1FTlRfTUFOQUdFTUVOVBA8EhwKGEZFQVRVUkVfSU1fTk9USUZJQ0FUSU9OUxA9Eh4KGkZFQVRVUkVfVEVSUkFGT1JNX1BST1ZJREVSED4SGwoXRkVBVFVSRV9EQVRBQkFTRV9HUk9VUFMQPxIdChlGRUFUVVJFX0VOVklST05NRU5UX1RJRVJTEEASIgoeRkVBVFVSRV9EQVNIQk9BUkRfQU5OT1VOQ0VNRU5UEEESJAogRkVBVFVSRV9BUElfSU5URUdSQVRJT05fR1VJREFOQ0UQQhIXChNGRUFUVVJFX0NVU1RPTV9MT0dPEEMSFQoRRkVBVFVSRV9XQVRFUk1BUksQRBIiCh5GRUFUVVJFX1JPQURNQVBfUFJJT1JJVElaQVRJT04QRRIWChJGRUFUVVJFX0NVU1RPTV9NU0EQRhIdChlGRUFUVVJFX0NPTU1VTklUWV9TVVBQT1JUEEcSGQoVRkVBVFVSRV9FTUFJTF9TVVBQT1JUEEgSJgoiRkVBVFVSRV9ERURJQ0FURURfU1VQUE9SVF9XSVRIX1NMQRBJMqUCChNTdWJzY3JpcHRpb25TZXJ2aWNlEnIKD0dldFN1YnNjcmlwdGlvbhIjLmJ5dGViYXNlLnYxLkdldFN1YnNjcmlwdGlvblJlcXVlc3QaGS5ieXRlYmFzZS52MS5TdWJzY3JpcHRpb24iH9pBAIDqMAGC0+STAhISEC92MS9zdWJzY3JpcHRpb24SmQEKElVwZGF0ZVN1YnNjcmlwdGlvbhImLmJ5dGViYXNlLnYxLlVwZGF0ZVN1YnNjcmlwdGlvblJlcXVlc3QaGS5ieXRlYmFzZS52MS5TdWJzY3JpcHRpb24iQNpBBXBhdGNoiuowD2JiLnNldHRpbmdzLnNldJDqMAGC0+STAhs6B2xpY2Vuc2UyEC92MS9zdWJzY3JpcHRpb25CrgEKD2NvbS5ieXRlYmFzZS52MUIYU3Vic2NyaXB0aW9uU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_timestamp, file_v1_annotation]);+ fileDesc("Ch12MS9zdWJzY3JpcHRpb25fc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiGAoWR2V0U3Vic2NyaXB0aW9uUmVxdWVzdCJDChlVcGRhdGVTdWJzY3JpcHRpb25SZXF1ZXN0Eg8KB2xpY2Vuc2UYASABKAkSFQoNYWxsb3dfbWlzc2luZxgCIAEoCCLoAQoMU3Vic2NyaXB0aW9uEigKBHBsYW4YASABKA4yFS5ieXRlYmFzZS52MS5QbGFuVHlwZUID4EEDEhIKBXNlYXRzGAIgASgFQgPgQQMSFgoJaW5zdGFuY2VzGAMgASgFQgPgQQMSHQoQYWN0aXZlX2luc3RhbmNlcxgEIAEoBUID4EEDEjUKDGV4cGlyZXNfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxIVCgh0cmlhbGluZxgGIAEoCEID4EEDEhUKCG9yZ19uYW1lGAcgASgJQgPgQQMibgoKUGxhbkNvbmZpZxIrCgVwbGFucxgBIAMoCzIcLmJ5dGViYXNlLnYxLlBsYW5MaW1pdENvbmZpZxIzChFpbnN0YW5jZV9mZWF0dXJlcxgCIAMoDjIYLmJ5dGViYXNlLnYxLlBsYW5GZWF0dXJlIp4BCg9QbGFuTGltaXRDb25maWcSIwoEdHlwZRgBIAEoDjIVLmJ5dGViYXNlLnYxLlBsYW5UeXBlEh4KFm1heGltdW1faW5zdGFuY2VfY291bnQYAiABKAUSGgoSbWF4aW11bV9zZWF0X2NvdW50GAMgASgFEioKCGZlYXR1cmVzGAQgAygOMhguYnl0ZWJhc2UudjEuUGxhbkZlYXR1cmUqSQoIUGxhblR5cGUSGQoVUExBTl9UWVBFX1VOU1BFQ0lGSUVEEAASCAoERlJFRRABEggKBFRFQU0QAhIOCgpFTlRFUlBSSVNFEAMq8BIKC1BsYW5GZWF0dXJlEhcKE0ZFQVRVUkVfVU5TUEVDSUZJRUQQABIbChdGRUFUVVJFX0RBVEFCQVNFX0NIQU5HRRABEiwKKEZFQVRVUkVfR0lUX0JBU0VEX1NDSEVNQV9WRVJTSU9OX0NPTlRST0wQAhIoCiRGRUFUVVJFX0RFQ0xBUkFUSVZFX1NDSEVNQV9NSUdSQVRJT04QAxIjCh9GRUFUVVJFX0NPTVBBUkVfQU5EX1NZTkNfU0NIRU1BEAQSIAocRkVBVFVSRV9PTkxJTkVfU0NIRU1BX0NIQU5HRRAFEiUKIUZFQVRVUkVfUFJFX0RFUExPWU1FTlRfU1FMX1JFVklFVxAGEjAKLEZFQVRVUkVfQVVUT01BVElDX0JBQ0tVUF9CRUZPUkVfREFUQV9DSEFOR0VTEAcSIwofRkVBVFVSRV9PTkVfQ0xJQ0tfREFUQV9ST0xMQkFDSxAIEigKJEZFQVRVUkVfTVVMVElfREFUQUJBU0VfQkFUQ0hfQ0hBTkdFUxAJEi4KKkZFQVRVUkVfUFJPR1JFU1NJVkVfRU5WSVJPTk1FTlRfREVQTE9ZTUVOVBAKEiIKHkZFQVRVUkVfU0NIRURVTEVEX1JPTExPVVRfVElNRRALEh4KGkZFQVRVUkVfREFUQUJBU0VfQ0hBTkdFTE9HEAwSIgoeRkVBVFVSRV9TQ0hFTUFfRFJJRlRfREVURUNUSU9OEA0SGwoXRkVBVFVSRV9TQ0hFTUFfVEVNUExBVEUQDxIaChZGRUFUVVJFX1JPTExPVVRfUE9MSUNZEBASIAocRkVBVFVSRV9XRUJfQkFTRURfU1FMX0VESVRPUhAREiEKHUZFQVRVUkVfU1FMX0VESVRPUl9BRE1JTl9NT0RFEBISIwofRkVBVFVSRV9OQVRVUkFMX0xBTkdVQUdFX1RPX1NRTBATEiAKHEZFQVRVUkVfQUlfUVVFUllfRVhQTEFOQVRJT04QFBIgChxGRUFUVVJFX0FJX1FVRVJZX1NVR0dFU1RJT05TEBUSGQoVRkVBVFVSRV9BVVRPX0NPTVBMRVRFEBYSGgoWRkVBVFVSRV9TQ0hFTUFfRElBR1JBTRAXEhkKFUZFQVRVUkVfU0NIRU1BX0VESVRPUhAYEhcKE0ZFQVRVUkVfREFUQV9FWFBPUlQQGRIfChtGRUFUVVJFX0RBVEFfT0ZGTElORV9FWFBPUlQQGhIZChVGRUFUVVJFX1FVRVJZX0hJU1RPUlkQGxIoCiRGRUFUVVJFX1NBVkVEX0FORF9TSEFSRURfU1FMX1NDUklQVFMQHBIXChNGRUFUVVJFX0JBVENIX1FVRVJZEB0SKQolRkVBVFVSRV9JTlNUQU5DRV9SRUFEX09OTFlfQ09OTkVDVElPThAeEhgKFEZFQVRVUkVfUVVFUllfUE9MSUNZEB8SIQodRkVBVFVSRV9SRVNUUklDVF9DT1BZSU5HX0RBVEEQIBIPCgtGRUFUVVJFX0lBTRAhEiMKH0ZFQVRVUkVfSU5TVEFOQ0VfU1NMX0NPTk5FQ1RJT04QIhIvCitGRUFUVVJFX0lOU1RBTkNFX0NPTk5FQ1RJT05fT1ZFUl9TU0hfVFVOTkVMECMSMgouRkVBVFVSRV9JTlNUQU5DRV9DT05ORUNUSU9OX0lBTV9BVVRIRU5USUNBVElPThAkEiEKHUZFQVRVUkVfR09PR0xFX0FORF9HSVRIVUJfU1NPECUSFwoTRkVBVFVSRV9VU0VSX0dST1VQUxAmEigKJEZFQVRVUkVfRElTQUxMT1dfU0VMRl9TRVJWSUNFX1NJR05VUBAnEiUKIUZFQVRVUkVfQ1VTVE9NX0lOU1RBTkNFX1NZTkNfVElNRRApEiwKKEZFQVRVUkVfQ1VTVE9NX0lOU1RBTkNFX0NPTk5FQ1RJT05fTElNSVQQKhIbChdGRUFUVVJFX1JJU0tfQVNTRVNTTUVOVBArEh0KGUZFQVRVUkVfQVBQUk9WQUxfV09SS0ZMT1cQLBIVChFGRUFUVVJFX0FVRElUX0xPRxAtEhoKFkZFQVRVUkVfRU5URVJQUklTRV9TU08QLhISCg5GRUFUVVJFX1RXT19GQRAvEiEKHUZFQVRVUkVfUEFTU1dPUkRfUkVTVFJJQ1RJT05TEDASJAogRkVBVFVSRV9ESVNBTExPV19QQVNTV09SRF9TSUdOSU4QMRIYChRGRUFUVVJFX0NVU1RPTV9ST0xFUxAyEiEKHUZFQVRVUkVfUkVRVUVTVF9ST0xFX1dPUktGTE9XEDMSGAoURkVBVFVSRV9EQVRBX01BU0tJTkcQNBIfChtGRUFUVVJFX0RBVEFfQ0xBU1NJRklDQVRJT04QNRIQCgxGRUFUVVJFX1NDSU0QNhIaChZGRUFUVVJFX0RJUkVDVE9SWV9TWU5DEDcSJQohRkVBVFVSRV9TSUdOX0lOX0ZSRVFVRU5DWV9DT05UUk9MEDgSIwofRkVBVFVSRV9FWFRFUk5BTF9TRUNSRVRfTUFOQUdFUhA5EikKJUZFQVRVUkVfVVNFUl9FTUFJTF9ET01BSU5fUkVTVFJJQ1RJT04QOhIeChpGRUFUVVJFX1BST0pFQ1RfTUFOQUdFTUVOVBA7EiIKHkZFQVRVUkVfRU5WSVJPTk1FTlRfTUFOQUdFTUVOVBA8EhwKGEZFQVRVUkVfSU1fTk9USUZJQ0FUSU9OUxA9Eh4KGkZFQVRVUkVfVEVSUkFGT1JNX1BST1ZJREVSED4SGwoXRkVBVFVSRV9EQVRBQkFTRV9HUk9VUFMQPxIdChlGRUFUVVJFX0VOVklST05NRU5UX1RJRVJTEEASIgoeRkVBVFVSRV9EQVNIQk9BUkRfQU5OT1VOQ0VNRU5UEEESJAogRkVBVFVSRV9BUElfSU5URUdSQVRJT05fR1VJREFOQ0UQQhIXChNGRUFUVVJFX0NVU1RPTV9MT0dPEEMSFQoRRkVBVFVSRV9XQVRFUk1BUksQRBIiCh5GRUFUVVJFX1JPQURNQVBfUFJJT1JJVElaQVRJT04QRRIWChJGRUFUVVJFX0NVU1RPTV9NU0EQRhIdChlGRUFUVVJFX0NPTU1VTklUWV9TVVBQT1JUEEcSGQoVRkVBVFVSRV9FTUFJTF9TVVBQT1JUEEgSJgoiRkVBVFVSRV9ERURJQ0FURURfU1VQUE9SVF9XSVRIX1NMQRBJMqUCChNTdWJzY3JpcHRpb25TZXJ2aWNlEnIKD0dldFN1YnNjcmlwdGlvbhIjLmJ5dGViYXNlLnYxLkdldFN1YnNjcmlwdGlvblJlcXVlc3QaGS5ieXRlYmFzZS52MS5TdWJzY3JpcHRpb24iH9pBAIDqMAGC0+STAhISEC92MS9zdWJzY3JpcHRpb24SmQEKElVwZGF0ZVN1YnNjcmlwdGlvbhImLmJ5dGViYXNlLnYxLlVwZGF0ZVN1YnNjcmlwdGlvblJlcXVlc3QaGS5ieXRlYmFzZS52MS5TdWJzY3JpcHRpb24iQNpBBXBhdGNoiuowD2JiLnNldHRpbmdzLnNldJDqMAGC0+STAhs6B2xpY2Vuc2UyEC92MS9zdWJzY3JpcHRpb25CrgEKD2NvbS5ieXRlYmFzZS52MUIYU3Vic2NyaXB0aW9uU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_timestamp, file_v1_annotation]);/*** Describes the message bytebase.v1.GetSubscriptionRequest.diff --git a/frontend/src/types/v1/changelist.ts b/frontend/src/types/v1/changelist.tsdeleted file mode 100644index 11ab5ce300..0000000000--- a/frontend/src/types/v1/changelist.ts+++ /dev/null@@ -1,18 +0,0 @@-import { create } from "@bufbuild/protobuf";-import { SYSTEM_BOT_USER_NAME } from "@/types";-import { ChangelistSchema } from "@/types/proto-es/v1/changelist_service_pb";--export const UNKNOWN_CHANGELIST_NAME = "projects/-1/changelists/-1";--export const unknownChangelist = () => {- return create(ChangelistSchema, {- name: UNKNOWN_CHANGELIST_NAME,- description: "<<Unknown Changelist>>",- creator: SYSTEM_BOT_USER_NAME,- });-};--export const Changelist_Change_Source_List = ["CHANGELOG", "RAW_SQL"] as const;--export type Changelist_Change_Source =- (typeof Changelist_Change_Source_List)[number];diff --git a/frontend/src/types/v1/index.ts b/frontend/src/types/v1/index.tsindex 62ff96c48e..5b554bf77d 100644--- a/frontend/src/types/v1/index.ts+++ b/frontend/src/types/v1/index.ts@@ -9,4 +9,3 @@ export * from "./user";export * from "./sql";export * from "./webTerminal";export * from "./issue";-export * from "./changelist";diff --git a/frontend/src/utils/v1/changelist.ts b/frontend/src/utils/v1/changelist.tsdeleted file mode 100644index 7a9abb12fd..0000000000--- a/frontend/src/utils/v1/changelist.ts+++ /dev/null@@ -1,36 +0,0 @@-import { useSheetV1Store } from "@/store";-import type { Changelist_Change_Source } from "@/types";-import type { Changelist_Change as Change } from "@/types/proto-es/v1/changelist_service_pb";-import { getSheetStatement } from "./sheet";--export const extractChangelistResourceName = (name: string) => {- const pattern = /(?:^|\/)changelists\/([^/]+)(?:$|\/)/;- const matches = name.match(pattern);- return matches?.[1] ?? "";-};--export const isChangelogChangeSource = (change: Change) => {- return change.source.match(/(^|\/)changelogs\//);-};--export const getChangelistChangeSourceType = (- change: Change-): Changelist_Change_Source => {- if (isChangelogChangeSource(change)) {- return "CHANGELOG";- } else {- return "RAW_SQL";- }-};--export const generateSQLForChangeToDatabase = async (change: Change) => {- const sheet = await useSheetV1Store().getOrFetchSheetByName(- change.sheet,- "FULL"- );- if (!sheet) {- return "";- }-- return getSheetStatement(sheet);-};diff --git a/frontend/src/utils/v1/index.ts b/frontend/src/utils/v1/index.tsindex 9463e350e2..ea6b612d87 100644--- a/frontend/src/utils/v1/index.ts+++ b/frontend/src/utils/v1/index.ts@@ -11,7 +11,6 @@ export * from "./sql";export * from "./sheet";export * from "./worksheet";export * from "./issue";-export * from "./changelist";export * from "./changelog";export * from "./cel";export * from "./advanced-search";diff --git a/frontend/src/views/project/ProjectChangelistDashboard.vue b/frontend/src/views/project/ProjectChangelistDashboard.vuedeleted file mode 100644index 1d788db23e..0000000000--- a/frontend/src/views/project/ProjectChangelistDashboard.vue+++ /dev/null@@ -1,18 +0,0 @@-<template>- <ChangelistDashboard :project="project" />-</template>--<script setup lang="ts">-import { computed } from "vue";-import ChangelistDashboard from "@/components/Changelist/ChangelistDashboard";-import { useProjectByName } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";--const props = defineProps<{- projectId: string;-}>();--const { project } = useProjectByName(- computed(() => `${projectNamePrefix}${props.projectId}`)-);-</script>diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex ceac58ec50..25605c6170 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -3626,194 +3626,6 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'- /v1/projects/{project}/changelists:- get:- tags:- - ChangelistService- description: |-- Lists changelists in a project.- Permissions required: bb.changelists.list- operationId: ChangelistService_ListChangelists- parameters:- - name: project- in: path- description: The project id.- required: true- schema:- type: string- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/ListChangelistsResponse'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'- post:- tags:- - ChangelistService- description: |-- Creates a new changelist in a project.- Permissions required: bb.changelists.create- operationId: ChangelistService_CreateChangelist- parameters:- - name: project- in: path- description: The project id.- required: true- schema:- type: string- - name: changelistId- in: query- description: |-- The ID to use for the changelist, which will become the final component of- the changelist's resource name.-- This value should be 4-63 characters, and valid characters- are /[a-z][0-9]-/.- schema:- type: string- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/Changelist'- required: true- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/Changelist'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'- /v1/projects/{project}/changelists/{changelist}:- get:- tags:- - ChangelistService- description: |-- Gets a changelist by name.- Permissions required: bb.changelists.get- operationId: ChangelistService_GetChangelist- parameters:- - name: project- in: path- description: The project id.- required: true- schema:- type: string- - name: changelist- in: path- description: The changelist id.- required: true- schema:- type: string- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/Changelist'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'- delete:- tags:- - ChangelistService- description: |-- Deletes a changelist.- Permissions required: bb.changelists.delete- operationId: ChangelistService_DeleteChangelist- parameters:- - name: project- in: path- description: The project id.- required: true- schema:- type: string- - name: changelist- in: path- description: The changelist id.- required: true- schema:- type: string- responses:- "200":- description: OK- content: {}- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'- patch:- tags:- - ChangelistService- description: |-- Updates a changelist.- Permissions required: bb.changelists.update- When allow_missing=true, also requires: bb.changelists.create- operationId: ChangelistService_UpdateChangelist- parameters:- - name: project- in: path- description: The project id.- required: true- schema:- type: string- - name: changelist- in: path- description: The changelist id.- required: true- schema:- type: string- - name: updateMask- in: query- description: The list of fields to be updated.- schema:- type: string- format: field-mask- - name: allowMissing- in: query- description: |-- If set to true, and the changelist is not found, a new changelist will be created.- In this situation, `update_mask` is ignored.- schema:- type: boolean- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/Changelist'- required: true- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/Changelist'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'/v1/projects/{project}/databaseGroups:get:tags:@@ -9123,33 +8935,6 @@ components:type: arrayitems:$ref: '#/components/schemas/ChangedResourceDatabase'- Changelist:- type: object- properties:- description:- type: string- description: Human-readable description of this changelist.- changes:- type: array- items:- $ref: '#/components/schemas/Changelist_Change'- description: The list of changes in this changelist.- description: Changelist represents a collection of database changes that can be applied together.- Changelist_Change:- type: object- properties:- sheet:- type: string- description: |-- The sheet containing the SQL statement.- Format: projects/{project}/sheets/{sheet}- source:- type: string- description: |-- The source of this change.- Format: instances/{instance}/databases/{database}/changelogs/{changelog}- If empty, the change is from raw SQL.- description: A single change in a changelist.Changelog:type: objectproperties:@@ -11303,15 +11088,6 @@ components:type: stringdescription: The group this label belongs to.description: A label for categorizing and organizing issues.- ListChangelistsResponse:- type: object- properties:- changelists:- type: array- items:- $ref: '#/components/schemas/Changelist'- description: The changelists from the specified request.- description: Response message for listing changelists.ListChangelogsResponse:type: objectproperties:@@ -14967,8 +14743,6 @@ tags:description: AuthService handles user authentication operations.- name: CelServicedescription: CelService manages CEL (Common Expression Language) parsing and formatting operations.- - name: ChangelistService- description: ChangelistService manages changelists for grouping and organizing database changes.- name: DatabaseCatalogServicedescription: DatabaseCatalogService manages database schema metadata and classification.- name: DatabaseGroupServicediff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 0c07d74aed..faf37dd344 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -35,10 +35,6 @@- [AuditLog.Severity](#bytebase-store-AuditLog-Severity)-- [store/changelist.proto](#store_changelist-proto)- - [Changelist](#bytebase-store-Changelist)- - [Changelist.Change](#bytebase-store-Changelist-Change)-- [store/changelog.proto](#store_changelog-proto)- [ChangedResourceDatabase](#bytebase-store-ChangedResourceDatabase)- [ChangedResourceFunction](#bytebase-store-ChangedResourceFunction)@@ -762,54 +758,6 @@ Metadata about the request.-<a name="store_changelist-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## store/changelist.proto----<a name="bytebase-store-Changelist"></a>--### Changelist-Changelist represents a collection of database changes that can be applied together.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| description | [string](#string) | | Human-readable description of this changelist. |-| changes | [Changelist.Change](#bytebase-store-Changelist-Change) | repeated | The list of changes in this changelist. |-------<a name="bytebase-store-Changelist-Change"></a>--### Changelist.Change-Change represents a single database modification within the changelist.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | Resource name of the sheet containing the SQL statements. |-| source | [string](#string) | | The source where this change originated from. Format: instances/{instance}/databases/{database}/changelogs/{changelog} for changes from changelog. Empty for raw SQL changes. |---------------<a name="store_changelog-proto"></a><p align="right"><a href="#top">Top</a></p>diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 6afa545cf6..5f6fafd186 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -298,25 +298,6 @@</li>- <li>- <a href="#store%2fchangelist.proto">store/changelist.proto</a>- <ul>-- <li>- <a href="#bytebase.store.Changelist"><span class="badge">M</span>Changelist</a>- </li>-- <li>- <a href="#bytebase.store.Changelist.Change"><span class="badge">M</span>Changelist.Change</a>- </li>----- </ul>- </li>--<li><a href="#store%2fchangelog.proto">store/changelog.proto</a><ul>@@ -2544,84 +2525,6 @@ This information is not authenticated and should be treated accordingly. </p></t- <div class="file-heading">- <h2 id="store/changelist.proto">store/changelist.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.Changelist">Changelist</h3>- <p>Changelist represents a collection of database changes that can be applied together.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Human-readable description of this changelist. </p></td>- </tr>-- <tr>- <td>changes</td>- <td><a href="#bytebase.store.Changelist.Change">Changelist.Change</a></td>- <td>repeated</td>- <td><p>The list of changes in this changelist. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.Changelist.Change">Changelist.Change</h3>- <p>Change represents a single database modification within the changelist.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>sheet</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Resource name of the sheet containing the SQL statements. </p></td>- </tr>-- <tr>- <td>source</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The source where this change originated from.-Format: instances/{instance}/databases/{database}/changelogs/{changelog} for changes from changelog.-Empty for raw SQL changes. </p></td>- </tr>-- </tbody>- </table>-------------<div class="file-heading"><h2 id="store/changelog.proto">store/changelog.proto</h2><a href="#title">Top</a></div>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex e41951b712..c999454996 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -366,18 +366,6 @@- [CelService](#bytebase-v1-CelService)-- [v1/changelist_service.proto](#v1_changelist_service-proto)- - [Changelist](#bytebase-v1-Changelist)- - [Changelist.Change](#bytebase-v1-Changelist-Change)- - [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest)- - [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest)- - [GetChangelistRequest](#bytebase-v1-GetChangelistRequest)- - [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest)- - [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse)- - [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest)-- - [ChangelistService](#bytebase-v1-ChangelistService)-- [v1/database_group_service.proto](#v1_database_group_service-proto)- [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest)- [DatabaseGroup](#bytebase-v1-DatabaseGroup)@@ -6320,169 +6308,6 @@ CelService manages CEL (Common Expression Language) parsing and formatting opera-<a name="v1_changelist_service-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## v1/changelist_service.proto----<a name="bytebase-v1-Changelist"></a>--### Changelist-A changelist groups multiple database changes together.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the changelist resource. Canonical parent is project. Format: projects/{project}/changelists/{changelist} |-| description | [string](#string) | | The description of the changelist. |-| creator | [string](#string) | | The creator of the changelist. Format: users/{email} |-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the changelist was updated. |-| changes | [Changelist.Change](#bytebase-v1-Changelist-Change) | repeated | The list of changes in this changelist. |-------<a name="bytebase-v1-Changelist-Change"></a>--### Changelist.Change-A single change in a changelist.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| sheet | [string](#string) | | The sheet containing the SQL statement. Format: projects/{project}/sheets/{sheet} |-| source | [string](#string) | | The source of this change. Format: instances/{instance}/databases/{database}/changelogs/{changelog} If empty, the change is from raw SQL. |-------<a name="bytebase-v1-CreateChangelistRequest"></a>--### CreateChangelistRequest-Request message for creating a changelist.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent resource where this changelist will be created. Format: projects/{project} |-| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to create. |-| changelist_id | [string](#string) | | The ID to use for the changelist, which will become the final component of the changelist's resource name.--This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-------<a name="bytebase-v1-DeleteChangelistRequest"></a>--### DeleteChangelistRequest-Request message for deleting a changelist.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the changelist to delete. Format: projects/{project}/changelists/{changelist} |-------<a name="bytebase-v1-GetChangelistRequest"></a>--### GetChangelistRequest-Request message for getting a changelist.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the changelist to retrieve. Format: projects/{project}/changelists/{changelist} |-------<a name="bytebase-v1-ListChangelistsRequest"></a>--### ListChangelistsRequest-Request message for listing changelists.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| parent | [string](#string) | | The parent, which owns this collection of changelists. Format: projects/{project} |-------<a name="bytebase-v1-ListChangelistsResponse"></a>--### ListChangelistsResponse-Response message for listing changelists.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| changelists | [Changelist](#bytebase-v1-Changelist) | repeated | The changelists from the specified request. |-------<a name="bytebase-v1-UpdateChangelistRequest"></a>--### UpdateChangelistRequest-Request message for updating a changelist.---| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to update.--The changelist's `name` field is used to identify the changelist to update. Format: projects/{project}/changelists/{changelist} |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |-| allow_missing | [bool](#bool) | | If set to true, and the changelist is not found, a new changelist will be created. In this situation, `update_mask` is ignored. |-------------<a name="bytebase-v1-ChangelistService"></a>--### ChangelistService-ChangelistService manages changelists for grouping and organizing database changes.--| Method Name | Request Type | Response Type | Description |-| ----------- | ------------ | ------------- | ------------|-| CreateChangelist | [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Creates a new changelist in a project. Permissions required: bb.changelists.create |-| GetChangelist | [GetChangelistRequest](#bytebase-v1-GetChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Gets a changelist by name. Permissions required: bb.changelists.get |-| ListChangelists | [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest) | [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse) | Lists changelists in a project. Permissions required: bb.changelists.list |-| UpdateChangelist | [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | Updates a changelist. Permissions required: bb.changelists.update When allow_missing=true, also requires: bb.changelists.create |-| DeleteChangelist | [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a changelist. Permissions required: bb.changelists.delete |-----<a name="v1_database_group_service-proto"></a><p align="right"><a href="#top">Top</a></p>@@ -10977,7 +10802,6 @@ PlanFeature represents the available features in Bytebase| FEATURE_SCHEDULED_ROLLOUT_TIME | 11 | || FEATURE_DATABASE_CHANGELOG | 12 | || FEATURE_SCHEMA_DRIFT_DETECTION | 13 | |-| FEATURE_CHANGELIST | 14 | || FEATURE_SCHEMA_TEMPLATE | 15 | || FEATURE_ROLLOUT_POLICY | 16 | || FEATURE_WEB_BASED_SQL_EDITOR | 17 | SQL Editor & Development |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 3b41ff7988..f06790a7fb 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1579,53 +1579,6 @@</li>- <li>- <a href="#v1%2fchangelist_service.proto">v1/changelist_service.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.Changelist"><span class="badge">M</span>Changelist</a>- </li>-- <li>- <a href="#bytebase.v1.Changelist.Change"><span class="badge">M</span>Changelist.Change</a>- </li>-- <li>- <a href="#bytebase.v1.CreateChangelistRequest"><span class="badge">M</span>CreateChangelistRequest</a>- </li>-- <li>- <a href="#bytebase.v1.DeleteChangelistRequest"><span class="badge">M</span>DeleteChangelistRequest</a>- </li>-- <li>- <a href="#bytebase.v1.GetChangelistRequest"><span class="badge">M</span>GetChangelistRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListChangelistsRequest"><span class="badge">M</span>ListChangelistsRequest</a>- </li>-- <li>- <a href="#bytebase.v1.ListChangelistsResponse"><span class="badge">M</span>ListChangelistsResponse</a>- </li>-- <li>- <a href="#bytebase.v1.UpdateChangelistRequest"><span class="badge">M</span>UpdateChangelistRequest</a>- </li>----- <li>- <a href="#bytebase.v1.ChangelistService"><span class="badge">S</span>ChangelistService</a>- </li>-- </ul>- </li>--<li><a href="#v1%2fdatabase_group_service.proto">v1/database_group_service.proto</a><ul>@@ -18159,414 +18112,6 @@ Permissions required: None</p></td>- <div class="file-heading">- <h2 id="v1/changelist_service.proto">v1/changelist_service.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.Changelist">Changelist</h3>- <p>A changelist groups multiple database changes together.</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 changelist resource.-Canonical parent is project.-Format: projects/{project}/changelists/{changelist} </p></td>- </tr>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The description of the changelist. </p></td>- </tr>-- <tr>- <td>creator</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The creator of the changelist.-Format: users/{email} </p></td>- </tr>-- <tr>- <td>update_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p>The last time the changelist was updated. </p></td>- </tr>-- <tr>- <td>changes</td>- <td><a href="#bytebase.v1.Changelist.Change">Changelist.Change</a></td>- <td>repeated</td>- <td><p>The list of changes in this changelist. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.Changelist.Change">Changelist.Change</h3>- <p>A single change in a changelist.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>sheet</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The sheet containing the SQL statement.-Format: projects/{project}/sheets/{sheet} </p></td>- </tr>-- <tr>- <td>source</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The source of this change.-Format: instances/{instance}/databases/{database}/changelogs/{changelog}-If empty, the change is from raw SQL. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.CreateChangelistRequest">CreateChangelistRequest</h3>- <p>Request message for creating a changelist.</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 resource where this changelist will be created.-Format: projects/{project} </p></td>- </tr>-- <tr>- <td>changelist</td>- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>- <td></td>- <td><p>The changelist to create. </p></td>- </tr>-- <tr>- <td>changelist_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The ID to use for the changelist, which will become the final component of-the changelist's resource name.--This value should be 4-63 characters, and valid characters-are /[a-z][0-9]-/. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.DeleteChangelistRequest">DeleteChangelistRequest</h3>- <p>Request message for deleting a changelist.</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 changelist to delete.-Format: projects/{project}/changelists/{changelist} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetChangelistRequest">GetChangelistRequest</h3>- <p>Request message for getting a changelist.</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 changelist to retrieve.-Format: projects/{project}/changelists/{changelist} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListChangelistsRequest">ListChangelistsRequest</h3>- <p>Request message for listing changelists.</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, which owns this collection of changelists.-Format: projects/{project} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.ListChangelistsResponse">ListChangelistsResponse</h3>- <p>Response message for listing changelists.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>changelists</td>- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>- <td>repeated</td>- <td><p>The changelists from the specified request. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.UpdateChangelistRequest">UpdateChangelistRequest</h3>- <p>Request message for updating a changelist.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>changelist</td>- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>- <td></td>- <td><p>The changelist to update.--The changelist's `name` field is used to identify the changelist to update.-Format: projects/{project}/changelists/{changelist} </p></td>- </tr>-- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to be updated. </p></td>- </tr>-- <tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>If set to true, and the changelist is not found, a new changelist will be created.-In this situation, `update_mask` is ignored. </p></td>- </tr>-- </tbody>- </table>------------ <h3 id="bytebase.v1.ChangelistService">ChangelistService</h3>- <p>ChangelistService manages changelists for grouping and organizing database changes.</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>CreateChangelist</td>- <td><a href="#bytebase.v1.CreateChangelistRequest">CreateChangelistRequest</a></td>- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>- <td><p>Creates a new changelist in a project.-Permissions required: bb.changelists.create</p></td>- </tr>-- <tr>- <td>GetChangelist</td>- <td><a href="#bytebase.v1.GetChangelistRequest">GetChangelistRequest</a></td>- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>- <td><p>Gets a changelist by name.-Permissions required: bb.changelists.get</p></td>- </tr>-- <tr>- <td>ListChangelists</td>- <td><a href="#bytebase.v1.ListChangelistsRequest">ListChangelistsRequest</a></td>- <td><a href="#bytebase.v1.ListChangelistsResponse">ListChangelistsResponse</a></td>- <td><p>Lists changelists in a project.-Permissions required: bb.changelists.list</p></td>- </tr>-- <tr>- <td>UpdateChangelist</td>- <td><a href="#bytebase.v1.UpdateChangelistRequest">UpdateChangelistRequest</a></td>- <td><a href="#bytebase.v1.Changelist">Changelist</a></td>- <td><p>Updates a changelist.-Permissions required: bb.changelists.update-When allow_missing=true, also requires: bb.changelists.create</p></td>- </tr>-- <tr>- <td>DeleteChangelist</td>- <td><a href="#bytebase.v1.DeleteChangelistRequest">DeleteChangelistRequest</a></td>- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>- <td><p>Deletes a changelist.-Permissions required: bb.changelists.delete</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>CreateChangelist</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/changelists</td>- <td>changelist</td>- </tr>----- <tr>- <td>GetChangelist</td>- <td>GET</td>- <td>/v1/{name=projects/*/changelists/*}</td>- <td></td>- </tr>----- <tr>- <td>ListChangelists</td>- <td>GET</td>- <td>/v1/{parent=projects/*}/changelists</td>- <td></td>- </tr>----- <tr>- <td>UpdateChangelist</td>- <td>PATCH</td>- <td>/v1/{changelist.name=projects/*/changelists/*}</td>- <td>changelist</td>- </tr>----- <tr>- <td>DeleteChangelist</td>- <td>DELETE</td>- <td>/v1/{name=projects/*/changelists/*}</td>- <td></td>- </tr>--- </tbody>- </table>----<div class="file-heading"><h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a></div>@@ -30480,12 +30025,6 @@ In this situation, `update_mask` is ignored. </p></td><td><p></p></td></tr>- <tr>- <td>FEATURE_CHANGELIST</td>- <td>14</td>- <td><p></p></td>- </tr>-<tr><td>FEATURE_SCHEMA_TEMPLATE</td><td>15</td>diff --git a/proto/store/store/changelist.proto b/proto/store/store/changelist.protodeleted file mode 100644index b7a36145b0..0000000000--- a/proto/store/store/changelist.proto+++ /dev/null@@ -1,23 +0,0 @@-syntax = "proto3";--package bytebase.store;--option go_package = "generated-go/store";--// Changelist represents a collection of database changes that can be applied together.-message Changelist {- // Human-readable description of this changelist.- string description = 1;-- // Change represents a single database modification within the changelist.- message Change {- // Resource name of the sheet containing the SQL statements.- string sheet = 1;- // The source where this change originated from.- // Format: instances/{instance}/databases/{database}/changelogs/{changelog} for changes from changelog.- // Empty for raw SQL changes.- string source = 2;- }- // The list of changes in this changelist.- repeated Change changes = 2;-}diff --git a/proto/v1/v1/changelist_service.proto b/proto/v1/v1/changelist_service.protodeleted file mode 100644index e301f1a3c4..0000000000--- a/proto/v1/v1/changelist_service.proto+++ /dev/null@@ -1,182 +0,0 @@-syntax = "proto3";--package bytebase.v1;--import "buf/validate/validate.proto";-import "google/api/annotations.proto";-import "google/api/client.proto";-import "google/api/field_behavior.proto";-import "google/api/resource.proto";-import "google/protobuf/empty.proto";-import "google/protobuf/field_mask.proto";-import "google/protobuf/timestamp.proto";-import "v1/annotation.proto";--option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";--// ChangelistService manages changelists for grouping and organizing database changes.-service ChangelistService {- // Creates a new changelist in a project.- // Permissions required: bb.changelists.create- rpc CreateChangelist(CreateChangelistRequest) returns (Changelist) {- option (google.api.http) = {- post: "/v1/{parent=projects/*}/changelists"- body: "changelist"- };- option (google.api.method_signature) = "parent,changelist";- option (bytebase.v1.permission) = "bb.changelists.create";- option (bytebase.v1.auth_method) = IAM;- }-- // Gets a changelist by name.- // Permissions required: bb.changelists.get- rpc GetChangelist(GetChangelistRequest) returns (Changelist) {- option (google.api.http) = {get: "/v1/{name=projects/*/changelists/*}"};- option (google.api.method_signature) = "name";- option (bytebase.v1.permission) = "bb.changelists.get";- option (bytebase.v1.auth_method) = IAM;- }-- // Lists changelists in a project.- // Permissions required: bb.changelists.list- rpc ListChangelists(ListChangelistsRequest) returns (ListChangelistsResponse) {- option (google.api.http) = {get: "/v1/{parent=projects/*}/changelists"};- option (google.api.method_signature) = "parent";- option (bytebase.v1.permission) = "bb.changelists.list";- option (bytebase.v1.auth_method) = IAM;- }-- // Updates a changelist.- // Permissions required: bb.changelists.update- // When allow_missing=true, also requires: bb.changelists.create- rpc UpdateChangelist(UpdateChangelistRequest) returns (Changelist) {- option (google.api.http) = {- patch: "/v1/{changelist.name=projects/*/changelists/*}"- body: "changelist"- };- option (google.api.method_signature) = "changelist,update_mask";- option (bytebase.v1.permission) = "bb.changelists.update";- option (bytebase.v1.allow_missing_requires) = "bb.changelists.create";- option (bytebase.v1.auth_method) = IAM;- }-- // Deletes a changelist.- // Permissions required: bb.changelists.delete- rpc DeleteChangelist(DeleteChangelistRequest) returns (google.protobuf.Empty) {- option (google.api.http) = {delete: "/v1/{name=projects/*/changelists/*}"};- option (google.api.method_signature) = "name";- option (bytebase.v1.permission) = "bb.changelists.delete";- option (bytebase.v1.auth_method) = IAM;- }-}--// Request message for creating a changelist.-message CreateChangelistRequest {- // The parent resource where this changelist will be created.- // Format: projects/{project}- string parent = 1 [- (google.api.field_behavior) = REQUIRED,- (google.api.resource_reference) = {type: "bytebase.com/Project"}- ];-- // The changelist to create.- Changelist changelist = 2 [(google.api.field_behavior) = REQUIRED];-- // The ID to use for the changelist, which will become the final component of- // the changelist's resource name.- //- // This value should be 4-63 characters, and valid characters- // are /[a-z][0-9]-/.- string changelist_id = 3 [(google.api.field_behavior) = REQUIRED];-}--// Request message for getting a changelist.-message GetChangelistRequest {- // The name of the changelist to retrieve.- // Format: projects/{project}/changelists/{changelist}- string name = 1 [- (google.api.field_behavior) = REQUIRED,- (google.api.resource_reference) = {type: "bytebase.com/Changelist"}- ];-}--// Request message for listing changelists.-message ListChangelistsRequest {- // The parent, which owns this collection of changelists.- // Format: projects/{project}- string parent = 1 [- (google.api.field_behavior) = REQUIRED,- (google.api.resource_reference) = {type: "bytebase.com/Project"}- ];-}--// Response message for listing changelists.-message ListChangelistsResponse {- // The changelists from the specified request.- repeated Changelist changelists = 1;-}--// Request message for updating a changelist.-message UpdateChangelistRequest {- // The changelist to update.- //- // The changelist's `name` field is used to identify the changelist to update.- // Format: projects/{project}/changelists/{changelist}- Changelist changelist = 1 [(google.api.field_behavior) = REQUIRED];-- // The list of fields to be updated.- google.protobuf.FieldMask update_mask = 2;-- // If set to true, and the changelist is not found, a new changelist will be created.- // In this situation, `update_mask` is ignored.- bool allow_missing = 3;-}--// Request message for deleting a changelist.-message DeleteChangelistRequest {- // The name of the changelist to delete.- // Format: projects/{project}/changelists/{changelist}- string name = 1 [- (google.api.field_behavior) = REQUIRED,- (google.api.resource_reference) = {type: "bytebase.com/Changelist"}- ];-}--// A changelist groups multiple database changes together.-message Changelist {- option (google.api.resource) = {- type: "bytebase.com/Changelist"- pattern: "projects/{project}/changelists/{changelist}"- };-- // The name of the changelist resource.- // Canonical parent is project.- // Format: projects/{project}/changelists/{changelist}- string name = 1 [- (google.api.field_behavior) = REQUIRED,- (google.api.field_behavior) = IMMUTABLE- ];-- // The description of the changelist.- string description = 2 [(buf.validate.field).string.max_len = 1000];-- // The creator of the changelist.- // Format: users/{email}- string creator = 3 [(google.api.field_behavior) = OUTPUT_ONLY];-- // The last time the changelist was updated.- google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];-- // A single change in a changelist.- message Change {- // The sheet containing the SQL statement.- // Format: projects/{project}/sheets/{sheet}- string sheet = 1;- // The source of this change.- // Format: instances/{instance}/databases/{database}/changelogs/{changelog}- // If empty, the change is from raw SQL.- string source = 2;- }- // The list of changes in this changelist.- repeated Change changes = 7;-}diff --git a/proto/v1/v1/subscription_service.proto b/proto/v1/v1/subscription_service.protoindex 31ee5860f4..9906872cde 100644--- a/proto/v1/v1/subscription_service.proto+++ b/proto/v1/v1/subscription_service.proto@@ -93,7 +93,6 @@ enum PlanFeature {FEATURE_SCHEDULED_ROLLOUT_TIME = 11;FEATURE_DATABASE_CHANGELOG = 12;FEATURE_SCHEMA_DRIFT_DETECTION = 13;- FEATURE_CHANGELIST = 14;FEATURE_SCHEMA_TEMPLATE = 15;FEATURE_ROLLOUT_POLICY = 16;