Skip to content

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

refactor: rename schema design to branch (#10159)

h3n4l2c549261dde2
diff --git a/backend/api/v1/branch_service.go b/backend/api/v1/branch_service.go
index d9c93252a9..a2d8e6bd8f 100644
--- a/backend/api/v1/branch_service.go
+++ b/backend/api/v1/branch_service.go
@@ -795,7 +795,7 @@ func (s *BranchService) convertBranchToBranch(ctx context.Context, project *stor
}
}
- schemaDesign := &v1pb.Branch{
+ v1Branch := &v1pb.Branch{
Name: fmt.Sprintf("%s%s/%s%v", common.ProjectNamePrefix, project.ResourceID, common.BranchPrefix, branch.ResourceID),
BranchId: branch.ResourceID,
Etag: fmt.Sprintf("%d", branch.UpdatedTime.UnixMilli()),
@@ -809,14 +809,14 @@ func (s *BranchService) convertBranchToBranch(ctx context.Context, project *stor
}
if view != v1pb.BranchView_BRANCH_VIEW_FULL {
- return schemaDesign, nil
+ return v1Branch, nil
}
- schemaDesign.Schema = string(branch.HeadSchema)
- schemaDesign.SchemaMetadata = convertStoreDatabaseMetadata(branch.Head.Metadata, branch.Head.DatabaseConfig, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil /* filter */)
- schemaDesign.BaselineSchema = string(branch.BaseSchema)
- schemaDesign.BaselineSchemaMetadata = convertStoreDatabaseMetadata(branch.Base.Metadata, branch.Base.DatabaseConfig, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil /* filter */)
- return schemaDesign, nil
+ v1Branch.Schema = string(branch.HeadSchema)
+ v1Branch.SchemaMetadata = convertStoreDatabaseMetadata(branch.Head.Metadata, branch.Head.DatabaseConfig, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil /* filter */)
+ v1Branch.BaselineSchema = string(branch.BaseSchema)
+ v1Branch.BaselineSchemaMetadata = convertStoreDatabaseMetadata(branch.Base.Metadata, branch.Base.DatabaseConfig, v1pb.DatabaseMetadataView_DATABASE_METADATA_VIEW_FULL, nil /* filter */)
+ return v1Branch, nil
}
func sanitizeCommentForSchemaMetadata(dbSchema *storepb.DatabaseSchemaMetadata) {
diff --git a/backend/store/branch.go b/backend/store/branch.go
index fca6fc49aa..4ac8379ebe 100644
--- a/backend/store/branch.go
+++ b/backend/store/branch.go
@@ -17,6 +17,7 @@ import (
type BranchMessage struct {
ProjectID string
ResourceID string
+ CreatorID int
Engine storepb.Engine
Config *storepb.BranchConfig
@@ -27,7 +28,6 @@ type BranchMessage struct {
// Output only fields
UID int
- CreatorID int
UpdaterID int
CreatedTime time.Time
UpdatedTime time.Time