Skip to content

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

chore: rename schema design proto to branch (#9669)

Danny Xu9ea114d0f4dd
diff --git a/backend/api/v1/branch_service.go b/backend/api/v1/branch_service.go
index e031638949..fc931577c8 100644
--- a/backend/api/v1/branch_service.go
+++ b/backend/api/v1/branch_service.go
@@ -20,14 +20,14 @@ import (
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
)
-// NewBranchService implements SchemaDesignServiceServer interface.
+// NewBranchService implements BranchServiceServer interface.
type BranchService struct {
- v1pb.UnimplementedSchemaDesignServiceServer
+ v1pb.UnimplementedBranchServiceServer
store *store.Store
licenseService enterprise.LicenseService
}
-// NewBranchService creates a new SchemaDesignService.
+// NewBranchService creates a new BranchService.
func NewBranchService(store *store.Store, licenseService enterprise.LicenseService) *BranchService {
return &BranchService{
store: store,
@@ -35,8 +35,8 @@ func NewBranchService(store *store.Store, licenseService enterprise.LicenseServi
}
}
-// GetSchemaDesign gets the schema design.
-func (s *BranchService) GetSchemaDesign(ctx context.Context, request *v1pb.GetSchemaDesignRequest) (*v1pb.SchemaDesign, error) {
+// GetBranch gets the branch.
+func (s *BranchService) GetBranch(ctx context.Context, request *v1pb.GetBranchRequest) (*v1pb.Branch, error) {
projectID, branchID, err := common.GetProjectAndBranchID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -56,15 +56,15 @@ func (s *BranchService) GetSchemaDesign(ctx context.Context, request *v1pb.GetSc
return nil, status.Errorf(codes.NotFound, "branch %q not found", branchID)
}
- schemaDesign, err := s.convertBranchToSchemaDesign(ctx, project, branch, v1pb.SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL)
+ branchV1, err := s.convertBranchToBranch(ctx, project, branch, v1pb.BranchView_BRANCH_VIEW_FULL)
if err != nil {
return nil, err
}
- return schemaDesign, nil
+ return branchV1, nil
}
-// ListSchemaDesigns lists schema designs.
-func (s *BranchService) ListSchemaDesigns(ctx context.Context, request *v1pb.ListSchemaDesignsRequest) (*v1pb.ListSchemaDesignsResponse, error) {
+// ListBranches lists branches.
+func (s *BranchService) ListBranches(ctx context.Context, request *v1pb.ListBranchesRequest) (*v1pb.ListBranchesResponse, error) {
projectID, err := common.GetProjectID(request.Parent)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -80,7 +80,7 @@ func (s *BranchService) ListSchemaDesigns(ctx context.Context, request *v1pb.Lis
branchFind := &store.FindBranchMessage{
ProjectID: &project.ResourceID,
}
- if request.View == v1pb.SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL {
+ if request.View == v1pb.BranchView_BRANCH_VIEW_FULL {
branchFind.LoadFull = true
}
branches, err := s.store.ListBranches(ctx, branchFind)
@@ -88,22 +88,22 @@ func (s *BranchService) ListSchemaDesigns(ctx context.Context, request *v1pb.Lis
return nil, status.Errorf(codes.Internal, "failed to list branches, error %v", err)
}
- var schemaDesigns []*v1pb.SchemaDesign
+ var v1Branches []*v1pb.Branch
for _, branch := range branches {
- schemaDesign, err := s.convertBranchToSchemaDesign(ctx, project, branch, request.View)
+ v1Branch, err := s.convertBranchToBranch(ctx, project, branch, request.View)
if err != nil {
return nil, err
}
- schemaDesigns = append(schemaDesigns, schemaDesign)
+ v1Branches = append(v1Branches, v1Branch)
}
- response := &v1pb.ListSchemaDesignsResponse{
- SchemaDesigns: schemaDesigns,
+ response := &v1pb.ListBranchesResponse{
+ Branches: v1Branches,
}
return response, nil
}
-// CreateSchemaDesign creates a new schema design.
-func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.CreateSchemaDesignRequest) (*v1pb.SchemaDesign, error) {
+// CreateBranch creates a new branch.
+func (s *BranchService) CreateBranch(ctx context.Context, request *v1pb.CreateBranchRequest) (*v1pb.Branch, error) {
projectID, err := common.GetProjectID(request.Parent)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -117,7 +117,7 @@ func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.Cr
}
// TODO(d): move to resource_id in the request.
- projectID, branchID, err := common.GetProjectAndBranchID(request.SchemaDesign.Name)
+ projectID, branchID, err := common.GetProjectAndBranchID(request.Branch.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
@@ -138,8 +138,8 @@ func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.Cr
}
var createdBranch *store.BranchMessage
- if request.SchemaDesign.ParentBranch != "" {
- parentProjectID, parentBranchID, err := common.GetProjectAndBranchID(request.SchemaDesign.ParentBranch)
+ if request.Branch.ParentBranch != "" {
+ parentProjectID, parentBranchID, err := common.GetProjectAndBranchID(request.Branch.ParentBranch)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
@@ -157,7 +157,7 @@ func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.Cr
Base: parentBranch.Head,
Head: parentBranch.Head,
Config: &storepb.BranchConfig{
- SourceBranch: request.SchemaDesign.ParentBranch,
+ SourceBranch: request.Branch.ParentBranch,
SourceDatabase: parentBranch.Config.GetSourceDatabase(),
},
CreatorID: principalID,
@@ -166,8 +166,8 @@ func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.Cr
return nil, err
}
createdBranch = created
- } else if request.SchemaDesign.BaselineDatabase != "" {
- instanceID, databaseName, err := common.GetInstanceDatabaseID(request.SchemaDesign.BaselineDatabase)
+ } else if request.Branch.BaselineDatabase != "" {
+ instanceID, databaseName, err := common.GetInstanceDatabaseID(request.Branch.BaselineDatabase)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
@@ -208,7 +208,7 @@ func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.Cr
DatabaseConfig: databaseSchema.GetConfig(),
},
Config: &storepb.BranchConfig{
- SourceDatabase: request.SchemaDesign.BaselineDatabase,
+ SourceDatabase: request.Branch.BaselineDatabase,
},
CreatorID: principalID,
})
@@ -220,18 +220,18 @@ func (s *BranchService) CreateSchemaDesign(ctx context.Context, request *v1pb.Cr
return nil, status.Errorf(codes.InvalidArgument, "either baseline database or parent branch must be specified")
}
- schemaDesign, err := s.convertBranchToSchemaDesign(ctx, project, createdBranch, v1pb.SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL)
+ v1Branch, err := s.convertBranchToBranch(ctx, project, createdBranch, v1pb.BranchView_BRANCH_VIEW_FULL)
if err != nil {
return nil, err
}
- return schemaDesign, nil
+ return v1Branch, nil
}
-// UpdateSchemaDesign updates an existing schema design.
-func (s *BranchService) UpdateSchemaDesign(ctx context.Context, request *v1pb.UpdateSchemaDesignRequest) (*v1pb.SchemaDesign, error) {
- projectID, branchID, err := common.GetProjectAndBranchID(request.SchemaDesign.Name)
+// UpdateBranch updates an existing branch.
+func (s *BranchService) UpdateBranch(ctx context.Context, request *v1pb.UpdateBranchRequest) (*v1pb.Branch, error) {
+ projectID, branchID, err := common.GetProjectAndBranchID(request.Branch.Name)
if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid schema design name: %v", err))
+ return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid branch name: %v", err))
}
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "update_mask is required")
@@ -251,7 +251,7 @@ func (s *BranchService) UpdateSchemaDesign(ctx context.Context, request *v1pb.Up
if branch == nil {
return nil, status.Errorf(codes.NotFound, "branch %q not found", branchID)
}
- schemaDesign := request.SchemaDesign
+ schemaDesign := request.Branch
// TODO(d): handle etag.
// TODO(d): support branch id update.
@@ -263,7 +263,7 @@ func (s *BranchService) UpdateSchemaDesign(ctx context.Context, request *v1pb.Up
// TODO(d): this section needs some clarifications for merging branches.
if slices.Contains(request.UpdateMask.Paths, "schema") && slices.Contains(request.UpdateMask.Paths, "metadata") {
headUpdate.Schema = []byte(schemaDesign.Schema)
- sanitizeSchemaDesignSchemaMetadata(schemaDesign)
+ sanitizeBranchSchemaMetadata(schemaDesign)
// TODO(d): update database metadata and config.
hasHeadUpdate = true
} else if slices.Contains(request.UpdateMask.Paths, "schema") {
@@ -275,7 +275,7 @@ func (s *BranchService) UpdateSchemaDesign(ctx context.Context, request *v1pb.Up
// return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to transform schema string to database metadata: %v", err))
// }
} else if slices.Contains(request.UpdateMask.Paths, "metadata") {
- sanitizeSchemaDesignSchemaMetadata(schemaDesign)
+ sanitizeBranchSchemaMetadata(schemaDesign)
// schema, err := getDesignSchema(schemaDesign.Engine, schemaDesign.BaselineSchema, schemaDesign.SchemaMetadata)
// if err != nil {
// return nil, err
@@ -301,15 +301,15 @@ func (s *BranchService) UpdateSchemaDesign(ctx context.Context, request *v1pb.Up
if err != nil {
return nil, err
}
- schemaDesign, err = s.convertBranchToSchemaDesign(ctx, project, branch, v1pb.SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL)
+ schemaDesign, err = s.convertBranchToBranch(ctx, project, branch, v1pb.BranchView_BRANCH_VIEW_FULL)
if err != nil {
return nil, err
}
return schemaDesign, nil
}
-// MergeSchemaDesign merges a personal draft schema design to the target schema design.
-func (s *BranchService) MergeSchemaDesign(ctx context.Context, request *v1pb.MergeSchemaDesignRequest) (*v1pb.SchemaDesign, error) {
+// MergeBranch merges a personal draft branch to the target branch.
+func (s *BranchService) MergeBranch(ctx context.Context, request *v1pb.MergeBranchRequest) (*v1pb.Branch, error) {
projectID, branchID, err := common.GetProjectAndBranchID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -347,17 +347,17 @@ func (s *BranchService) MergeSchemaDesign(ctx context.Context, request *v1pb.Mer
return nil, status.Errorf(codes.NotFound, "branch %q not found", targetBranchID)
}
- // Restrict merging only when the target schema design is not updated.
+ // Restrict merging only when the target branch is not updated.
// Maybe we can support auto-merging in the future.
baseMetadata := convertDatabaseMetadata(nil, branch.Base.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
headMetadata := convertDatabaseMetadata(nil, branch.Head.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
targetHeadMetadata := convertDatabaseMetadata(nil, targetBranch.Head.Metadata, nil, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil)
mergedTarget, err := tryMerge(baseMetadata, headMetadata, targetHeadMetadata)
if err != nil {
- return nil, status.Errorf(codes.FailedPrecondition, fmt.Sprintf("failed to merge schema design: %v", err))
+ return nil, status.Errorf(codes.FailedPrecondition, fmt.Sprintf("failed to merge branch: %v", err))
}
if mergedTarget == nil {
- return nil, status.Errorf(codes.FailedPrecondition, "failed to merge schema design: no change")
+ return nil, status.Errorf(codes.FailedPrecondition, "failed to merge branch: no change")
}
mergedTargetSchema, err := getDesignSchema(v1pb.Engine(branch.Engine), string(targetBranch.Head.Schema), mergedTarget)
if err != nil {
@@ -381,15 +381,15 @@ func (s *BranchService) MergeSchemaDesign(ctx context.Context, request *v1pb.Mer
return nil, status.Errorf(codes.Internal, "failed update branch, error %v", err)
}
- targetSchemaDesign, err := s.convertBranchToSchemaDesign(ctx, targetProject, targetBranch, v1pb.SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL)
+ targetBranchV1, err := s.convertBranchToBranch(ctx, targetProject, targetBranch, v1pb.BranchView_BRANCH_VIEW_FULL)
if err != nil {
return nil, err
}
- return targetSchemaDesign, nil
+ return targetBranchV1, nil
}
-// DeleteSchemaDesign deletes an existing schema design.
-func (s *BranchService) DeleteSchemaDesign(ctx context.Context, request *v1pb.DeleteSchemaDesignRequest) (*emptypb.Empty, error) {
+// DeleteBranch deletes an existing branch.
+func (s *BranchService) DeleteBranch(ctx context.Context, request *v1pb.DeleteBranchRequest) (*emptypb.Empty, error) {
projectID, branchID, err := common.GetProjectAndBranchID(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
@@ -556,7 +556,7 @@ func (s *BranchService) checkProtectionRules(ctx context.Context, project *store
return nil
}
-func (s *BranchService) convertBranchToSchemaDesign(ctx context.Context, project *store.ProjectMessage, branch *store.BranchMessage, view v1pb.SchemaDesignView) (*v1pb.SchemaDesign, error) {
+func (s *BranchService) convertBranchToBranch(ctx context.Context, project *store.ProjectMessage, branch *store.BranchMessage, view v1pb.BranchView) (*v1pb.Branch, error) {
creator, err := s.store.GetUserByID(ctx, branch.CreatorID)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get creator, error %v", err)
@@ -573,30 +573,27 @@ func (s *BranchService) convertBranchToSchemaDesign(ctx context.Context, project
}
var baselineDatabase, baselineBranch string
- schemaDesignType := v1pb.SchemaDesign_MAIN_BRANCH
if branch.Config != nil {
baselineDatabase = branch.Config.SourceDatabase
if branch.Config.SourceBranch != "" {
- schemaDesignType = v1pb.SchemaDesign_PERSONAL_DRAFT
baselineBranch = branch.Config.SourceBranch
}
}
- schemaDesign := &v1pb.SchemaDesign{
+ schemaDesign := &v1pb.Branch{
Name: fmt.Sprintf("%s%s/%s%v", common.ProjectNamePrefix, project.ResourceID, common.BranchPrefix, branch.ResourceID),
Title: branch.ResourceID,
Etag: fmt.Sprintf("%d", branch.CreatedTime.UnixMilli()),
ParentBranch: baselineBranch,
Engine: v1pb.Engine(branch.Engine),
BaselineDatabase: baselineDatabase,
- Type: schemaDesignType,
Creator: common.FormatUserEmail(creator.Email),
Updater: common.FormatUserEmail(updater.Email),
CreateTime: timestamppb.New(branch.CreatedTime),
UpdateTime: timestamppb.New(branch.UpdatedTime),
}
- if view != v1pb.SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL {
+ if view != v1pb.BranchView_BRANCH_VIEW_FULL {
return schemaDesign, nil
}
@@ -607,7 +604,7 @@ func (s *BranchService) convertBranchToSchemaDesign(ctx context.Context, project
return schemaDesign, nil
}
-func sanitizeSchemaDesignSchemaMetadata(design *v1pb.SchemaDesign) {
+func sanitizeBranchSchemaMetadata(design *v1pb.Branch) {
if dbSchema := design.GetBaselineSchemaMetadata(); dbSchema != nil {
sanitizeCommentForSchemaMetadata(dbSchema)
}
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index cffa4199d9..200a24bec4 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -84,7 +84,7 @@ func configureGrpcRouters(
v1pb.RegisterRolloutServiceServer(grpcServer, rolloutService)
v1pb.RegisterRoleServiceServer(grpcServer, apiv1.NewRoleService(stores, licenseService))
v1pb.RegisterSheetServiceServer(grpcServer, apiv1.NewSheetService(stores, licenseService))
- v1pb.RegisterSchemaDesignServiceServer(grpcServer, apiv1.NewBranchService(stores, licenseService))
+ v1pb.RegisterBranchServiceServer(grpcServer, apiv1.NewBranchService(stores, licenseService))
v1pb.RegisterCelServiceServer(grpcServer, apiv1.NewCelService())
v1pb.RegisterLoggingServiceServer(grpcServer, apiv1.NewLoggingService(stores))
v1pb.RegisterInboxServiceServer(grpcServer, apiv1.NewInboxService(stores))
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue
index 90cc5b9073..cc5b7caa89 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorModal.vue
@@ -137,7 +137,7 @@ import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import ActionConfirmModal from "@/components/SchemaEditorV1/Modals/ActionConfirmModal.vue";
import SchemaEditorV1 from "@/components/SchemaEditorV1/index.vue";
-import { schemaDesignServiceClient } from "@/grpcweb";
+import { branchServiceClient } from "@/grpcweb";
import {
pushNotification,
useDBSchemaV1Store,
@@ -346,7 +346,7 @@ const fetchStatementMapWithSchemaEditor = async () => {
continue;
}
- const { diff } = await schemaDesignServiceClient.diffMetadata({
+ const { diff } = await branchServiceClient.diffMetadata({
sourceMetadata,
targetMetadata,
engine: database.instanceEntity.engine,
diff --git a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
index 9628b0b763..edcc36a615 100644
--- a/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
+++ b/frontend/src/components/AlterSchemaPrepForm/SchemaEditorSQLCheckButton/useSchemaEditorSQLCheck.ts
@@ -4,7 +4,7 @@ import {
mergeSchemaEditToMetadata,
validateDatabaseMetadata,
} from "@/components/SchemaEditorV1/utils";
-import { schemaDesignServiceClient } from "@/grpcweb";
+import { branchServiceClient } from "@/grpcweb";
import { t } from "@/plugins/i18n";
import { useDBSchemaV1Store, useSchemaEditorV1Store } from "@/store";
import { ComposedDatabase } from "@/types";
@@ -70,7 +70,7 @@ export const useSchemaEditorSQLCheck = (params: {
}
try {
- const { diff } = await schemaDesignServiceClient.diffMetadata(
+ const { diff } = await branchServiceClient.diffMetadata(
{
sourceMetadata: metadata,
targetMetadata: mergedMetadata,
diff --git a/frontend/src/components/Branch/BranchBaseline.vue b/frontend/src/components/Branch/BranchBaseline.vue
index 52ba4c6726..54e1509b39 100644
--- a/frontend/src/components/Branch/BranchBaseline.vue
+++ b/frontend/src/components/Branch/BranchBaseline.vue
@@ -15,11 +15,11 @@
import { computed } from "vue";
import { RichDatabaseName } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
const props = withDefaults(
defineProps<{
- branch: SchemaDesign;
+ branch: Branch;
showInstanceIcon?: boolean;
}>(),
{
diff --git a/frontend/src/components/Branch/BranchCreateView.vue b/frontend/src/components/Branch/BranchCreateView.vue
index c33ca0c4ed..8357ff7015 100644
--- a/frontend/src/components/Branch/BranchCreateView.vue
+++ b/frontend/src/components/Branch/BranchCreateView.vue
@@ -91,17 +91,14 @@ import {
useSchemaEditorV1Store,
useSheetV1Store,
} from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import {
databaseNamePrefix,
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
} from "@/store/modules/v1/common";
import { UNKNOWN_ID } from "@/types";
+import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import {
- SchemaDesign,
- SchemaDesign_Type,
-} from "@/types/proto/v1/schema_design_service";
import {
Sheet_Source,
Sheet_Type,
@@ -122,7 +119,7 @@ interface LocalState {
projectId?: string;
loading: boolean;
baselineSchema: BaselineSchema;
- schemaDesign: SchemaDesign;
+ branch: Branch;
parentBranchName?: string;
isCreating: boolean;
}
@@ -138,15 +135,13 @@ const { t } = useI18n();
const router = useRouter();
const projectStore = useProjectV1Store();
const databaseStore = useDatabaseV1Store();
-const schemaDesignStore = useSchemaDesignStore();
+const branchStore = useBranchStore();
const sheetStore = useSheetV1Store();
const state = reactive<LocalState>({
projectId: props.projectId,
loading: false,
baselineSchema: {},
- schemaDesign: SchemaDesign.fromPartial({
- type: SchemaDesign_Type.MAIN_BRANCH,
- }),
+ branch: Branch.fromPartial({}),
isCreating: false,
});
const branchTitle = ref<string>("");
@@ -163,7 +158,7 @@ const disallowToChangeBaseline = computed(() => {
});
// Avoid to create array or object literals in template to improve performance
-const branches = computed(() => [state.schemaDesign]);
+const branches = computed(() => [state.branch]);
onMounted(async () => {
if (props.projectId) {
@@ -174,10 +169,7 @@ onMounted(async () => {
});
watch(
- () => [
- state.schemaDesign.baselineDatabase,
- state.schemaDesign.baselineSchema,
- ],
+ () => [state.branch.baselineDatabase, state.branch.baselineSchema],
() => {
refreshId.value = uniqueId();
}
@@ -188,13 +180,11 @@ watch(
async () => {
if (!state.parentBranchName) {
state.baselineSchema = {};
- state.schemaDesign = SchemaDesign.fromPartial({
- type: SchemaDesign_Type.MAIN_BRANCH,
- });
+ state.branch = Branch.fromPartial({});
return;
}
- const branch = await schemaDesignStore.fetchSchemaDesignByName(
+ const branch = await branchStore.fetchBranchByName(
state.parentBranchName,
false /* !useCache */
);
@@ -205,7 +195,7 @@ watch(
state.baselineSchema.databaseId = database.uid;
state.baselineSchema.schema = undefined;
state.baselineSchema.databaseMetadata = undefined;
- state.schemaDesign = branch;
+ state.branch = branch;
refreshId.value = uniqueId();
}
);
@@ -219,18 +209,15 @@ const prepareSchemaDesign = async () => {
const database = databaseStore.getDatabaseByUID(
state.baselineSchema.databaseId
);
- return SchemaDesign.fromPartial({
+ return Branch.fromPartial({
engine: database.instanceEntity.engine,
baselineSchema: state.baselineSchema.schema,
baselineSchemaMetadata: state.baselineSchema.databaseMetadata,
schema: state.baselineSchema.schema,
schemaMetadata: state.baselineSchema.databaseMetadata,
- type: SchemaDesign_Type.MAIN_BRANCH,
});
}
- return SchemaDesign.fromPartial({
- type: SchemaDesign_Type.MAIN_BRANCH,
- });
+ return Branch.fromPartial({});
};
const allowConfirm = computed(() => {
@@ -266,13 +253,13 @@ const handleBaselineSchemaChange = async (baselineSchema: BaselineSchema) => {
}
console.time("prepareSchemaDesign");
state.loading = true;
- state.schemaDesign = await prepareSchemaDesign();
+ state.branch = await prepareSchemaDesign();
state.loading = false;
console.timeEnd("prepareSchemaDesign");
};
const handleConfirm = async () => {
- if (!state.schemaDesign) {
+ if (!state.branch) {
return;
}
@@ -290,7 +277,7 @@ const handleConfirm = async () => {
);
const schemaEditorV1Store = useSchemaEditorV1Store();
const branchSchema = schemaEditorV1Store.resourceMap["branch"].get(
- state.schemaDesign.name
+ state.branch.name
);
if (!branchSchema) {
return;
@@ -300,8 +287,7 @@ const handleConfirm = async () => {
const metadata = mergeSchemaEditToMetadata(
branchSchema.schemaList,
cloneDeep(
- state.schemaDesign.baselineSchemaMetadata ||
- DatabaseMetadata.fromPartial({})
+ state.branch.baselineSchemaMetadata || DatabaseMetadata.fromPartial({})
)
);
const baselineDatabase = `${database.instanceEntity.name}/${databaseNamePrefix}${state.baselineSchema.databaseId}`;
@@ -309,7 +295,7 @@ const handleConfirm = async () => {
const baselineSheet = await sheetStore.createSheet(project.value.name, {
title: `baseline schema of ${branchTitle.value}`,
database: baselineDatabase,
- content: new TextEncoder().encode(state.schemaDesign.baselineSchema),
+ content: new TextEncoder().encode(state.branch.baselineSchema),
visibility: Sheet_Visibility.VISIBILITY_PROJECT,
source: Sheet_Source.SOURCE_BYTEBASE_ARTIFACT,
type: Sheet_Type.TYPE_SQL,
@@ -317,27 +303,26 @@ const handleConfirm = async () => {
let createdSchemaDesign;
if (!state.parentBranchName) {
- createdSchemaDesign = await schemaDesignStore.createSchemaDesign(
+ createdSchemaDesign = await branchStore.createBranch(
project.value.name,
- SchemaDesign.fromPartial({
+ Branch.fromPartial({
title: branchTitle.value,
// Keep schema empty in frontend. Backend will generate the design schema.
schema: "",
schemaMetadata: metadata,
- baselineSchema: state.schemaDesign.baselineSchema,
- baselineSchemaMetadata: state.schemaDesign.baselineSchemaMetadata,
- engine: state.schemaDesign.engine,
- type: SchemaDesign_Type.MAIN_BRANCH,
+ baselineSchema: state.branch.baselineSchema,
+ baselineSchemaMetadata: state.branch.baselineSchemaMetadata,
+ engine: state.branch.engine,
baselineDatabase: baselineDatabase,
parentBranch: baselineSheet.name,
})
);
} else {
- const parentBranch = await schemaDesignStore.fetchSchemaDesignByName(
+ const parentBranch = await branchStore.fetchBranchByName(
state.parentBranchName,
false /* useCache */
);
- createdSchemaDesign = await schemaDesignStore.createSchemaDesignDraft({
+ createdSchemaDesign = await branchStore.createBranchDraft({
...parentBranch,
title: branchTitle.value,
});
@@ -350,14 +335,12 @@ const handleConfirm = async () => {
});
// Go to branch detail page after created.
- const [_, sheetId] = getProjectAndSchemaDesignSheetId(
- createdSchemaDesign.name
- );
+ const [_, branchId] = getProjectAndBranchId(createdSchemaDesign.name);
router.replace({
name: "workspace.project.branch.detail",
params: {
projectSlug: projectV1Slug(project.value),
- branchName: sheetId,
+ branchName: branchId,
},
});
};
diff --git a/frontend/src/components/Branch/BranchDataTable.vue b/frontend/src/components/Branch/BranchDataTable.vue
index 4ab3125d34..179c4d9933 100644
--- a/frontend/src/components/Branch/BranchDataTable.vue
+++ b/frontend/src/components/Branch/BranchDataTable.vue
@@ -18,16 +18,13 @@ import { useI18n } from "vue-i18n";
import BranchBaseline from "@/components/Branch/BranchBaseline.vue";
import { useDatabaseV1Store, useProjectV1Store, useUserStore } from "@/store";
import {
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
projectNamePrefix,
} from "@/store/modules/v1/common";
-import {
- SchemaDesign,
- SchemaDesign_Type,
-} from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
type BranchRowData = {
- branch: SchemaDesign;
+ branch: Branch;
name: string;
branchName: string;
projectName: string;
@@ -37,13 +34,13 @@ type BranchRowData = {
};
const props = defineProps<{
- branches: SchemaDesign[];
+ branches: Branch[];
hideProjectColumn?: boolean;
ready?: boolean;
}>();
const emit = defineEmits<{
- (event: "click", schemaDesign: SchemaDesign): void;
+ (event: "click", branch: Branch): void;
}>();
const { t } = useI18n();
@@ -53,10 +50,10 @@ const databaseStore = useDatabaseV1Store();
const dataTableRows = computed(() => {
const parentBranches = props.branches.filter((branch) => {
- return branch.type === SchemaDesign_Type.MAIN_BRANCH;
+ return branch.parentBranch === "";
});
const parentRows: BranchRowData[] = parentBranches.map((branch) => {
- const [projectName] = getProjectAndSchemaDesignSheetId(branch.name);
+ const [projectName] = getProjectAndBranchId(branch.name);
const project = projectV1Store.getProjectByName(
`${projectNamePrefix}${projectName}`
);
@@ -74,7 +71,7 @@ const dataTableRows = computed(() => {
};
});
const childBranches = props.branches.filter((branch) => {
- return branch.type === SchemaDesign_Type.PERSONAL_DRAFT;
+ return branch.parentBranch !== "";
});
for (const childBranch of childBranches) {
const parentRow = parentRows.find(
@@ -148,7 +145,7 @@ const rowProps = (row: BranchRowData) => {
};
};
-const getUpdatedTimeStr = (branch: SchemaDesign) => {
+const getUpdatedTimeStr = (branch: Branch) => {
const updater = userV1Store.getUserByEmail(branch.updater.split("/")[1]);
const updatedTimeStr = t("schema-designer.message.updated-time-by-user", {
time: dayjs
diff --git a/frontend/src/components/Branch/BranchDetailView.vue b/frontend/src/components/Branch/BranchDetailView.vue
index 0067be1052..661faf1646 100644
--- a/frontend/src/components/Branch/BranchDetailView.vue
+++ b/frontend/src/components/Branch/BranchDetailView.vue
@@ -83,7 +83,7 @@
:style="'DELETE'"
:button-text="$t('database.delete-this-branch')"
:require-confirm="true"
- @confirm="deleteSchemaDesign"
+ @confirm="deleteBranch"
/>
</div>
</div>
@@ -121,24 +121,18 @@ import {
validateDatabaseMetadata,
} from "@/components/SchemaEditorV1/utils";
import TargetDatabasesSelectPanel from "@/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue";
-import { schemaDesignServiceClient } from "@/grpcweb";
+import { branchServiceClient } from "@/grpcweb";
import {
pushNotification,
useDatabaseV1Store,
useSchemaEditorV1Store,
} from "@/store";
+import { useBranchList, useBranchStore } from "@/store/modules/branch";
import {
- useSchemaDesignList,
- useSchemaDesignStore,
-} from "@/store/modules/schemaDesign";
-import {
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
projectNamePrefix,
} from "@/store/modules/v1/common";
-import {
- SchemaDesign,
- SchemaDesign_Type,
-} from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { projectV1Slug } from "@/utils";
import { provideSQLCheckContext } from "../SQLCheck";
import { fetchBaselineMetadataOfBranch } from "../SchemaEditorV1/utils/branch";
@@ -156,15 +150,15 @@ interface LocalState {
const props = defineProps<{
// Should be a schema design name of main branch.
- branch: SchemaDesign;
+ branch: Branch;
viewMode?: boolean;
}>();
const { t } = useI18n();
const router = useRouter();
const databaseStore = useDatabaseV1Store();
-const schemaDesignStore = useSchemaDesignStore();
-const { schemaDesignList, ready } = useSchemaDesignList();
+const branchStore = useBranchStore();
+const { branchList, ready } = useBranchList();
const { runSQLCheck } = provideSQLCheckContext();
const dialog = useDialog();
const state = reactive<LocalState>({
@@ -191,11 +185,8 @@ const schemaDesign = computed(() => {
const parentBranch = asyncComputed(async () => {
// Show parent branch when the current branch is a personal draft and it's not the new created one.
- if (
- schemaDesign.value.type === SchemaDesign_Type.PERSONAL_DRAFT &&
- schemaDesign.value.parentBranch
- ) {
- return await schemaDesignStore.fetchSchemaDesignByName(
+ if (schemaDesign.value.parentBranch !== "") {
+ return await branchStore.fetchBranchByName(
schemaDesign.value.parentBranch,
true /* useCache */
);
@@ -239,11 +230,8 @@ watch(
state.schemaDesignTitle = schemaDesign.value.title;
await prepareBaselineDatabase();
// Prepare the parent branch for personal draft.
- if (
- schemaDesign.value.type === SchemaDesign_Type.PERSONAL_DRAFT &&
- schemaDesign.value.parentBranch
- ) {
- await schemaDesignStore.fetchSchemaDesignByName(
+ if (schemaDesign.value.parentBranch !== "") {
+ await branchStore.fetchBranchByName(
schemaDesign.value.parentBranch,
true /* useCache */
);
@@ -277,8 +265,8 @@ const handleBranchTitleInputBlur = async () => {
updateMask.push("title");
}
if (updateMask.length !== 0) {
- await schemaDesignStore.updateSchemaDesign(
- SchemaDesign.fromPartial({
+ await branchStore.updateBranch(
+ Branch.fromPartial({
name: schemaDesign.value.name,
title: state.schemaDesignTitle,
baselineDatabase: schemaDesign.value.baselineDatabase,
@@ -295,8 +283,8 @@ const handleBranchTitleInputBlur = async () => {
};
const handleMergeBranch = () => {
- const tempList = schemaDesignList.value.filter((item) => {
- const [projectName] = getProjectAndSchemaDesignSheetId(item.name);
+ const tempList = branchList.value.filter((item) => {
+ const [projectName] = getProjectAndBranchId(item.name);
return (
`${projectNamePrefix}${projectName}` === project.value.name &&
item.engine === schemaDesign.value.engine &&
@@ -393,9 +381,9 @@ const handleSaveBranch = async () => {
state.isSaving = true;
if (updateMask.length !== 0) {
- if (schemaDesign.value.type === SchemaDesign_Type.MAIN_BRANCH) {
+ if (schemaDesign.value.parentBranch === "") {
const branchName = generateForkedBranchName(schemaDesign.value);
- const newBranch = await schemaDesignStore.createSchemaDesignDraft({
+ const newBranch = await branchStore.createBranchDraft({
...schemaDesign.value,
baselineSchema: schemaDesign.value.schema,
schemaMetadata: mergedMetadata,
@@ -403,7 +391,7 @@ const handleSaveBranch = async () => {
title: branchName,
});
try {
- await schemaDesignStore.mergeSchemaDesign({
+ await branchStore.mergeBranch({
name: newBranch.name,
targetName: schemaDesign.value.name,
});
@@ -421,15 +409,13 @@ const handleSaveBranch = async () => {
closeOnEsc: true,
onNegativeClick: () => {
// Go to draft branch detail page after merge failed.
- const [_, sheetId] = getProjectAndSchemaDesignSheetId(
- newBranch.name
- );
+ const [_, branchId] = getProjectAndBranchId(newBranch.name);
state.isEditing = false;
router.replace({
name: "workspace.project.branch.detail",
params: {
projectSlug: projectV1Slug(project.value),
- branchName: sheetId,
+ branchName: branchId,
},
});
},
@@ -454,15 +440,15 @@ const handleSaveBranch = async () => {
}
// Delete the draft after merged.
- await schemaDesignStore.deleteSchemaDesign(newBranch.name);
+ await branchStore.deleteBranch(newBranch.name);
// Fetch the latest schema design after merged.
- await schemaDesignStore.fetchSchemaDesignByName(
+ await branchStore.fetchBranchByName(
schemaDesign.value.name,
false /* !useCache */
);
} else {
- await schemaDesignStore.updateSchemaDesign(
- SchemaDesign.fromPartial({
+ await branchStore.updateBranch(
+ Branch.fromPartial({
name: schemaDesign.value.name,
title: state.schemaDesignTitle,
engine: schemaDesign.value.engine,
@@ -487,12 +473,12 @@ const handleSaveBranch = async () => {
const handleMergeAfterConflictResolved = (branchName: string) => {
state.showDiffEditor = false;
state.isEditing = false;
- const [_, sheetId] = getProjectAndSchemaDesignSheetId(branchName);
+ const [_, branchId] = getProjectAndBranchId(branchName);
router.replace({
name: "workspace.project.branch.detail",
params: {
projectSlug: projectV1Slug(project.value),
- branchName: sheetId,
+ branchName: branchId,
},
});
};
@@ -502,7 +488,7 @@ const handleSelectedDatabaseIdListChanged = async (
) => {
let statement = "";
try {
- const diffResponse = await schemaDesignServiceClient.diffMetadata(
+ const diffResponse = await branchServiceClient.diffMetadata(
{
sourceMetadata: schemaDesign.value.baselineSchemaMetadata,
targetMetadata: schemaDesign.value.schemaMetadata,
@@ -576,8 +562,8 @@ const generateIssueName = (databaseNameList: string[]) => {
return issueNameParts.join(" ");
};
-const deleteSchemaDesign = async () => {
- await schemaDesignStore.deleteSchemaDesign(schemaDesign.value.name);
+const deleteBranch = async () => {
+ await branchStore.deleteBranch(schemaDesign.value.name);
router.replace({
name: "workspace.project.detail",
hash: "#branches",
diff --git a/frontend/src/components/Branch/SchemaDesignSQLCheckButton.vue b/frontend/src/components/Branch/BranchSQLCheckButton.vue
similarity index 87%
rename from frontend/src/components/Branch/SchemaDesignSQLCheckButton.vue
rename to frontend/src/components/Branch/BranchSQLCheckButton.vue
index ad6e1c7848..bb0c6c2b9c 100644
--- a/frontend/src/components/Branch/SchemaDesignSQLCheckButton.vue
+++ b/frontend/src/components/Branch/BranchSQLCheckButton.vue
@@ -27,30 +27,30 @@ import {
mergeSchemaEditToMetadata,
validateDatabaseMetadata,
} from "@/components/SchemaEditorV1/utils";
-import { schemaDesignServiceClient } from "@/grpcweb";
+import { branchServiceClient } from "@/grpcweb";
import { useDatabaseV1Store, useSchemaEditorV1Store } from "@/store";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { fetchBaselineMetadataOfBranch } from "../SchemaEditorV1/utils/branch";
const props = defineProps<{
- schemaDesign: SchemaDesign;
+ branch: Branch;
}>();
const { t } = useI18n();
const databaseStore = useDatabaseV1Store();
const schemaEditorV1Store = useSchemaEditorV1Store();
const database = computed(() => {
- return databaseStore.getDatabaseByName(props.schemaDesign.baselineDatabase);
+ return databaseStore.getDatabaseByName(props.branch.baselineDatabase);
});
const getSourceMetadata = async () => {
- const branch = props.schemaDesign;
+ const branch = props.branch;
return await fetchBaselineMetadataOfBranch(branch);
};
const getEditingMetadata = async () => {
const branchSchema = schemaEditorV1Store.resourceMap["branch"].get(
- props.schemaDesign.name
+ props.branch.name
);
if (!branchSchema) {
return undefined;
@@ -89,7 +89,7 @@ const getStatement = async () => {
const target = editingMetadata;
try {
- const diffResponse = await schemaDesignServiceClient.diffMetadata(
+ const diffResponse = await branchServiceClient.diffMetadata(
{
sourceMetadata: source,
targetMetadata: target,
diff --git a/frontend/src/components/Branch/BranchSelector.vue b/frontend/src/components/Branch/BranchSelector.vue
index 194fe08ac3..74d49f3a8f 100644
--- a/frontend/src/components/Branch/BranchSelector.vue
+++ b/frontend/src/components/Branch/BranchSelector.vue
@@ -16,36 +16,32 @@
<script lang="ts" setup>
import { NSelect, SelectOption, SelectRenderLabel } from "naive-ui";
import { computed, h } from "vue";
+import { useDatabaseV1Store, useProjectV1Store, useBranchList } from "@/store";
import {
- useDatabaseV1Store,
- useProjectV1Store,
- useSchemaDesignList,
-} from "@/store";
-import {
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
projectNamePrefix,
} from "@/store/modules/v1/common";
import { UNKNOWN_ID } from "@/types";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { InstanceV1EngineIcon } from "../v2";
interface BranchSelectOption extends SelectOption {
value: string;
- branch: SchemaDesign;
+ branch: Branch;
}
const props = defineProps<{
project?: string;
branch?: string;
clearable?: boolean;
- filter?: (branch: SchemaDesign, index: number) => boolean;
+ filter?: (branch: Branch, index: number) => boolean;
}>();
defineEmits<{
(event: "update:branch", name: string | undefined): void;
}>();
-const { schemaDesignList: branchList } = useSchemaDesignList();
+const { branchList: branchList } = useBranchList();
const projectStore = useProjectV1Store();
const databaseStore = useDatabaseV1Store();
@@ -55,7 +51,7 @@ const combinedBranchList = computed(() => {
const project = projectStore.getProjectByUID(props.project);
if (project) {
list = list.filter((branch) => {
- const [projectName] = getProjectAndSchemaDesignSheetId(branch.name);
+ const [projectName] = getProjectAndBranchId(branch.name);
return project.name === `${projectNamePrefix}${projectName}`;
});
}
diff --git a/frontend/src/components/Branch/BranchTable.vue b/frontend/src/components/Branch/BranchTable.vue
index dfc150daed..37ccc059ba 100644
--- a/frontend/src/components/Branch/BranchTable.vue
+++ b/frontend/src/components/Branch/BranchTable.vue
@@ -8,7 +8,7 @@
v-bind="$attrs"
@click-row="clickBranch"
>
- <template #item="{ item: branch }: { item: SchemaDesign }">
+ <template #item="{ item: branch }: { item: Branch }">
<div v-if="!hideProjectColumn" class="bb-grid-cell">
{{ projectV1Name(getFormattedValue(branch).project) }}
</div>
@@ -45,21 +45,18 @@ import { BBGridColumn } from "@/bbkit";
import DatabaseInfo from "@/components/DatabaseInfo.vue";
import { useDatabaseV1Store, useProjectV1Store, useUserStore } from "@/store";
import {
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
projectNamePrefix,
} from "@/store/modules/v1/common";
-import {
- SchemaDesign,
- SchemaDesign_Type,
-} from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { projectV1Name } from "@/utils";
const emit = defineEmits<{
- (event: "click", schemaDesign: SchemaDesign): void;
+ (event: "click", branch: Branch): void;
}>();
const props = defineProps<{
- branches: SchemaDesign[];
+ branches: Branch[];
hideProjectColumn?: boolean;
ready?: boolean;
}>();
@@ -86,13 +83,13 @@ const COLUMN_LIST = computed(() => {
return columns;
});
-const getFormattedValue = (branch: SchemaDesign) => {
- const [projectName] = getProjectAndSchemaDesignSheetId(branch.name);
+const getFormattedValue = (branch: Branch) => {
+ const [projectName] = getProjectAndBranchId(branch.name);
const project = projectV1Store.getProjectByName(
`${projectNamePrefix}${projectName}`
);
let parentBranch = "";
- if (branch.type === SchemaDesign_Type.PERSONAL_DRAFT) {
+ if (branch.parentBranch !== "") {
const parentSchemaDesign = props.branches.find(
(br) => br.name === branch.parentBranch
);
@@ -118,7 +115,7 @@ const getFormattedValue = (branch: SchemaDesign) => {
};
};
-const clickBranch = (branch: SchemaDesign) => {
+const clickBranch = (branch: Branch) => {
emit("click", branch);
};
</script>
diff --git a/frontend/src/components/Branch/MergeBranchPanel.vue b/frontend/src/components/Branch/MergeBranchPanel.vue
index 7feb906ed0..67a18d5027 100644
--- a/frontend/src/components/Branch/MergeBranchPanel.vue
+++ b/frontend/src/components/Branch/MergeBranchPanel.vue
@@ -83,12 +83,12 @@ import { computed, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { Drawer, DrawerContent } from "@/components/v2";
import { pushNotification, useSheetV1Store } from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import {
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
projectNamePrefix,
} from "@/store/modules/v1/common";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import {
Sheet_Source,
Sheet_Type,
@@ -120,10 +120,10 @@ const state = reactive<LocalState>({
const { t } = useI18n();
const dialog = useDialog();
const sheetStore = useSheetV1Store();
-const schemaDesignStore = useSchemaDesignStore();
+const branchStore = useBranchStore();
const isLoadingSourceBranch = ref(false);
const isLoadingTargetBranch = ref(false);
-const emptyBranch = () => SchemaDesign.fromPartial({});
+const emptyBranch = () => Branch.fromPartial({});
const sourceBranch = asyncComputed(
async () => {
@@ -131,10 +131,7 @@ const sourceBranch = asyncComputed(
if (!name) {
return emptyBranch();
}
- return await schemaDesignStore.fetchSchemaDesignByName(
- name,
- true /* useCache */
- );
+ return await branchStore.fetchBranchByName(name, true /* useCache */);
},
emptyBranch(),
{
@@ -148,10 +145,7 @@ const targetBranch = asyncComputed(
if (!name) {
return emptyBranch();
}
- return await schemaDesignStore.fetchSchemaDesignByName(
- name,
- true /* useCache */
- );
+ return await branchStore.fetchBranchByName(name, true /* useCache */);
},
emptyBranch(),
{
@@ -164,7 +158,7 @@ const ready = computed(() => {
return !isLoadingSourceBranch.value && !isLoadingTargetBranch.value;
});
-const targetBranchFilter = (branch: SchemaDesign) => {
+const targetBranchFilter = (branch: Branch) => {
return (
branch.name !== props.sourceBranchName &&
branch.engine === sourceBranch.value.engine
@@ -173,9 +167,7 @@ const targetBranchFilter = (branch: SchemaDesign) => {
const handleSaveDraft = async (ignoreNotify?: boolean) => {
const updateMask = ["schema", "parent_branch"];
- const [projectName] = getProjectAndSchemaDesignSheetId(
- sourceBranch.value.name
- );
+ const [projectName] = getProjectAndBranchId(sourceBranch.value.name);
// Create a baseline sheet for the schema design.
const baselineSheet = await sheetStore.createSheet(
`${projectNamePrefix}${projectName}`,
@@ -190,8 +182,8 @@ const handleSaveDraft = async (ignoreNotify?: boolean) => {
);
// Update the schema design draft first.
- await schemaDesignStore.updateSchemaDesign(
- SchemaDesign.fromPartial({
+ await branchStore.updateBranch(
+ Branch.fromPartial({
name: sourceBranch.value.name,
engine: sourceBranch.value.engine,
baselineDatabase: sourceBranch.value.baselineDatabase,
@@ -215,7 +207,7 @@ const handleMergeBranch = async () => {
await handleSaveDraft(true);
try {
- await schemaDesignStore.mergeSchemaDesign({
+ await branchStore.mergeBranch({
name: sourceBranch.value.name,
targetName: targetBranch.value.name,
});
@@ -236,7 +228,7 @@ const handleMergeBranch = async () => {
},
onPositiveClick: async () => {
// Fetching the latest target branch.
- await schemaDesignStore.fetchSchemaDesignByName(
+ await branchStore.fetchBranchByName(
state.targetBranchName,
false /* !useCache */
);
@@ -261,7 +253,7 @@ const handleMergeBranch = async () => {
emit("merged", state.targetBranchName);
if (state.deleteBranchAfterMerged) {
- await schemaDesignStore.deleteSchemaDesign(props.sourceBranchName);
+ await branchStore.deleteBranch(props.sourceBranchName);
}
};
diff --git a/frontend/src/components/Branch/SchemaDesignEditor.vue b/frontend/src/components/Branch/SchemaDesignEditor.vue
index b7d7ca25f2..d5990545a0 100644
--- a/frontend/src/components/Branch/SchemaDesignEditor.vue
+++ b/frontend/src/components/Branch/SchemaDesignEditor.vue
@@ -26,10 +26,7 @@
</button>
</div>
<div v-if="!hideSQLCheckButton" class="flex items-center flex-end">
- <SchemaDesignSQLCheckButton
- class="justify-end"
- :schema-design="branch"
- />
+ <BranchSQLCheckButton class="justify-end" :branch="branch" />
</div>
</div>
<div class="grow w-full h-auto overflow-auto">
@@ -64,14 +61,14 @@
import { cloneDeep } from "lodash-es";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
-import { schemaDesignServiceClient } from "@/grpcweb";
+import { branchServiceClient } from "@/grpcweb";
import {
pushNotification,
useDatabaseV1Store,
useSchemaEditorV1Store,
} from "@/store";
import { ComposedProject } from "@/types";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { MonacoEditor } from "../MonacoEditor";
import {
mergeSchemaEditToMetadata,
@@ -87,7 +84,7 @@ interface LocalState {
const props = defineProps<{
project: ComposedProject;
- branch: SchemaDesign;
+ branch: Branch;
readonly?: boolean;
hideSQLCheckButton?: boolean;
}>();
@@ -160,7 +157,7 @@ const fetchRawSQLPreview = async () => {
try {
rawSQLPreviewState.isFetching = true;
- const diffResponse = await schemaDesignServiceClient.diffMetadata(
+ const diffResponse = await branchServiceClient.diffMetadata(
{
sourceMetadata,
targetMetadata: metadata,
diff --git a/frontend/src/components/Branch/utils.ts b/frontend/src/components/Branch/utils.ts
index 238c9b3270..987c2b0d12 100644
--- a/frontend/src/components/Branch/utils.ts
+++ b/frontend/src/components/Branch/utils.ts
@@ -1,7 +1,7 @@
import { useCurrentUserV1 } from "@/store";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
-export const generateForkedBranchName = (branch: SchemaDesign): string => {
+export const generateForkedBranchName = (branch: Branch): string => {
const currentUser = useCurrentUserV1();
const parentBranchName = branch.title;
const branchName =
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue
index e841493800..55b982b8cd 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/AddChangePanel.vue
@@ -86,14 +86,14 @@ import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { fetchBaselineMetadataOfBranch } from "@/components/SchemaEditorV1/utils/branch";
import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";
-import { schemaDesignServiceClient } from "@/grpcweb";
+import { branchServiceClient } from "@/grpcweb";
import {
pushNotification,
useChangeHistoryStore,
useChangelistStore,
useLocalSheetStore,
} from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import {
Changelist_Change as Change,
Changelist,
@@ -170,14 +170,14 @@ const doAddChange = async () => {
}
if (sourceType === "BRANCH") {
// For branch changes, use its diff DDL
- const branch = await useSchemaDesignStore().fetchSchemaDesignByName(
+ const branch = await useBranchStore().fetchBranchByName(
change.source,
false /* !useCache */
);
const source = await fetchBaselineMetadataOfBranch(branch);
const target = branch.schemaMetadata;
- const { diff } = await schemaDesignServiceClient.diffMetadata({
+ const { diff } = await branchServiceClient.diffMetadata({
sourceMetadata: source,
targetMetadata: target,
engine: branch.engine,
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue
index d6b20aee23..44c5df5623 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchChangeItem.vue
@@ -40,12 +40,12 @@ import { NButton } from "naive-ui";
import { computed } from "vue";
import { RichDatabaseName } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
+import { Branch } from "@/types/proto/v1/branch_service";
import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
const props = defineProps<{
change: Change;
- branch: SchemaDesign | undefined;
+ branch: Branch | undefined;
}>();
defineEmits<{
@@ -56,7 +56,7 @@ defineEmits<{
const branch = computed(() => {
return (
props.branch ??
- SchemaDesign.fromPartial({
+ Branch.fromPartial({
name: props.change.source,
title: "<<Unknown Branch>>",
})
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue
index 0396198bee..0487522a39 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchForm.vue
@@ -52,13 +52,10 @@ import { first, orderBy } from "lodash-es";
import { computed, reactive, watch } from "vue";
import { DatabaseSelect } from "@/components/v2";
import { useDatabaseV1Store, useLocalSheetStore } from "@/store";
-import {
- useSchemaDesignList,
- useSchemaDesignStore,
-} from "@/store/modules/schemaDesign";
+import { useBranchList, useBranchStore } from "@/store/modules/branch";
import { UNKNOWN_ID } from "@/types";
+import { Branch } from "@/types/proto/v1/branch_service";
import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
import { keyBy } from "@/utils";
import BranchDetailPanel from "../../BranchDetailPanel";
import { useChangelistDetailContext } from "../../context";
@@ -69,7 +66,7 @@ import BranchTable from "./BranchTable";
type LocalState = {
keyword: string;
databaseUID: string | undefined;
- branchList: SchemaDesign[];
+ branchList: Branch[];
detailBranchName: string | undefined;
};
@@ -82,7 +79,7 @@ const state = reactive<LocalState>({
const { project } = useChangelistDetailContext();
const { changesFromBranch: changes } = useAddChangeContext();
-const { schemaDesignList: branchList, ready } = useSchemaDesignList();
+const { branchList, ready } = useBranchList();
const localSheetStore = useLocalSheetStore();
const database = computed(() => {
@@ -154,7 +151,7 @@ const handleRemoveChange = (change: Change) => {
const handleClickChange = async (change: Change) => {
const branchName = change.source;
- const branch = await useSchemaDesignStore().fetchSchemaDesignByName(
+ const branch = await useBranchStore().fetchBranchByName(
branchName,
true /* useCache */
);
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
index e81607983c..9e3d2b8938 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
@@ -28,7 +28,7 @@
</div>
</div>
</template>
- <template #item="{ item: branch }: BBGridRow<SchemaDesign>">
+ <template #item="{ item: branch }: BBGridRow<Branch>">
<div class="bb-grid-cell">
<NCheckbox
:checked="isSelected(branch)"
@@ -63,19 +63,19 @@ import { BBGrid, BBGridColumn, BBGridRow } from "@/bbkit";
import BranchBaseline from "@/components/Branch/BranchBaseline.vue";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
import { useUserStore } from "@/store";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { extractUserResourceName, getHighlightHTMLByRegExp } from "@/utils";
const props = defineProps<{
selected: string[];
- branchList: SchemaDesign[];
+ branchList: Branch[];
isFetching: boolean;
keyword: string;
}>();
const emit = defineEmits<{
(event: "update:selected", selected: string[]): void;
- (event: "click-item", branch: SchemaDesign): void;
+ (event: "click-item", branch: Branch): void;
}>();
const { t } = useI18n();
@@ -117,11 +117,11 @@ const toggleSelectAll = (on: boolean) => {
}
};
-const isSelected = (branch: SchemaDesign) => {
+const isSelected = (branch: Branch) => {
return props.selected.includes(branch.name);
};
-const toggleSelect = (branch: SchemaDesign, on: boolean) => {
+const toggleSelect = (branch: Branch, on: boolean) => {
const set = new Set(props.selected);
const key = branch.name;
if (on) {
@@ -137,7 +137,7 @@ const toggleSelect = (branch: SchemaDesign, on: boolean) => {
}
};
-const renderTitle = (item: SchemaDesign) => {
+const renderTitle = (item: Branch) => {
const keyword = props.keyword.trim().toLowerCase();
const { title } = item;
@@ -158,7 +158,7 @@ const getUser = (name: string) => {
return useUserStore().getUserByEmail(email);
};
-const handleClickRow = (item: SchemaDesign) => {
+const handleClickRow = (item: Branch) => {
emit("click-item", item);
};
</script>
diff --git a/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue
index fbbb7ef136..75df945ff2 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchBaseline.vue
@@ -14,10 +14,10 @@
import { computed } from "vue";
import DatabaseInfo from "@/components/DatabaseInfo.vue";
import { useDatabaseV1Store } from "@/store";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
const props = defineProps<{
- branch: SchemaDesign;
+ branch: Branch;
}>();
const baselineDatabase = computed(() => {
diff --git a/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vue b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vue
index 843aed24d7..eadc0ed1dd 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/BranchDetailPanel/BranchDetailPanel.vue
@@ -28,7 +28,7 @@ import { useI18n } from "vue-i18n";
import SchemaDesignEditor from "@/components/Branch/SchemaDesignEditor.vue";
import { Drawer, DrawerContent } from "@/components/v2";
import { useDatabaseV1Store } from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import BranchBaseline from "./BranchBaseline.vue";
const props = defineProps<{
@@ -47,7 +47,7 @@ const branch = asyncComputed(async () => {
if (!branchName) {
return undefined;
}
- return await useSchemaDesignStore().fetchSchemaDesignByName(
+ return await useBranchStore().fetchBranchByName(
branchName,
true /* useCache */
);
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue
index ede6b450e4..22e7b910ab 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/DatabaseForChange.vue
@@ -12,7 +12,7 @@
<script setup lang="ts">
import { asyncComputed } from "@vueuse/core";
import { RichDatabaseName } from "@/components/v2";
-import { useDatabaseV1Store, useSchemaDesignStore } from "@/store";
+import { useDatabaseV1Store, useBranchStore } from "@/store";
import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import {
extractDatabaseResourceName,
@@ -31,7 +31,7 @@ const database = asyncComputed(async () => {
const { full: database } = extractDatabaseResourceName(source);
return useDatabaseV1Store().getDatabaseByName(database);
} else if (isBranchChangeSource(change)) {
- const branch = await useSchemaDesignStore().fetchSchemaDesignByName(
+ const branch = await useBranchStore().fetchBranchByName(
source,
true /* useCache */
);
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue
index b6c7df95d8..4f336da1ff 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ChangeTable/Source.vue
@@ -31,7 +31,7 @@
import { asyncComputed } from "@vueuse/core";
import { File, GitBranch, History } from "lucide-vue-next";
import { computed } from "vue";
-import { useChangeHistoryStore, useSchemaDesignStore } from "@/store";
+import { useChangeHistoryStore, useBranchStore } from "@/store";
import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import { getChangelistChangeSourceType } from "@/utils";
@@ -50,7 +50,7 @@ const changeHistory = computed(() => {
const branch = asyncComputed(() => {
if (type.value !== "BRANCH") return undefined;
- return useSchemaDesignStore().fetchSchemaDesignByName(
+ return useBranchStore().fetchBranchByName(
props.change.source,
true /* useCache */
);
diff --git a/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts b/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts
index 6352b6c67c..1c95b32642 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts
+++ b/frontend/src/components/Changelist/ChangelistDetail/NavBar/export.ts
@@ -1,7 +1,7 @@
import JSZip from "jszip";
import { padStart } from "lodash-es";
import { useChangeHistoryStore, useSheetV1Store } from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import { Changelist_Change_Source as ChangeSource } from "@/types";
import { Changelist_Change as Change } from "@/types/proto/v1/changelist_service";
import {
@@ -54,7 +54,7 @@ const zipFileForBranch = async (zip: JSZip, change: Change, index: number) => {
if (!sheet) {
return;
}
- const branch = await useSchemaDesignStore().fetchSchemaDesignByName(
+ const branch = await useBranchStore().fetchBranchByName(
change.source,
false /* !useCache */
);
diff --git a/frontend/src/components/IssueV1/logic/initialize/create.ts b/frontend/src/components/IssueV1/logic/initialize/create.ts
index 891a95ac19..519f5d5915 100644
--- a/frontend/src/components/IssueV1/logic/initialize/create.ts
+++ b/frontend/src/components/IssueV1/logic/initialize/create.ts
@@ -4,6 +4,7 @@ import { reactive } from "vue";
import { rolloutServiceClient } from "@/grpcweb";
import { TemplateType } from "@/plugins";
import {
+ useBranchStore,
useChangelistStore,
useCurrentUserV1,
useDatabaseV1Store,
@@ -11,13 +12,13 @@ import {
useProjectV1Store,
useSheetV1Store,
} from "@/store";
-import { getProjectAndSchemaDesignSheetId } from "@/store/modules/v1/common";
import {
ComposedProject,
emptyIssue,
TaskTypeListWithStatement,
UNKNOWN_ID,
} from "@/types";
+import { DatabaseConfig } from "@/types/proto/v1/database_service";
import { IssueStatus, Issue_Type } from "@/types/proto/v1/issue_service";
import {
Plan,
@@ -29,6 +30,7 @@ import {
Stage,
Task_Type,
} from "@/types/proto/v1/rollout_service";
+import { SheetPayload } from "@/types/proto/v1/sheet_service";
import {
extractSheetUID,
generateSQLForChangeToDatabase,
@@ -106,8 +108,7 @@ export const createIssueSkeleton = async (query: Record<string, string>) => {
const prepareParamsContext = async (params: CreateIssueParams) => {
if (params.branch) {
- const [_, sheetId] = getProjectAndSchemaDesignSheetId(params.branch);
- await useSheetV1Store().getOrFetchSheetByUID(sheetId);
+ await useBranchStore().fetchBranchByName(params.branch);
}
};
@@ -410,7 +411,7 @@ const maybeSetInitialSQLForSpec = (
}
};
-const maybeSetInitialDatabaseConfigForSpec = (
+const maybeSetInitialDatabaseConfigForSpec = async (
spec: Plan_Spec,
params: CreateIssueParams
) => {
@@ -427,11 +428,19 @@ const maybeSetInitialDatabaseConfigForSpec = (
return;
}
- const [_, sheetId] = getProjectAndSchemaDesignSheetId(branch);
- const temp = useSheetV1Store().getSheetByUID(sheetId);
- if (temp && temp.payload) {
+ // TODO(d): double check setting database config.
+ const temp = await useBranchStore().fetchBranchByName(branch);
+ if (temp) {
const sheetEntity = getLocalSheetByName(sheetName);
- sheetEntity.payload = temp.payload;
+ if (!sheetEntity.payload) {
+ sheetEntity.payload = SheetPayload.fromPartial({});
+ }
+ sheetEntity.payload.databaseConfig = DatabaseConfig.fromPartial({
+ schemaConfigs: temp.schemaMetadata?.schemaConfigs,
+ });
+ sheetEntity.payload.baselineDatabaseConfig = DatabaseConfig.fromPartial({
+ schemaConfigs: temp.baselineSchemaMetadata?.schemaConfigs,
+ });
}
};
diff --git a/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue b/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue
index 9a5cf09d1d..881f01c9b0 100644
--- a/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue
+++ b/frontend/src/components/Project/CreateProjectBranchProtectionRulePanel.vue
@@ -89,9 +89,9 @@ import { NButton, NCheckbox, NInput, NDivider, NSelect, NTag } from "naive-ui";
import { v4 as uuidv4 } from "uuid";
import { computed, reactive, watch } from "vue";
import { Drawer, DrawerContent } from "@/components/v2";
-import { useRoleStore, useSchemaDesignList } from "@/store";
+import { useRoleStore, useBranchList } from "@/store";
import {
- getProjectAndSchemaDesignSheetId,
+ getProjectAndBranchId,
projectNamePrefix,
protectionRulesSuffix,
} from "@/store/modules/v1/common";
@@ -122,7 +122,7 @@ const emit = defineEmits<{
(event: "close"): void;
}>();
-const { schemaDesignList } = useSchemaDesignList();
+const { branchList } = useBranchList();
const protectionRuleStore = useProjectProtectionRulesStore();
const branchProtectionRules = useProjectBranchProtectionRules(
props.project.name
@@ -140,15 +140,15 @@ const state = reactive<LocalState>({
selectedRoles: props.protectionRule?.createAllowedRoles || [],
});
-const branchList = computed(() => {
- return schemaDesignList.value.filter((branch) => {
- const [projectName] = getProjectAndSchemaDesignSheetId(branch.name);
+const branches = computed(() => {
+ return branchList.value.filter((branch) => {
+ const [projectName] = getProjectAndBranchId(branch.name);
return projectNamePrefix + projectName === props.project.name;
});
});
const matchedBranchList = computed(() => {
- return branchList.value.filter((branch) => {
+ return branches.value.filter((branch) => {
return wildcardToRegex(state.protectionRule.nameFilter).test(branch.title);
});
});
diff --git a/frontend/src/components/ProjectBranchesPanel.vue b/frontend/src/components/ProjectBranchesPanel.vue
index 4721913543..4a6aa3bbe1 100644
--- a/frontend/src/components/ProjectBranchesPanel.vue
+++ b/frontend/src/components/ProjectBranchesPanel.vue
@@ -29,9 +29,9 @@ import { computed, reactive } from "vue";
import { useRouter } from "vue-router";
import BranchDataTable from "@/components/Branch/BranchDataTable.vue";
import { useProjectV1Store } from "@/store";
-import { useSchemaDesignList } from "@/store/modules/schemaDesign";
-import { getProjectAndSchemaDesignSheetId } from "@/store/modules/v1/common";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
+import { useBranchList } from "@/store/modules/branch";
+import { getProjectAndBranchId } from "@/store/modules/v1/common";
+import { Branch } from "@/types/proto/v1/branch_service";
import { projectV1Slug } from "@/utils";
const props = defineProps<{
@@ -44,7 +44,7 @@ interface LocalState {
const router = useRouter();
const projectV1Store = useProjectV1Store();
-const { schemaDesignList, ready } = useSchemaDesignList();
+const { branchList, ready } = useBranchList();
const state = reactive<LocalState>({
searchKeyword: "",
});
@@ -54,10 +54,10 @@ const project = computed(() => projectV1Store.getProjectByUID(props.projectId));
const filteredBranches = computed(() => {
return orderBy(
props.projectId
- ? schemaDesignList.value.filter((schemaDesign) =>
- schemaDesign.name.startsWith(project.value.name)
+ ? branchList.value.filter((branch) =>
+ branch.name.startsWith(project.value.name)
)
- : schemaDesignList.value,
+ : branchList.value,
"updateTime",
"desc"
).filter((branch) => {
@@ -77,13 +77,13 @@ const handleCreateBranch = () => {
});
};
-const handleBranchClick = async (schemaDesign: SchemaDesign) => {
- const [_, sheetId] = getProjectAndSchemaDesignSheetId(schemaDesign.name);
+const handleBranchClick = async (schemaDesign: Branch) => {
+ const [_, branchId] = getProjectAndBranchId(schemaDesign.name);
router.push({
name: "workspace.project.branch.detail",
params: {
projectSlug: projectV1Slug(project.value),
- branchName: `${sheetId}`,
+ branchName: `${branchId}`,
},
});
};
diff --git a/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue b/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue
index af7b057166..8571fed050 100644
--- a/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue
+++ b/frontend/src/components/SchemaEditorV1/Aside/BranchTree.vue
@@ -85,8 +85,8 @@ import TableIcon from "~icons/heroicons-outline/table-cells";
import SchemaIcon from "~icons/heroicons-outline/view-columns";
import EllipsisIcon from "~icons/heroicons-solid/ellipsis-horizontal";
import { generateUniqueTabId, useSchemaEditorV1Store } from "@/store";
+import { Branch } from "@/types/proto/v1/branch_service";
import { Engine } from "@/types/proto/v1/common";
-import { SchemaDesign } from "@/types/proto/v1/schema_design_service";
import { Table } from "@/types/v1/schemaEditor";
import { BranchSchema, SchemaEditorTabType } from "@/types/v1/schemaEditor";
import { getHighlightHTMLByKeyWords, isDescendantOf } from "@/utils";
@@ -169,7 +169,7 @@ const branchSchema = computed(
) as BranchSchema
);
const engine = computed(() => {
- return (branchSchema.value.branch as any as SchemaDesign).engine;
+ return (branchSchema.value.branch as any as Branch).engine;
});
const schemaList = computed(() =>
diff --git a/frontend/src/components/SchemaEditorV1/index.vue b/frontend/src/components/SchemaEditorV1/index.vue
index 94e5766eb4..9f3d658848 100644
--- a/frontend/src/components/SchemaEditorV1/index.vue
+++ b/frontend/src/components/SchemaEditorV1/index.vue
@@ -24,12 +24,9 @@ import { isEqual } from "lodash-es";
import { Splitpanes, Pane } from "splitpanes";
import { onMounted, watch, reactive, computed } from "vue";
import { useSchemaEditorV1Store, useSettingV1Store } from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import { ComposedProject, ComposedDatabase } from "@/types";
-import {
- SchemaDesign,
- SchemaDesign_Type,
-} from "@/types/proto/v1/schema_design_service";
+import { Branch } from "@/types/proto/v1/branch_service";
import { BranchSchema } from "@/types/v1/schemaEditor";
import { nextAnimationFrame } from "@/utils";
import MaskSpinner from "../misc/MaskSpinner.vue";
@@ -43,7 +40,7 @@ const props = defineProps<{
readonly?: boolean;
databases?: ComposedDatabase[];
// NOTE: we only support editing one branch for now.
- branches?: SchemaDesign[];
+ branches?: Branch[];
loading?: boolean;
}>();
@@ -54,7 +51,7 @@ interface LocalState {
const settingStore = useSettingV1Store();
const schemaEditorV1Store = useSchemaEditorV1Store();
-const schemaDesignStore = useSchemaDesignStore();
+const branchStore = useBranchStore();
const state = reactive<LocalState>({
loading: false,
initialized: false,
@@ -69,12 +66,9 @@ const prepareBranchContext = async () => {
return;
}
for (const branch of props.branches) {
- if (
- branch.type === SchemaDesign_Type.PERSONAL_DRAFT &&
- branch.parentBranch
- ) {
+ if (branch.parentBranch !== "") {
// Prepare parent branch for personal draft.
- await schemaDesignStore.fetchSchemaDesignByName(
+ await branchStore.fetchBranchByName(
branch.parentBranch,
true /* useCache */
);
@@ -82,7 +76,7 @@ const prepareBranchContext = async () => {
}
};
-const batchConvertBranchSchemas = async (branches: SchemaDesign[]) => {
+const batchConvertBranchSchemas = async (branches: Branch[]) => {
try {
state.loading = true;
await nextAnimationFrame();
diff --git a/frontend/src/components/SchemaEditorV1/utils/branch.ts b/frontend/src/components/SchemaEditorV1/utils/branch.ts
index 295e755fa5..eebd5e3098 100644
--- a/frontend/src/components/SchemaEditorV1/utils/branch.ts
+++ b/frontend/src/components/SchemaEditorV1/utils/branch.ts
@@ -1,10 +1,7 @@
import { markRaw } from "vue";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
+import { Branch } from "@/types/proto/v1/branch_service";
import { DatabaseMetadata } from "@/types/proto/v1/database_service";
-import {
- SchemaDesign,
- SchemaDesign_Type,
-} from "@/types/proto/v1/schema_design_service";
import {
BranchSchema,
convertSchemaMetadataList,
@@ -12,7 +9,7 @@ import {
import { rebuildEditableSchemas } from "./metadata";
export const convertBranchToBranchSchema = async (
- branch: SchemaDesign
+ branch: Branch
): Promise<BranchSchema> => {
const baselineMetadata = await fetchBaselineMetadataOfBranch(branch);
const originalSchemas = convertSchemaMetadataList(
@@ -34,11 +31,11 @@ export const convertBranchToBranchSchema = async (
};
export const fetchBaselineMetadataOfBranch = async (
- branch: SchemaDesign
+ branch: Branch
): Promise<DatabaseMetadata> => {
// For personal branches, we use its parent branch's schema as the original schema in editing state.
- if (branch.type === SchemaDesign_Type.PERSONAL_DRAFT && branch.parentBranch) {
- const parentBranch = await useSchemaDesignStore().fetchSchemaDesignByName(
+ if (branch.parentBranch !== "") {
+ const parentBranch = await useBranchStore().fetchBranchByName(
branch.parentBranch,
false /* !useCache */
);
diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.ts
index 287798c533..fbaa4d4cc3 100644
--- a/frontend/src/grpcweb/index.ts
+++ b/frontend/src/grpcweb/index.ts
@@ -8,6 +8,7 @@ import {
import { ActuatorServiceDefinition } from "@/types/proto/v1/actuator_service";
import { AnomalyServiceDefinition } from "@/types/proto/v1/anomaly_service";
import { AuthServiceDefinition } from "@/types/proto/v1/auth_service";
+import { BranchServiceDefinition } from "@/types/proto/v1/branch_service";
import { CelServiceDefinition } from "@/types/proto/v1/cel_service";
import { ChangelistServiceDefinition } from "@/types/proto/v1/changelist_service";
import { DatabaseServiceDefinition } from "@/types/proto/v1/database_service";
@@ -24,7 +25,6 @@ import { ProjectServiceDefinition } from "@/types/proto/v1/project_service";
import { RiskServiceDefinition } from "@/types/proto/v1/risk_service";
import { RoleServiceDefinition } from "@/types/proto/v1/role_service";
import { RolloutServiceDefinition } from "@/types/proto/v1/rollout_service";
-import { SchemaDesignServiceDefinition } from "@/types/proto/v1/schema_design_service";
import { SettingServiceDefinition } from "@/types/proto/v1/setting_service";
import { SheetServiceDefinition } from "@/types/proto/v1/sheet_service";
import { SQLServiceDefinition } from "@/types/proto/v1/sql_service";
@@ -178,8 +178,8 @@ export const anomalyServiceClient = clientFactory.create(
channel
);
-export const schemaDesignServiceClient = clientFactory.create(
- SchemaDesignServiceDefinition,
+export const branchServiceClient = clientFactory.create(
+ BranchServiceDefinition,
channel
);
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index c485c8b397..1a25b74769 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -36,7 +36,7 @@ import {
useDatabaseV1Store,
useChangeHistoryStore,
useChangelistStore,
- useSchemaDesignStore,
+ useBranchStore,
useSQLEditorTreeStore,
} from "@/store";
import {
@@ -1243,8 +1243,8 @@ router.beforeEach((to, from, next) => {
to.params.branchName !== "new"
) {
const name = `${project.name}/schemaDesigns/${to.params.branchName}`;
- useSchemaDesignStore()
- .fetchSchemaDesignByName(name, false /* !useCache */)
+ useBranchStore()
+ .fetchBranchByName(name, false /* !useCache */)
.then((branch) => {
if (branch) {
next();
diff --git a/frontend/src/store/modules/branch.ts b/frontend/src/store/modules/branch.ts
new file mode 100644
index 0000000000..26f32c8c1e
--- /dev/null
+++ b/frontend/src/store/modules/branch.ts
@@ -0,0 +1,136 @@
+import { defineStore } from "pinia";
+import { reactive, ref, watchEffect } from "vue";
+import { branchServiceClient } from "@/grpcweb";
+import {
+ MergeBranchRequest,
+ Branch,
+ BranchView,
+} from "@/types/proto/v1/branch_service";
+import {
+ getProjectAndBranchId,
+ projectNamePrefix,
+ branchNamePrefix,
+} from "./v1/common";
+
+export const useBranchStore = defineStore("schema_design", () => {
+ const branchMapByName = reactive(new Map<string, Branch>());
+ const getBranchRequestCacheByName = new Map<string, Promise<Branch>>();
+
+ // Actions
+ const fetchBranchList = async (projectName: string = "projects/-") => {
+ const { branches } = await branchServiceClient.listBranches({
+ parent: projectName,
+ view: BranchView.BRANCH_VIEW_BASIC,
+ });
+ return branches;
+ };
+
+ const createBranch = async (projectResourceId: string, branch: Branch) => {
+ const createdBranch = await branchServiceClient.createBranch({
+ parent: projectResourceId,
+ branch,
+ });
+ console.debug("baseline schema", branch.baselineSchema);
+ console.debug("target metadata", branch.schemaMetadata);
+ console.debug("got schema", createdBranch.schema);
+ branchMapByName.set(createdBranch.name, createdBranch);
+ return createdBranch;
+ };
+
+ const createBranchDraft = async (branch: Branch) => {
+ const [projectName, branchId] = getProjectAndBranchId(branch.name);
+ const projectResourceId = `${projectNamePrefix}${projectName}`;
+ const parentBranch = `${projectResourceId}/${branchNamePrefix}${branchId}`;
+ return createBranch(projectResourceId, {
+ ...branch,
+ parentBranch: parentBranch,
+ });
+ };
+
+ const updateBranch = async (branch: Branch, updateMask: string[]) => {
+ const updatedBranch = await branchServiceClient.updateBranch({
+ branch,
+ updateMask,
+ });
+ branchMapByName.set(updatedBranch.name, updatedBranch);
+ return updatedBranch;
+ };
+
+ const mergeBranch = async (request: MergeBranchRequest) => {
+ const updatedBranch = await branchServiceClient.mergeBranch(request, {
+ silent: true,
+ });
+ branchMapByName.set(updatedBranch.name, updatedBranch);
+ };
+
+ const fetchBranchByName = async (
+ name: string,
+ useCache = true,
+ silent = false
+ ) => {
+ if (useCache) {
+ const cachedEntity = branchMapByName.get(name);
+ if (cachedEntity) {
+ return cachedEntity;
+ }
+
+ // Avoid making duplicated requests concurrently
+ const cachedRequest = getBranchRequestCacheByName.get(name);
+ if (cachedRequest) {
+ return cachedRequest;
+ }
+ }
+ const request = branchServiceClient.getBranch(
+ {
+ name,
+ },
+ {
+ silent,
+ }
+ );
+ request.then((branch) => {
+ branchMapByName.set(branch.name, branch);
+ });
+ getBranchRequestCacheByName.set(name, request);
+ return request;
+ };
+
+ const getBranchByName = (name: string) => {
+ return branchMapByName.get(name);
+ };
+
+ const deleteBranch = async (name: string) => {
+ await branchServiceClient.deleteBranch({
+ name,
+ });
+ branchMapByName.delete(name);
+ };
+
+ return {
+ fetchBranchList,
+ createBranch,
+ createBranchDraft,
+ updateBranch,
+ mergeBranch,
+ fetchBranchByName,
+ getBranchByName,
+ deleteBranch,
+ };
+});
+
+export const useBranchList = (projectName: string | undefined = undefined) => {
+ const store = useBranchStore();
+ const ready = ref(false);
+ const branchList = ref<Branch[]>([]);
+
+ watchEffect(() => {
+ ready.value = false;
+ branchList.value = [];
+ store.fetchBranchList(projectName).then((response) => {
+ ready.value = true;
+ branchList.value = response;
+ });
+ });
+
+ return { branchList, ready };
+};
diff --git a/frontend/src/store/modules/index.ts b/frontend/src/store/modules/index.ts
index 5b16489e99..a5212a1d07 100644
--- a/frontend/src/store/modules/index.ts
+++ b/frontend/src/store/modules/index.ts
@@ -19,4 +19,4 @@ export * from "./role";
export * from "./dbGroup";
export * from "./utils";
export * from "./v1";
-export * from "./schemaDesign";
+export * from "./branch";
diff --git a/frontend/src/store/modules/schemaDesign.ts b/frontend/src/store/modules/schemaDesign.ts
deleted file mode 100644
index d41a437c98..0000000000
--- a/frontend/src/store/modules/schemaDesign.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import { defineStore } from "pinia";
-import { reactive, ref, watchEffect } from "vue";
-import { schemaDesignServiceClient } from "@/grpcweb";
-import {
- MergeSchemaDesignRequest,
- SchemaDesign,
- SchemaDesign_Type,
- SchemaDesignView,
-} from "@/types/proto/v1/schema_design_service";
-import {
- getProjectAndSchemaDesignSheetId,
- projectNamePrefix,
- sheetNamePrefix,
-} from "./v1/common";
-
-export const useSchemaDesignStore = defineStore("schema_design", () => {
- const schemaDesignMapByName = reactive(new Map<string, SchemaDesign>());
- const getSchemaDesignRequestCacheByName = new Map<
- string,
- Promise<SchemaDesign>
- >();
-
- // Actions
- const fetchSchemaDesignList = async (projectName: string = "projects/-") => {
- const { schemaDesigns } = await schemaDesignServiceClient.listSchemaDesigns(
- {
- parent: projectName,
- view: SchemaDesignView.SCHEMA_DESIGN_VIEW_BASIC,
- }
- );
- return schemaDesigns;
- };
-
- const createSchemaDesign = async (
- projectResourceId: string,
- schemaDesign: SchemaDesign
- ) => {
- const createdSchemaDesign =
- await schemaDesignServiceClient.createSchemaDesign({
- parent: projectResourceId,
- schemaDesign,
- });
- console.debug("baseline schema", schemaDesign.baselineSchema);
- console.debug("target metadata", schemaDesign.schemaMetadata);
- console.debug("got schema", createdSchemaDesign.schema);
- schemaDesignMapByName.set(createdSchemaDesign.name, createdSchemaDesign);
- return createdSchemaDesign;
- };
-
- const createSchemaDesignDraft = async (schemaDesign: SchemaDesign) => {
- const [projectName, sheetId] = getProjectAndSchemaDesignSheetId(
- schemaDesign.name
- );
- const projectResourceId = `${projectNamePrefix}${projectName}`;
- const parentBranch = `${projectResourceId}/${sheetNamePrefix}${sheetId}`;
- return createSchemaDesign(projectResourceId, {
- ...schemaDesign,
- type: SchemaDesign_Type.PERSONAL_DRAFT,
- parentBranch: parentBranch,
- });
- };
-
- const updateSchemaDesign = async (
- schemaDesign: SchemaDesign,
- updateMask: string[]
- ) => {
- const updatedSchemaDesign =
- await schemaDesignServiceClient.updateSchemaDesign({
- schemaDesign,
- updateMask,
- });
- schemaDesignMapByName.set(updatedSchemaDesign.name, updatedSchemaDesign);
- return updatedSchemaDesign;
- };
-
- const mergeSchemaDesign = async (request: MergeSchemaDesignRequest) => {
- const updatedSchemaDesign =
- await schemaDesignServiceClient.mergeSchemaDesign(request, {
- silent: true,
- });
- schemaDesignMapByName.set(updatedSchemaDesign.name, updatedSchemaDesign);
- };
-
- const fetchSchemaDesignByName = async (
- name: string,
- useCache = true,
- silent = false
- ) => {
- if (useCache) {
- const cachedEntity = schemaDesignMapByName.get(name);
- if (cachedEntity) {
- return cachedEntity;
- }
-
- // Avoid making duplicated requests concurrently
- const cachedRequest = getSchemaDesignRequestCacheByName.get(name);
- if (cachedRequest) {
- return cachedRequest;
- }
- }
- const request = schemaDesignServiceClient.getSchemaDesign(
- {
- name,
- },
- {
- silent,
- }
- );
- request.then((schemaDesign) => {
- schemaDesignMapByName.set(schemaDesign.name, schemaDesign);
- });
- getSchemaDesignRequestCacheByName.set(name, request);
- return request;
- };
-
- const getSchemaDesignByName = (name: string) => {
- return schemaDesignMapByName.get(name);
- };
-
- const deleteSchemaDesign = async (name: string) => {
- await schemaDesignServiceClient.deleteSchemaDesign({
- name,
- });
- schemaDesignMapByName.delete(name);
- };
-
- return {
- fetchSchemaDesignList,
- createSchemaDesign,
- createSchemaDesignDraft,
- updateSchemaDesign,
- mergeSchemaDesign,
- fetchSchemaDesignByName,
- getSchemaDesignByName,
- deleteSchemaDesign,
- };
-});
-
-export const useSchemaDesignList = (
- projectName: string | undefined = undefined
-) => {
- const store = useSchemaDesignStore();
- const ready = ref(false);
- const schemaDesignList = ref<SchemaDesign[]>([]);
-
- watchEffect(() => {
- ready.value = false;
- schemaDesignList.value = [];
- store.fetchSchemaDesignList(projectName).then((response) => {
- ready.value = true;
- schemaDesignList.value = response;
- });
- });
-
- return { schemaDesignList, ready };
-};
diff --git a/frontend/src/store/modules/v1/changelist.ts b/frontend/src/store/modules/v1/changelist.ts
index ca4b6c3c1c..45735267d5 100644
--- a/frontend/src/store/modules/v1/changelist.ts
+++ b/frontend/src/store/modules/v1/changelist.ts
@@ -13,7 +13,7 @@ import {
isBranchChangeSource,
isChangeHistoryChangeSource,
} from "@/utils";
-import { useSchemaDesignStore } from "../schemaDesign";
+import { useBranchStore } from "../branch";
import { useChangeHistoryStore } from "./changeHistory";
import { useSheetV1Store } from "./sheet";
@@ -105,10 +105,7 @@ export const useChangelistStore = defineStore("changelist", () => {
);
} else if (isBranchChangeSource(change)) {
composer.collect(source, () =>
- useSchemaDesignStore().fetchSchemaDesignByName(
- source,
- true /* useCache */
- )
+ useBranchStore().fetchBranchByName(source, true /* useCache */)
);
} else {
// Raw SQL, no need to compose
diff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/store/modules/v1/common.ts
index 6c129da0ef..f17c5b5d94 100644
--- a/frontend/src/store/modules/v1/common.ts
+++ b/frontend/src/store/modules/v1/common.ts
@@ -15,7 +15,7 @@ export const externalVersionControlPrefix = "externalVersionControls/";
export const logNamePrefix = "logs/";
export const issueNamePrefix = "issues/";
export const secretNamePrefix = "secrets/";
-export const schemaDesignNamePrefix = "schemaDesigns/";
+export const branchNamePrefix = "branches/";
export const protectionRulesSuffix = "/protectionRules";
@@ -79,10 +79,10 @@ export const getProjectAndSheetId = (name: string): string[] => {
return tokens;
};
-export const getProjectAndSchemaDesignSheetId = (name: string): string[] => {
+export const getProjectAndBranchId = (name: string): string[] => {
const tokens = getNameParentTokens(name, [
projectNamePrefix,
- schemaDesignNamePrefix,
+ branchNamePrefix,
]);
if (tokens.length != 2) {
diff --git a/frontend/src/types/proto/v1/schema_design_service.ts b/frontend/src/types/proto/v1/branch_service.ts
similarity index 66%
rename from frontend/src/types/proto/v1/schema_design_service.ts
rename to frontend/src/types/proto/v1/branch_service.ts
index db42384b2b..dcc899887c 100644
--- a/frontend/src/types/proto/v1/schema_design_service.ts
+++ b/frontend/src/types/proto/v1/branch_service.ts
@@ -9,61 +9,61 @@ import { DatabaseMetadata } from "./database_service";
export const protobufPackage = "bytebase.v1";
-export enum SchemaDesignView {
+export enum BranchView {
/**
- * SCHEMA_DESIGN_VIEW_UNSPECIFIED - The default / unset value.
+ * BRANCH_VIEW_UNSPECIFIED - The default / unset value.
* The API will default to the BASIC view.
*/
- SCHEMA_DESIGN_VIEW_UNSPECIFIED = 0,
- /** SCHEMA_DESIGN_VIEW_BASIC - Exclude schema, baseline_schema. */
- SCHEMA_DESIGN_VIEW_BASIC = 1,
- /** SCHEMA_DESIGN_VIEW_FULL - Include everything. */
- SCHEMA_DESIGN_VIEW_FULL = 2,
+ BRANCH_VIEW_UNSPECIFIED = 0,
+ /** BRANCH_VIEW_BASIC - Exclude schema, baseline_schema. */
+ BRANCH_VIEW_BASIC = 1,
+ /** BRANCH_VIEW_FULL - Include everything. */
+ BRANCH_VIEW_FULL = 2,
UNRECOGNIZED = -1,
}
-export function schemaDesignViewFromJSON(object: any): SchemaDesignView {
+export function branchViewFromJSON(object: any): BranchView {
switch (object) {
case 0:
- case "SCHEMA_DESIGN_VIEW_UNSPECIFIED":
- return SchemaDesignView.SCHEMA_DESIGN_VIEW_UNSPECIFIED;
+ case "BRANCH_VIEW_UNSPECIFIED":
+ return BranchView.BRANCH_VIEW_UNSPECIFIED;
case 1:
- case "SCHEMA_DESIGN_VIEW_BASIC":
- return SchemaDesignView.SCHEMA_DESIGN_VIEW_BASIC;
+ case "BRANCH_VIEW_BASIC":
+ return BranchView.BRANCH_VIEW_BASIC;
case 2:
- case "SCHEMA_DESIGN_VIEW_FULL":
- return SchemaDesignView.SCHEMA_DESIGN_VIEW_FULL;
+ case "BRANCH_VIEW_FULL":
+ return BranchView.BRANCH_VIEW_FULL;
case -1:
case "UNRECOGNIZED":
default:
- return SchemaDesignView.UNRECOGNIZED;
+ return BranchView.UNRECOGNIZED;
}
}
-export function schemaDesignViewToJSON(object: SchemaDesignView): string {
+export function branchViewToJSON(object: BranchView): string {
switch (object) {
- case SchemaDesignView.SCHEMA_DESIGN_VIEW_UNSPECIFIED:
- return "SCHEMA_DESIGN_VIEW_UNSPECIFIED";
- case SchemaDesignView.SCHEMA_DESIGN_VIEW_BASIC:
- return "SCHEMA_DESIGN_VIEW_BASIC";
- case SchemaDesignView.SCHEMA_DESIGN_VIEW_FULL:
- return "SCHEMA_DESIGN_VIEW_FULL";
- case SchemaDesignView.UNRECOGNIZED:
+ case BranchView.BRANCH_VIEW_UNSPECIFIED:
+ return "BRANCH_VIEW_UNSPECIFIED";
+ case BranchView.BRANCH_VIEW_BASIC:
+ return "BRANCH_VIEW_BASIC";
+ case BranchView.BRANCH_VIEW_FULL:
+ return "BRANCH_VIEW_FULL";
+ case BranchView.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
-export interface SchemaDesign {
+export interface Branch {
/**
- * The name of the schema design.
- * Format: projects/{project}/schemaDesigns/{schemaDesign}
- * {schemaDesign} should be the id of a sheet.
+ * The name of the branch.
+ * Format: projects/{project}/branches/{branch}
+ * {branch} should be the id of a sheet.
*/
name: string;
- /** The title of schema design. AKA sheet's name. */
+ /** The title of branch. AKA sheet's name. */
title: string;
- /** The schema of schema design. AKA sheet's statement. */
+ /** The schema of branch. AKA sheet's statement. */
schema: string;
/** The metadata of the current editing schema. */
schemaMetadata:
@@ -75,7 +75,7 @@ export interface SchemaDesign {
baselineSchemaMetadata:
| DatabaseMetadata
| undefined;
- /** The database engine of the schema design. */
+ /** The database engine of the branch. */
engine: Engine;
/**
* The name of the baseline database.
@@ -83,111 +83,68 @@ export interface SchemaDesign {
*/
baselineDatabase: string;
/**
- * The name of the baseline sheet.
- * For main branch, its format will be: projects/{project}/sheets/{sheet}
- * For personal draft, its format will be: projects/{project}/schemaDesigns/{schemaDesign}
+ * The name of the parent branch.
+ * For main branch, it's empty.
+ * For child branch, its format will be: projects/{project}/branches/{branch}
*/
parentBranch: string;
- /** The type of the schema design. */
- type: SchemaDesign_Type;
- /** The etag of the schema design. */
+ /** The etag of the branch. */
etag: string;
/**
- * The creator of the schema design.
+ * The creator of the branch.
* Format: users/{email}
*/
creator: string;
/**
- * The updater of the schema design.
+ * The updater of the branch.
* Format: users/{email}
*/
updater: string;
- /** The timestamp when the schema design was created. */
+ /** The timestamp when the branch was created. */
createTime:
| Date
| undefined;
- /** The timestamp when the schema design was last updated. */
+ /** The timestamp when the branch was last updated. */
updateTime: Date | undefined;
}
-export enum SchemaDesign_Type {
- TYPE_UNSPECIFIED = 0,
- /** MAIN_BRANCH - Main branch type is the main version of schema design. And only allow to be updated/merged with personal drafts. */
- MAIN_BRANCH = 1,
- /** PERSONAL_DRAFT - Personal draft type is a copy of the main branch type schema designs. */
- PERSONAL_DRAFT = 2,
- UNRECOGNIZED = -1,
-}
-
-export function schemaDesign_TypeFromJSON(object: any): SchemaDesign_Type {
- switch (object) {
- case 0:
- case "TYPE_UNSPECIFIED":
- return SchemaDesign_Type.TYPE_UNSPECIFIED;
- case 1:
- case "MAIN_BRANCH":
- return SchemaDesign_Type.MAIN_BRANCH;
- case 2:
- case "PERSONAL_DRAFT":
- return SchemaDesign_Type.PERSONAL_DRAFT;
- case -1:
- case "UNRECOGNIZED":
- default:
- return SchemaDesign_Type.UNRECOGNIZED;
- }
-}
-
-export function schemaDesign_TypeToJSON(object: SchemaDesign_Type): string {
- switch (object) {
- case SchemaDesign_Type.TYPE_UNSPECIFIED:
- return "TYPE_UNSPECIFIED";
- case SchemaDesign_Type.MAIN_BRANCH:
- return "MAIN_BRANCH";
- case SchemaDesign_Type.PERSONAL_DRAFT:
- return "PERSONAL_DRAFT";
- case SchemaDesign_Type.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export interface GetSchemaDesignRequest {
+export interface GetBranchRequest {
/**
- * The name of the schema design to retrieve.
- * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ * The name of the branch to retrieve.
+ * Format: projects/{project}/branches/{branch}
*/
name: string;
}
-export interface ListSchemaDesignsRequest {
+export interface ListBranchesRequest {
/**
- * The parent resource of the schema design.
+ * The parent resource of the branch.
* Foramt: projects/{project}
*/
parent: string;
/** To filter the search result. */
filter: string;
/**
- * The maximum number of schema designs to return. The service may return fewer than
+ * The maximum number of branches to return. The service may return fewer than
* this value.
- * If unspecified, at most 50 schema designs will be returned.
+ * If unspecified, at most 50 branches will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
*/
pageSize: number;
/**
- * A page token, received from a previous `ListSchemaDesigns` call.
+ * A page token, received from a previous `ListBranches` call.
* Provide this to retrieve the subsequent page.
*
- * When paginating, all other parameters provided to `ListSchemaDesigns` must match
+ * When paginating, all other parameters provided to `ListBranches` must match
* the call that provided the page token.
*/
pageToken: string;
- view: SchemaDesignView;
+ view: BranchView;
}
-export interface ListSchemaDesignsResponse {
- /** The schema designs from the specified request. */
- schemaDesigns: SchemaDesign[];
+export interface ListBranchesResponse {
+ /** The branches from the specified request. */
+ branches: Branch[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
* If this field is omitted, there are no subsequent pages.
@@ -195,46 +152,46 @@ export interface ListSchemaDesignsResponse {
nextPageToken: string;
}
-export interface CreateSchemaDesignRequest {
+export interface CreateBranchRequest {
/**
- * The parent, which owns this collection of schema designs.
+ * The parent, which owns this collection of branches.
* Format: project/{project}
*/
parent: string;
- schemaDesign: SchemaDesign | undefined;
+ branch: Branch | undefined;
}
-export interface UpdateSchemaDesignRequest {
+export interface UpdateBranchRequest {
/**
- * The schema design to update.
+ * The branch to update.
*
- * The schema design's `name` field is used to identify the schema design to update.
- * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ * The branch's `name` field is used to identify the branch to update.
+ * Format: projects/{project}/branches/{branch}
*/
- schemaDesign:
- | SchemaDesign
+ branch:
+ | Branch
| undefined;
/** The list of fields to update. */
updateMask: string[] | undefined;
}
-export interface MergeSchemaDesignRequest {
+export interface MergeBranchRequest {
/**
- * The name of the schema design to merge.
- * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ * The name of the branch to merge.
+ * Format: projects/{project}/branches/{branch}
*/
name: string;
/**
- * The target schema design to merge into.
- * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ * The target branch to merge into.
+ * Format: projects/{project}/branches/{branch}
*/
targetName: string;
}
-export interface DeleteSchemaDesignRequest {
+export interface DeleteBranchRequest {
/**
- * The name of the schema design to delete.
- * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ * The name of the branch to delete.
+ * Format: projects/{project}/branches/{branch}
*/
name: string;
}
@@ -257,7 +214,7 @@ export interface DiffMetadataResponse {
diff: string;
}
-function createBaseSchemaDesign(): SchemaDesign {
+function createBaseBranch(): Branch {
return {
name: "",
title: "",
@@ -268,7 +225,6 @@ function createBaseSchemaDesign(): SchemaDesign {
engine: 0,
baselineDatabase: "",
parentBranch: "",
- type: 0,
etag: "",
creator: "",
updater: "",
@@ -277,8 +233,8 @@ function createBaseSchemaDesign(): SchemaDesign {
};
}
-export const SchemaDesign = {
- encode(message: SchemaDesign, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const Branch = {
+ encode(message: Branch, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
@@ -306,31 +262,28 @@ export const SchemaDesign = {
if (message.parentBranch !== "") {
writer.uint32(74).string(message.parentBranch);
}
- if (message.type !== 0) {
- writer.uint32(88).int32(message.type);
- }
if (message.etag !== "") {
- writer.uint32(98).string(message.etag);
+ writer.uint32(82).string(message.etag);
}
if (message.creator !== "") {
- writer.uint32(114).string(message.creator);
+ writer.uint32(90).string(message.creator);
}
if (message.updater !== "") {
- writer.uint32(122).string(message.updater);
+ writer.uint32(98).string(message.updater);
}
if (message.createTime !== undefined) {
- Timestamp.encode(toTimestamp(message.createTime), writer.uint32(130).fork()).ldelim();
+ Timestamp.encode(toTimestamp(message.createTime), writer.uint32(106).fork()).ldelim();
}
if (message.updateTime !== undefined) {
- Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(138).fork()).ldelim();
+ Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(114).fork()).ldelim();
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): SchemaDesign {
+ decode(input: _m0.Reader | Uint8Array, length?: number): Branch {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseSchemaDesign();
+ const message = createBaseBranch();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -397,43 +350,36 @@ export const SchemaDesign = {
message.parentBranch = reader.string();
continue;
- case 11:
- if (tag !== 88) {
- break;
- }
-
- message.type = reader.int32() as any;
- continue;
- case 12:
- if (tag !== 98) {
+ case 10:
+ if (tag !== 82) {
break;
}
message.etag = reader.string();
continue;
- case 14:
- if (tag !== 114) {
+ case 11:
+ if (tag !== 90) {
break;
}
message.creator = reader.string();
continue;
- case 15:
- if (tag !== 122) {
+ case 12:
+ if (tag !== 98) {
break;
}
message.updater = reader.string();
continue;
- case 16:
- if (tag !== 130) {
+ case 13:
+ if (tag !== 106) {
break;
}
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
- case 17:
- if (tag !== 138) {
+ case 14:
+ if (tag !== 114) {
break;
}
@@ -448,7 +394,7 @@ export const SchemaDesign = {
return message;
},
- fromJSON(object: any): SchemaDesign {
+ fromJSON(object: any): Branch {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
title: isSet(object.title) ? globalThis.String(object.title) : "",
@@ -461,7 +407,6 @@ export const SchemaDesign = {
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
baselineDatabase: isSet(object.baselineDatabase) ? globalThis.String(object.baselineDatabase) : "",
parentBranch: isSet(object.parentBranch) ? globalThis.String(object.parentBranch) : "",
- type: isSet(object.type) ? schemaDesign_TypeFromJSON(object.type) : 0,
etag: isSet(object.etag) ? globalThis.String(object.etag) : "",
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
updater: isSet(object.updater) ? globalThis.String(object.updater) : "",
@@ -470,7 +415,7 @@ export const SchemaDesign = {
};
},
- toJSON(message: SchemaDesign): unknown {
+ toJSON(message: Branch): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -499,9 +444,6 @@ export const SchemaDesign = {
if (message.parentBranch !== "") {
obj.parentBranch = message.parentBranch;
}
- if (message.type !== 0) {
- obj.type = schemaDesign_TypeToJSON(message.type);
- }
if (message.etag !== "") {
obj.etag = message.etag;
}
@@ -520,11 +462,11 @@ export const SchemaDesign = {
return obj;
},
- create(base?: DeepPartial<SchemaDesign>): SchemaDesign {
- return SchemaDesign.fromPartial(base ?? {});
+ create(base?: DeepPartial<Branch>): Branch {
+ return Branch.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<SchemaDesign>): SchemaDesign {
- const message = createBaseSchemaDesign();
+ fromPartial(object: DeepPartial<Branch>): Branch {
+ const message = createBaseBranch();
message.name = object.name ?? "";
message.title = object.title ?? "";
message.schema = object.schema ?? "";
@@ -539,7 +481,6 @@ export const SchemaDesign = {
message.engine = object.engine ?? 0;
message.baselineDatabase = object.baselineDatabase ?? "";
message.parentBranch = object.parentBranch ?? "";
- message.type = object.type ?? 0;
message.etag = object.etag ?? "";
message.creator = object.creator ?? "";
message.updater = object.updater ?? "";
@@ -549,22 +490,22 @@ export const SchemaDesign = {
},
};
-function createBaseGetSchemaDesignRequest(): GetSchemaDesignRequest {
+function createBaseGetBranchRequest(): GetBranchRequest {
return { name: "" };
}
-export const GetSchemaDesignRequest = {
- encode(message: GetSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const GetBranchRequest = {
+ encode(message: GetBranchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): GetSchemaDesignRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetBranchRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseGetSchemaDesignRequest();
+ const message = createBaseGetBranchRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -584,11 +525,11 @@ export const GetSchemaDesignRequest = {
return message;
},
- fromJSON(object: any): GetSchemaDesignRequest {
+ fromJSON(object: any): GetBranchRequest {
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
- toJSON(message: GetSchemaDesignRequest): unknown {
+ toJSON(message: GetBranchRequest): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -596,22 +537,22 @@ export const GetSchemaDesignRequest = {
return obj;
},
- create(base?: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {
- return GetSchemaDesignRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<GetBranchRequest>): GetBranchRequest {
+ return GetBranchRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {
- const message = createBaseGetSchemaDesignRequest();
+ fromPartial(object: DeepPartial<GetBranchRequest>): GetBranchRequest {
+ const message = createBaseGetBranchRequest();
message.name = object.name ?? "";
return message;
},
};
-function createBaseListSchemaDesignsRequest(): ListSchemaDesignsRequest {
+function createBaseListBranchesRequest(): ListBranchesRequest {
return { parent: "", filter: "", pageSize: 0, pageToken: "", view: 0 };
}
-export const ListSchemaDesignsRequest = {
- encode(message: ListSchemaDesignsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const ListBranchesRequest = {
+ encode(message: ListBranchesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.parent !== "") {
writer.uint32(10).string(message.parent);
}
@@ -630,10 +571,10 @@ export const ListSchemaDesignsRequest = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): ListSchemaDesignsRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListBranchesRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListSchemaDesignsRequest();
+ const message = createBaseListBranchesRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -681,17 +622,17 @@ export const ListSchemaDesignsRequest = {
return message;
},
- fromJSON(object: any): ListSchemaDesignsRequest {
+ fromJSON(object: any): ListBranchesRequest {
return {
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
- view: isSet(object.view) ? schemaDesignViewFromJSON(object.view) : 0,
+ view: isSet(object.view) ? branchViewFromJSON(object.view) : 0,
};
},
- toJSON(message: ListSchemaDesignsRequest): unknown {
+ toJSON(message: ListBranchesRequest): unknown {
const obj: any = {};
if (message.parent !== "") {
obj.parent = message.parent;
@@ -706,16 +647,16 @@ export const ListSchemaDesignsRequest = {
obj.pageToken = message.pageToken;
}
if (message.view !== 0) {
- obj.view = schemaDesignViewToJSON(message.view);
+ obj.view = branchViewToJSON(message.view);
}
return obj;
},
- create(base?: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
- return ListSchemaDesignsRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<ListBranchesRequest>): ListBranchesRequest {
+ return ListBranchesRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
- const message = createBaseListSchemaDesignsRequest();
+ fromPartial(object: DeepPartial<ListBranchesRequest>): ListBranchesRequest {
+ const message = createBaseListBranchesRequest();
message.parent = object.parent ?? "";
message.filter = object.filter ?? "";
message.pageSize = object.pageSize ?? 0;
@@ -725,14 +666,14 @@ export const ListSchemaDesignsRequest = {
},
};
-function createBaseListSchemaDesignsResponse(): ListSchemaDesignsResponse {
- return { schemaDesigns: [], nextPageToken: "" };
+function createBaseListBranchesResponse(): ListBranchesResponse {
+ return { branches: [], nextPageToken: "" };
}
-export const ListSchemaDesignsResponse = {
- encode(message: ListSchemaDesignsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- for (const v of message.schemaDesigns) {
- SchemaDesign.encode(v!, writer.uint32(10).fork()).ldelim();
+export const ListBranchesResponse = {
+ encode(message: ListBranchesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.branches) {
+ Branch.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.nextPageToken !== "") {
writer.uint32(18).string(message.nextPageToken);
@@ -740,10 +681,10 @@ export const ListSchemaDesignsResponse = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): ListSchemaDesignsResponse {
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListBranchesResponse {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseListSchemaDesignsResponse();
+ const message = createBaseListBranchesResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -752,7 +693,7 @@ export const ListSchemaDesignsResponse = {
break;
}
- message.schemaDesigns.push(SchemaDesign.decode(reader, reader.uint32()));
+ message.branches.push(Branch.decode(reader, reader.uint32()));
continue;
case 2:
if (tag !== 18) {
@@ -770,19 +711,17 @@ export const ListSchemaDesignsResponse = {
return message;
},
- fromJSON(object: any): ListSchemaDesignsResponse {
+ fromJSON(object: any): ListBranchesResponse {
return {
- schemaDesigns: globalThis.Array.isArray(object?.schemaDesigns)
- ? object.schemaDesigns.map((e: any) => SchemaDesign.fromJSON(e))
- : [],
+ branches: globalThis.Array.isArray(object?.branches) ? object.branches.map((e: any) => Branch.fromJSON(e)) : [],
nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
- toJSON(message: ListSchemaDesignsResponse): unknown {
+ toJSON(message: ListBranchesResponse): unknown {
const obj: any = {};
- if (message.schemaDesigns?.length) {
- obj.schemaDesigns = message.schemaDesigns.map((e) => SchemaDesign.toJSON(e));
+ if (message.branches?.length) {
+ obj.branches = message.branches.map((e) => Branch.toJSON(e));
}
if (message.nextPageToken !== "") {
obj.nextPageToken = message.nextPageToken;
@@ -790,36 +729,36 @@ export const ListSchemaDesignsResponse = {
return obj;
},
- create(base?: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {
- return ListSchemaDesignsResponse.fromPartial(base ?? {});
+ create(base?: DeepPartial<ListBranchesResponse>): ListBranchesResponse {
+ return ListBranchesResponse.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {
- const message = createBaseListSchemaDesignsResponse();
- message.schemaDesigns = object.schemaDesigns?.map((e) => SchemaDesign.fromPartial(e)) || [];
+ fromPartial(object: DeepPartial<ListBranchesResponse>): ListBranchesResponse {
+ const message = createBaseListBranchesResponse();
+ message.branches = object.branches?.map((e) => Branch.fromPartial(e)) || [];
message.nextPageToken = object.nextPageToken ?? "";
return message;
},
};
-function createBaseCreateSchemaDesignRequest(): CreateSchemaDesignRequest {
- return { parent: "", schemaDesign: undefined };
+function createBaseCreateBranchRequest(): CreateBranchRequest {
+ return { parent: "", branch: undefined };
}
-export const CreateSchemaDesignRequest = {
- encode(message: CreateSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const CreateBranchRequest = {
+ encode(message: CreateBranchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.parent !== "") {
writer.uint32(10).string(message.parent);
}
- if (message.schemaDesign !== undefined) {
- SchemaDesign.encode(message.schemaDesign, writer.uint32(18).fork()).ldelim();
+ if (message.branch !== undefined) {
+ Branch.encode(message.branch, writer.uint32(18).fork()).ldelim();
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): CreateSchemaDesignRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): CreateBranchRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseCreateSchemaDesignRequest();
+ const message = createBaseCreateBranchRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -835,7 +774,7 @@ export const CreateSchemaDesignRequest = {
break;
}
- message.schemaDesign = SchemaDesign.decode(reader, reader.uint32());
+ message.branch = Branch.decode(reader, reader.uint32());
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -846,45 +785,45 @@ export const CreateSchemaDesignRequest = {
return message;
},
- fromJSON(object: any): CreateSchemaDesignRequest {
+ fromJSON(object: any): CreateBranchRequest {
return {
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
- schemaDesign: isSet(object.schemaDesign) ? SchemaDesign.fromJSON(object.schemaDesign) : undefined,
+ branch: isSet(object.branch) ? Branch.fromJSON(object.branch) : undefined,
};
},
- toJSON(message: CreateSchemaDesignRequest): unknown {
+ toJSON(message: CreateBranchRequest): unknown {
const obj: any = {};
if (message.parent !== "") {
obj.parent = message.parent;
}
- if (message.schemaDesign !== undefined) {
- obj.schemaDesign = SchemaDesign.toJSON(message.schemaDesign);
+ if (message.branch !== undefined) {
+ obj.branch = Branch.toJSON(message.branch);
}
return obj;
},
- create(base?: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {
- return CreateSchemaDesignRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<CreateBranchRequest>): CreateBranchRequest {
+ return CreateBranchRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {
- const message = createBaseCreateSchemaDesignRequest();
+ fromPartial(object: DeepPartial<CreateBranchRequest>): CreateBranchRequest {
+ const message = createBaseCreateBranchRequest();
message.parent = object.parent ?? "";
- message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)
- ? SchemaDesign.fromPartial(object.schemaDesign)
+ message.branch = (object.branch !== undefined && object.branch !== null)
+ ? Branch.fromPartial(object.branch)
: undefined;
return message;
},
};
-function createBaseUpdateSchemaDesignRequest(): UpdateSchemaDesignRequest {
- return { schemaDesign: undefined, updateMask: undefined };
+function createBaseUpdateBranchRequest(): UpdateBranchRequest {
+ return { branch: undefined, updateMask: undefined };
}
-export const UpdateSchemaDesignRequest = {
- encode(message: UpdateSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.schemaDesign !== undefined) {
- SchemaDesign.encode(message.schemaDesign, writer.uint32(10).fork()).ldelim();
+export const UpdateBranchRequest = {
+ encode(message: UpdateBranchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.branch !== undefined) {
+ Branch.encode(message.branch, writer.uint32(10).fork()).ldelim();
}
if (message.updateMask !== undefined) {
FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();
@@ -892,10 +831,10 @@ export const UpdateSchemaDesignRequest = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): UpdateSchemaDesignRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateBranchRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseUpdateSchemaDesignRequest();
+ const message = createBaseUpdateBranchRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -904,7 +843,7 @@ export const UpdateSchemaDesignRequest = {
break;
}
- message.schemaDesign = SchemaDesign.decode(reader, reader.uint32());
+ message.branch = Branch.decode(reader, reader.uint32());
continue;
case 2:
if (tag !== 18) {
@@ -922,17 +861,17 @@ export const UpdateSchemaDesignRequest = {
return message;
},
- fromJSON(object: any): UpdateSchemaDesignRequest {
+ fromJSON(object: any): UpdateBranchRequest {
return {
- schemaDesign: isSet(object.schemaDesign) ? SchemaDesign.fromJSON(object.schemaDesign) : undefined,
+ branch: isSet(object.branch) ? Branch.fromJSON(object.branch) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
};
},
- toJSON(message: UpdateSchemaDesignRequest): unknown {
+ toJSON(message: UpdateBranchRequest): unknown {
const obj: any = {};
- if (message.schemaDesign !== undefined) {
- obj.schemaDesign = SchemaDesign.toJSON(message.schemaDesign);
+ if (message.branch !== undefined) {
+ obj.branch = Branch.toJSON(message.branch);
}
if (message.updateMask !== undefined) {
obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
@@ -940,25 +879,25 @@ export const UpdateSchemaDesignRequest = {
return obj;
},
- create(base?: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {
- return UpdateSchemaDesignRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<UpdateBranchRequest>): UpdateBranchRequest {
+ return UpdateBranchRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {
- const message = createBaseUpdateSchemaDesignRequest();
- message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)
- ? SchemaDesign.fromPartial(object.schemaDesign)
+ fromPartial(object: DeepPartial<UpdateBranchRequest>): UpdateBranchRequest {
+ const message = createBaseUpdateBranchRequest();
+ message.branch = (object.branch !== undefined && object.branch !== null)
+ ? Branch.fromPartial(object.branch)
: undefined;
message.updateMask = object.updateMask ?? undefined;
return message;
},
};
-function createBaseMergeSchemaDesignRequest(): MergeSchemaDesignRequest {
+function createBaseMergeBranchRequest(): MergeBranchRequest {
return { name: "", targetName: "" };
}
-export const MergeSchemaDesignRequest = {
- encode(message: MergeSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const MergeBranchRequest = {
+ encode(message: MergeBranchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
@@ -968,10 +907,10 @@ export const MergeSchemaDesignRequest = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): MergeSchemaDesignRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): MergeBranchRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseMergeSchemaDesignRequest();
+ const message = createBaseMergeBranchRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -998,14 +937,14 @@ export const MergeSchemaDesignRequest = {
return message;
},
- fromJSON(object: any): MergeSchemaDesignRequest {
+ fromJSON(object: any): MergeBranchRequest {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
targetName: isSet(object.targetName) ? globalThis.String(object.targetName) : "",
};
},
- toJSON(message: MergeSchemaDesignRequest): unknown {
+ toJSON(message: MergeBranchRequest): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -1016,33 +955,33 @@ export const MergeSchemaDesignRequest = {
return obj;
},
- create(base?: DeepPartial<MergeSchemaDesignRequest>): MergeSchemaDesignRequest {
- return MergeSchemaDesignRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<MergeBranchRequest>): MergeBranchRequest {
+ return MergeBranchRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<MergeSchemaDesignRequest>): MergeSchemaDesignRequest {
- const message = createBaseMergeSchemaDesignRequest();
+ fromPartial(object: DeepPartial<MergeBranchRequest>): MergeBranchRequest {
+ const message = createBaseMergeBranchRequest();
message.name = object.name ?? "";
message.targetName = object.targetName ?? "";
return message;
},
};
-function createBaseDeleteSchemaDesignRequest(): DeleteSchemaDesignRequest {
+function createBaseDeleteBranchRequest(): DeleteBranchRequest {
return { name: "" };
}
-export const DeleteSchemaDesignRequest = {
- encode(message: DeleteSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const DeleteBranchRequest = {
+ encode(message: DeleteBranchRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): DeleteSchemaDesignRequest {
+ decode(input: _m0.Reader | Uint8Array, length?: number): DeleteBranchRequest {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDeleteSchemaDesignRequest();
+ const message = createBaseDeleteBranchRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -1062,11 +1001,11 @@ export const DeleteSchemaDesignRequest = {
return message;
},
- fromJSON(object: any): DeleteSchemaDesignRequest {
+ fromJSON(object: any): DeleteBranchRequest {
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
- toJSON(message: DeleteSchemaDesignRequest): unknown {
+ toJSON(message: DeleteBranchRequest): unknown {
const obj: any = {};
if (message.name !== "") {
obj.name = message.name;
@@ -1074,11 +1013,11 @@ export const DeleteSchemaDesignRequest = {
return obj;
},
- create(base?: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {
- return DeleteSchemaDesignRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<DeleteBranchRequest>): DeleteBranchRequest {
+ return DeleteBranchRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {
- const message = createBaseDeleteSchemaDesignRequest();
+ fromPartial(object: DeepPartial<DeleteBranchRequest>): DeleteBranchRequest {
+ const message = createBaseDeleteBranchRequest();
message.name = object.name ?? "";
return message;
},
@@ -1234,25 +1173,25 @@ export const DiffMetadataResponse = {
},
};
-export type SchemaDesignServiceDefinition = typeof SchemaDesignServiceDefinition;
-export const SchemaDesignServiceDefinition = {
- name: "SchemaDesignService",
- fullName: "bytebase.v1.SchemaDesignService",
+export type BranchServiceDefinition = typeof BranchServiceDefinition;
+export const BranchServiceDefinition = {
+ name: "BranchService",
+ fullName: "bytebase.v1.BranchService",
methods: {
- getSchemaDesign: {
- name: "GetSchemaDesign",
- requestType: GetSchemaDesignRequest,
+ getBranch: {
+ name: "GetBranch",
+ requestType: GetBranchRequest,
requestStream: false,
- responseType: SchemaDesign,
+ responseType: Branch,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([4, 110, 97, 109, 101])],
578365826: [
new Uint8Array([
- 39,
+ 34,
18,
- 37,
+ 32,
47,
118,
49,
@@ -1274,18 +1213,13 @@ export const SchemaDesignServiceDefinition = {
47,
42,
47,
- 115,
+ 98,
+ 114,
+ 97,
+ 110,
99,
104,
101,
- 109,
- 97,
- 68,
- 101,
- 115,
- 105,
- 103,
- 110,
115,
47,
42,
@@ -1295,20 +1229,20 @@ export const SchemaDesignServiceDefinition = {
},
},
},
- listSchemaDesigns: {
- name: "ListSchemaDesigns",
- requestType: ListSchemaDesignsRequest,
+ listBranches: {
+ name: "ListBranches",
+ requestType: ListBranchesRequest,
requestStream: false,
- responseType: ListSchemaDesignsResponse,
+ responseType: ListBranchesResponse,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([0])],
578365826: [
new Uint8Array([
- 39,
+ 34,
18,
- 37,
+ 32,
47,
118,
49,
@@ -1333,77 +1267,41 @@ export const SchemaDesignServiceDefinition = {
42,
125,
47,
- 115,
+ 98,
+ 114,
+ 97,
+ 110,
99,
104,
101,
- 109,
- 97,
- 68,
- 101,
- 115,
- 105,
- 103,
- 110,
115,
]),
],
},
},
},
- createSchemaDesign: {
- name: "CreateSchemaDesign",
- requestType: CreateSchemaDesignRequest,
+ createBranch: {
+ name: "CreateBranch",
+ requestType: CreateBranchRequest,
requestStream: false,
- responseType: SchemaDesign,
+ responseType: Branch,
responseStream: false,
options: {
_unknownFields: {
- 8410: [
+ 8410: [new Uint8Array([13, 112, 97, 114, 101, 110, 116, 44, 98, 114, 97, 110, 99, 104])],
+ 578365826: [
new Uint8Array([
- 20,
- 112,
- 97,
+ 40,
+ 58,
+ 6,
+ 98,
114,
- 101,
- 110,
- 116,
- 44,
- 115,
- 99,
- 104,
- 101,
- 109,
97,
- 95,
- 100,
- 101,
- 115,
- 105,
- 103,
110,
- ]),
- ],
- 578365826: [
- new Uint8Array([
- 53,
- 58,
- 13,
- 115,
99,
104,
- 101,
- 109,
- 97,
- 95,
- 100,
- 101,
- 115,
- 105,
- 103,
- 110,
34,
- 36,
+ 30,
47,
118,
49,
@@ -1428,99 +1326,52 @@ export const SchemaDesignServiceDefinition = {
42,
125,
47,
- 115,
- 99,
- 104,
- 101,
- 109,
+ 98,
+ 114,
97,
- 68,
- 101,
- 115,
- 105,
- 103,
110,
+ 99,
+ 104,
]),
],
},
},
},
- updateSchemaDesign: {
- name: "UpdateSchemaDesign",
- requestType: UpdateSchemaDesignRequest,
+ updateBranch: {
+ name: "UpdateBranch",
+ requestType: UpdateBranchRequest,
requestStream: false,
- responseType: SchemaDesign,
+ responseType: Branch,
responseStream: false,
options: {
_unknownFields: {
8410: [
- new Uint8Array([
- 25,
- 115,
- 99,
- 104,
- 101,
- 109,
- 97,
- 95,
- 100,
- 101,
- 115,
- 105,
- 103,
- 110,
- 44,
- 117,
- 112,
- 100,
- 97,
- 116,
- 101,
- 95,
- 109,
- 97,
- 115,
- 107,
- ]),
+ new Uint8Array([18, 98, 114, 97, 110, 99, 104, 44, 117, 112, 100, 97, 116, 101, 95, 109, 97, 115, 107]),
],
578365826: [
new Uint8Array([
- 68,
+ 49,
58,
- 13,
- 115,
- 99,
- 104,
- 101,
- 109,
+ 6,
+ 98,
+ 114,
97,
- 95,
- 100,
- 101,
- 115,
- 105,
- 103,
110,
+ 99,
+ 104,
50,
- 51,
+ 39,
47,
118,
49,
47,
123,
- 115,
- 99,
- 104,
- 101,
- 109,
+ 98,
+ 114,
97,
- 95,
- 100,
- 101,
- 115,
- 105,
- 103,
110,
+ 99,
+ 104,
46,
110,
97,
@@ -1538,18 +1389,13 @@ export const SchemaDesignServiceDefinition = {
47,
42,
47,
- 115,
+ 98,
+ 114,
+ 97,
+ 110,
99,
104,
101,
- 109,
- 97,
- 68,
- 101,
- 115,
- 105,
- 103,
- 110,
115,
47,
42,
@@ -1559,20 +1405,20 @@ export const SchemaDesignServiceDefinition = {
},
},
},
- mergeSchemaDesign: {
- name: "MergeSchemaDesign",
- requestType: MergeSchemaDesignRequest,
+ mergeBranch: {
+ name: "MergeBranch",
+ requestType: MergeBranchRequest,
requestStream: false,
- responseType: SchemaDesign,
+ responseType: Branch,
responseStream: false,
options: {
_unknownFields: {
8410: [new Uint8Array([16, 110, 97, 109, 101, 44, 116, 97, 114, 103, 101, 116, 95, 110, 97, 109, 101])],
578365826: [
new Uint8Array([
- 45,
+ 40,
34,
- 43,
+ 38,
47,
118,
49,
@@ -1594,18 +1440,13 @@ export const SchemaDesignServiceDefinition = {
47,
42,
47,
- 115,
+ 98,
+ 114,
+ 97,
+ 110,
99,
104,
101,
- 109,
- 97,
- 68,
- 101,
- 115,
- 105,
- 103,
- 110,
115,
47,
42,
@@ -1621,9 +1462,9 @@ export const SchemaDesignServiceDefinition = {
},
},
},
- deleteSchemaDesign: {
- name: "DeleteSchemaDesign",
- requestType: DeleteSchemaDesignRequest,
+ deleteBranch: {
+ name: "DeleteBranch",
+ requestType: DeleteBranchRequest,
requestStream: false,
responseType: Empty,
responseStream: false,
@@ -1632,9 +1473,9 @@ export const SchemaDesignServiceDefinition = {
8410: [new Uint8Array([4, 110, 97, 109, 101])],
578365826: [
new Uint8Array([
- 39,
+ 34,
42,
- 37,
+ 32,
47,
118,
49,
@@ -1656,18 +1497,13 @@ export const SchemaDesignServiceDefinition = {
47,
42,
47,
- 115,
+ 98,
+ 114,
+ 97,
+ 110,
99,
104,
101,
- 109,
- 97,
- 68,
- 101,
- 115,
- 105,
- 103,
- 110,
115,
47,
42,
diff --git a/frontend/src/types/v1/schemaEditor/state.ts b/frontend/src/types/v1/schemaEditor/state.ts
index 3ef6384b4f..fb98f70161 100644
--- a/frontend/src/types/v1/schemaEditor/state.ts
+++ b/frontend/src/types/v1/schemaEditor/state.ts
@@ -1,5 +1,5 @@
import { ComposedDatabase, ComposedProject } from "..";
-import { SchemaDesign } from "../../proto/v1/schema_design_service";
+import { Branch } from "../../proto/v1/branch_service";
import { Schema } from "./atomType";
export enum SchemaEditorTabType {
@@ -37,7 +37,7 @@ export interface DatabaseSchema {
}
export interface BranchSchema {
- branch: SchemaDesign;
+ branch: Branch;
schemaList: Schema[];
originSchemaList: Schema[];
}
diff --git a/frontend/src/views/branch/BranchDetail.vue b/frontend/src/views/branch/BranchDetail.vue
index 5966edf0d1..0bb523fc7c 100644
--- a/frontend/src/views/branch/BranchDetail.vue
+++ b/frontend/src/views/branch/BranchDetail.vue
@@ -17,19 +17,19 @@ import { useRoute } from "vue-router";
import BranchCreateView from "@/components/Branch/BranchCreateView.vue";
import BranchDetailView from "@/components/Branch/BranchDetailView.vue";
import { useProjectV1Store } from "@/store";
-import { useSchemaDesignStore } from "@/store/modules/schemaDesign";
+import { useBranchStore } from "@/store/modules/branch";
import { idFromSlug } from "@/utils";
const { t } = useI18n();
const route = useRoute();
const projectStore = useProjectV1Store();
-const schemaDesignStore = useSchemaDesignStore();
+const branchStore = useBranchStore();
const branchFullName = ref<string>("");
const ready = ref<boolean>(false);
const isCreating = computed(() => route.params.branchName === "new");
const branch = computed(() => {
- return schemaDesignStore.getSchemaDesignByName(branchFullName.value);
+ return branchStore.getBranchByName(branchFullName.value);
});
const project = computed(() => {
if (route.params.projectSlug === "-") {
@@ -69,7 +69,7 @@ watch(
return;
}
- await schemaDesignStore.fetchSchemaDesignByName(
+ await branchStore.fetchBranchByName(
branchFullName.value,
false /* useCache */
);
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 1db05ec1b3..9858372ed9 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -97,26 +97,6 @@
- [AuthService](#bytebase-v1-AuthService)
-- [v1/cel_service.proto](#v1_cel_service-proto)
- - [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest)
- - [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse)
- - [BatchParseRequest](#bytebase-v1-BatchParseRequest)
- - [BatchParseResponse](#bytebase-v1-BatchParseResponse)
-
- - [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/vcs.proto](#v1_vcs-proto)
- [Commit](#bytebase-v1-Commit)
- [FileCommit](#bytebase-v1-FileCommit)
@@ -203,6 +183,42 @@
- [DatabaseService](#bytebase-v1-DatabaseService)
+- [v1/branch_service.proto](#v1_branch_service-proto)
+ - [Branch](#bytebase-v1-Branch)
+ - [CreateBranchRequest](#bytebase-v1-CreateBranchRequest)
+ - [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest)
+ - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
+ - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
+ - [GetBranchRequest](#bytebase-v1-GetBranchRequest)
+ - [ListBranchesRequest](#bytebase-v1-ListBranchesRequest)
+ - [ListBranchesResponse](#bytebase-v1-ListBranchesResponse)
+ - [MergeBranchRequest](#bytebase-v1-MergeBranchRequest)
+ - [UpdateBranchRequest](#bytebase-v1-UpdateBranchRequest)
+
+ - [BranchView](#bytebase-v1-BranchView)
+
+ - [BranchService](#bytebase-v1-BranchService)
+
+- [v1/cel_service.proto](#v1_cel_service-proto)
+ - [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest)
+ - [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse)
+ - [BatchParseRequest](#bytebase-v1-BatchParseRequest)
+ - [BatchParseResponse](#bytebase-v1-BatchParseResponse)
+
+ - [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/environment_service.proto](#v1_environment_service-proto)
- [CreateEnvironmentRequest](#bytebase-v1-CreateEnvironmentRequest)
- [DeleteEnvironmentRequest](#bytebase-v1-DeleteEnvironmentRequest)
@@ -507,23 +523,6 @@
- [RolloutService](#bytebase-v1-RolloutService)
-- [v1/schema_design_service.proto](#v1_schema_design_service-proto)
- - [CreateSchemaDesignRequest](#bytebase-v1-CreateSchemaDesignRequest)
- - [DeleteSchemaDesignRequest](#bytebase-v1-DeleteSchemaDesignRequest)
- - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
- - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
- - [GetSchemaDesignRequest](#bytebase-v1-GetSchemaDesignRequest)
- - [ListSchemaDesignsRequest](#bytebase-v1-ListSchemaDesignsRequest)
- - [ListSchemaDesignsResponse](#bytebase-v1-ListSchemaDesignsResponse)
- - [MergeSchemaDesignRequest](#bytebase-v1-MergeSchemaDesignRequest)
- - [SchemaDesign](#bytebase-v1-SchemaDesign)
- - [UpdateSchemaDesignRequest](#bytebase-v1-UpdateSchemaDesignRequest)
-
- - [SchemaDesign.Type](#bytebase-v1-SchemaDesign-Type)
- - [SchemaDesignView](#bytebase-v1-SchemaDesignView)
-
- - [SchemaDesignService](#bytebase-v1-SchemaDesignService)
-
- [v1/subscription_service.proto](#v1_subscription_service-proto)
- [Feature](#bytebase-v1-Feature)
- [Feature.MatrixEntry](#bytebase-v1-Feature-MatrixEntry)
@@ -1962,70 +1961,96 @@ The user&#39;s `name` field is used to identify the user to update. Format: user
-<a name="v1_cel_service-proto"></a>
+<a name="v1_vcs-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/cel_service.proto
+## v1/vcs.proto
-<a name="bytebase-v1-BatchDeparseRequest"></a>
+<a name="bytebase-v1-Commit"></a>
-### BatchDeparseRequest
+### Commit
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | repeated | |
+| id | [string](#string) | | |
+| title | [string](#string) | | |
+| message | [string](#string) | | |
+| created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| url | [string](#string) | | |
+| author_name | [string](#string) | | |
+| author_email | [string](#string) | | |
+| added_list | [string](#string) | repeated | |
+| modified_list | [string](#string) | repeated | |
-<a name="bytebase-v1-BatchDeparseResponse"></a>
+<a name="bytebase-v1-FileCommit"></a>
-### BatchDeparseResponse
+### FileCommit
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | |
+| id | [string](#string) | | |
+| title | [string](#string) | | |
+| message | [string](#string) | | |
+| created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| url | [string](#string) | | |
+| author_name | [string](#string) | | |
+| author_email | [string](#string) | | |
+| added | [string](#string) | | |
-<a name="bytebase-v1-BatchParseRequest"></a>
+<a name="bytebase-v1-PushEvent"></a>
-### BatchParseRequest
+### PushEvent
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | |
-
-
-
+| vcs_type | [VcsType](#bytebase-v1-VcsType) | | |
+| base_dir | [string](#string) | | |
+| ref | [string](#string) | | |
+| before | [string](#string) | | |
+| after | [string](#string) | | |
+| repository_id | [string](#string) | | |
+| repository_url | [string](#string) | | |
+| repository_full_path | [string](#string) | | |
+| author_name | [string](#string) | | |
+| commits | [Commit](#bytebase-v1-Commit) | repeated | |
+| file_commit | [FileCommit](#bytebase-v1-FileCommit) | | |
-<a name="bytebase-v1-BatchParseResponse"></a>
-### BatchParseResponse
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | repeated | |
+<a name="bytebase-v1-VcsType"></a>
+### VcsType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| VCS_TYPE_UNSPECIFIED | 0 | |
+| GITLAB | 1 | |
+| GITHUB | 2 | |
+| BITBUCKET | 3 | |
@@ -2035,765 +2060,483 @@ The user&#39;s `name` field is used to identify the user to update. Format: user
-<a name="bytebase-v1-CelService"></a>
-### CelService
+<a name="v1_database_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_service.proto
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | |
-| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | |
-
+<a name="bytebase-v1-AdviseIndexRequest"></a>
+### AdviseIndexRequest
+AdviseIndexRequest is the request of advising index.
-<a name="v1_changelist_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/changelist_service.proto
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | Format: instances/{instance}/databases/{database} |
+| statement | [string](#string) | | The statement to be advised. |
-<a name="bytebase-v1-Changelist"></a>
-### Changelist
+<a name="bytebase-v1-AdviseIndexResponse"></a>
+
+### AdviseIndexResponse
+AdviseIndexResponse is the response of advising index.
+
| 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) | | |
-| creator | [string](#string) | | The creator of the changelist. Format: users/{email} |
-| updater | [string](#string) | | The updater of the changelist. Format: users/{email} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The create time of the changelist. |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last update time of the changelist. |
-| changes | [Changelist.Change](#bytebase-v1-Changelist-Change) | repeated | |
-
+| current_index | [string](#string) | | The current index of the statement used. |
+| suggestion | [string](#string) | | The suggested index of the statement. |
+| create_index_statement | [string](#string) | | The create index statement of the suggested index. |
-<a name="bytebase-v1-Changelist-Change"></a>
-### Changelist.Change
+<a name="bytebase-v1-Backup"></a>
+### Backup
+The message of the backup.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| sheet | [string](#string) | | The name of a sheet. |
-| source | [string](#string) | | The source of origin. 1) change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}. 2) branch: projects/{project}/schemaDesigns/{schemaDesign}. 3) raw SQL if empty. |
-
+| name | [string](#string) | | The resource name of the database backup. backup-name is specified by the client. Format: instances/{instance}/databases/{database}/backups/{backup-name} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the backup resource was created initially. |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the backup resource was updated. |
+| state | [Backup.BackupState](#bytebase-v1-Backup-BackupState) | | The state of the backup. |
+| backup_type | [Backup.BackupType](#bytebase-v1-Backup-BackupType) | | The type of the backup. |
+| comment | [string](#string) | | The comment of the backup. |
+| uid | [string](#string) | | |
-<a name="bytebase-v1-CreateChangelistRequest"></a>
-### CreateChangelistRequest
+<a name="bytebase-v1-BackupSetting"></a>
+### BackupSetting
+BackupSetting is the setting for database backup.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this changelist will be created. Foramt: 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&#39;s resource name.
+| name | [string](#string) | | The name of the database backup setting. Format: instances/{instance}/databases/{database}/backupSetting |
+| backup_retain_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The default maximum age of a Backup created via this BackupPlan. If specified, a Backup will be automatically deleted after its age reaches. If not specified, Backups created under this BackupPlan will be deleted after 7 DAYS. It will be rounded up to the number of days. |
+| cron_schedule | [string](#string) | | Cron(https://wikipedia.com/wiki/cron) string that defines a repeating schedule for creating Backups. Support hour of day, day of week. (UTC time)
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+Default (empty): Disable automatic backup. |
+| hook_url | [string](#string) | | hook_url(https://www.bytebase.com/docs/disaster-recovery/backup/#post-backup-webhook) is the URL to send a notification when a backup is created. |
-<a name="bytebase-v1-DeleteChangelistRequest"></a>
+<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>
-### DeleteChangelistRequest
+### BatchUpdateDatabasesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelist to delete. Format: projects/{project}/changelists/{changelist} |
+| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the project of databases for now. |
+| requests | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |
-<a name="bytebase-v1-GetChangelistRequest"></a>
+<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>
-### GetChangelistRequest
+### BatchUpdateDatabasesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelist to retrieve. Format: projects/{project}/changelists/{changelist} |
+| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |
-<a name="bytebase-v1-ListChangelistsRequest"></a>
+<a name="bytebase-v1-ChangeHistory"></a>
-### ListChangelistsRequest
+### ChangeHistory
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of changelists. Format: projects/{project} Use &#34;projects/-&#34; to list all changelists. |
-| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 50 databases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListDatabases` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
+| uid | [string](#string) | | |
+| creator | [string](#string) | | Format: users/[email protected] |
+| updater | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| release_version | [string](#string) | | release version of Bytebase |
+| source | [ChangeHistory.Source](#bytebase-v1-ChangeHistory-Source) | | |
+| type | [ChangeHistory.Type](#bytebase-v1-ChangeHistory-Type) | | |
+| status | [ChangeHistory.Status](#bytebase-v1-ChangeHistory-Status) | | |
+| version | [string](#string) | | |
+| description | [string](#string) | | |
+| statement | [string](#string) | | The statement is used for preview purpose. |
+| statement_sheet | [string](#string) | | The name of the sheet resource. Format: projects/{project}/sheets/{sheet} |
+| schema | [string](#string) | | |
+| prev_schema | [string](#string) | | |
+| execution_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
+| issue | [string](#string) | | Format: projects/{project}/issues/{issue} |
+| push_event | [PushEvent](#bytebase-v1-PushEvent) | | |
+| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
-<a name="bytebase-v1-ListChangelistsResponse"></a>
+<a name="bytebase-v1-ChangedResourceDatabase"></a>
-### ListChangelistsResponse
+### ChangedResourceDatabase
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| changelists | [Changelist](#bytebase-v1-Changelist) | repeated | The changelists from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| name | [string](#string) | | |
+| schemas | [ChangedResourceSchema](#bytebase-v1-ChangedResourceSchema) | repeated | |
-<a name="bytebase-v1-UpdateChangelistRequest"></a>
+<a name="bytebase-v1-ChangedResourceSchema"></a>
-### UpdateChangelistRequest
+### ChangedResourceSchema
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to update.
+| name | [string](#string) | | |
+| tables | [ChangedResourceTable](#bytebase-v1-ChangedResourceTable) | repeated | |
-The changelist&#39;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. |
-
+<a name="bytebase-v1-ChangedResourceTable"></a>
-
+### ChangedResourceTable
-
-<a name="bytebase-v1-ChangelistService"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | |
-### ChangelistService
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| CreateChangelist | [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
-| GetChangelist | [GetChangelistRequest](#bytebase-v1-GetChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
-| ListChangelists | [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest) | [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse) | |
-| UpdateChangelist | [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
-| DeleteChangelist | [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
-
-
-
-
-
-<a name="v1_vcs-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## v1/vcs.proto
-<a name="bytebase-v1-Commit"></a>
+<a name="bytebase-v1-ChangedResources"></a>
-### Commit
+### ChangedResources
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| title | [string](#string) | | |
-| message | [string](#string) | | |
-| created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| url | [string](#string) | | |
-| author_name | [string](#string) | | |
-| author_email | [string](#string) | | |
-| added_list | [string](#string) | repeated | |
-| modified_list | [string](#string) | repeated | |
+| databases | [ChangedResourceDatabase](#bytebase-v1-ChangedResourceDatabase) | repeated | |
-<a name="bytebase-v1-FileCommit"></a>
+<a name="bytebase-v1-ColumnConfig"></a>
-### FileCommit
+### ColumnConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| title | [string](#string) | | |
-| message | [string](#string) | | |
-| created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| url | [string](#string) | | |
-| author_name | [string](#string) | | |
-| author_email | [string](#string) | | |
-| added | [string](#string) | | |
+| name | [string](#string) | | The name is the name of a column. |
+| semantic_type_id | [string](#string) | | |
+| labels | [ColumnConfig.LabelsEntry](#bytebase-v1-ColumnConfig-LabelsEntry) | repeated | The user labels for a column. |
-<a name="bytebase-v1-PushEvent"></a>
+<a name="bytebase-v1-ColumnConfig-LabelsEntry"></a>
-### PushEvent
+### ColumnConfig.LabelsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| vcs_type | [VcsType](#bytebase-v1-VcsType) | | |
-| base_dir | [string](#string) | | |
-| ref | [string](#string) | | |
-| before | [string](#string) | | |
-| after | [string](#string) | | |
-| repository_id | [string](#string) | | |
-| repository_url | [string](#string) | | |
-| repository_full_path | [string](#string) | | |
-| author_name | [string](#string) | | |
-| commits | [Commit](#bytebase-v1-Commit) | repeated | |
-| file_commit | [FileCommit](#bytebase-v1-FileCommit) | | |
-
-
-
-
-
-
-
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-VcsType"></a>
-### VcsType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| VCS_TYPE_UNSPECIFIED | 0 | |
-| GITLAB | 1 | |
-| GITHUB | 2 | |
-| BITBUCKET | 3 | |
-
+<a name="bytebase-v1-ColumnMetadata"></a>
-
+### ColumnMetadata
+ColumnMetadata is the metadata for columns.
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a column. |
+| position | [int32](#int32) | | The position is the position in columns. |
+| has_default | [bool](#bool) | | |
+| default_null | [bool](#bool) | | |
+| default_string | [string](#string) | | |
+| default_expression | [string](#string) | | |
+| nullable | [bool](#bool) | | The nullable is the nullable of a column. |
+| type | [string](#string) | | The type is the type of a column. |
+| character_set | [string](#string) | | The character_set is the character_set of a column. |
+| collation | [string](#string) | | The collation is the collation of a column. |
+| comment | [string](#string) | | The comment is the comment of a column. classification and user_comment is parsed from the comment. |
+| classification | [string](#string) | | The classification is the classification of a column parsed from the comment. |
+| user_comment | [string](#string) | | The user_comment is the user comment of a column parsed from the comment. |
+| effective_masking_level | [MaskingLevel](#bytebase-v1-MaskingLevel) | | The effective_masking_level is the effective masking level of the column, evaluate from the column masking data and global masking rules. |
-<a name="v1_database_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/database_service.proto
-<a name="bytebase-v1-AdviseIndexRequest"></a>
+<a name="bytebase-v1-CreateBackupRequest"></a>
-### AdviseIndexRequest
-AdviseIndexRequest is the request of advising index.
+### CreateBackupRequest
+CreateBackupRequest is the request message for CreateBackup.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | Format: instances/{instance}/databases/{database} |
-| statement | [string](#string) | | The statement to be advised. |
+| parent | [string](#string) | | The parent resource where this backup will be created. Format: instances/{instance}/databases/{database} |
+| backup | [Backup](#bytebase-v1-Backup) | | |
-<a name="bytebase-v1-AdviseIndexResponse"></a>
+<a name="bytebase-v1-Database"></a>
+
+### Database
-### AdviseIndexResponse
-AdviseIndexResponse is the response of advising index.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| current_index | [string](#string) | | The current index of the statement used. |
-| suggestion | [string](#string) | | The suggested index of the statement. |
-| create_index_statement | [string](#string) | | The create index statement of the suggested index. |
+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance. |
+| uid | [string](#string) | | The system-assigned, unique identifier for a resource. |
+| sync_state | [State](#bytebase-v1-State) | | The existence of a database on latest sync. |
+| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |
+| project | [string](#string) | | The project for a database. Format: projects/{project} |
+| schema_version | [string](#string) | | The version of database schema. |
+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| effective_environment | [string](#string) | | The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview. |
+| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |
-<a name="bytebase-v1-Backup"></a>
+<a name="bytebase-v1-Database-LabelsEntry"></a>
+
+### Database.LabelsEntry
-### Backup
-The message of the backup.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the database backup. backup-name is specified by the client. Format: instances/{instance}/databases/{database}/backups/{backup-name} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the backup resource was created initially. |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the backup resource was updated. |
-| state | [Backup.BackupState](#bytebase-v1-Backup-BackupState) | | The state of the backup. |
-| backup_type | [Backup.BackupType](#bytebase-v1-Backup-BackupType) | | The type of the backup. |
-| comment | [string](#string) | | The comment of the backup. |
-| uid | [string](#string) | | |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-BackupSetting"></a>
+<a name="bytebase-v1-DatabaseConfig"></a>
+
+### DatabaseConfig
-### BackupSetting
-BackupSetting is the setting for database backup.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database backup setting. Format: instances/{instance}/databases/{database}/backupSetting |
-| backup_retain_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The default maximum age of a Backup created via this BackupPlan. If specified, a Backup will be automatically deleted after its age reaches. If not specified, Backups created under this BackupPlan will be deleted after 7 DAYS. It will be rounded up to the number of days. |
-| cron_schedule | [string](#string) | | Cron(https://wikipedia.com/wiki/cron) string that defines a repeating schedule for creating Backups. Support hour of day, day of week. (UTC time)
-
-Default (empty): Disable automatic backup. |
-| hook_url | [string](#string) | | hook_url(https://www.bytebase.com/docs/disaster-recovery/backup/#post-backup-webhook) is the URL to send a notification when a backup is created. |
-
+| name | [string](#string) | | |
+| schema_configs | [SchemaConfig](#bytebase-v1-SchemaConfig) | repeated | The schema_configs is the list of configs for schemas in a database. |
-<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>
-### BatchUpdateDatabasesRequest
+<a name="bytebase-v1-DatabaseMetadata"></a>
+### DatabaseMetadata
+DatabaseMetadata is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the project of databases for now. |
-| requests | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |
+| name | [string](#string) | | The database metadata name.
+Format: instances/{instance}/databases/{database}/metadata |
+| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |
+| character_set | [string](#string) | | The character_set is the character set of a database. |
+| collation | [string](#string) | | The collation is the collation of a database. |
+| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |
+| schema_configs | [SchemaConfig](#bytebase-v1-SchemaConfig) | repeated | The schema_configs is the list of configs for schemas in a database. |
-<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>
-### BatchUpdateDatabasesResponse
+<a name="bytebase-v1-DatabaseSchema"></a>
+### DatabaseSchema
+DatabaseSchema is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |
+| schema | [string](#string) | | The schema dump from database. |
-<a name="bytebase-v1-ChangeHistory"></a>
+<a name="bytebase-v1-DeleteSecretRequest"></a>
-### ChangeHistory
+### DeleteSecretRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
-| uid | [string](#string) | | |
-| creator | [string](#string) | | Format: users/[email protected] |
-| updater | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| release_version | [string](#string) | | release version of Bytebase |
-| source | [ChangeHistory.Source](#bytebase-v1-ChangeHistory-Source) | | |
-| type | [ChangeHistory.Type](#bytebase-v1-ChangeHistory-Type) | | |
-| status | [ChangeHistory.Status](#bytebase-v1-ChangeHistory-Status) | | |
-| version | [string](#string) | | |
-| description | [string](#string) | | |
-| statement | [string](#string) | | The statement is used for preview purpose. |
-| statement_sheet | [string](#string) | | The name of the sheet resource. Format: projects/{project}/sheets/{sheet} |
-| schema | [string](#string) | | |
-| prev_schema | [string](#string) | | |
-| execution_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
-| issue | [string](#string) | | Format: projects/{project}/issues/{issue} |
-| push_event | [PushEvent](#bytebase-v1-PushEvent) | | |
-| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
-
+| name | [string](#string) | | The name of the secret to be deleted. Format: instances/{instance}/databases/{database}/secrets/{secret} |
-<a name="bytebase-v1-ChangedResourceDatabase"></a>
-### ChangedResourceDatabase
+<a name="bytebase-v1-DependentColumn"></a>
+### DependentColumn
+DependentColumn is the metadata for dependent columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | |
-| schemas | [ChangedResourceSchema](#bytebase-v1-ChangedResourceSchema) | repeated | |
+| schema | [string](#string) | | The schema is the schema of a reference column. |
+| table | [string](#string) | | The table is the table of a reference column. |
+| column | [string](#string) | | The column is the name of a reference column. |
-<a name="bytebase-v1-ChangedResourceSchema"></a>
+<a name="bytebase-v1-DiffSchemaRequest"></a>
-### ChangedResourceSchema
+### DiffSchemaRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | |
-| tables | [ChangedResourceTable](#bytebase-v1-ChangedResourceTable) | repeated | |
+| name | [string](#string) | | The name of the database or change history. Format: database: instances/{instance}/databases/{database} change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
+| schema | [string](#string) | | The target schema. |
+| change_history | [string](#string) | | The resource name of the change history Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
+| sdl_format | [bool](#bool) | | Format the schema dump into SDL format. |
-<a name="bytebase-v1-ChangedResourceTable"></a>
+<a name="bytebase-v1-DiffSchemaResponse"></a>
-### ChangedResourceTable
+### DiffSchemaResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | |
-
+| diff | [string](#string) | | |
-<a name="bytebase-v1-ChangedResources"></a>
-### ChangedResources
+<a name="bytebase-v1-ExtensionMetadata"></a>
+### ExtensionMetadata
+ExtensionMetadata is the metadata for extensions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [ChangedResourceDatabase](#bytebase-v1-ChangedResourceDatabase) | repeated | |
-
+| name | [string](#string) | | The name is the name of an extension. |
+| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |
+| version | [string](#string) | | The version is the version of an extension. |
+| description | [string](#string) | | The description is the description of an extension. |
-<a name="bytebase-v1-ColumnConfig"></a>
-### ColumnConfig
+<a name="bytebase-v1-ForeignKeyMetadata"></a>
+### ForeignKeyMetadata
+ForeignKeyMetadata is the metadata for foreign keys.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a column. |
-| semantic_type_id | [string](#string) | | |
-| labels | [ColumnConfig.LabelsEntry](#bytebase-v1-ColumnConfig-LabelsEntry) | repeated | The user labels for a column. |
-
-
-
-
-
-
-<a name="bytebase-v1-ColumnConfig-LabelsEntry"></a>
-
-### ColumnConfig.LabelsEntry
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-ColumnMetadata"></a>
-
-### ColumnMetadata
-ColumnMetadata is the metadata for columns.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a column. |
-| position | [int32](#int32) | | The position is the position in columns. |
-| has_default | [bool](#bool) | | |
-| default_null | [bool](#bool) | | |
-| default_string | [string](#string) | | |
-| default_expression | [string](#string) | | |
-| nullable | [bool](#bool) | | The nullable is the nullable of a column. |
-| type | [string](#string) | | The type is the type of a column. |
-| character_set | [string](#string) | | The character_set is the character_set of a column. |
-| collation | [string](#string) | | The collation is the collation of a column. |
-| comment | [string](#string) | | The comment is the comment of a column. classification and user_comment is parsed from the comment. |
-| classification | [string](#string) | | The classification is the classification of a column parsed from the comment. |
-| user_comment | [string](#string) | | The user_comment is the user comment of a column parsed from the comment. |
-| effective_masking_level | [MaskingLevel](#bytebase-v1-MaskingLevel) | | The effective_masking_level is the effective masking level of the column, evaluate from the column masking data and global masking rules. |
-
-
-
-
-
-
-<a name="bytebase-v1-CreateBackupRequest"></a>
-
-### CreateBackupRequest
-CreateBackupRequest is the request message for CreateBackup.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this backup will be created. Format: instances/{instance}/databases/{database} |
-| backup | [Backup](#bytebase-v1-Backup) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-Database"></a>
-
-### Database
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance. |
-| uid | [string](#string) | | The system-assigned, unique identifier for a resource. |
-| sync_state | [State](#bytebase-v1-State) | | The existence of a database on latest sync. |
-| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |
-| project | [string](#string) | | The project for a database. Format: projects/{project} |
-| schema_version | [string](#string) | | The version of database schema. |
-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-| effective_environment | [string](#string) | | The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview. |
-| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |
-
-
-
-
-
-
-<a name="bytebase-v1-Database-LabelsEntry"></a>
-
-### Database.LabelsEntry
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-DatabaseConfig"></a>
-
-### DatabaseConfig
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | |
-| schema_configs | [SchemaConfig](#bytebase-v1-SchemaConfig) | repeated | The schema_configs is the list of configs for schemas in a database. |
-
-
-
-
-
-
-<a name="bytebase-v1-DatabaseMetadata"></a>
-
-### DatabaseMetadata
-DatabaseMetadata is the metadata for databases.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The database metadata name.
-
-Format: instances/{instance}/databases/{database}/metadata |
-| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |
-| character_set | [string](#string) | | The character_set is the character set of a database. |
-| collation | [string](#string) | | The collation is the collation of a database. |
-| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |
-| schema_configs | [SchemaConfig](#bytebase-v1-SchemaConfig) | repeated | The schema_configs is the list of configs for schemas in a database. |
-
-
-
-
-
-
-<a name="bytebase-v1-DatabaseSchema"></a>
-
-### DatabaseSchema
-DatabaseSchema is the metadata for databases.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema dump from database. |
-
-
-
-
-
-
-<a name="bytebase-v1-DeleteSecretRequest"></a>
-
-### DeleteSecretRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the secret to be deleted. Format: instances/{instance}/databases/{database}/secrets/{secret} |
-
-
-
-
-
-
-<a name="bytebase-v1-DependentColumn"></a>
-
-### DependentColumn
-DependentColumn is the metadata for dependent columns.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema is the schema of a reference column. |
-| table | [string](#string) | | The table is the table of a reference column. |
-| column | [string](#string) | | The column is the name of a reference column. |
-
-
-
-
-
-
-<a name="bytebase-v1-DiffSchemaRequest"></a>
-
-### DiffSchemaRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database or change history. Format: database: instances/{instance}/databases/{database} change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
-| schema | [string](#string) | | The target schema. |
-| change_history | [string](#string) | | The resource name of the change history Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
-| sdl_format | [bool](#bool) | | Format the schema dump into SDL format. |
-
-
-
-
-
-
-<a name="bytebase-v1-DiffSchemaResponse"></a>
-
-### DiffSchemaResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-ExtensionMetadata"></a>
-
-### ExtensionMetadata
-ExtensionMetadata is the metadata for extensions.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of an extension. |
-| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |
-| version | [string](#string) | | The version is the version of an extension. |
-| description | [string](#string) | | The description is the description of an extension. |
-
-
-
-
-
-
-<a name="bytebase-v1-ForeignKeyMetadata"></a>
-
-### ForeignKeyMetadata
-ForeignKeyMetadata is the metadata for foreign keys.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a foreign key. |
-| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |
-| referenced_schema | [string](#string) | | The referenced_schema is the referenced schema name of a foreign key. It is an empty string for databases without such concept such as MySQL. |
-| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |
-| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |
-| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |
-| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |
-| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It&#39;s empty string for other databases. |
+| name | [string](#string) | | The name is the name of a foreign key. |
+| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |
+| referenced_schema | [string](#string) | | The referenced_schema is the referenced schema name of a foreign key. It is an empty string for databases without such concept such as MySQL. |
+| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |
+| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |
+| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |
+| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |
+| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It&#39;s empty string for other databases. |
@@ -3208,455 +2951,933 @@ SlowQueryDetails is the details of the slow query log.
-<a name="bytebase-v1-SlowQueryLog"></a>
+<a name="bytebase-v1-SlowQueryLog"></a>
+
+### SlowQueryLog
+SlowQueryLog is the slow query log.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| resource | [string](#string) | | The resource of the slow query log. The format is &#34;instances/{instance}/databases/{database}&#34;. |
+| project | [string](#string) | | The project of the slow query log. The format is &#34;projects/{project}&#34;. |
+| statistics | [SlowQueryStatistics](#bytebase-v1-SlowQueryStatistics) | | The statistics of the slow query log. |
+
+
+
+
+
+
+<a name="bytebase-v1-SlowQueryStatistics"></a>
+
+### SlowQueryStatistics
+SlowQueryStatistics is the statistics of the slow query log.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| sql_fingerprint | [string](#string) | | The fingerprint of the slow query log. |
+| count | [int32](#int32) | | The count of the slow query log. |
+| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest log time of the slow query log. |
+| average_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The average query time of the slow query log. |
+| maximum_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The maximum query time of the slow query log. |
+| average_rows_sent | [int32](#int32) | | The average rows sent of the slow query log. |
+| maximum_rows_sent | [int32](#int32) | | The maximum rows sent of the slow query log. |
+| average_rows_examined | [int32](#int32) | | The average rows examined of the slow query log. |
+| maximum_rows_examined | [int32](#int32) | | The maximum rows examined of the slow query log. |
+| query_time_percent | [double](#double) | | The percentage of the query time. |
+| count_percent | [double](#double) | | The percentage of the count. |
+| samples | [SlowQueryDetails](#bytebase-v1-SlowQueryDetails) | repeated | Samples are details of the sample slow query logs with the same fingerprint. |
+
+
+
+
+
+
+<a name="bytebase-v1-StreamMetadata"></a>
+
+### StreamMetadata
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a stream. |
+| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |
+| owner | [string](#string) | | The owner of the stream. |
+| comment | [string](#string) | | The comment of the stream. |
+| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |
+| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |
+| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |
+| definition | [string](#string) | | The definition of the stream. |
+
+
+
+
+
+
+<a name="bytebase-v1-SyncDatabaseRequest"></a>
+
+### SyncDatabaseRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} |
+
+
+
+
+
+
+<a name="bytebase-v1-SyncDatabaseResponse"></a>
+
+### SyncDatabaseResponse
+
+
+
+
+
+
+
+<a name="bytebase-v1-TableConfig"></a>
+
+### TableConfig
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a table. |
+| column_configs | [ColumnConfig](#bytebase-v1-ColumnConfig) | repeated | The column_configs is the ordered list of configs for columns in a table. |
+
+
+
+
+
+
+<a name="bytebase-v1-TableMetadata"></a>
+
+### TableMetadata
+TableMetadata is the metadata for tables.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a table. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
+| engine | [string](#string) | | The engine is the engine of a table. |
+| collation | [string](#string) | | The collation is the collation of a table. |
+| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |
+| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |
+| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |
+| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |
+| create_options | [string](#string) | | The create_options is the create option of a table. |
+| comment | [string](#string) | | The comment is the comment of a table. classification and user_comment is parsed from the comment. |
+| classification | [string](#string) | | The classification is the classification of a table parsed from the comment. |
+| user_comment | [string](#string) | | The user_comment is the user comment of a table parsed from the comment. |
+| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |
+| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |
+
+
+
+
+
+
+<a name="bytebase-v1-TablePartitionMetadata"></a>
+
+### TablePartitionMetadata
+TablePartitionMetadata is the metadata for table partitions.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a table partition. |
+| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |
+| expression | [string](#string) | | The expression is the expression of a table partition. |
+| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |
+
+
+
+
+
+
+<a name="bytebase-v1-TaskMetadata"></a>
+
+### TaskMetadata
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a task. |
+| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |
+| owner | [string](#string) | | The owner of the task. |
+| comment | [string](#string) | | The comment of the task. |
+| warehouse | [string](#string) | | The warehouse of the task. |
+| schedule | [string](#string) | | The schedule interval of the task. |
+| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |
+| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |
+| condition | [string](#string) | | The condition of the task. |
+| definition | [string](#string) | | The definition of the task. |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateBackupSettingRequest"></a>
+
+### UpdateBackupSettingRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| setting | [BackupSetting](#bytebase-v1-BackupSetting) | | The database backup setting to update. |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateDatabaseMetadataRequest"></a>
+
+### UpdateDatabaseMetadataRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| database_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The database metadata to update.
+
+The database_metadata&#39;s `name` field is used to identify the database metadata to update. Format: instances/{instance}/databases/{database}/metadata |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateDatabaseRequest"></a>
+
+### UpdateDatabaseRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| database | [Database](#bytebase-v1-Database) | | The database to update.
+
+The database&#39;s `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateSecretRequest"></a>
+
+### UpdateSecretRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| secret | [Secret](#bytebase-v1-Secret) | | The secret to be created or updated. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The mask of the fields to be updated. |
+| allow_missing | [bool](#bool) | | If true, the secret will be created if it does not exist. |
+
+
+
+
+
+
+<a name="bytebase-v1-ViewMetadata"></a>
+
+### ViewMetadata
+ViewMetadata is the metadata for views.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a view. |
+| definition | [string](#string) | | The definition is the definition of a view. |
+| comment | [string](#string) | | The comment is the comment of a view. |
+| dependent_columns | [DependentColumn](#bytebase-v1-DependentColumn) | repeated | The dependent_columns is the list of dependent columns of a view. |
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-Backup-BackupState"></a>
+
+### Backup.BackupState
+The state of the backup.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| BACKUP_STATE_UNSPECIFIED | 0 | The state of the backup is unknown. |
+| PENDING_CREATE | 1 | The backup is being pending to create. |
+| DONE | 2 | The backup is ready to use. |
+| FAILED | 3 | The backup is being deleted. |
+
+
+
+<a name="bytebase-v1-Backup-BackupType"></a>
+
+### Backup.BackupType
+The type of the backup.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| BACKUP_TYPE_UNSPECIFIED | 0 | The type of the backup is unknown. |
+| MANUAL | 1 | The backup is created by user. |
+| AUTOMATIC | 2 | The backup is created by automatic backup. |
+| PITR | 3 | The backup is created automatically after doing PITR. |
+
+
+
+<a name="bytebase-v1-ChangeHistory-Source"></a>
+
+### ChangeHistory.Source
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SOURCE_UNSPECIFIED | 0 | |
+| UI | 1 | |
+| VCS | 2 | |
+| LIBRARY | 3 | |
+
+
+
+<a name="bytebase-v1-ChangeHistory-Status"></a>
+
+### ChangeHistory.Status
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+
+
+
+<a name="bytebase-v1-ChangeHistory-Type"></a>
+
+### ChangeHistory.Type
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| BASELINE | 1 | |
+| MIGRATE | 2 | |
+| MIGRATE_SDL | 3 | |
+| MIGRATE_GHOST | 4 | |
+| BRANCH | 5 | |
+| DATA | 6 | |
+
+
+
+<a name="bytebase-v1-ChangeHistoryView"></a>
+
+### ChangeHistoryView
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CHANGE_HISTORY_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| CHANGE_HISTORY_VIEW_BASIC | 1 | |
+| CHANGE_HISTORY_VIEW_FULL | 2 | |
+
+
+
+<a name="bytebase-v1-DatabaseMetadataView"></a>
+
+### DatabaseMetadataView
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATABASE_METADATA_VIEW_UNSPECIFIED | 0 | The default and unset value. The API will default to the BASIC view. |
+| DATABASE_METADATA_VIEW_BASIC | 1 | Include basic information of schema object names such as schema, table, view, function names. |
+| DATABASE_METADATA_VIEW_FULL | 2 | Include everything such as columns and column masking level. |
+
+
+
+<a name="bytebase-v1-StreamMetadata-Mode"></a>
+
+### StreamMetadata.Mode
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MODE_UNSPECIFIED | 0 | |
+| MODE_DEFAULT | 1 | |
+| MODE_APPEND_ONLY | 2 | |
+| MODE_INSERT_ONLY | 3 | |
+
+
+
+<a name="bytebase-v1-StreamMetadata-Type"></a>
+
+### StreamMetadata.Type
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| TYPE_DELTA | 1 | |
+
+
+
+<a name="bytebase-v1-TablePartitionMetadata-Type"></a>
+
+### TablePartitionMetadata.Type
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| RANGE | 1 | |
+| LIST | 2 | |
+| HASH | 3 | |
+
+
+
+<a name="bytebase-v1-TaskMetadata-State"></a>
+
+### TaskMetadata.State
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATE_UNSPECIFIED | 0 | |
+| STATE_STARTED | 1 | |
+| STATE_SUSPENDED | 2 | |
+
+
+
+
+
+
+
+<a name="bytebase-v1-DatabaseService"></a>
+
+### DatabaseService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | |
+| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | |
+| SearchDatabases | [SearchDatabasesRequest](#bytebase-v1-SearchDatabasesRequest) | [SearchDatabasesResponse](#bytebase-v1-SearchDatabasesResponse) | Search for databases that the caller has both projects.get permission on, and also satisfy the specified query. |
+| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | |
+| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | |
+| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | |
+| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | |
+| UpdateDatabaseMetadata | [UpdateDatabaseMetadataRequest](#bytebase-v1-UpdateDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | |
+| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | |
+| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | |
+| GetBackupSetting | [GetBackupSettingRequest](#bytebase-v1-GetBackupSettingRequest) | [BackupSetting](#bytebase-v1-BackupSetting) | |
+| UpdateBackupSetting | [UpdateBackupSettingRequest](#bytebase-v1-UpdateBackupSettingRequest) | [BackupSetting](#bytebase-v1-BackupSetting) | |
+| CreateBackup | [CreateBackupRequest](#bytebase-v1-CreateBackupRequest) | [Backup](#bytebase-v1-Backup) | |
+| ListBackups | [ListBackupsRequest](#bytebase-v1-ListBackupsRequest) | [ListBackupsResponse](#bytebase-v1-ListBackupsResponse) | |
+| ListSlowQueries | [ListSlowQueriesRequest](#bytebase-v1-ListSlowQueriesRequest) | [ListSlowQueriesResponse](#bytebase-v1-ListSlowQueriesResponse) | |
+| ListSecrets | [ListSecretsRequest](#bytebase-v1-ListSecretsRequest) | [ListSecretsResponse](#bytebase-v1-ListSecretsResponse) | |
+| UpdateSecret | [UpdateSecretRequest](#bytebase-v1-UpdateSecretRequest) | [Secret](#bytebase-v1-Secret) | |
+| DeleteSecret | [DeleteSecretRequest](#bytebase-v1-DeleteSecretRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
+| AdviseIndex | [AdviseIndexRequest](#bytebase-v1-AdviseIndexRequest) | [AdviseIndexResponse](#bytebase-v1-AdviseIndexResponse) | |
+| ListChangeHistories | [ListChangeHistoriesRequest](#bytebase-v1-ListChangeHistoriesRequest) | [ListChangeHistoriesResponse](#bytebase-v1-ListChangeHistoriesResponse) | |
+| GetChangeHistory | [GetChangeHistoryRequest](#bytebase-v1-GetChangeHistoryRequest) | [ChangeHistory](#bytebase-v1-ChangeHistory) | |
+
+
+
+
+
+<a name="v1_branch_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/branch_service.proto
+
+
+
+<a name="bytebase-v1-Branch"></a>
+
+### Branch
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the branch. Format: projects/{project}/branches/{branch} {branch} should be the id of a sheet. |
+| title | [string](#string) | | The title of branch. AKA sheet&#39;s name. |
+| schema | [string](#string) | | The schema of branch. AKA sheet&#39;s statement. |
+| schema_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the current editing schema. |
+| baseline_schema | [string](#string) | | The baseline schema. |
+| baseline_schema_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the baseline schema. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the branch. |
+| baseline_database | [string](#string) | | The name of the baseline database. Format: instances/{instance}/databases/{database} |
+| parent_branch | [string](#string) | | The name of the parent branch. For main branch, it&#39;s empty. For child branch, its format will be: projects/{project}/branches/{branch} |
+| etag | [string](#string) | | The etag of the branch. |
+| creator | [string](#string) | | The creator of the branch. Format: users/{email} |
+| updater | [string](#string) | | The updater of the branch. Format: users/{email} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the branch was created. |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the branch was last updated. |
+
+
+
+
+
+
+<a name="bytebase-v1-CreateBranchRequest"></a>
+
+### CreateBranchRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent, which owns this collection of branches. Format: project/{project} |
+| branch | [Branch](#bytebase-v1-Branch) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-DeleteBranchRequest"></a>
+
+### DeleteBranchRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the branch to delete. Format: projects/{project}/branches/{branch} |
+
+
+
+
+
+
+<a name="bytebase-v1-DiffMetadataRequest"></a>
+
+### DiffMetadataRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
+
+
+
+
+
+
+<a name="bytebase-v1-DiffMetadataResponse"></a>
+
+### DiffMetadataResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| diff | [string](#string) | | The diff of the metadata. |
+
+
+
+
+
+
+<a name="bytebase-v1-GetBranchRequest"></a>
+
+### GetBranchRequest
-### SlowQueryLog
-SlowQueryLog is the slow query log.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| resource | [string](#string) | | The resource of the slow query log. The format is &#34;instances/{instance}/databases/{database}&#34;. |
-| project | [string](#string) | | The project of the slow query log. The format is &#34;projects/{project}&#34;. |
-| statistics | [SlowQueryStatistics](#bytebase-v1-SlowQueryStatistics) | | The statistics of the slow query log. |
+| name | [string](#string) | | The name of the branch to retrieve. Format: projects/{project}/branches/{branch} |
-<a name="bytebase-v1-SlowQueryStatistics"></a>
+<a name="bytebase-v1-ListBranchesRequest"></a>
+
+### ListBranchesRequest
-### SlowQueryStatistics
-SlowQueryStatistics is the statistics of the slow query log.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| sql_fingerprint | [string](#string) | | The fingerprint of the slow query log. |
-| count | [int32](#int32) | | The count of the slow query log. |
-| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest log time of the slow query log. |
-| average_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The average query time of the slow query log. |
-| maximum_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The maximum query time of the slow query log. |
-| average_rows_sent | [int32](#int32) | | The average rows sent of the slow query log. |
-| maximum_rows_sent | [int32](#int32) | | The maximum rows sent of the slow query log. |
-| average_rows_examined | [int32](#int32) | | The average rows examined of the slow query log. |
-| maximum_rows_examined | [int32](#int32) | | The maximum rows examined of the slow query log. |
-| query_time_percent | [double](#double) | | The percentage of the query time. |
-| count_percent | [double](#double) | | The percentage of the count. |
-| samples | [SlowQueryDetails](#bytebase-v1-SlowQueryDetails) | repeated | Samples are details of the sample slow query logs with the same fingerprint. |
+| parent | [string](#string) | | The parent resource of the branch. Foramt: projects/{project} |
+| filter | [string](#string) | | To filter the search result. |
+| page_size | [int32](#int32) | | The maximum number of branches to return. The service may return fewer than this value. If unspecified, at most 50 branches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListBranches` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListBranches` must match the call that provided the page token. |
+| view | [BranchView](#bytebase-v1-BranchView) | | |
-<a name="bytebase-v1-StreamMetadata"></a>
-### StreamMetadata
+<a name="bytebase-v1-ListBranchesResponse"></a>
+
+### ListBranchesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a stream. |
-| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |
-| owner | [string](#string) | | The owner of the stream. |
-| comment | [string](#string) | | The comment of the stream. |
-| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |
-| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |
-| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |
-| definition | [string](#string) | | The definition of the stream. |
+| branches | [Branch](#bytebase-v1-Branch) | repeated | The branches from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-SyncDatabaseRequest"></a>
+<a name="bytebase-v1-MergeBranchRequest"></a>
-### SyncDatabaseRequest
+### MergeBranchRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} |
+| name | [string](#string) | | The name of the branch to merge. Format: projects/{project}/branches/{branch} |
+| target_name | [string](#string) | | The target branch to merge into. Format: projects/{project}/branches/{branch} |
-<a name="bytebase-v1-SyncDatabaseResponse"></a>
+<a name="bytebase-v1-UpdateBranchRequest"></a>
-### SyncDatabaseResponse
+### UpdateBranchRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| branch | [Branch](#bytebase-v1-Branch) | | The branch to update.
+The branch&#39;s `name` field is used to identify the branch to update. Format: projects/{project}/branches/{branch} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-<a name="bytebase-v1-TableConfig"></a>
-### TableConfig
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table. |
-| column_configs | [ColumnConfig](#bytebase-v1-ColumnConfig) | repeated | The column_configs is the ordered list of configs for columns in a table. |
+<a name="bytebase-v1-BranchView"></a>
+### BranchView
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| BRANCH_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| BRANCH_VIEW_BASIC | 1 | Exclude schema, baseline_schema. |
+| BRANCH_VIEW_FULL | 2 | Include everything. |
+
-<a name="bytebase-v1-TableMetadata"></a>
+
-### TableMetadata
-TableMetadata is the metadata for tables.
+<a name="bytebase-v1-BranchService"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
-| engine | [string](#string) | | The engine is the engine of a table. |
-| collation | [string](#string) | | The collation is the collation of a table. |
-| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |
-| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |
-| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |
-| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |
-| create_options | [string](#string) | | The create_options is the create option of a table. |
-| comment | [string](#string) | | The comment is the comment of a table. classification and user_comment is parsed from the comment. |
-| classification | [string](#string) | | The classification is the classification of a table parsed from the comment. |
-| user_comment | [string](#string) | | The user_comment is the user comment of a table parsed from the comment. |
-| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |
-| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |
+### BranchService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetBranch | [GetBranchRequest](#bytebase-v1-GetBranchRequest) | [Branch](#bytebase-v1-Branch) | |
+| ListBranches | [ListBranchesRequest](#bytebase-v1-ListBranchesRequest) | [ListBranchesResponse](#bytebase-v1-ListBranchesResponse) | |
+| CreateBranch | [CreateBranchRequest](#bytebase-v1-CreateBranchRequest) | [Branch](#bytebase-v1-Branch) | |
+| UpdateBranch | [UpdateBranchRequest](#bytebase-v1-UpdateBranchRequest) | [Branch](#bytebase-v1-Branch) | |
+| MergeBranch | [MergeBranchRequest](#bytebase-v1-MergeBranchRequest) | [Branch](#bytebase-v1-Branch) | |
+| DeleteBranch | [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |
+
+<a name="v1_cel_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/cel_service.proto
-<a name="bytebase-v1-TablePartitionMetadata"></a>
-### TablePartitionMetadata
-TablePartitionMetadata is the metadata for table partitions.
+
+<a name="bytebase-v1-BatchDeparseRequest"></a>
+
+### BatchDeparseRequest
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table partition. |
-| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |
-| expression | [string](#string) | | The expression is the expression of a table partition. |
-| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |
+| expressions | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | repeated | |
-<a name="bytebase-v1-TaskMetadata"></a>
+<a name="bytebase-v1-BatchDeparseResponse"></a>
-### TaskMetadata
+### BatchDeparseResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a task. |
-| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |
-| owner | [string](#string) | | The owner of the task. |
-| comment | [string](#string) | | The comment of the task. |
-| warehouse | [string](#string) | | The warehouse of the task. |
-| schedule | [string](#string) | | The schedule interval of the task. |
-| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |
-| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |
-| condition | [string](#string) | | The condition of the task. |
-| definition | [string](#string) | | The definition of the task. |
+| expressions | [string](#string) | repeated | |
-<a name="bytebase-v1-UpdateBackupSettingRequest"></a>
+<a name="bytebase-v1-BatchParseRequest"></a>
-### UpdateBackupSettingRequest
+### BatchParseRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| setting | [BackupSetting](#bytebase-v1-BackupSetting) | | The database backup setting to update. |
+| expressions | [string](#string) | repeated | |
-<a name="bytebase-v1-UpdateDatabaseMetadataRequest"></a>
+<a name="bytebase-v1-BatchParseResponse"></a>
-### UpdateDatabaseMetadataRequest
+### BatchParseResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The database metadata to update.
+| expressions | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | repeated | |
-The database_metadata&#39;s `name` field is used to identify the database metadata to update. Format: instances/{instance}/databases/{database}/metadata |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+
+
-<a name="bytebase-v1-UpdateDatabaseRequest"></a>
+
-### UpdateDatabaseRequest
+<a name="bytebase-v1-CelService"></a>
+### CelService
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| database | [Database](#bytebase-v1-Database) | | The database to update.
-The database&#39;s `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | |
+| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | |
+
+
+<a name="v1_changelist_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/changelist_service.proto
-<a name="bytebase-v1-UpdateSecretRequest"></a>
-### UpdateSecretRequest
+<a name="bytebase-v1-Changelist"></a>
+
+### Changelist
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| secret | [Secret](#bytebase-v1-Secret) | | The secret to be created or updated. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The mask of the fields to be updated. |
-| allow_missing | [bool](#bool) | | If true, the secret will be created if it does not exist. |
+| name | [string](#string) | | The name of the changelist resource. Canonical parent is project. Format: projects/{project}/changelists/{changelist} |
+| description | [string](#string) | | |
+| creator | [string](#string) | | The creator of the changelist. Format: users/{email} |
+| updater | [string](#string) | | The updater of the changelist. Format: users/{email} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The create time of the changelist. |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last update time of the changelist. |
+| changes | [Changelist.Change](#bytebase-v1-Changelist-Change) | repeated | |
-<a name="bytebase-v1-ViewMetadata"></a>
+<a name="bytebase-v1-Changelist-Change"></a>
+
+### Changelist.Change
-### ViewMetadata
-ViewMetadata is the metadata for views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a view. |
-| definition | [string](#string) | | The definition is the definition of a view. |
-| comment | [string](#string) | | The comment is the comment of a view. |
-| dependent_columns | [DependentColumn](#bytebase-v1-DependentColumn) | repeated | The dependent_columns is the list of dependent columns of a view. |
-
+| sheet | [string](#string) | | The name of a sheet. |
+| source | [string](#string) | | The source of origin. 1) change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}. 2) branch: projects/{project}/schemaDesigns/{schemaDesign}. 3) raw SQL if empty. |
-
-<a name="bytebase-v1-Backup-BackupState"></a>
+<a name="bytebase-v1-CreateChangelistRequest"></a>
-### Backup.BackupState
-The state of the backup.
+### CreateChangelistRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| BACKUP_STATE_UNSPECIFIED | 0 | The state of the backup is unknown. |
-| PENDING_CREATE | 1 | The backup is being pending to create. |
-| DONE | 2 | The backup is ready to use. |
-| FAILED | 3 | The backup is being deleted. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent resource where this changelist will be created. Foramt: 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&#39;s resource name.
-<a name="bytebase-v1-Backup-BackupType"></a>
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-### Backup.BackupType
-The type of the backup.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| BACKUP_TYPE_UNSPECIFIED | 0 | The type of the backup is unknown. |
-| MANUAL | 1 | The backup is created by user. |
-| AUTOMATIC | 2 | The backup is created by automatic backup. |
-| PITR | 3 | The backup is created automatically after doing PITR. |
-<a name="bytebase-v1-ChangeHistory-Source"></a>
-### ChangeHistory.Source
+<a name="bytebase-v1-DeleteChangelistRequest"></a>
+### DeleteChangelistRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SOURCE_UNSPECIFIED | 0 | |
-| UI | 1 | |
-| VCS | 2 | |
-| LIBRARY | 3 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the changelist to delete. Format: projects/{project}/changelists/{changelist} |
-<a name="bytebase-v1-ChangeHistory-Status"></a>
-### ChangeHistory.Status
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
+<a name="bytebase-v1-GetChangelistRequest"></a>
-<a name="bytebase-v1-ChangeHistory-Type"></a>
+### GetChangelistRequest
-### ChangeHistory.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| BASELINE | 1 | |
-| MIGRATE | 2 | |
-| MIGRATE_SDL | 3 | |
-| MIGRATE_GHOST | 4 | |
-| BRANCH | 5 | |
-| DATA | 6 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the changelist to retrieve. Format: projects/{project}/changelists/{changelist} |
-<a name="bytebase-v1-ChangeHistoryView"></a>
-### ChangeHistoryView
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CHANGE_HISTORY_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| CHANGE_HISTORY_VIEW_BASIC | 1 | |
-| CHANGE_HISTORY_VIEW_FULL | 2 | |
+<a name="bytebase-v1-ListChangelistsRequest"></a>
+### ListChangelistsRequest
-<a name="bytebase-v1-DatabaseMetadataView"></a>
-### DatabaseMetadataView
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent, which owns this collection of changelists. Format: projects/{project} Use &#34;projects/-&#34; to list all changelists. |
+| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 50 databases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListDatabases` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| DATABASE_METADATA_VIEW_UNSPECIFIED | 0 | The default and unset value. The API will default to the BASIC view. |
-| DATABASE_METADATA_VIEW_BASIC | 1 | Include basic information of schema object names such as schema, table, view, function names. |
-| DATABASE_METADATA_VIEW_FULL | 2 | Include everything such as columns and column masking level. |
-<a name="bytebase-v1-StreamMetadata-Mode"></a>
-### StreamMetadata.Mode
+<a name="bytebase-v1-ListChangelistsResponse"></a>
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MODE_UNSPECIFIED | 0 | |
-| MODE_DEFAULT | 1 | |
-| MODE_APPEND_ONLY | 2 | |
-| MODE_INSERT_ONLY | 3 | |
+### ListChangelistsResponse
-<a name="bytebase-v1-StreamMetadata-Type"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| changelists | [Changelist](#bytebase-v1-Changelist) | repeated | The changelists from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-### StreamMetadata.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| TYPE_DELTA | 1 | |
-<a name="bytebase-v1-TablePartitionMetadata-Type"></a>
+<a name="bytebase-v1-UpdateChangelistRequest"></a>
-### TablePartitionMetadata.Type
+### UpdateChangelistRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| RANGE | 1 | |
-| LIST | 2 | |
-| HASH | 3 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| changelist | [Changelist](#bytebase-v1-Changelist) | | The changelist to update.
+The changelist&#39;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. |
-<a name="bytebase-v1-TaskMetadata-State"></a>
-### TaskMetadata.State
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATE_UNSPECIFIED | 0 | |
-| STATE_STARTED | 1 | |
-| STATE_SUSPENDED | 2 | |
+
-<a name="bytebase-v1-DatabaseService"></a>
+<a name="bytebase-v1-ChangelistService"></a>
-### DatabaseService
+### ChangelistService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | |
-| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | |
-| SearchDatabases | [SearchDatabasesRequest](#bytebase-v1-SearchDatabasesRequest) | [SearchDatabasesResponse](#bytebase-v1-SearchDatabasesResponse) | Search for databases that the caller has both projects.get permission on, and also satisfy the specified query. |
-| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | |
-| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | |
-| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | |
-| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | |
-| UpdateDatabaseMetadata | [UpdateDatabaseMetadataRequest](#bytebase-v1-UpdateDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | |
-| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | |
-| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | |
-| GetBackupSetting | [GetBackupSettingRequest](#bytebase-v1-GetBackupSettingRequest) | [BackupSetting](#bytebase-v1-BackupSetting) | |
-| UpdateBackupSetting | [UpdateBackupSettingRequest](#bytebase-v1-UpdateBackupSettingRequest) | [BackupSetting](#bytebase-v1-BackupSetting) | |
-| CreateBackup | [CreateBackupRequest](#bytebase-v1-CreateBackupRequest) | [Backup](#bytebase-v1-Backup) | |
-| ListBackups | [ListBackupsRequest](#bytebase-v1-ListBackupsRequest) | [ListBackupsResponse](#bytebase-v1-ListBackupsResponse) | |
-| ListSlowQueries | [ListSlowQueriesRequest](#bytebase-v1-ListSlowQueriesRequest) | [ListSlowQueriesResponse](#bytebase-v1-ListSlowQueriesResponse) | |
-| ListSecrets | [ListSecretsRequest](#bytebase-v1-ListSecretsRequest) | [ListSecretsResponse](#bytebase-v1-ListSecretsResponse) | |
-| UpdateSecret | [UpdateSecretRequest](#bytebase-v1-UpdateSecretRequest) | [Secret](#bytebase-v1-Secret) | |
-| DeleteSecret | [DeleteSecretRequest](#bytebase-v1-DeleteSecretRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
-| AdviseIndex | [AdviseIndexRequest](#bytebase-v1-AdviseIndexRequest) | [AdviseIndexResponse](#bytebase-v1-AdviseIndexResponse) | |
-| ListChangeHistories | [ListChangeHistoriesRequest](#bytebase-v1-ListChangeHistoriesRequest) | [ListChangeHistoriesResponse](#bytebase-v1-ListChangeHistoriesResponse) | |
-| GetChangeHistory | [GetChangeHistoryRequest](#bytebase-v1-GetChangeHistoryRequest) | [ChangeHistory](#bytebase-v1-ChangeHistory) | |
+| CreateChangelist | [CreateChangelistRequest](#bytebase-v1-CreateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
+| GetChangelist | [GetChangelistRequest](#bytebase-v1-GetChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
+| ListChangelists | [ListChangelistsRequest](#bytebase-v1-ListChangelistsRequest) | [ListChangelistsResponse](#bytebase-v1-ListChangelistsResponse) | |
+| UpdateChangelist | [UpdateChangelistRequest](#bytebase-v1-UpdateChangelistRequest) | [Changelist](#bytebase-v1-Changelist) | |
+| DeleteChangelist | [DeleteChangelistRequest](#bytebase-v1-DeleteChangelistRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
@@ -8239,242 +8460,6 @@ Type is the database change type.
-<a name="v1_schema_design_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## v1/schema_design_service.proto
-
-
-
-<a name="bytebase-v1-CreateSchemaDesignRequest"></a>
-
-### CreateSchemaDesignRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of schema designs. Format: project/{project} |
-| schema_design | [SchemaDesign](#bytebase-v1-SchemaDesign) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-DeleteSchemaDesignRequest"></a>
-
-### DeleteSchemaDesignRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the schema design to delete. Format: projects/{project}/schemaDesigns/{schemaDesign} |
-
-
-
-
-
-
-<a name="bytebase-v1-DiffMetadataRequest"></a>
-
-### DiffMetadataRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
-
-
-
-
-
-
-<a name="bytebase-v1-DiffMetadataResponse"></a>
-
-### DiffMetadataResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | The diff of the metadata. |
-
-
-
-
-
-
-<a name="bytebase-v1-GetSchemaDesignRequest"></a>
-
-### GetSchemaDesignRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the schema design to retrieve. Format: projects/{project}/schemaDesigns/{schemaDesign} |
-
-
-
-
-
-
-<a name="bytebase-v1-ListSchemaDesignsRequest"></a>
-
-### ListSchemaDesignsRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource of the schema design. Foramt: projects/{project} |
-| filter | [string](#string) | | To filter the search result. |
-| page_size | [int32](#int32) | | The maximum number of schema designs to return. The service may return fewer than this value. If unspecified, at most 50 schema designs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListSchemaDesigns` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListSchemaDesigns` must match the call that provided the page token. |
-| view | [SchemaDesignView](#bytebase-v1-SchemaDesignView) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-ListSchemaDesignsResponse"></a>
-
-### ListSchemaDesignsResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema_designs | [SchemaDesign](#bytebase-v1-SchemaDesign) | repeated | The schema designs from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-
-
-
-
-
-<a name="bytebase-v1-MergeSchemaDesignRequest"></a>
-
-### MergeSchemaDesignRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the schema design to merge. Format: projects/{project}/schemaDesigns/{schemaDesign} |
-| target_name | [string](#string) | | The target schema design to merge into. Format: projects/{project}/schemaDesigns/{schemaDesign} |
-
-
-
-
-
-
-<a name="bytebase-v1-SchemaDesign"></a>
-
-### SchemaDesign
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the schema design. Format: projects/{project}/schemaDesigns/{schemaDesign} {schemaDesign} should be the id of a sheet. |
-| title | [string](#string) | | The title of schema design. AKA sheet&#39;s name. |
-| schema | [string](#string) | | The schema of schema design. AKA sheet&#39;s statement. |
-| schema_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the current editing schema. |
-| baseline_schema | [string](#string) | | The baseline schema. |
-| baseline_schema_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the baseline schema. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema design. |
-| baseline_database | [string](#string) | | The name of the baseline database. Format: instances/{instance}/databases/{database} |
-| parent_branch | [string](#string) | | The name of the baseline sheet. For main branch, its format will be: projects/{project}/sheets/{sheet} For personal draft, its format will be: projects/{project}/schemaDesigns/{schemaDesign} |
-| type | [SchemaDesign.Type](#bytebase-v1-SchemaDesign-Type) | | The type of the schema design. |
-| etag | [string](#string) | | The etag of the schema design. |
-| creator | [string](#string) | | The creator of the schema design. Format: users/{email} |
-| updater | [string](#string) | | The updater of the schema design. Format: users/{email} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the schema design was created. |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the schema design was last updated. |
-
-
-
-
-
-
-<a name="bytebase-v1-UpdateSchemaDesignRequest"></a>
-
-### UpdateSchemaDesignRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema_design | [SchemaDesign](#bytebase-v1-SchemaDesign) | | The schema design to update.
-
-The schema design&#39;s `name` field is used to identify the schema design to update. Format: projects/{project}/schemaDesigns/{schemaDesign} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-
-
-
-
-
-
-
-
-<a name="bytebase-v1-SchemaDesign-Type"></a>
-
-### SchemaDesign.Type
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| MAIN_BRANCH | 1 | Main branch type is the main version of schema design. And only allow to be updated/merged with personal drafts. |
-| PERSONAL_DRAFT | 2 | Personal draft type is a copy of the main branch type schema designs. |
-
-
-
-<a name="bytebase-v1-SchemaDesignView"></a>
-
-### SchemaDesignView
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SCHEMA_DESIGN_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| SCHEMA_DESIGN_VIEW_BASIC | 1 | Exclude schema, baseline_schema. |
-| SCHEMA_DESIGN_VIEW_FULL | 2 | Include everything. |
-
-
-
-
-
-
-
-<a name="bytebase-v1-SchemaDesignService"></a>
-
-### SchemaDesignService
-
-
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetSchemaDesign | [GetSchemaDesignRequest](#bytebase-v1-GetSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
-| ListSchemaDesigns | [ListSchemaDesignsRequest](#bytebase-v1-ListSchemaDesignsRequest) | [ListSchemaDesignsResponse](#bytebase-v1-ListSchemaDesignsResponse) | |
-| CreateSchemaDesign | [CreateSchemaDesignRequest](#bytebase-v1-CreateSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
-| UpdateSchemaDesign | [UpdateSchemaDesignRequest](#bytebase-v1-UpdateSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
-| MergeSchemaDesign | [MergeSchemaDesignRequest](#bytebase-v1-MergeSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
-| DeleteSchemaDesign | [DeleteSchemaDesignRequest](#bytebase-v1-DeleteSchemaDesignRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |
-
-
-
-
-
<a name="v1_subscription_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.go
new file mode 100644
index 0000000000..031bd2b6f6
--- /dev/null
+++ b/proto/generated-go/v1/branch_service.pb.go
@@ -0,0 +1,1193 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc (unknown)
+// source: v1/branch_service.proto
+
+package v1
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ 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"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type BranchView int32
+
+const (
+ // The default / unset value.
+ // The API will default to the BASIC view.
+ BranchView_BRANCH_VIEW_UNSPECIFIED BranchView = 0
+ // Exclude schema, baseline_schema.
+ BranchView_BRANCH_VIEW_BASIC BranchView = 1
+ // Include everything.
+ BranchView_BRANCH_VIEW_FULL BranchView = 2
+)
+
+// Enum value maps for BranchView.
+var (
+ BranchView_name = map[int32]string{
+ 0: "BRANCH_VIEW_UNSPECIFIED",
+ 1: "BRANCH_VIEW_BASIC",
+ 2: "BRANCH_VIEW_FULL",
+ }
+ BranchView_value = map[string]int32{
+ "BRANCH_VIEW_UNSPECIFIED": 0,
+ "BRANCH_VIEW_BASIC": 1,
+ "BRANCH_VIEW_FULL": 2,
+ }
+)
+
+func (x BranchView) Enum() *BranchView {
+ p := new(BranchView)
+ *p = x
+ return p
+}
+
+func (x BranchView) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BranchView) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_branch_service_proto_enumTypes[0].Descriptor()
+}
+
+func (BranchView) Type() protoreflect.EnumType {
+ return &file_v1_branch_service_proto_enumTypes[0]
+}
+
+func (x BranchView) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use BranchView.Descriptor instead.
+func (BranchView) EnumDescriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{0}
+}
+
+type Branch struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the branch.
+ // Format: projects/{project}/branches/{branch}
+ // {branch} should be the id of a sheet.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The title of branch. AKA sheet's name.
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ // The schema of branch. AKA sheet's statement.
+ Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
+ // The metadata of the current editing schema.
+ SchemaMetadata *DatabaseMetadata `protobuf:"bytes,4,opt,name=schema_metadata,json=schemaMetadata,proto3" json:"schema_metadata,omitempty"`
+ // The baseline schema.
+ BaselineSchema string `protobuf:"bytes,5,opt,name=baseline_schema,json=baselineSchema,proto3" json:"baseline_schema,omitempty"`
+ // The metadata of the baseline schema.
+ BaselineSchemaMetadata *DatabaseMetadata `protobuf:"bytes,6,opt,name=baseline_schema_metadata,json=baselineSchemaMetadata,proto3" json:"baseline_schema_metadata,omitempty"`
+ // The database engine of the branch.
+ Engine Engine `protobuf:"varint,7,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
+ // The name of the baseline database.
+ // Format: instances/{instance}/databases/{database}
+ BaselineDatabase string `protobuf:"bytes,8,opt,name=baseline_database,json=baselineDatabase,proto3" json:"baseline_database,omitempty"`
+ // The name of the parent branch.
+ // For main branch, it's empty.
+ // For child branch, its format will be: projects/{project}/branches/{branch}
+ ParentBranch string `protobuf:"bytes,9,opt,name=parent_branch,json=parentBranch,proto3" json:"parent_branch,omitempty"`
+ // The etag of the branch.
+ Etag string `protobuf:"bytes,10,opt,name=etag,proto3" json:"etag,omitempty"`
+ // The creator of the branch.
+ // Format: users/{email}
+ Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"`
+ // The updater of the branch.
+ // Format: users/{email}
+ Updater string `protobuf:"bytes,12,opt,name=updater,proto3" json:"updater,omitempty"`
+ // The timestamp when the branch was created.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The timestamp when the branch was last updated.
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+}
+
+func (x *Branch) Reset() {
+ *x = Branch{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Branch) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Branch) ProtoMessage() {}
+
+func (x *Branch) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Branch.ProtoReflect.Descriptor instead.
+func (*Branch) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Branch) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Branch) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *Branch) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+func (x *Branch) GetSchemaMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.SchemaMetadata
+ }
+ return nil
+}
+
+func (x *Branch) GetBaselineSchema() string {
+ if x != nil {
+ return x.BaselineSchema
+ }
+ return ""
+}
+
+func (x *Branch) GetBaselineSchemaMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.BaselineSchemaMetadata
+ }
+ return nil
+}
+
+func (x *Branch) GetEngine() Engine {
+ if x != nil {
+ return x.Engine
+ }
+ return Engine_ENGINE_UNSPECIFIED
+}
+
+func (x *Branch) GetBaselineDatabase() string {
+ if x != nil {
+ return x.BaselineDatabase
+ }
+ return ""
+}
+
+func (x *Branch) GetParentBranch() string {
+ if x != nil {
+ return x.ParentBranch
+ }
+ return ""
+}
+
+func (x *Branch) GetEtag() string {
+ if x != nil {
+ return x.Etag
+ }
+ return ""
+}
+
+func (x *Branch) GetCreator() string {
+ if x != nil {
+ return x.Creator
+ }
+ return ""
+}
+
+func (x *Branch) GetUpdater() string {
+ if x != nil {
+ return x.Updater
+ }
+ return ""
+}
+
+func (x *Branch) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Branch) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+type GetBranchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the branch to retrieve.
+ // Format: projects/{project}/branches/{branch}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetBranchRequest) Reset() {
+ *x = GetBranchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetBranchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetBranchRequest) ProtoMessage() {}
+
+func (x *GetBranchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetBranchRequest.ProtoReflect.Descriptor instead.
+func (*GetBranchRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetBranchRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ListBranchesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent resource of the branch.
+ // Foramt: projects/{project}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // To filter the search result.
+ Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
+ // The maximum number of branches to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 branches will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from a previous `ListBranches` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListBranches` must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ View BranchView `protobuf:"varint,5,opt,name=view,proto3,enum=bytebase.v1.BranchView" json:"view,omitempty"`
+}
+
+func (x *ListBranchesRequest) Reset() {
+ *x = ListBranchesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListBranchesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListBranchesRequest) ProtoMessage() {}
+
+func (x *ListBranchesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListBranchesRequest.ProtoReflect.Descriptor instead.
+func (*ListBranchesRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListBranchesRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListBranchesRequest) GetFilter() string {
+ if x != nil {
+ return x.Filter
+ }
+ return ""
+}
+
+func (x *ListBranchesRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListBranchesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListBranchesRequest) GetView() BranchView {
+ if x != nil {
+ return x.View
+ }
+ return BranchView_BRANCH_VIEW_UNSPECIFIED
+}
+
+type ListBranchesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The branches from the specified request.
+ Branches []*Branch `protobuf:"bytes,1,rep,name=branches,proto3" json:"branches,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListBranchesResponse) Reset() {
+ *x = ListBranchesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListBranchesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListBranchesResponse) ProtoMessage() {}
+
+func (x *ListBranchesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListBranchesResponse.ProtoReflect.Descriptor instead.
+func (*ListBranchesResponse) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ListBranchesResponse) GetBranches() []*Branch {
+ if x != nil {
+ return x.Branches
+ }
+ return nil
+}
+
+func (x *ListBranchesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateBranchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent, which owns this collection of branches.
+ // Format: project/{project}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ Branch *Branch `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"`
+}
+
+func (x *CreateBranchRequest) Reset() {
+ *x = CreateBranchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateBranchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateBranchRequest) ProtoMessage() {}
+
+func (x *CreateBranchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateBranchRequest.ProtoReflect.Descriptor instead.
+func (*CreateBranchRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CreateBranchRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *CreateBranchRequest) GetBranch() *Branch {
+ if x != nil {
+ return x.Branch
+ }
+ return nil
+}
+
+type UpdateBranchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The branch to update.
+ //
+ // The branch's `name` field is used to identify the branch to update.
+ // Format: projects/{project}/branches/{branch}
+ Branch *Branch `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"`
+ // The list of fields to update.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdateBranchRequest) Reset() {
+ *x = UpdateBranchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateBranchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateBranchRequest) ProtoMessage() {}
+
+func (x *UpdateBranchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateBranchRequest.ProtoReflect.Descriptor instead.
+func (*UpdateBranchRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UpdateBranchRequest) GetBranch() *Branch {
+ if x != nil {
+ return x.Branch
+ }
+ return nil
+}
+
+func (x *UpdateBranchRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type MergeBranchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the branch to merge.
+ // Format: projects/{project}/branches/{branch}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The target branch to merge into.
+ // Format: projects/{project}/branches/{branch}
+ TargetName string `protobuf:"bytes,2,opt,name=target_name,json=targetName,proto3" json:"target_name,omitempty"`
+}
+
+func (x *MergeBranchRequest) Reset() {
+ *x = MergeBranchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MergeBranchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MergeBranchRequest) ProtoMessage() {}
+
+func (x *MergeBranchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MergeBranchRequest.ProtoReflect.Descriptor instead.
+func (*MergeBranchRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *MergeBranchRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *MergeBranchRequest) GetTargetName() string {
+ if x != nil {
+ return x.TargetName
+ }
+ return ""
+}
+
+type DeleteBranchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the branch to delete.
+ // Format: projects/{project}/branches/{branch}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *DeleteBranchRequest) Reset() {
+ *x = DeleteBranchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteBranchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteBranchRequest) ProtoMessage() {}
+
+func (x *DeleteBranchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteBranchRequest.ProtoReflect.Descriptor instead.
+func (*DeleteBranchRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *DeleteBranchRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type DiffMetadataRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The metadata of the source schema.
+ SourceMetadata *DatabaseMetadata `protobuf:"bytes,1,opt,name=source_metadata,json=sourceMetadata,proto3" json:"source_metadata,omitempty"`
+ // The metadata of the target schema.
+ TargetMetadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=target_metadata,json=targetMetadata,proto3" json:"target_metadata,omitempty"`
+ // The database engine of the schema.
+ Engine Engine `protobuf:"varint,3,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
+}
+
+func (x *DiffMetadataRequest) Reset() {
+ *x = DiffMetadataRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DiffMetadataRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffMetadataRequest) ProtoMessage() {}
+
+func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
+func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.SourceMetadata
+ }
+ return nil
+}
+
+func (x *DiffMetadataRequest) GetTargetMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.TargetMetadata
+ }
+ return nil
+}
+
+func (x *DiffMetadataRequest) GetEngine() Engine {
+ if x != nil {
+ return x.Engine
+ }
+ return Engine_ENGINE_UNSPECIFIED
+}
+
+type DiffMetadataResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The diff of the metadata.
+ Diff string `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
+}
+
+func (x *DiffMetadataResponse) Reset() {
+ *x = DiffMetadataResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_branch_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DiffMetadataResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffMetadataResponse) ProtoMessage() {}
+
+func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_branch_service_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
+func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
+ return file_v1_branch_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DiffMetadataResponse) GetDiff() string {
+ if x != nil {
+ return x.Diff
+ }
+ return ""
+}
+
+var File_v1_branch_service_proto protoreflect.FileDescriptor
+
+var file_v1_branch_service_proto_rawDesc = []byte{
+ 0x0a, 0x17, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
+ 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,
+ 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f,
+ 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x19, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x05, 0x0a, 0x06, 0x42,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12,
+ 0x1b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0f,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65,
+ 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x12, 0x5c, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69,
+ 0x6e, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45,
+ 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x30, 0x0a,
+ 0x11, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x10, 0x62,
+ 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12,
+ 0x28, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61,
+ 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x1d, 0x0a,
+ 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x07,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x03, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41,
+ 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a,
+ 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03,
+ 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22,
+ 0x2b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a,
+ 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61,
+ 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69,
+ 0x65, 0x77, 0x22, 0x6f, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x62, 0x72,
+ 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e,
+ 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x22, 0x5a, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61,
+ 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22,
+ 0x84, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x03, 0xe0, 0x41,
+ 0x02, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x13, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x13,
+ 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02,
+ 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x12, 0x4b, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74,
+ 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a,
+ 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69,
+ 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69,
+ 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x2a, 0x56, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56,
+ 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+ 0x00, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57,
+ 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52, 0x41, 0x4e,
+ 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xa5,
+ 0x07, 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x70, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1d, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22,
+ 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
+ 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61,
+ 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x3e, 0xda,
+ 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x1e, 0x2f,
+ 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x93, 0x01,
+ 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x4c, 0xda, 0x41, 0x12, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x31, 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,
+ 0x2f, 0x2a, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61,
+ 0x6e, 0x63, 0x68, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x41, 0xda, 0x41, 0x10, 0x6e, 0x61,
+ 0x6d, 0x65, 0x2c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x28, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63,
+ 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x79, 0x0a, 0x0c,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7d, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
+ 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+}
+
+var (
+ file_v1_branch_service_proto_rawDescOnce sync.Once
+ file_v1_branch_service_proto_rawDescData = file_v1_branch_service_proto_rawDesc
+)
+
+func file_v1_branch_service_proto_rawDescGZIP() []byte {
+ file_v1_branch_service_proto_rawDescOnce.Do(func() {
+ file_v1_branch_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_branch_service_proto_rawDescData)
+ })
+ return file_v1_branch_service_proto_rawDescData
+}
+
+var file_v1_branch_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_v1_branch_service_proto_goTypes = []interface{}{
+ (BranchView)(0), // 0: bytebase.v1.BranchView
+ (*Branch)(nil), // 1: bytebase.v1.Branch
+ (*GetBranchRequest)(nil), // 2: bytebase.v1.GetBranchRequest
+ (*ListBranchesRequest)(nil), // 3: bytebase.v1.ListBranchesRequest
+ (*ListBranchesResponse)(nil), // 4: bytebase.v1.ListBranchesResponse
+ (*CreateBranchRequest)(nil), // 5: bytebase.v1.CreateBranchRequest
+ (*UpdateBranchRequest)(nil), // 6: bytebase.v1.UpdateBranchRequest
+ (*MergeBranchRequest)(nil), // 7: bytebase.v1.MergeBranchRequest
+ (*DeleteBranchRequest)(nil), // 8: bytebase.v1.DeleteBranchRequest
+ (*DiffMetadataRequest)(nil), // 9: bytebase.v1.DiffMetadataRequest
+ (*DiffMetadataResponse)(nil), // 10: bytebase.v1.DiffMetadataResponse
+ (*DatabaseMetadata)(nil), // 11: bytebase.v1.DatabaseMetadata
+ (Engine)(0), // 12: bytebase.v1.Engine
+ (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp
+ (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask
+ (*emptypb.Empty)(nil), // 15: google.protobuf.Empty
+}
+var file_v1_branch_service_proto_depIdxs = []int32{
+ 11, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 11, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 12, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine
+ 13, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp
+ 13, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp
+ 0, // 5: bytebase.v1.ListBranchesRequest.view:type_name -> bytebase.v1.BranchView
+ 1, // 6: bytebase.v1.ListBranchesResponse.branches:type_name -> bytebase.v1.Branch
+ 1, // 7: bytebase.v1.CreateBranchRequest.branch:type_name -> bytebase.v1.Branch
+ 1, // 8: bytebase.v1.UpdateBranchRequest.branch:type_name -> bytebase.v1.Branch
+ 14, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 11, // 10: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 11, // 11: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 12, // 12: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
+ 2, // 13: bytebase.v1.BranchService.GetBranch:input_type -> bytebase.v1.GetBranchRequest
+ 3, // 14: bytebase.v1.BranchService.ListBranches:input_type -> bytebase.v1.ListBranchesRequest
+ 5, // 15: bytebase.v1.BranchService.CreateBranch:input_type -> bytebase.v1.CreateBranchRequest
+ 6, // 16: bytebase.v1.BranchService.UpdateBranch:input_type -> bytebase.v1.UpdateBranchRequest
+ 7, // 17: bytebase.v1.BranchService.MergeBranch:input_type -> bytebase.v1.MergeBranchRequest
+ 8, // 18: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest
+ 9, // 19: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
+ 1, // 20: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch
+ 4, // 21: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse
+ 1, // 22: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch
+ 1, // 23: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch
+ 1, // 24: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.Branch
+ 15, // 25: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty
+ 10, // 26: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
+ 20, // [20:27] is the sub-list for method output_type
+ 13, // [13:20] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
+}
+
+func init() { file_v1_branch_service_proto_init() }
+func file_v1_branch_service_proto_init() {
+ if File_v1_branch_service_proto != nil {
+ return
+ }
+ file_v1_common_proto_init()
+ file_v1_database_service_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_v1_branch_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Branch); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetBranchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListBranchesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListBranchesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateBranchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateBranchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MergeBranchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteBranchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DiffMetadataRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_branch_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DiffMetadataResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_v1_branch_service_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 10,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_branch_service_proto_goTypes,
+ DependencyIndexes: file_v1_branch_service_proto_depIdxs,
+ EnumInfos: file_v1_branch_service_proto_enumTypes,
+ MessageInfos: file_v1_branch_service_proto_msgTypes,
+ }.Build()
+ File_v1_branch_service_proto = out.File
+ file_v1_branch_service_proto_rawDesc = nil
+ file_v1_branch_service_proto_goTypes = nil
+ file_v1_branch_service_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/schema_design_service.pb.gw.go b/proto/generated-go/v1/branch_service.pb.gw.go
similarity index 52%
rename from proto/generated-go/v1/schema_design_service.pb.gw.go
rename to proto/generated-go/v1/branch_service.pb.gw.go
index 01fa0ad32f..c7c9792cef 100644
--- a/proto/generated-go/v1/schema_design_service.pb.gw.go
+++ b/proto/generated-go/v1/branch_service.pb.gw.go
@@ -1,5 +1,5 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
-// source: v1/schema_design_service.proto
+// source: v1/branch_service.proto
/*
Package v1 is a reverse proxy.
@@ -31,8 +31,8 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
-func request_SchemaDesignService_GetSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetSchemaDesignRequest
+func request_BranchService_GetBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetBranchRequest
var metadata runtime.ServerMetadata
var (
@@ -52,13 +52,13 @@ func request_SchemaDesignService_GetSchemaDesign_0(ctx context.Context, marshale
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := client.GetSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.GetBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SchemaDesignService_GetSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetSchemaDesignRequest
+func local_request_BranchService_GetBranch_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetBranchRequest
var metadata runtime.ServerMetadata
var (
@@ -78,17 +78,17 @@ func local_request_SchemaDesignService_GetSchemaDesign_0(ctx context.Context, ma
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := server.GetSchemaDesign(ctx, &protoReq)
+ msg, err := server.GetBranch(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_SchemaDesignService_ListSchemaDesigns_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+ filter_BranchService_ListBranches_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
)
-func request_SchemaDesignService_ListSchemaDesigns_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq ListSchemaDesignsRequest
+func request_BranchService_ListBranches_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListBranchesRequest
var metadata runtime.ServerMetadata
var (
@@ -111,17 +111,17 @@ func request_SchemaDesignService_ListSchemaDesigns_0(ctx context.Context, marsha
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_ListSchemaDesigns_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_ListBranches_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.ListSchemaDesigns(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListBranches(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SchemaDesignService_ListSchemaDesigns_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq ListSchemaDesignsRequest
+func local_request_BranchService_ListBranches_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListBranchesRequest
var metadata runtime.ServerMetadata
var (
@@ -144,24 +144,24 @@ func local_request_SchemaDesignService_ListSchemaDesigns_0(ctx context.Context,
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_ListSchemaDesigns_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_ListBranches_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.ListSchemaDesigns(ctx, &protoReq)
+ msg, err := server.ListBranches(ctx, &protoReq)
return msg, metadata, err
}
-func request_SchemaDesignService_CreateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq CreateSchemaDesignRequest
+func request_BranchService_CreateBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateBranchRequest
var metadata runtime.ServerMetadata
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.SchemaDesign); err != nil && err != io.EOF {
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Branch); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -182,20 +182,20 @@ func request_SchemaDesignService_CreateSchemaDesign_0(ctx context.Context, marsh
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
}
- msg, err := client.CreateSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.CreateBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SchemaDesignService_CreateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq CreateSchemaDesignRequest
+func local_request_BranchService_CreateBranch_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateBranchRequest
var metadata runtime.ServerMetadata
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.SchemaDesign); err != nil && err != io.EOF {
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Branch); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -216,28 +216,28 @@ func local_request_SchemaDesignService_CreateSchemaDesign_0(ctx context.Context,
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
}
- msg, err := server.CreateSchemaDesign(ctx, &protoReq)
+ msg, err := server.CreateBranch(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_SchemaDesignService_UpdateSchemaDesign_0 = &utilities.DoubleArray{Encoding: map[string]int{"schema_design": 0, "schemaDesign": 1, "name": 2}, Base: []int{1, 3, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 5, 2, 3, 4}}
+ filter_BranchService_UpdateBranch_0 = &utilities.DoubleArray{Encoding: map[string]int{"branch": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
)
-func request_SchemaDesignService_UpdateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq UpdateSchemaDesignRequest
+func request_BranchService_UpdateBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateBranchRequest
var metadata runtime.ServerMetadata
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.SchemaDesign); err != nil && err != io.EOF {
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Branch); err != nil && 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.SchemaDesign); err != nil {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Branch); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
} else {
protoReq.UpdateMask = fieldMask
@@ -251,41 +251,41 @@ func request_SchemaDesignService_UpdateSchemaDesign_0(ctx context.Context, marsh
_ = err
)
- val, ok = pathParams["schema_design.name"]
+ val, ok = pathParams["branch.name"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_design.name")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "branch.name")
}
- err = runtime.PopulateFieldFromPath(&protoReq, "schema_design.name", val)
+ err = runtime.PopulateFieldFromPath(&protoReq, "branch.name", val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_design.name", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "branch.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_SchemaDesignService_UpdateSchemaDesign_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_UpdateBranch_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.UpdateSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.UpdateBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SchemaDesignService_UpdateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq UpdateSchemaDesignRequest
+func local_request_BranchService_UpdateBranch_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateBranchRequest
var metadata runtime.ServerMetadata
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.SchemaDesign); err != nil && err != io.EOF {
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Branch); err != nil && 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.SchemaDesign); err != nil {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Branch); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
} else {
protoReq.UpdateMask = fieldMask
@@ -299,34 +299,34 @@ func local_request_SchemaDesignService_UpdateSchemaDesign_0(ctx context.Context,
_ = err
)
- val, ok = pathParams["schema_design.name"]
+ val, ok = pathParams["branch.name"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_design.name")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "branch.name")
}
- err = runtime.PopulateFieldFromPath(&protoReq, "schema_design.name", val)
+ err = runtime.PopulateFieldFromPath(&protoReq, "branch.name", val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_design.name", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "branch.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_SchemaDesignService_UpdateSchemaDesign_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_UpdateBranch_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.UpdateSchemaDesign(ctx, &protoReq)
+ msg, err := server.UpdateBranch(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_SchemaDesignService_MergeSchemaDesign_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+ filter_BranchService_MergeBranch_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
)
-func request_SchemaDesignService_MergeSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq MergeSchemaDesignRequest
+func request_BranchService_MergeBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq MergeBranchRequest
var metadata runtime.ServerMetadata
var (
@@ -349,17 +349,17 @@ func request_SchemaDesignService_MergeSchemaDesign_0(ctx context.Context, marsha
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_MergeSchemaDesign_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_MergeBranch_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.MergeSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.MergeBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SchemaDesignService_MergeSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq MergeSchemaDesignRequest
+func local_request_BranchService_MergeBranch_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq MergeBranchRequest
var metadata runtime.ServerMetadata
var (
@@ -382,17 +382,17 @@ func local_request_SchemaDesignService_MergeSchemaDesign_0(ctx context.Context,
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_MergeSchemaDesign_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_MergeBranch_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.MergeSchemaDesign(ctx, &protoReq)
+ msg, err := server.MergeBranch(ctx, &protoReq)
return msg, metadata, err
}
-func request_SchemaDesignService_DeleteSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DeleteSchemaDesignRequest
+func request_BranchService_DeleteBranch_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteBranchRequest
var metadata runtime.ServerMetadata
var (
@@ -412,13 +412,13 @@ func request_SchemaDesignService_DeleteSchemaDesign_0(ctx context.Context, marsh
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := client.DeleteSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.DeleteBranch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SchemaDesignService_DeleteSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DeleteSchemaDesignRequest
+func local_request_BranchService_DeleteBranch_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteBranchRequest
var metadata runtime.ServerMetadata
var (
@@ -438,12 +438,12 @@ func local_request_SchemaDesignService_DeleteSchemaDesign_0(ctx context.Context,
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
- msg, err := server.DeleteSchemaDesign(ctx, &protoReq)
+ msg, err := server.DeleteBranch(ctx, &protoReq)
return msg, metadata, err
}
-func request_SchemaDesignService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func request_BranchService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DiffMetadataRequest
var metadata runtime.ServerMetadata
@@ -460,7 +460,7 @@ func request_SchemaDesignService_DiffMetadata_0(ctx context.Context, marshaler r
}
-func local_request_SchemaDesignService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func local_request_BranchService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DiffMetadataRequest
var metadata runtime.ServerMetadata
@@ -477,13 +477,13 @@ func local_request_SchemaDesignService_DiffMetadata_0(ctx context.Context, marsh
}
-// RegisterSchemaDesignServiceHandlerServer registers the http handlers for service SchemaDesignService to "mux".
-// UnaryRPC :call SchemaDesignServiceServer directly.
+// RegisterBranchServiceHandlerServer registers the http handlers for service BranchService to "mux".
+// UnaryRPC :call BranchServiceServer 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 RegisterSchemaDesignServiceHandlerFromEndpoint instead.
-func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchemaDesignServiceServer) error {
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBranchServiceHandlerFromEndpoint instead.
+func RegisterBranchServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BranchServiceServer) error {
- mux.Handle("GET", pattern_SchemaDesignService_GetSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_BranchService_GetBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -491,12 +491,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/GetSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/GetBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_GetSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_GetBranch_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 {
@@ -504,11 +504,11 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_GetSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_GetBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_SchemaDesignService_ListSchemaDesigns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_BranchService_ListBranches_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -516,12 +516,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/ListSchemaDesigns", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesigns"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/ListBranches", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/branches"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_ListBranches_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 {
@@ -529,11 +529,11 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_ListBranches_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_SchemaDesignService_CreateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_BranchService_CreateBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -541,12 +541,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/CreateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesign"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/CreateBranch", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/branch"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_CreateBranch_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 {
@@ -554,11 +554,11 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_CreateBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("PATCH", pattern_SchemaDesignService_UpdateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("PATCH", pattern_BranchService_UpdateBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -566,12 +566,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/UpdateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{schema_design.name=projects/*/schemaDesigns/*}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/UpdateBranch", runtime.WithHTTPPathPattern("/v1/{branch.name=projects/*/branches/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_UpdateBranch_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 {
@@ -579,11 +579,11 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_UpdateBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_SchemaDesignService_MergeSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_BranchService_MergeBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -591,12 +591,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/MergeSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}:merge"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/MergeBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:merge"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_MergeSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_MergeBranch_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 {
@@ -604,11 +604,11 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_MergeSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_MergeBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("DELETE", pattern_SchemaDesignService_DeleteSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("DELETE", pattern_BranchService_DeleteBranch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -616,12 +616,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/DeleteSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/DeleteBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_DeleteBranch_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 {
@@ -629,11 +629,11 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_DeleteBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_SchemaDesignService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -641,12 +641,12 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SchemaDesignService_DiffMetadata_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_BranchService_DiffMetadata_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 {
@@ -654,16 +654,16 @@ func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.
return
}
- forward_SchemaDesignService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
-// RegisterSchemaDesignServiceHandlerFromEndpoint is same as RegisterSchemaDesignServiceHandler but
+// RegisterBranchServiceHandlerFromEndpoint is same as RegisterBranchServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
-func RegisterSchemaDesignServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+func RegisterBranchServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.DialContext(ctx, endpoint, opts...)
if err != nil {
return err
@@ -683,173 +683,173 @@ func RegisterSchemaDesignServiceHandlerFromEndpoint(ctx context.Context, mux *ru
}()
}()
- return RegisterSchemaDesignServiceHandler(ctx, mux, conn)
+ return RegisterBranchServiceHandler(ctx, mux, conn)
}
-// RegisterSchemaDesignServiceHandler registers the http handlers for service SchemaDesignService to "mux".
+// RegisterBranchServiceHandler registers the http handlers for service BranchService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
-func RegisterSchemaDesignServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
- return RegisterSchemaDesignServiceHandlerClient(ctx, mux, NewSchemaDesignServiceClient(conn))
+func RegisterBranchServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterBranchServiceHandlerClient(ctx, mux, NewBranchServiceClient(conn))
}
-// RegisterSchemaDesignServiceHandlerClient registers the http handlers for service SchemaDesignService
-// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchemaDesignServiceClient".
-// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchemaDesignServiceClient"
+// RegisterBranchServiceHandlerClient registers the http handlers for service BranchService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BranchServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BranchServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "SchemaDesignServiceClient" to call the correct interceptors.
-func RegisterSchemaDesignServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchemaDesignServiceClient) error {
+// "BranchServiceClient" to call the correct interceptors.
+func RegisterBranchServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BranchServiceClient) error {
- mux.Handle("GET", pattern_SchemaDesignService_GetSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_BranchService_GetBranch_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/GetSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/GetBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_GetSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_GetBranch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_GetSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_GetBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_SchemaDesignService_ListSchemaDesigns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_BranchService_ListBranches_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/ListSchemaDesigns", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesigns"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/ListBranches", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/branches"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_ListBranches_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_ListBranches_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_SchemaDesignService_CreateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_BranchService_CreateBranch_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/CreateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesign"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/CreateBranch", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/branch"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_CreateBranch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_CreateBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("PATCH", pattern_SchemaDesignService_UpdateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("PATCH", pattern_BranchService_UpdateBranch_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/UpdateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{schema_design.name=projects/*/schemaDesigns/*}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/UpdateBranch", runtime.WithHTTPPathPattern("/v1/{branch.name=projects/*/branches/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_UpdateBranch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_UpdateBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_SchemaDesignService_MergeSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_BranchService_MergeBranch_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/MergeSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}:merge"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/MergeBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:merge"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_MergeSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_MergeBranch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_MergeSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_MergeBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("DELETE", pattern_SchemaDesignService_DeleteSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("DELETE", pattern_BranchService_DeleteBranch_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/DeleteSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/DeleteBranch", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_DeleteBranch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_DeleteBranch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_SchemaDesignService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_BranchService_DiffMetadata_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)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SchemaDesignService_DiffMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_BranchService_DiffMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SchemaDesignService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_BranchService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -857,33 +857,33 @@ func RegisterSchemaDesignServiceHandlerClient(ctx context.Context, mux *runtime.
}
var (
- pattern_SchemaDesignService_GetSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "name"}, ""))
+ pattern_BranchService_GetBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, ""))
- pattern_SchemaDesignService_ListSchemaDesigns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "schemaDesigns"}, ""))
+ pattern_BranchService_ListBranches_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "branches"}, ""))
- pattern_SchemaDesignService_CreateSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "schemaDesign"}, ""))
+ pattern_BranchService_CreateBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "branch"}, ""))
- pattern_SchemaDesignService_UpdateSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "schema_design.name"}, ""))
+ pattern_BranchService_UpdateBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "branch.name"}, ""))
- pattern_SchemaDesignService_MergeSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "name"}, "merge"))
+ pattern_BranchService_MergeBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, "merge"))
- pattern_SchemaDesignService_DeleteSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "name"}, ""))
+ pattern_BranchService_DeleteBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, ""))
- pattern_SchemaDesignService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))
+ pattern_BranchService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))
)
var (
- forward_SchemaDesignService_GetSchemaDesign_0 = runtime.ForwardResponseMessage
+ forward_BranchService_GetBranch_0 = runtime.ForwardResponseMessage
- forward_SchemaDesignService_ListSchemaDesigns_0 = runtime.ForwardResponseMessage
+ forward_BranchService_ListBranches_0 = runtime.ForwardResponseMessage
- forward_SchemaDesignService_CreateSchemaDesign_0 = runtime.ForwardResponseMessage
+ forward_BranchService_CreateBranch_0 = runtime.ForwardResponseMessage
- forward_SchemaDesignService_UpdateSchemaDesign_0 = runtime.ForwardResponseMessage
+ forward_BranchService_UpdateBranch_0 = runtime.ForwardResponseMessage
- forward_SchemaDesignService_MergeSchemaDesign_0 = runtime.ForwardResponseMessage
+ forward_BranchService_MergeBranch_0 = runtime.ForwardResponseMessage
- forward_SchemaDesignService_DeleteSchemaDesign_0 = runtime.ForwardResponseMessage
+ forward_BranchService_DeleteBranch_0 = runtime.ForwardResponseMessage
- forward_SchemaDesignService_DiffMetadata_0 = runtime.ForwardResponseMessage
+ forward_BranchService_DiffMetadata_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/generated-go/v1/branch_service_grpc.pb.go b/proto/generated-go/v1/branch_service_grpc.pb.go
new file mode 100644
index 0000000000..8bcee391bc
--- /dev/null
+++ b/proto/generated-go/v1/branch_service_grpc.pb.go
@@ -0,0 +1,332 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc (unknown)
+// source: v1/branch_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.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ BranchService_GetBranch_FullMethodName = "/bytebase.v1.BranchService/GetBranch"
+ BranchService_ListBranches_FullMethodName = "/bytebase.v1.BranchService/ListBranches"
+ BranchService_CreateBranch_FullMethodName = "/bytebase.v1.BranchService/CreateBranch"
+ BranchService_UpdateBranch_FullMethodName = "/bytebase.v1.BranchService/UpdateBranch"
+ BranchService_MergeBranch_FullMethodName = "/bytebase.v1.BranchService/MergeBranch"
+ BranchService_DeleteBranch_FullMethodName = "/bytebase.v1.BranchService/DeleteBranch"
+ BranchService_DiffMetadata_FullMethodName = "/bytebase.v1.BranchService/DiffMetadata"
+)
+
+// BranchServiceClient is the client API for BranchService 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.
+type BranchServiceClient interface {
+ GetBranch(ctx context.Context, in *GetBranchRequest, opts ...grpc.CallOption) (*Branch, error)
+ ListBranches(ctx context.Context, in *ListBranchesRequest, opts ...grpc.CallOption) (*ListBranchesResponse, error)
+ CreateBranch(ctx context.Context, in *CreateBranchRequest, opts ...grpc.CallOption) (*Branch, error)
+ UpdateBranch(ctx context.Context, in *UpdateBranchRequest, opts ...grpc.CallOption) (*Branch, error)
+ MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*Branch, error)
+ DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
+}
+
+type branchServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewBranchServiceClient(cc grpc.ClientConnInterface) BranchServiceClient {
+ return &branchServiceClient{cc}
+}
+
+func (c *branchServiceClient) GetBranch(ctx context.Context, in *GetBranchRequest, opts ...grpc.CallOption) (*Branch, error) {
+ out := new(Branch)
+ err := c.cc.Invoke(ctx, BranchService_GetBranch_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *branchServiceClient) ListBranches(ctx context.Context, in *ListBranchesRequest, opts ...grpc.CallOption) (*ListBranchesResponse, error) {
+ out := new(ListBranchesResponse)
+ err := c.cc.Invoke(ctx, BranchService_ListBranches_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *branchServiceClient) CreateBranch(ctx context.Context, in *CreateBranchRequest, opts ...grpc.CallOption) (*Branch, error) {
+ out := new(Branch)
+ err := c.cc.Invoke(ctx, BranchService_CreateBranch_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *branchServiceClient) UpdateBranch(ctx context.Context, in *UpdateBranchRequest, opts ...grpc.CallOption) (*Branch, error) {
+ out := new(Branch)
+ err := c.cc.Invoke(ctx, BranchService_UpdateBranch_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *branchServiceClient) MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*Branch, error) {
+ out := new(Branch)
+ err := c.cc.Invoke(ctx, BranchService_MergeBranch_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *branchServiceClient) DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, BranchService_DeleteBranch_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *branchServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
+ out := new(DiffMetadataResponse)
+ err := c.cc.Invoke(ctx, BranchService_DiffMetadata_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// BranchServiceServer is the server API for BranchService service.
+// All implementations must embed UnimplementedBranchServiceServer
+// for forward compatibility
+type BranchServiceServer interface {
+ GetBranch(context.Context, *GetBranchRequest) (*Branch, error)
+ ListBranches(context.Context, *ListBranchesRequest) (*ListBranchesResponse, error)
+ CreateBranch(context.Context, *CreateBranchRequest) (*Branch, error)
+ UpdateBranch(context.Context, *UpdateBranchRequest) (*Branch, error)
+ MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error)
+ DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error)
+ DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
+ mustEmbedUnimplementedBranchServiceServer()
+}
+
+// UnimplementedBranchServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedBranchServiceServer struct {
+}
+
+func (UnimplementedBranchServiceServer) GetBranch(context.Context, *GetBranchRequest) (*Branch, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetBranch not implemented")
+}
+func (UnimplementedBranchServiceServer) ListBranches(context.Context, *ListBranchesRequest) (*ListBranchesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListBranches not implemented")
+}
+func (UnimplementedBranchServiceServer) CreateBranch(context.Context, *CreateBranchRequest) (*Branch, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateBranch not implemented")
+}
+func (UnimplementedBranchServiceServer) UpdateBranch(context.Context, *UpdateBranchRequest) (*Branch, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateBranch not implemented")
+}
+func (UnimplementedBranchServiceServer) MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method MergeBranch not implemented")
+}
+func (UnimplementedBranchServiceServer) DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteBranch not implemented")
+}
+func (UnimplementedBranchServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DiffMetadata not implemented")
+}
+func (UnimplementedBranchServiceServer) mustEmbedUnimplementedBranchServiceServer() {}
+
+// UnsafeBranchServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to BranchServiceServer will
+// result in compilation errors.
+type UnsafeBranchServiceServer interface {
+ mustEmbedUnimplementedBranchServiceServer()
+}
+
+func RegisterBranchServiceServer(s grpc.ServiceRegistrar, srv BranchServiceServer) {
+ s.RegisterService(&BranchService_ServiceDesc, srv)
+}
+
+func _BranchService_GetBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetBranchRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).GetBranch(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_GetBranch_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).GetBranch(ctx, req.(*GetBranchRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _BranchService_ListBranches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListBranchesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).ListBranches(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_ListBranches_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).ListBranches(ctx, req.(*ListBranchesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _BranchService_CreateBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateBranchRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).CreateBranch(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_CreateBranch_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).CreateBranch(ctx, req.(*CreateBranchRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _BranchService_UpdateBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateBranchRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).UpdateBranch(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_UpdateBranch_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).UpdateBranch(ctx, req.(*UpdateBranchRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _BranchService_MergeBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MergeBranchRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).MergeBranch(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_MergeBranch_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).MergeBranch(ctx, req.(*MergeBranchRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _BranchService_DeleteBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteBranchRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).DeleteBranch(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_DeleteBranch_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).DeleteBranch(ctx, req.(*DeleteBranchRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _BranchService_DiffMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DiffMetadataRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(BranchServiceServer).DiffMetadata(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: BranchService_DiffMetadata_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(BranchServiceServer).DiffMetadata(ctx, req.(*DiffMetadataRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// BranchService_ServiceDesc is the grpc.ServiceDesc for BranchService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var BranchService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.BranchService",
+ HandlerType: (*BranchServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetBranch",
+ Handler: _BranchService_GetBranch_Handler,
+ },
+ {
+ MethodName: "ListBranches",
+ Handler: _BranchService_ListBranches_Handler,
+ },
+ {
+ MethodName: "CreateBranch",
+ Handler: _BranchService_CreateBranch_Handler,
+ },
+ {
+ MethodName: "UpdateBranch",
+ Handler: _BranchService_UpdateBranch_Handler,
+ },
+ {
+ MethodName: "MergeBranch",
+ Handler: _BranchService_MergeBranch_Handler,
+ },
+ {
+ MethodName: "DeleteBranch",
+ Handler: _BranchService_DeleteBranch_Handler,
+ },
+ {
+ MethodName: "DiffMetadata",
+ Handler: _BranchService_DiffMetadata_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/branch_service.proto",
+}
diff --git a/proto/generated-go/v1/schema_design_service.pb.go b/proto/generated-go/v1/schema_design_service.pb.go
deleted file mode 100644
index b221142d42..0000000000
--- a/proto/generated-go/v1/schema_design_service.pb.go
+++ /dev/null
@@ -1,1282 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.31.0
-// protoc (unknown)
-// source: v1/schema_design_service.proto
-
-package v1
-
-import (
- _ "google.golang.org/genproto/googleapis/api/annotations"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- 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"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type SchemaDesignView int32
-
-const (
- // The default / unset value.
- // The API will default to the BASIC view.
- SchemaDesignView_SCHEMA_DESIGN_VIEW_UNSPECIFIED SchemaDesignView = 0
- // Exclude schema, baseline_schema.
- SchemaDesignView_SCHEMA_DESIGN_VIEW_BASIC SchemaDesignView = 1
- // Include everything.
- SchemaDesignView_SCHEMA_DESIGN_VIEW_FULL SchemaDesignView = 2
-)
-
-// Enum value maps for SchemaDesignView.
-var (
- SchemaDesignView_name = map[int32]string{
- 0: "SCHEMA_DESIGN_VIEW_UNSPECIFIED",
- 1: "SCHEMA_DESIGN_VIEW_BASIC",
- 2: "SCHEMA_DESIGN_VIEW_FULL",
- }
- SchemaDesignView_value = map[string]int32{
- "SCHEMA_DESIGN_VIEW_UNSPECIFIED": 0,
- "SCHEMA_DESIGN_VIEW_BASIC": 1,
- "SCHEMA_DESIGN_VIEW_FULL": 2,
- }
-)
-
-func (x SchemaDesignView) Enum() *SchemaDesignView {
- p := new(SchemaDesignView)
- *p = x
- return p
-}
-
-func (x SchemaDesignView) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (SchemaDesignView) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_schema_design_service_proto_enumTypes[0].Descriptor()
-}
-
-func (SchemaDesignView) Type() protoreflect.EnumType {
- return &file_v1_schema_design_service_proto_enumTypes[0]
-}
-
-func (x SchemaDesignView) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use SchemaDesignView.Descriptor instead.
-func (SchemaDesignView) EnumDescriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{0}
-}
-
-type SchemaDesign_Type int32
-
-const (
- SchemaDesign_TYPE_UNSPECIFIED SchemaDesign_Type = 0
- // Main branch type is the main version of schema design. And only allow to be updated/merged with personal drafts.
- SchemaDesign_MAIN_BRANCH SchemaDesign_Type = 1
- // Personal draft type is a copy of the main branch type schema designs.
- SchemaDesign_PERSONAL_DRAFT SchemaDesign_Type = 2
-)
-
-// Enum value maps for SchemaDesign_Type.
-var (
- SchemaDesign_Type_name = map[int32]string{
- 0: "TYPE_UNSPECIFIED",
- 1: "MAIN_BRANCH",
- 2: "PERSONAL_DRAFT",
- }
- SchemaDesign_Type_value = map[string]int32{
- "TYPE_UNSPECIFIED": 0,
- "MAIN_BRANCH": 1,
- "PERSONAL_DRAFT": 2,
- }
-)
-
-func (x SchemaDesign_Type) Enum() *SchemaDesign_Type {
- p := new(SchemaDesign_Type)
- *p = x
- return p
-}
-
-func (x SchemaDesign_Type) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (SchemaDesign_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_schema_design_service_proto_enumTypes[1].Descriptor()
-}
-
-func (SchemaDesign_Type) Type() protoreflect.EnumType {
- return &file_v1_schema_design_service_proto_enumTypes[1]
-}
-
-func (x SchemaDesign_Type) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use SchemaDesign_Type.Descriptor instead.
-func (SchemaDesign_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{0, 0}
-}
-
-type SchemaDesign struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the schema design.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- // {schemaDesign} should be the id of a sheet.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The title of schema design. AKA sheet's name.
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- // The schema of schema design. AKA sheet's statement.
- Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
- // The metadata of the current editing schema.
- SchemaMetadata *DatabaseMetadata `protobuf:"bytes,4,opt,name=schema_metadata,json=schemaMetadata,proto3" json:"schema_metadata,omitempty"`
- // The baseline schema.
- BaselineSchema string `protobuf:"bytes,5,opt,name=baseline_schema,json=baselineSchema,proto3" json:"baseline_schema,omitempty"`
- // The metadata of the baseline schema.
- BaselineSchemaMetadata *DatabaseMetadata `protobuf:"bytes,6,opt,name=baseline_schema_metadata,json=baselineSchemaMetadata,proto3" json:"baseline_schema_metadata,omitempty"`
- // The database engine of the schema design.
- Engine Engine `protobuf:"varint,7,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
- // The name of the baseline database.
- // Format: instances/{instance}/databases/{database}
- BaselineDatabase string `protobuf:"bytes,8,opt,name=baseline_database,json=baselineDatabase,proto3" json:"baseline_database,omitempty"`
- // The name of the baseline sheet.
- // For main branch, its format will be: projects/{project}/sheets/{sheet}
- // For personal draft, its format will be: projects/{project}/schemaDesigns/{schemaDesign}
- ParentBranch string `protobuf:"bytes,9,opt,name=parent_branch,json=parentBranch,proto3" json:"parent_branch,omitempty"`
- // The type of the schema design.
- Type SchemaDesign_Type `protobuf:"varint,11,opt,name=type,proto3,enum=bytebase.v1.SchemaDesign_Type" json:"type,omitempty"`
- // The etag of the schema design.
- Etag string `protobuf:"bytes,12,opt,name=etag,proto3" json:"etag,omitempty"`
- // The creator of the schema design.
- // Format: users/{email}
- Creator string `protobuf:"bytes,14,opt,name=creator,proto3" json:"creator,omitempty"`
- // The updater of the schema design.
- // Format: users/{email}
- Updater string `protobuf:"bytes,15,opt,name=updater,proto3" json:"updater,omitempty"`
- // The timestamp when the schema design was created.
- CreateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
- // The timestamp when the schema design was last updated.
- UpdateTime *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
-}
-
-func (x *SchemaDesign) Reset() {
- *x = SchemaDesign{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *SchemaDesign) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*SchemaDesign) ProtoMessage() {}
-
-func (x *SchemaDesign) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use SchemaDesign.ProtoReflect.Descriptor instead.
-func (*SchemaDesign) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *SchemaDesign) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *SchemaDesign) GetTitle() string {
- if x != nil {
- return x.Title
- }
- return ""
-}
-
-func (x *SchemaDesign) GetSchema() string {
- if x != nil {
- return x.Schema
- }
- return ""
-}
-
-func (x *SchemaDesign) GetSchemaMetadata() *DatabaseMetadata {
- if x != nil {
- return x.SchemaMetadata
- }
- return nil
-}
-
-func (x *SchemaDesign) GetBaselineSchema() string {
- if x != nil {
- return x.BaselineSchema
- }
- return ""
-}
-
-func (x *SchemaDesign) GetBaselineSchemaMetadata() *DatabaseMetadata {
- if x != nil {
- return x.BaselineSchemaMetadata
- }
- return nil
-}
-
-func (x *SchemaDesign) GetEngine() Engine {
- if x != nil {
- return x.Engine
- }
- return Engine_ENGINE_UNSPECIFIED
-}
-
-func (x *SchemaDesign) GetBaselineDatabase() string {
- if x != nil {
- return x.BaselineDatabase
- }
- return ""
-}
-
-func (x *SchemaDesign) GetParentBranch() string {
- if x != nil {
- return x.ParentBranch
- }
- return ""
-}
-
-func (x *SchemaDesign) GetType() SchemaDesign_Type {
- if x != nil {
- return x.Type
- }
- return SchemaDesign_TYPE_UNSPECIFIED
-}
-
-func (x *SchemaDesign) GetEtag() string {
- if x != nil {
- return x.Etag
- }
- return ""
-}
-
-func (x *SchemaDesign) GetCreator() string {
- if x != nil {
- return x.Creator
- }
- return ""
-}
-
-func (x *SchemaDesign) GetUpdater() string {
- if x != nil {
- return x.Updater
- }
- return ""
-}
-
-func (x *SchemaDesign) GetCreateTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreateTime
- }
- return nil
-}
-
-func (x *SchemaDesign) GetUpdateTime() *timestamppb.Timestamp {
- if x != nil {
- return x.UpdateTime
- }
- return nil
-}
-
-type GetSchemaDesignRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the schema design to retrieve.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
-}
-
-func (x *GetSchemaDesignRequest) Reset() {
- *x = GetSchemaDesignRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetSchemaDesignRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetSchemaDesignRequest) ProtoMessage() {}
-
-func (x *GetSchemaDesignRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetSchemaDesignRequest.ProtoReflect.Descriptor instead.
-func (*GetSchemaDesignRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *GetSchemaDesignRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-type ListSchemaDesignsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The parent resource of the schema design.
- // Foramt: projects/{project}
- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
- // To filter the search result.
- Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
- // The maximum number of schema designs to return. The service may return fewer than
- // this value.
- // If unspecified, at most 50 schema designs will be returned.
- // The maximum value is 1000; values above 1000 will be coerced to 1000.
- PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- // A page token, received from a previous `ListSchemaDesigns` call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided to `ListSchemaDesigns` must match
- // the call that provided the page token.
- PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- View SchemaDesignView `protobuf:"varint,5,opt,name=view,proto3,enum=bytebase.v1.SchemaDesignView" json:"view,omitempty"`
-}
-
-func (x *ListSchemaDesignsRequest) Reset() {
- *x = ListSchemaDesignsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ListSchemaDesignsRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListSchemaDesignsRequest) ProtoMessage() {}
-
-func (x *ListSchemaDesignsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListSchemaDesignsRequest.ProtoReflect.Descriptor instead.
-func (*ListSchemaDesignsRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{2}
-}
-
-func (x *ListSchemaDesignsRequest) GetParent() string {
- if x != nil {
- return x.Parent
- }
- return ""
-}
-
-func (x *ListSchemaDesignsRequest) GetFilter() string {
- if x != nil {
- return x.Filter
- }
- return ""
-}
-
-func (x *ListSchemaDesignsRequest) GetPageSize() int32 {
- if x != nil {
- return x.PageSize
- }
- return 0
-}
-
-func (x *ListSchemaDesignsRequest) GetPageToken() string {
- if x != nil {
- return x.PageToken
- }
- return ""
-}
-
-func (x *ListSchemaDesignsRequest) GetView() SchemaDesignView {
- if x != nil {
- return x.View
- }
- return SchemaDesignView_SCHEMA_DESIGN_VIEW_UNSPECIFIED
-}
-
-type ListSchemaDesignsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The schema designs from the specified request.
- SchemaDesigns []*SchemaDesign `protobuf:"bytes,1,rep,name=schema_designs,json=schemaDesigns,proto3" json:"schema_designs,omitempty"`
- // A token, which can be sent as `page_token` to retrieve the next page.
- // If this field is omitted, there are no subsequent pages.
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
-}
-
-func (x *ListSchemaDesignsResponse) Reset() {
- *x = ListSchemaDesignsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *ListSchemaDesignsResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ListSchemaDesignsResponse) ProtoMessage() {}
-
-func (x *ListSchemaDesignsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ListSchemaDesignsResponse.ProtoReflect.Descriptor instead.
-func (*ListSchemaDesignsResponse) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{3}
-}
-
-func (x *ListSchemaDesignsResponse) GetSchemaDesigns() []*SchemaDesign {
- if x != nil {
- return x.SchemaDesigns
- }
- return nil
-}
-
-func (x *ListSchemaDesignsResponse) GetNextPageToken() string {
- if x != nil {
- return x.NextPageToken
- }
- return ""
-}
-
-type CreateSchemaDesignRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The parent, which owns this collection of schema designs.
- // Format: project/{project}
- Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
- SchemaDesign *SchemaDesign `protobuf:"bytes,2,opt,name=schema_design,json=schemaDesign,proto3" json:"schema_design,omitempty"`
-}
-
-func (x *CreateSchemaDesignRequest) Reset() {
- *x = CreateSchemaDesignRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *CreateSchemaDesignRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*CreateSchemaDesignRequest) ProtoMessage() {}
-
-func (x *CreateSchemaDesignRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use CreateSchemaDesignRequest.ProtoReflect.Descriptor instead.
-func (*CreateSchemaDesignRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{4}
-}
-
-func (x *CreateSchemaDesignRequest) GetParent() string {
- if x != nil {
- return x.Parent
- }
- return ""
-}
-
-func (x *CreateSchemaDesignRequest) GetSchemaDesign() *SchemaDesign {
- if x != nil {
- return x.SchemaDesign
- }
- return nil
-}
-
-type UpdateSchemaDesignRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The schema design to update.
- //
- // The schema design's `name` field is used to identify the schema design to update.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- SchemaDesign *SchemaDesign `protobuf:"bytes,1,opt,name=schema_design,json=schemaDesign,proto3" json:"schema_design,omitempty"`
- // The list of fields to update.
- UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
-}
-
-func (x *UpdateSchemaDesignRequest) Reset() {
- *x = UpdateSchemaDesignRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *UpdateSchemaDesignRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*UpdateSchemaDesignRequest) ProtoMessage() {}
-
-func (x *UpdateSchemaDesignRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use UpdateSchemaDesignRequest.ProtoReflect.Descriptor instead.
-func (*UpdateSchemaDesignRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{5}
-}
-
-func (x *UpdateSchemaDesignRequest) GetSchemaDesign() *SchemaDesign {
- if x != nil {
- return x.SchemaDesign
- }
- return nil
-}
-
-func (x *UpdateSchemaDesignRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
- if x != nil {
- return x.UpdateMask
- }
- return nil
-}
-
-type MergeSchemaDesignRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the schema design to merge.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // The target schema design to merge into.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- TargetName string `protobuf:"bytes,2,opt,name=target_name,json=targetName,proto3" json:"target_name,omitempty"`
-}
-
-func (x *MergeSchemaDesignRequest) Reset() {
- *x = MergeSchemaDesignRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *MergeSchemaDesignRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*MergeSchemaDesignRequest) ProtoMessage() {}
-
-func (x *MergeSchemaDesignRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use MergeSchemaDesignRequest.ProtoReflect.Descriptor instead.
-func (*MergeSchemaDesignRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{6}
-}
-
-func (x *MergeSchemaDesignRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *MergeSchemaDesignRequest) GetTargetName() string {
- if x != nil {
- return x.TargetName
- }
- return ""
-}
-
-type DeleteSchemaDesignRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The name of the schema design to delete.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
-}
-
-func (x *DeleteSchemaDesignRequest) Reset() {
- *x = DeleteSchemaDesignRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DeleteSchemaDesignRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DeleteSchemaDesignRequest) ProtoMessage() {}
-
-func (x *DeleteSchemaDesignRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DeleteSchemaDesignRequest.ProtoReflect.Descriptor instead.
-func (*DeleteSchemaDesignRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{7}
-}
-
-func (x *DeleteSchemaDesignRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-type DiffMetadataRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The metadata of the source schema.
- SourceMetadata *DatabaseMetadata `protobuf:"bytes,1,opt,name=source_metadata,json=sourceMetadata,proto3" json:"source_metadata,omitempty"`
- // The metadata of the target schema.
- TargetMetadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=target_metadata,json=targetMetadata,proto3" json:"target_metadata,omitempty"`
- // The database engine of the schema.
- Engine Engine `protobuf:"varint,3,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
-}
-
-func (x *DiffMetadataRequest) Reset() {
- *x = DiffMetadataRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DiffMetadataRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DiffMetadataRequest) ProtoMessage() {}
-
-func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
-func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{8}
-}
-
-func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {
- if x != nil {
- return x.SourceMetadata
- }
- return nil
-}
-
-func (x *DiffMetadataRequest) GetTargetMetadata() *DatabaseMetadata {
- if x != nil {
- return x.TargetMetadata
- }
- return nil
-}
-
-func (x *DiffMetadataRequest) GetEngine() Engine {
- if x != nil {
- return x.Engine
- }
- return Engine_ENGINE_UNSPECIFIED
-}
-
-type DiffMetadataResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // The diff of the metadata.
- Diff string `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
-}
-
-func (x *DiffMetadataResponse) Reset() {
- *x = DiffMetadataResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_schema_design_service_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DiffMetadataResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DiffMetadataResponse) ProtoMessage() {}
-
-func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_schema_design_service_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
-func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
- return file_v1_schema_design_service_proto_rawDescGZIP(), []int{9}
-}
-
-func (x *DiffMetadataResponse) GetDiff() string {
- if x != nil {
- return x.Diff
- }
- return ""
-}
-
-var File_v1_schema_design_service_proto protoreflect.FileDescriptor
-
-var file_v1_schema_design_service_proto_rawDesc = []byte{
- 0x0a, 0x1e, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69,
- 0x67, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
- 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x22, 0xff, 0x05, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
- 0x67, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x06,
- 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
- 0x03, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0f, 0x73, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x12, 0x2c, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
- 0x0e, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
- 0x5c, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a,
- 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69,
- 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x30, 0x0a, 0x11, 0x62, 0x61,
- 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x10, 0x62, 0x61, 0x73, 0x65,
- 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0d,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b,
- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2e,
- 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74,
- 0x61, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x1d,
- 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a,
- 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
- 0xe0, 0x41, 0x03, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0,
- 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40,
- 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
- 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
- 0x22, 0x41, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45,
- 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f,
- 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12,
- 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x52, 0x41, 0x46,
- 0x54, 0x10, 0x02, 0x22, 0x31, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65,
- 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67,
- 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
- 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x31, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x56, 0x69, 0x65,
- 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x85, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74,
- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
- 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,
- 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22,
- 0x73, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44,
- 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64,
- 0x65, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x22, 0x9d, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73,
- 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46,
- 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x59, 0x0a, 0x18, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
- 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x61, 0x72,
- 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
- 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22,
- 0x34, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44,
- 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a,
- 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x0f, 0x74, 0x61,
- 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e,
- 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e,
- 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,
- 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66,
- 0x2a, 0x71, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e,
- 0x56, 0x69, 0x65, 0x77, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x44,
- 0x45, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
- 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x43, 0x48, 0x45,
- 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42,
- 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41,
- 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c,
- 0x4c, 0x10, 0x02, 0x32, 0xd2, 0x08, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0f,
- 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12,
- 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
- 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x22,
- 0x34, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25,
- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67,
- 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67,
- 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0xda, 0x41, 0x00, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
- 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x12, 0xab, 0x01, 0x0a,
- 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73,
- 0x69, 0x67, 0x6e, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x52, 0xda, 0x41, 0x14, 0x70, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x2c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0xbf, 0x01, 0x0a, 0x12, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67,
- 0x6e, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
- 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x22, 0x66, 0xda, 0x41, 0x19, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
- 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
- 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x3a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x32, 0x33, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65,
- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x9d, 0x01, 0x0a,
- 0x11, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
- 0x67, 0x6e, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
- 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x22, 0x46, 0xda, 0x41, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x74, 0x61,
- 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22,
- 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
- 0x67, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x8a, 0x01, 0x0a,
- 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73,
- 0x69, 0x67, 0x6e, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
- 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
- 0x70, 0x74, 0x79, 0x22, 0x34, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x27, 0x2a, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72,
- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44,
- 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7d, 0x0a, 0x0c, 0x44, 0x69, 0x66,
- 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66,
- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
-}
-
-var (
- file_v1_schema_design_service_proto_rawDescOnce sync.Once
- file_v1_schema_design_service_proto_rawDescData = file_v1_schema_design_service_proto_rawDesc
-)
-
-func file_v1_schema_design_service_proto_rawDescGZIP() []byte {
- file_v1_schema_design_service_proto_rawDescOnce.Do(func() {
- file_v1_schema_design_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_schema_design_service_proto_rawDescData)
- })
- return file_v1_schema_design_service_proto_rawDescData
-}
-
-var file_v1_schema_design_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_v1_schema_design_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
-var file_v1_schema_design_service_proto_goTypes = []interface{}{
- (SchemaDesignView)(0), // 0: bytebase.v1.SchemaDesignView
- (SchemaDesign_Type)(0), // 1: bytebase.v1.SchemaDesign.Type
- (*SchemaDesign)(nil), // 2: bytebase.v1.SchemaDesign
- (*GetSchemaDesignRequest)(nil), // 3: bytebase.v1.GetSchemaDesignRequest
- (*ListSchemaDesignsRequest)(nil), // 4: bytebase.v1.ListSchemaDesignsRequest
- (*ListSchemaDesignsResponse)(nil), // 5: bytebase.v1.ListSchemaDesignsResponse
- (*CreateSchemaDesignRequest)(nil), // 6: bytebase.v1.CreateSchemaDesignRequest
- (*UpdateSchemaDesignRequest)(nil), // 7: bytebase.v1.UpdateSchemaDesignRequest
- (*MergeSchemaDesignRequest)(nil), // 8: bytebase.v1.MergeSchemaDesignRequest
- (*DeleteSchemaDesignRequest)(nil), // 9: bytebase.v1.DeleteSchemaDesignRequest
- (*DiffMetadataRequest)(nil), // 10: bytebase.v1.DiffMetadataRequest
- (*DiffMetadataResponse)(nil), // 11: bytebase.v1.DiffMetadataResponse
- (*DatabaseMetadata)(nil), // 12: bytebase.v1.DatabaseMetadata
- (Engine)(0), // 13: bytebase.v1.Engine
- (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp
- (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask
- (*emptypb.Empty)(nil), // 16: google.protobuf.Empty
-}
-var file_v1_schema_design_service_proto_depIdxs = []int32{
- 12, // 0: bytebase.v1.SchemaDesign.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 12, // 1: bytebase.v1.SchemaDesign.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 13, // 2: bytebase.v1.SchemaDesign.engine:type_name -> bytebase.v1.Engine
- 1, // 3: bytebase.v1.SchemaDesign.type:type_name -> bytebase.v1.SchemaDesign.Type
- 14, // 4: bytebase.v1.SchemaDesign.create_time:type_name -> google.protobuf.Timestamp
- 14, // 5: bytebase.v1.SchemaDesign.update_time:type_name -> google.protobuf.Timestamp
- 0, // 6: bytebase.v1.ListSchemaDesignsRequest.view:type_name -> bytebase.v1.SchemaDesignView
- 2, // 7: bytebase.v1.ListSchemaDesignsResponse.schema_designs:type_name -> bytebase.v1.SchemaDesign
- 2, // 8: bytebase.v1.CreateSchemaDesignRequest.schema_design:type_name -> bytebase.v1.SchemaDesign
- 2, // 9: bytebase.v1.UpdateSchemaDesignRequest.schema_design:type_name -> bytebase.v1.SchemaDesign
- 15, // 10: bytebase.v1.UpdateSchemaDesignRequest.update_mask:type_name -> google.protobuf.FieldMask
- 12, // 11: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 12, // 12: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 13, // 13: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
- 3, // 14: bytebase.v1.SchemaDesignService.GetSchemaDesign:input_type -> bytebase.v1.GetSchemaDesignRequest
- 4, // 15: bytebase.v1.SchemaDesignService.ListSchemaDesigns:input_type -> bytebase.v1.ListSchemaDesignsRequest
- 6, // 16: bytebase.v1.SchemaDesignService.CreateSchemaDesign:input_type -> bytebase.v1.CreateSchemaDesignRequest
- 7, // 17: bytebase.v1.SchemaDesignService.UpdateSchemaDesign:input_type -> bytebase.v1.UpdateSchemaDesignRequest
- 8, // 18: bytebase.v1.SchemaDesignService.MergeSchemaDesign:input_type -> bytebase.v1.MergeSchemaDesignRequest
- 9, // 19: bytebase.v1.SchemaDesignService.DeleteSchemaDesign:input_type -> bytebase.v1.DeleteSchemaDesignRequest
- 10, // 20: bytebase.v1.SchemaDesignService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
- 2, // 21: bytebase.v1.SchemaDesignService.GetSchemaDesign:output_type -> bytebase.v1.SchemaDesign
- 5, // 22: bytebase.v1.SchemaDesignService.ListSchemaDesigns:output_type -> bytebase.v1.ListSchemaDesignsResponse
- 2, // 23: bytebase.v1.SchemaDesignService.CreateSchemaDesign:output_type -> bytebase.v1.SchemaDesign
- 2, // 24: bytebase.v1.SchemaDesignService.UpdateSchemaDesign:output_type -> bytebase.v1.SchemaDesign
- 2, // 25: bytebase.v1.SchemaDesignService.MergeSchemaDesign:output_type -> bytebase.v1.SchemaDesign
- 16, // 26: bytebase.v1.SchemaDesignService.DeleteSchemaDesign:output_type -> google.protobuf.Empty
- 11, // 27: bytebase.v1.SchemaDesignService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
- 21, // [21:28] is the sub-list for method output_type
- 14, // [14:21] is the sub-list for method input_type
- 14, // [14:14] is the sub-list for extension type_name
- 14, // [14:14] is the sub-list for extension extendee
- 0, // [0:14] is the sub-list for field type_name
-}
-
-func init() { file_v1_schema_design_service_proto_init() }
-func file_v1_schema_design_service_proto_init() {
- if File_v1_schema_design_service_proto != nil {
- return
- }
- file_v1_common_proto_init()
- file_v1_database_service_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_v1_schema_design_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SchemaDesign); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetSchemaDesignRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListSchemaDesignsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListSchemaDesignsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateSchemaDesignRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateSchemaDesignRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MergeSchemaDesignRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteSchemaDesignRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DiffMetadataRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_schema_design_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DiffMetadataResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_v1_schema_design_service_proto_rawDesc,
- NumEnums: 2,
- NumMessages: 10,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_v1_schema_design_service_proto_goTypes,
- DependencyIndexes: file_v1_schema_design_service_proto_depIdxs,
- EnumInfos: file_v1_schema_design_service_proto_enumTypes,
- MessageInfos: file_v1_schema_design_service_proto_msgTypes,
- }.Build()
- File_v1_schema_design_service_proto = out.File
- file_v1_schema_design_service_proto_rawDesc = nil
- file_v1_schema_design_service_proto_goTypes = nil
- file_v1_schema_design_service_proto_depIdxs = nil
-}
diff --git a/proto/generated-go/v1/schema_design_service_grpc.pb.go b/proto/generated-go/v1/schema_design_service_grpc.pb.go
deleted file mode 100644
index cb0142f87a..0000000000
--- a/proto/generated-go/v1/schema_design_service_grpc.pb.go
+++ /dev/null
@@ -1,332 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-// versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc (unknown)
-// source: v1/schema_design_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.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
-
-const (
- SchemaDesignService_GetSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/GetSchemaDesign"
- SchemaDesignService_ListSchemaDesigns_FullMethodName = "/bytebase.v1.SchemaDesignService/ListSchemaDesigns"
- SchemaDesignService_CreateSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/CreateSchemaDesign"
- SchemaDesignService_UpdateSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/UpdateSchemaDesign"
- SchemaDesignService_MergeSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/MergeSchemaDesign"
- SchemaDesignService_DeleteSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/DeleteSchemaDesign"
- SchemaDesignService_DiffMetadata_FullMethodName = "/bytebase.v1.SchemaDesignService/DiffMetadata"
-)
-
-// SchemaDesignServiceClient is the client API for SchemaDesignService 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.
-type SchemaDesignServiceClient interface {
- GetSchemaDesign(ctx context.Context, in *GetSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
- ListSchemaDesigns(ctx context.Context, in *ListSchemaDesignsRequest, opts ...grpc.CallOption) (*ListSchemaDesignsResponse, error)
- CreateSchemaDesign(ctx context.Context, in *CreateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
- UpdateSchemaDesign(ctx context.Context, in *UpdateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
- MergeSchemaDesign(ctx context.Context, in *MergeSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
- DeleteSchemaDesign(ctx context.Context, in *DeleteSchemaDesignRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
-}
-
-type schemaDesignServiceClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewSchemaDesignServiceClient(cc grpc.ClientConnInterface) SchemaDesignServiceClient {
- return &schemaDesignServiceClient{cc}
-}
-
-func (c *schemaDesignServiceClient) GetSchemaDesign(ctx context.Context, in *GetSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
- out := new(SchemaDesign)
- err := c.cc.Invoke(ctx, SchemaDesignService_GetSchemaDesign_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *schemaDesignServiceClient) ListSchemaDesigns(ctx context.Context, in *ListSchemaDesignsRequest, opts ...grpc.CallOption) (*ListSchemaDesignsResponse, error) {
- out := new(ListSchemaDesignsResponse)
- err := c.cc.Invoke(ctx, SchemaDesignService_ListSchemaDesigns_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *schemaDesignServiceClient) CreateSchemaDesign(ctx context.Context, in *CreateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
- out := new(SchemaDesign)
- err := c.cc.Invoke(ctx, SchemaDesignService_CreateSchemaDesign_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *schemaDesignServiceClient) UpdateSchemaDesign(ctx context.Context, in *UpdateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
- out := new(SchemaDesign)
- err := c.cc.Invoke(ctx, SchemaDesignService_UpdateSchemaDesign_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *schemaDesignServiceClient) MergeSchemaDesign(ctx context.Context, in *MergeSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
- out := new(SchemaDesign)
- err := c.cc.Invoke(ctx, SchemaDesignService_MergeSchemaDesign_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *schemaDesignServiceClient) DeleteSchemaDesign(ctx context.Context, in *DeleteSchemaDesignRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, SchemaDesignService_DeleteSchemaDesign_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *schemaDesignServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
- out := new(DiffMetadataResponse)
- err := c.cc.Invoke(ctx, SchemaDesignService_DiffMetadata_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// SchemaDesignServiceServer is the server API for SchemaDesignService service.
-// All implementations must embed UnimplementedSchemaDesignServiceServer
-// for forward compatibility
-type SchemaDesignServiceServer interface {
- GetSchemaDesign(context.Context, *GetSchemaDesignRequest) (*SchemaDesign, error)
- ListSchemaDesigns(context.Context, *ListSchemaDesignsRequest) (*ListSchemaDesignsResponse, error)
- CreateSchemaDesign(context.Context, *CreateSchemaDesignRequest) (*SchemaDesign, error)
- UpdateSchemaDesign(context.Context, *UpdateSchemaDesignRequest) (*SchemaDesign, error)
- MergeSchemaDesign(context.Context, *MergeSchemaDesignRequest) (*SchemaDesign, error)
- DeleteSchemaDesign(context.Context, *DeleteSchemaDesignRequest) (*emptypb.Empty, error)
- DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
- mustEmbedUnimplementedSchemaDesignServiceServer()
-}
-
-// UnimplementedSchemaDesignServiceServer must be embedded to have forward compatible implementations.
-type UnimplementedSchemaDesignServiceServer struct {
-}
-
-func (UnimplementedSchemaDesignServiceServer) GetSchemaDesign(context.Context, *GetSchemaDesignRequest) (*SchemaDesign, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetSchemaDesign not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) ListSchemaDesigns(context.Context, *ListSchemaDesignsRequest) (*ListSchemaDesignsResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListSchemaDesigns not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) CreateSchemaDesign(context.Context, *CreateSchemaDesignRequest) (*SchemaDesign, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateSchemaDesign not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) UpdateSchemaDesign(context.Context, *UpdateSchemaDesignRequest) (*SchemaDesign, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateSchemaDesign not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) MergeSchemaDesign(context.Context, *MergeSchemaDesignRequest) (*SchemaDesign, error) {
- return nil, status.Errorf(codes.Unimplemented, "method MergeSchemaDesign not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) DeleteSchemaDesign(context.Context, *DeleteSchemaDesignRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteSchemaDesign not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DiffMetadata not implemented")
-}
-func (UnimplementedSchemaDesignServiceServer) mustEmbedUnimplementedSchemaDesignServiceServer() {}
-
-// UnsafeSchemaDesignServiceServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to SchemaDesignServiceServer will
-// result in compilation errors.
-type UnsafeSchemaDesignServiceServer interface {
- mustEmbedUnimplementedSchemaDesignServiceServer()
-}
-
-func RegisterSchemaDesignServiceServer(s grpc.ServiceRegistrar, srv SchemaDesignServiceServer) {
- s.RegisterService(&SchemaDesignService_ServiceDesc, srv)
-}
-
-func _SchemaDesignService_GetSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetSchemaDesignRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).GetSchemaDesign(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_GetSchemaDesign_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).GetSchemaDesign(ctx, req.(*GetSchemaDesignRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _SchemaDesignService_ListSchemaDesigns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListSchemaDesignsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).ListSchemaDesigns(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_ListSchemaDesigns_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).ListSchemaDesigns(ctx, req.(*ListSchemaDesignsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _SchemaDesignService_CreateSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreateSchemaDesignRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).CreateSchemaDesign(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_CreateSchemaDesign_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).CreateSchemaDesign(ctx, req.(*CreateSchemaDesignRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _SchemaDesignService_UpdateSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UpdateSchemaDesignRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).UpdateSchemaDesign(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_UpdateSchemaDesign_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).UpdateSchemaDesign(ctx, req.(*UpdateSchemaDesignRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _SchemaDesignService_MergeSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(MergeSchemaDesignRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).MergeSchemaDesign(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_MergeSchemaDesign_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).MergeSchemaDesign(ctx, req.(*MergeSchemaDesignRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _SchemaDesignService_DeleteSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteSchemaDesignRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).DeleteSchemaDesign(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_DeleteSchemaDesign_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).DeleteSchemaDesign(ctx, req.(*DeleteSchemaDesignRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _SchemaDesignService_DiffMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DiffMetadataRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SchemaDesignServiceServer).DiffMetadata(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SchemaDesignService_DiffMetadata_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SchemaDesignServiceServer).DiffMetadata(ctx, req.(*DiffMetadataRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-// SchemaDesignService_ServiceDesc is the grpc.ServiceDesc for SchemaDesignService service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var SchemaDesignService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "bytebase.v1.SchemaDesignService",
- HandlerType: (*SchemaDesignServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GetSchemaDesign",
- Handler: _SchemaDesignService_GetSchemaDesign_Handler,
- },
- {
- MethodName: "ListSchemaDesigns",
- Handler: _SchemaDesignService_ListSchemaDesigns_Handler,
- },
- {
- MethodName: "CreateSchemaDesign",
- Handler: _SchemaDesignService_CreateSchemaDesign_Handler,
- },
- {
- MethodName: "UpdateSchemaDesign",
- Handler: _SchemaDesignService_UpdateSchemaDesign_Handler,
- },
- {
- MethodName: "MergeSchemaDesign",
- Handler: _SchemaDesignService_MergeSchemaDesign_Handler,
- },
- {
- MethodName: "DeleteSchemaDesign",
- Handler: _SchemaDesignService_DeleteSchemaDesign_Handler,
- },
- {
- MethodName: "DiffMetadata",
- Handler: _SchemaDesignService_DiffMetadata_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "v1/schema_design_service.proto",
-}
diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.proto
new file mode 100644
index 0000000000..98a7883784
--- /dev/null
+++ b/proto/v1/branch_service.proto
@@ -0,0 +1,211 @@
+syntax = "proto3";
+
+package bytebase.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "v1/common.proto";
+import "v1/database_service.proto";
+
+option go_package = "generated-go/v1";
+
+service BranchService {
+ rpc GetBranch(GetBranchRequest) returns (Branch) {
+ option (google.api.http) = {get: "/v1/{name=projects/*/branches/*}"};
+ option (google.api.method_signature) = "name";
+ }
+
+ rpc ListBranches(ListBranchesRequest) returns (ListBranchesResponse) {
+ option (google.api.http) = {get: "/v1/{parent=projects/*}/branches"};
+ option (google.api.method_signature) = "";
+ }
+
+ rpc CreateBranch(CreateBranchRequest) returns (Branch) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/branch"
+ body: "branch"
+ };
+ option (google.api.method_signature) = "parent,branch";
+ }
+
+ rpc UpdateBranch(UpdateBranchRequest) returns (Branch) {
+ option (google.api.http) = {
+ patch: "/v1/{branch.name=projects/*/branches/*}"
+ body: "branch"
+ };
+ option (google.api.method_signature) = "branch,update_mask";
+ }
+
+ rpc MergeBranch(MergeBranchRequest) returns (Branch) {
+ option (google.api.http) = {post: "/v1/{name=projects/*/branches/*}:merge"};
+ option (google.api.method_signature) = "name,target_name";
+ }
+
+ rpc DeleteBranch(DeleteBranchRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {delete: "/v1/{name=projects/*/branches/*}"};
+ option (google.api.method_signature) = "name";
+ }
+
+ rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
+ option (google.api.http) = {
+ post: "/v1/schemaDesign:diffMetadata"
+ body: "*"
+ };
+ }
+}
+
+enum BranchView {
+ // The default / unset value.
+ // The API will default to the BASIC view.
+ BRANCH_VIEW_UNSPECIFIED = 0;
+
+ // Exclude schema, baseline_schema.
+ BRANCH_VIEW_BASIC = 1;
+ // Include everything.
+ BRANCH_VIEW_FULL = 2;
+}
+
+message Branch {
+ // The name of the branch.
+ // Format: projects/{project}/branches/{branch}
+ // {branch} should be the id of a sheet.
+ string name = 1;
+
+ // The title of branch. AKA sheet's name.
+ string title = 2;
+
+ // The schema of branch. AKA sheet's statement.
+ string schema = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The metadata of the current editing schema.
+ DatabaseMetadata schema_metadata = 4;
+
+ // The baseline schema.
+ string baseline_schema = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The metadata of the baseline schema.
+ DatabaseMetadata baseline_schema_metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The database engine of the branch.
+ Engine engine = 7;
+
+ // The name of the baseline database.
+ // Format: instances/{instance}/databases/{database}
+ string baseline_database = 8 [(google.api.field_behavior) = IMMUTABLE];
+
+ // The name of the parent branch.
+ // For main branch, it's empty.
+ // For child branch, its format will be: projects/{project}/branches/{branch}
+ string parent_branch = 9 [(google.api.field_behavior) = IMMUTABLE];
+
+ // The etag of the branch.
+ string etag = 10;
+
+ // The creator of the branch.
+ // Format: users/{email}
+ string creator = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The updater of the branch.
+ // Format: users/{email}
+ string updater = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The timestamp when the branch was created.
+ google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The timestamp when the branch was last updated.
+ google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+message GetBranchRequest {
+ // The name of the branch to retrieve.
+ // Format: projects/{project}/branches/{branch}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message ListBranchesRequest {
+ // The parent resource of the branch.
+ // Foramt: projects/{project}
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // To filter the search result.
+ string filter = 2;
+
+ // The maximum number of branches to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 branches will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 3;
+
+ // A page token, received from a previous `ListBranches` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListBranches` must match
+ // the call that provided the page token.
+ string page_token = 4;
+
+ BranchView view = 5;
+}
+
+message ListBranchesResponse {
+ // The branches from the specified request.
+ repeated Branch branches = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+message CreateBranchRequest {
+ // The parent, which owns this collection of branches.
+ // Format: project/{project}
+ string parent = 1;
+
+ Branch branch = 2;
+}
+
+message UpdateBranchRequest {
+ // The branch to update.
+ //
+ // The branch's `name` field is used to identify the branch to update.
+ // Format: projects/{project}/branches/{branch}
+ Branch branch = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to update.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+message MergeBranchRequest {
+ // The name of the branch to merge.
+ // Format: projects/{project}/branches/{branch}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The target branch to merge into.
+ // Format: projects/{project}/branches/{branch}
+ string target_name = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message DeleteBranchRequest {
+ // The name of the branch to delete.
+ // Format: projects/{project}/branches/{branch}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message DiffMetadataRequest {
+ // The metadata of the source schema.
+ DatabaseMetadata source_metadata = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The metadata of the target schema.
+ DatabaseMetadata target_metadata = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The database engine of the schema.
+ Engine engine = 3;
+}
+
+message DiffMetadataResponse {
+ // The diff of the metadata.
+ string diff = 1;
+}
diff --git a/proto/v1/schema_design_service.proto b/proto/v1/schema_design_service.proto
deleted file mode 100644
index b1fbb619f7..0000000000
--- a/proto/v1/schema_design_service.proto
+++ /dev/null
@@ -1,221 +0,0 @@
-syntax = "proto3";
-
-package bytebase.v1;
-
-import "google/api/annotations.proto";
-import "google/api/client.proto";
-import "google/api/field_behavior.proto";
-import "google/protobuf/empty.proto";
-import "google/protobuf/field_mask.proto";
-import "google/protobuf/timestamp.proto";
-import "v1/common.proto";
-import "v1/database_service.proto";
-
-option go_package = "generated-go/v1";
-
-service SchemaDesignService {
- rpc GetSchemaDesign(GetSchemaDesignRequest) returns (SchemaDesign) {
- option (google.api.http) = {get: "/v1/{name=projects/*/schemaDesigns/*}"};
- option (google.api.method_signature) = "name";
- }
-
- rpc ListSchemaDesigns(ListSchemaDesignsRequest) returns (ListSchemaDesignsResponse) {
- option (google.api.http) = {get: "/v1/{parent=projects/*}/schemaDesigns"};
- option (google.api.method_signature) = "";
- }
-
- rpc CreateSchemaDesign(CreateSchemaDesignRequest) returns (SchemaDesign) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*}/schemaDesign"
- body: "schema_design"
- };
- option (google.api.method_signature) = "parent,schema_design";
- }
-
- rpc UpdateSchemaDesign(UpdateSchemaDesignRequest) returns (SchemaDesign) {
- option (google.api.http) = {
- patch: "/v1/{schema_design.name=projects/*/schemaDesigns/*}"
- body: "schema_design"
- };
- option (google.api.method_signature) = "schema_design,update_mask";
- }
-
- rpc MergeSchemaDesign(MergeSchemaDesignRequest) returns (SchemaDesign) {
- option (google.api.http) = {post: "/v1/{name=projects/*/schemaDesigns/*}:merge"};
- option (google.api.method_signature) = "name,target_name";
- }
-
- rpc DeleteSchemaDesign(DeleteSchemaDesignRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {delete: "/v1/{name=projects/*/schemaDesigns/*}"};
- option (google.api.method_signature) = "name";
- }
-
- rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
- option (google.api.http) = {
- post: "/v1/schemaDesign:diffMetadata"
- body: "*"
- };
- }
-}
-
-enum SchemaDesignView {
- // The default / unset value.
- // The API will default to the BASIC view.
- SCHEMA_DESIGN_VIEW_UNSPECIFIED = 0;
-
- // Exclude schema, baseline_schema.
- SCHEMA_DESIGN_VIEW_BASIC = 1;
- // Include everything.
- SCHEMA_DESIGN_VIEW_FULL = 2;
-}
-
-message SchemaDesign {
- // The name of the schema design.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- // {schemaDesign} should be the id of a sheet.
- string name = 1;
-
- // The title of schema design. AKA sheet's name.
- string title = 2;
-
- // The schema of schema design. AKA sheet's statement.
- string schema = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The metadata of the current editing schema.
- DatabaseMetadata schema_metadata = 4;
-
- // The baseline schema.
- string baseline_schema = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The metadata of the baseline schema.
- DatabaseMetadata baseline_schema_metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The database engine of the schema design.
- Engine engine = 7;
-
- // The name of the baseline database.
- // Format: instances/{instance}/databases/{database}
- string baseline_database = 8 [(google.api.field_behavior) = IMMUTABLE];
-
- // The name of the baseline sheet.
- // For main branch, its format will be: projects/{project}/sheets/{sheet}
- // For personal draft, its format will be: projects/{project}/schemaDesigns/{schemaDesign}
- string parent_branch = 9 [(google.api.field_behavior) = IMMUTABLE];
-
- enum Type {
- TYPE_UNSPECIFIED = 0;
- // Main branch type is the main version of schema design. And only allow to be updated/merged with personal drafts.
- MAIN_BRANCH = 1;
- // Personal draft type is a copy of the main branch type schema designs.
- PERSONAL_DRAFT = 2;
- }
- // The type of the schema design.
- Type type = 11;
-
- // The etag of the schema design.
- string etag = 12;
-
- // The creator of the schema design.
- // Format: users/{email}
- string creator = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The updater of the schema design.
- // Format: users/{email}
- string updater = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The timestamp when the schema design was created.
- google.protobuf.Timestamp create_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The timestamp when the schema design was last updated.
- google.protobuf.Timestamp update_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
-}
-
-message GetSchemaDesignRequest {
- // The name of the schema design to retrieve.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- string name = 1 [(google.api.field_behavior) = REQUIRED];
-}
-
-message ListSchemaDesignsRequest {
- // The parent resource of the schema design.
- // Foramt: projects/{project}
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
-
- // To filter the search result.
- string filter = 2;
-
- // The maximum number of schema designs to return. The service may return fewer than
- // this value.
- // If unspecified, at most 50 schema designs will be returned.
- // The maximum value is 1000; values above 1000 will be coerced to 1000.
- int32 page_size = 3;
-
- // A page token, received from a previous `ListSchemaDesigns` call.
- // Provide this to retrieve the subsequent page.
- //
- // When paginating, all other parameters provided to `ListSchemaDesigns` must match
- // the call that provided the page token.
- string page_token = 4;
-
- SchemaDesignView view = 5;
-}
-
-message ListSchemaDesignsResponse {
- // The schema designs from the specified request.
- repeated SchemaDesign schema_designs = 1;
-
- // A token, which can be sent as `page_token` to retrieve the next page.
- // If this field is omitted, there are no subsequent pages.
- string next_page_token = 2;
-}
-
-message CreateSchemaDesignRequest {
- // The parent, which owns this collection of schema designs.
- // Format: project/{project}
- string parent = 1;
-
- SchemaDesign schema_design = 2;
-}
-
-message UpdateSchemaDesignRequest {
- // The schema design to update.
- //
- // The schema design's `name` field is used to identify the schema design to update.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- SchemaDesign schema_design = 1 [(google.api.field_behavior) = REQUIRED];
-
- // The list of fields to update.
- google.protobuf.FieldMask update_mask = 2;
-}
-
-message MergeSchemaDesignRequest {
- // The name of the schema design to merge.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- string name = 1 [(google.api.field_behavior) = REQUIRED];
-
- // The target schema design to merge into.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- string target_name = 2 [(google.api.field_behavior) = REQUIRED];
-}
-
-message DeleteSchemaDesignRequest {
- // The name of the schema design to delete.
- // Format: projects/{project}/schemaDesigns/{schemaDesign}
- string name = 1 [(google.api.field_behavior) = REQUIRED];
-}
-
-message DiffMetadataRequest {
- // The metadata of the source schema.
- DatabaseMetadata source_metadata = 1 [(google.api.field_behavior) = REQUIRED];
-
- // The metadata of the target schema.
- DatabaseMetadata target_metadata = 2 [(google.api.field_behavior) = REQUIRED];
-
- // The database engine of the schema.
- Engine engine = 3;
-}
-
-message DiffMetadataResponse {
- // The diff of the metadata.
- string diff = 1;
-}