Skip to content

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

refactor!: move SchemaChangeType to release level (#18750)

Danny Xu1ceed7ead04d
diff --git a/action/command/check.go b/action/command/check.go
index 943a2ef291..54dbde59d5 100644
--- a/action/command/check.go
+++ b/action/command/check.go
@@ -66,9 +66,16 @@ func runCheck(w *world.World) func(*cobra.Command, []string) error {
if err != nil {
return err
}
+ releaseType := v1pb.Release_VERSIONED
+ if w.Declarative {
+ releaseType = v1pb.Release_DECLARATIVE
+ }
checkReleaseResponse, err := client.CheckRelease(cmd.Context(), &v1pb.CheckReleaseRequest{
- Parent: w.Project,
- Release: &v1pb.Release{Files: releaseFiles},
+ Parent: w.Project,
+ Release: &v1pb.Release{
+ Files: releaseFiles,
+ Type: releaseType,
+ },
Targets: w.Targets,
CustomRules: w.CustomRules,
})
diff --git a/action/command/file.go b/action/command/file.go
index 503d0cb0a3..6c3119c73e 100644
--- a/action/command/file.go
+++ b/action/command/file.go
@@ -58,7 +58,6 @@ func getReleaseFiles(w *world.World) ([]*v1pb.Release_File, string, error) {
{
// use file pattern as the path
Path: w.FilePattern,
- Type: v1pb.Release_File_DECLARATIVE,
Version: w.CurrentTime.Format(versionFormat),
EnableGhost: false,
Statement: contents,
@@ -80,7 +79,6 @@ func getReleaseFiles(w *world.World) ([]*v1pb.Release_File, string, error) {
}
files = append(files, &v1pb.Release_File{
Path: m,
- Type: v1pb.Release_File_DECLARATIVE,
Version: w.CurrentTime.Format(versionFormat),
EnableGhost: false,
Statement: content,
@@ -115,7 +113,6 @@ func getReleaseFiles(w *world.World) ([]*v1pb.Release_File, string, error) {
}
files = append(files, &v1pb.Release_File{
Path: m,
- Type: v1pb.Release_File_VERSIONED,
Version: version,
EnableGhost: t,
Statement: content,
diff --git a/action/command/rollout.go b/action/command/rollout.go
index 5457e8d600..c9d9194cdc 100644
--- a/action/command/rollout.go
+++ b/action/command/rollout.go
@@ -89,11 +89,16 @@ func runRollout(w *world.World) func(command *cobra.Command, _ []string) error {
w.Logger.Info("found release by digest", "url", fmt.Sprintf("%s/%s", client.url, searchRelease.Name))
release = searchRelease.Name
} else {
+ releaseType := v1pb.Release_VERSIONED
+ if w.Declarative {
+ releaseType = v1pb.Release_DECLARATIVE
+ }
createReleaseResponse, err := client.CreateRelease(ctx, w.Project, &v1pb.Release{
Title: w.ReleaseTitle,
Files: releaseFiles,
VcsSource: getVCSSource(w),
Digest: releaseDigest,
+ Type: releaseType,
})
if err != nil {
return errors.Wrapf(err, "failed to create release")
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index 5d0690efa6..3468714134 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -13838,6 +13838,10 @@ components:
The user can provide the digest of the release. It can be used later to retrieve the release in GetRelease.
Whether to provide digest and how to generate it is up to the user.
If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned.
+ type:
+ title: type
+ description: The type of schema change for all files in this release.
+ $ref: '#/components/schemas/bytebase.v1.Release.Type'
title: Release
additionalProperties: false
bytebase.v1.Release.File:
@@ -13851,10 +13855,6 @@ components:
type: string
title: path
description: The path of the file. e.g., `2.2/V0001_create_table.sql`.
- type:
- title: type
- description: The type of the file.
- $ref: '#/components/schemas/bytebase.v1.Release.File.Type'
version:
type: string
title: version
@@ -13884,14 +13884,14 @@ components:
title: File
additionalProperties: false
description: A SQL file in a release.
- bytebase.v1.Release.File.Type:
+ bytebase.v1.Release.Type:
type: string
title: Type
enum:
- TYPE_UNSPECIFIED
- VERSIONED
- DECLARATIVE
- description: The type of migration file.
+ description: The type of schema change.
bytebase.v1.Release.VCSSource:
type: object
properties:
diff --git a/backend/api/v1/release_service.go b/backend/api/v1/release_service.go
index 88b903d664..0258dadc92 100644
--- a/backend/api/v1/release_service.go
+++ b/backend/api/v1/release_service.go
@@ -64,7 +64,7 @@ func (s *ReleaseService) CreateRelease(ctx context.Context, req *connect.Request
return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project %s not found", projectID))
}
- sanitizedFiles, err := validateAndSanitizeReleaseFiles(ctx, s.store, req.Msg.Release.Files, true)
+ sanitizedFiles, err := validateAndSanitizeReleaseFiles(ctx, s.store, req.Msg.Release.Files, req.Msg.Release.Type)
if err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrapf(err, "invalid release files"))
}
@@ -105,6 +105,7 @@ func (s *ReleaseService) CreateRelease(ctx context.Context, req *connect.Request
Payload: &storepb.ReleasePayload{
Title: req.Msg.Release.Title,
VcsSource: convertReleaseVcsSource(req.Msg.Release.VcsSource),
+ Type: storepb.SchemaChangeType(req.Msg.Release.Type),
},
}
@@ -129,7 +130,6 @@ func (s *ReleaseService) CreateRelease(ctx context.Context, req *connect.Request
Id: f.Id,
Path: f.Path,
SheetSha256: sheetSha256s[i],
- Type: storepb.SchemaChangeType(f.Type),
Version: f.Version,
EnableGhost: f.EnableGhost,
})
@@ -322,6 +322,11 @@ func (s *ReleaseService) UpdateRelease(ctx context.Context, req *connect.Request
payload.Title = req.Msg.Release.Title
update.Payload = payload
}
+ if path == "type" {
+ payload := release.Payload
+ payload.Type = storepb.SchemaChangeType(req.Msg.Release.Type)
+ update.Payload = payload
+ }
}
releaseMessage, err := s.store.UpdateRelease(ctx, update)
@@ -402,6 +407,7 @@ func convertToRelease(release *store.ReleaseMessage) *v1pb.Release {
VcsSource: convertToReleaseVcsSource(release.Payload.VcsSource),
State: convertDeletedToState(release.Deleted),
Digest: release.Digest,
+ Type: v1pb.Release_Type(release.Payload.Type),
}
for _, f := range release.Payload.Files {
@@ -411,7 +417,6 @@ func convertToRelease(release *store.ReleaseMessage) *v1pb.Release {
Path: f.Path,
Sheet: common.FormatSheet(release.ProjectID, f.SheetSha256),
SheetSha256: f.SheetSha256,
- Type: v1pb.Release_File_Type(f.Type),
Version: f.Version,
EnableGhost: f.EnableGhost,
})
@@ -441,19 +446,17 @@ func convertReleaseVcsSource(vs *v1pb.Release_VCSSource) *storepb.ReleasePayload
// validateAndSanitizeReleaseFiles validates and sanitizes the release files inputs.
// It ensures that each file has either a sheet or a statement, and that the sheet is valid.
-// It also checks for duplicate versions and sorts the files by version.
-// For creating release with declarative files, it checks if there is only one file.
+// It also checks for duplicate versions in versioned releases and sorts the files by version.
//
// The input files are modified in place.
// If a sheet is provided, it populates the statement from the sheet.
// If a statement is provided, it computes the sheetSha256 from the statement.
-func validateAndSanitizeReleaseFiles(ctx context.Context, s *store.Store, files []*v1pb.Release_File, createRelease bool) ([]*v1pb.Release_File, error) {
+func validateAndSanitizeReleaseFiles(ctx context.Context, s *store.Store, files []*v1pb.Release_File, releaseType v1pb.Release_Type) ([]*v1pb.Release_File, error) {
if len(files) == 0 {
return nil, errors.Errorf("release files cannot be empty")
}
versionSet := map[string]struct{}{}
- fileTypeCount := map[v1pb.Release_File_Type]int{}
for _, f := range files {
f.Id = uuid.NewString()
@@ -488,29 +491,14 @@ func validateAndSanitizeReleaseFiles(ctx context.Context, s *store.Store, files
default:
}
- switch f.Type {
- case v1pb.Release_File_VERSIONED:
+ // Version validation for versioned releases only.
+ // Declarative releases can have multiple files with the same version.
+ if releaseType == v1pb.Release_VERSIONED {
if _, ok := versionSet[f.Version]; ok {
return nil, errors.Errorf("found duplicate version %q", f.Version)
}
versionSet[f.Version] = struct{}{}
- case v1pb.Release_File_DECLARATIVE:
- versionSet[f.Version] = struct{}{}
- if len(versionSet) > 1 {
- return nil, errors.Errorf("declarative files should have the same version, found %v", versionSet)
- }
- default:
- return nil, errors.Errorf("unexpected file type %q", f.Type.String())
}
-
- fileTypeCount[f.Type]++
- }
-
- if fileTypeCount[v1pb.Release_File_VERSIONED] > 0 && fileTypeCount[v1pb.Release_File_DECLARATIVE] > 0 {
- return nil, errors.Errorf("cannot have both versioned and declarative files")
- }
- if createRelease && fileTypeCount[v1pb.Release_File_DECLARATIVE] > 1 {
- return nil, errors.Errorf("cannot have multiple declarative files when creating release")
}
// Create files with additional parsed version data for sorting.
diff --git a/backend/api/v1/release_service_check.go b/backend/api/v1/release_service_check.go
index abffae8eb4..004231bc46 100644
--- a/backend/api/v1/release_service_check.go
+++ b/backend/api/v1/release_service_check.go
@@ -109,7 +109,7 @@ func (s *ReleaseService) CheckRelease(ctx context.Context, req *connect.Request[
}
// Validate and sanitize release files.
- sanitizedFiles, err := validateAndSanitizeReleaseFiles(ctx, s.store, request.Release.Files, false)
+ sanitizedFiles, err := validateAndSanitizeReleaseFiles(ctx, s.store, request.Release.Files, request.Release.Type)
if err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrapf(err, "invalid release files"))
}
@@ -117,24 +117,24 @@ func (s *ReleaseService) CheckRelease(ctx context.Context, req *connect.Request[
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("release files cannot be empty"))
}
- releaseFileType := sanitizedFiles[0].Type
+ releaseType := request.Release.Type
var response *v1pb.CheckReleaseResponse
- switch releaseFileType {
- case v1pb.Release_File_DECLARATIVE:
+ switch releaseType {
+ case v1pb.Release_DECLARATIVE:
resp, err := s.checkReleaseDeclarative(ctx, sanitizedFiles, targetDatabases, request.CustomRules)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to check release declarative"))
}
response = resp
- case v1pb.Release_File_VERSIONED:
+ case v1pb.Release_VERSIONED:
resp, err := s.checkReleaseVersioned(ctx, project, sanitizedFiles, targetDatabases, request.CustomRules)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to check release versioned"))
}
response = resp
default:
- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unexpected release file type %q", releaseFileType.String()))
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unexpected release type %q", releaseType.String()))
}
return connect.NewResponse(response), nil
diff --git a/backend/generated-go/store/release.pb.go b/backend/generated-go/store/release.pb.go
index b94e4aecba..11faa6d231 100644
--- a/backend/generated-go/store/release.pb.go
+++ b/backend/generated-go/store/release.pb.go
@@ -26,6 +26,7 @@ type ReleasePayload struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Files []*ReleasePayload_File `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
VcsSource *ReleasePayload_VCSSource `protobuf:"bytes,3,opt,name=vcs_source,json=vcsSource,proto3" json:"vcs_source,omitempty"`
+ Type SchemaChangeType `protobuf:"varint,4,opt,name=type,proto3,enum=bytebase.store.SchemaChangeType" json:"type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -81,6 +82,13 @@ func (x *ReleasePayload) GetVcsSource() *ReleasePayload_VCSSource {
return nil
}
+func (x *ReleasePayload) GetType() SchemaChangeType {
+ if x != nil {
+ return x.Type
+ }
+ return SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED
+}
+
type ReleasePayload_File struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The unique identifier for the file.
@@ -88,9 +96,8 @@ type ReleasePayload_File struct {
// The path of the file, e.g., `2.2/V0001_create_table.sql`.
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
// The SHA256 hash of the sheet content (hex-encoded).
- SheetSha256 string `protobuf:"bytes,4,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`
- Type SchemaChangeType `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.store.SchemaChangeType" json:"type,omitempty"`
- Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
+ SheetSha256 string `protobuf:"bytes,4,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`
+ Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
// Whether to use gh-ost for online schema migration.
EnableGhost bool `protobuf:"varint,7,opt,name=enable_ghost,json=enableGhost,proto3" json:"enable_ghost,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -148,13 +155,6 @@ func (x *ReleasePayload_File) GetSheetSha256() string {
return ""
}
-func (x *ReleasePayload_File) GetType() SchemaChangeType {
- if x != nil {
- return x.Type
- }
- return SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED
-}
-
func (x *ReleasePayload_File) GetVersion() string {
if x != nil {
return x.Version
@@ -225,19 +225,19 @@ var File_store_release_proto protoreflect.FileDescriptor
const file_store_release_proto_rawDesc = "" +
"\n" +
- "\x13store/release.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"\xc6\x03\n" +
+ "\x13store/release.proto\x12\x0ebytebase.store\x1a\x12store/common.proto\"\xcc\x03\n" +
"\x0eReleasePayload\x12\x14\n" +
"\x05title\x18\x01 \x01(\tR\x05title\x129\n" +
"\x05files\x18\x02 \x03(\v2#.bytebase.store.ReleasePayload.FileR\x05files\x12G\n" +
"\n" +
- "vcs_source\x18\x03 \x01(\v2(.bytebase.store.ReleasePayload.VCSSourceR\tvcsSource\x1a\xc6\x01\n" +
+ "vcs_source\x18\x03 \x01(\v2(.bytebase.store.ReleasePayload.VCSSourceR\tvcsSource\x124\n" +
+ "\x04type\x18\x04 \x01(\x0e2 .bytebase.store.SchemaChangeTypeR\x04type\x1a\x96\x01\n" +
"\x04File\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
"\x04path\x18\x02 \x01(\tR\x04path\x12!\n" +
- "\fsheet_sha256\x18\x04 \x01(\tR\vsheetSha256\x124\n" +
- "\x04type\x18\x05 \x01(\x0e2 .bytebase.store.SchemaChangeTypeR\x04type\x12\x18\n" +
+ "\fsheet_sha256\x18\x04 \x01(\tR\vsheetSha256\x12\x18\n" +
"\aversion\x18\x06 \x01(\tR\aversion\x12!\n" +
- "\fenable_ghost\x18\a \x01(\bR\venableGhostJ\x04\b\x03\x10\x04\x1aQ\n" +
+ "\fenable_ghost\x18\a \x01(\bR\venableGhostJ\x04\b\x03\x10\x04J\x04\b\x05\x10\x06\x1aQ\n" +
"\tVCSSource\x122\n" +
"\bvcs_type\x18\x01 \x01(\x0e2\x17.bytebase.store.VCSTypeR\avcsType\x12\x10\n" +
"\x03url\x18\x02 \x01(\tR\x03urlB\x8f\x01\n" +
@@ -266,7 +266,7 @@ var file_store_release_proto_goTypes = []any{
var file_store_release_proto_depIdxs = []int32{
1, // 0: bytebase.store.ReleasePayload.files:type_name -> bytebase.store.ReleasePayload.File
2, // 1: bytebase.store.ReleasePayload.vcs_source:type_name -> bytebase.store.ReleasePayload.VCSSource
- 3, // 2: bytebase.store.ReleasePayload.File.type:type_name -> bytebase.store.SchemaChangeType
+ 3, // 2: bytebase.store.ReleasePayload.type:type_name -> bytebase.store.SchemaChangeType
4, // 3: bytebase.store.ReleasePayload.VCSSource.vcs_type:type_name -> bytebase.store.VCSType
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
diff --git a/backend/generated-go/store/release_equal.pb.go b/backend/generated-go/store/release_equal.pb.go
index fba592d26d..1972e10acd 100644
--- a/backend/generated-go/store/release_equal.pb.go
+++ b/backend/generated-go/store/release_equal.pb.go
@@ -19,9 +19,6 @@ func (x *ReleasePayload_File) Equal(y *ReleasePayload_File) bool {
if x.SheetSha256 != y.SheetSha256 {
return false
}
- if x.Type != y.Type {
- return false
- }
if x.Version != y.Version {
return false
}
@@ -68,5 +65,8 @@ func (x *ReleasePayload) Equal(y *ReleasePayload) bool {
if !x.VcsSource.Equal(y.VcsSource) {
return false
}
+ if x.Type != y.Type {
+ return false
+ }
return true
}
diff --git a/backend/generated-go/v1/release_service.pb.go b/backend/generated-go/v1/release_service.pb.go
index f6146a3336..d9e9be2374 100644
--- a/backend/generated-go/v1/release_service.pb.go
+++ b/backend/generated-go/v1/release_service.pb.go
@@ -26,57 +26,57 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-// The type of migration file.
-type Release_File_Type int32
+// The type of schema change.
+type Release_Type int32
const (
// Unspecified type.
- Release_File_TYPE_UNSPECIFIED Release_File_Type = 0
- // Versioned migration file with sequential version numbers.
- Release_File_VERSIONED Release_File_Type = 1
- // Declarative schema definition file describing desired state.
- Release_File_DECLARATIVE Release_File_Type = 2
+ Release_TYPE_UNSPECIFIED Release_Type = 0
+ // Versioned schema migration.
+ Release_VERSIONED Release_Type = 1
+ // Declarative schema definition.
+ Release_DECLARATIVE Release_Type = 2
)
-// Enum value maps for Release_File_Type.
+// Enum value maps for Release_Type.
var (
- Release_File_Type_name = map[int32]string{
+ Release_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "VERSIONED",
2: "DECLARATIVE",
}
- Release_File_Type_value = map[string]int32{
+ Release_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"VERSIONED": 1,
"DECLARATIVE": 2,
}
)
-func (x Release_File_Type) Enum() *Release_File_Type {
- p := new(Release_File_Type)
+func (x Release_Type) Enum() *Release_Type {
+ p := new(Release_Type)
*p = x
return p
}
-func (x Release_File_Type) String() string {
+func (x Release_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
-func (Release_File_Type) Descriptor() protoreflect.EnumDescriptor {
+func (Release_Type) Descriptor() protoreflect.EnumDescriptor {
return file_v1_release_service_proto_enumTypes[0].Descriptor()
}
-func (Release_File_Type) Type() protoreflect.EnumType {
+func (Release_Type) Type() protoreflect.EnumType {
return &file_v1_release_service_proto_enumTypes[0]
}
-func (x Release_File_Type) Number() protoreflect.EnumNumber {
+func (x Release_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
-// Deprecated: Use Release_File_Type.Descriptor instead.
-func (Release_File_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_release_service_proto_rawDescGZIP(), []int{11, 0, 0}
+// Deprecated: Use Release_Type.Descriptor instead.
+func (Release_Type) EnumDescriptor() ([]byte, []int) {
+ return file_v1_release_service_proto_rawDescGZIP(), []int{11, 0}
}
type GetReleaseRequest struct {
@@ -761,7 +761,9 @@ type Release struct {
// The user can provide the digest of the release. It can be used later to retrieve the release in GetRelease.
// Whether to provide digest and how to generate it is up to the user.
// If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned.
- Digest string `protobuf:"bytes,8,opt,name=digest,proto3" json:"digest,omitempty"`
+ Digest string `protobuf:"bytes,8,opt,name=digest,proto3" json:"digest,omitempty"`
+ // The type of schema change for all files in this release.
+ Type Release_Type `protobuf:"varint,9,opt,name=type,proto3,enum=bytebase.v1.Release_Type" json:"type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -852,6 +854,13 @@ func (x *Release) GetDigest() string {
return ""
}
+func (x *Release) GetType() Release_Type {
+ if x != nil {
+ return x.Type
+ }
+ return Release_TYPE_UNSPECIFIED
+}
+
// Check result for a single release file on a target database.
type CheckReleaseResponse_CheckResult struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -942,8 +951,6 @@ type Release_File struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// The path of the file. e.g., `2.2/V0001_create_table.sql`.
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
- // The type of the file.
- Type Release_File_Type `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.v1.Release_File_Type" json:"type,omitempty"`
// The version identifier for the file.
Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
// Whether to use gh-ost for online schema migration.
@@ -1006,13 +1013,6 @@ func (x *Release_File) GetPath() string {
return ""
}
-func (x *Release_File) GetType() Release_File_Type {
- if x != nil {
- return x.Type
- }
- return Release_File_TYPE_UNSPECIFIED
-}
-
func (x *Release_File) GetVersion() string {
if x != nil {
return x.Version
@@ -1164,7 +1164,7 @@ const file_v1_release_service_proto_rawDesc = "" +
"\aadvices\x18\x03 \x03(\v2\x13.bytebase.v1.AdviceR\aadvices\x12#\n" +
"\raffected_rows\x18\x04 \x01(\x03R\faffectedRows\x125\n" +
"\n" +
- "risk_level\x18\x05 \x01(\x0e2\x16.bytebase.v1.RiskLevelR\triskLevel\"\xc2\x06\n" +
+ "risk_level\x18\x05 \x01(\x0e2\x16.bytebase.v1.RiskLevelR\triskLevel\"\xc3\x06\n" +
"\aRelease\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12\x1e\n" +
"\x05title\x18\x02 \x01(\tB\b\xbaH\x05r\x03\x18\xc8\x01R\x05title\x12/\n" +
@@ -1175,24 +1175,24 @@ const file_v1_release_service_proto_rawDesc = "" +
"\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime\x12-\n" +
"\x05state\x18\a \x01(\x0e2\x12.bytebase.v1.StateB\x03\xe0A\x03R\x05state\x12\x16\n" +
- "\x06digest\x18\b \x01(\tR\x06digest\x1a\xd3\x02\n" +
+ "\x06digest\x18\b \x01(\tR\x06digest\x12-\n" +
+ "\x04type\x18\t \x01(\x0e2\x19.bytebase.v1.Release.TypeR\x04type\x1a\xe7\x01\n" +
"\x04File\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
- "\x04path\x18\x02 \x01(\tR\x04path\x122\n" +
- "\x04type\x18\x05 \x01(\x0e2\x1e.bytebase.v1.Release.File.TypeR\x04type\x12\x18\n" +
+ "\x04path\x18\x02 \x01(\tR\x04path\x12\x18\n" +
"\aversion\x18\x06 \x01(\tR\aversion\x12!\n" +
"\fenable_ghost\x18\t \x01(\bR\venableGhost\x12-\n" +
"\x05sheet\x18\x03 \x01(\tB\x17\xfaA\x14\n" +
"\x12bytebase.com/SheetR\x05sheet\x12!\n" +
"\tstatement\x18\a \x01(\fB\x03\xe0A\x04R\tstatement\x12&\n" +
- "\fsheet_sha256\x18\x04 \x01(\tB\x03\xe0A\x03R\vsheetSha256\"<\n" +
+ "\fsheet_sha256\x18\x04 \x01(\tB\x03\xe0A\x03R\vsheetSha256J\x04\b\x05\x10\x06\x1aN\n" +
+ "\tVCSSource\x12/\n" +
+ "\bvcs_type\x18\x01 \x01(\x0e2\x14.bytebase.v1.VCSTypeR\avcsType\x12\x10\n" +
+ "\x03url\x18\x02 \x01(\tR\x03url\"<\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n" +
"\tVERSIONED\x10\x01\x12\x0f\n" +
- "\vDECLARATIVE\x10\x02\x1aN\n" +
- "\tVCSSource\x12/\n" +
- "\bvcs_type\x18\x01 \x01(\x0e2\x14.bytebase.v1.VCSTypeR\avcsType\x12\x10\n" +
- "\x03url\x18\x02 \x01(\tR\x03url:@\xeaA=\n" +
+ "\vDECLARATIVE\x10\x02:@\xeaA=\n" +
"\x14bytebase.com/Release\x12%projects/{project}/releases/{release}2\xa2\n" +
"\n" +
"\x0eReleaseService\x12\x8a\x01\n" +
@@ -1222,7 +1222,7 @@ func file_v1_release_service_proto_rawDescGZIP() []byte {
var file_v1_release_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_v1_release_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_v1_release_service_proto_goTypes = []any{
- (Release_File_Type)(0), // 0: bytebase.v1.Release.File.Type
+ (Release_Type)(0), // 0: bytebase.v1.Release.Type
(*GetReleaseRequest)(nil), // 1: bytebase.v1.GetReleaseRequest
(*ListReleasesRequest)(nil), // 2: bytebase.v1.ListReleasesRequest
(*ListReleasesResponse)(nil), // 3: bytebase.v1.ListReleasesResponse
@@ -1259,9 +1259,9 @@ var file_v1_release_service_proto_depIdxs = []int32{
15, // 9: bytebase.v1.Release.vcs_source:type_name -> bytebase.v1.Release.VCSSource
18, // 10: bytebase.v1.Release.create_time:type_name -> google.protobuf.Timestamp
19, // 11: bytebase.v1.Release.state:type_name -> bytebase.v1.State
- 20, // 12: bytebase.v1.CheckReleaseResponse.CheckResult.advices:type_name -> bytebase.v1.Advice
- 17, // 13: bytebase.v1.CheckReleaseResponse.CheckResult.risk_level:type_name -> bytebase.v1.RiskLevel
- 0, // 14: bytebase.v1.Release.File.type:type_name -> bytebase.v1.Release.File.Type
+ 0, // 12: bytebase.v1.Release.type:type_name -> bytebase.v1.Release.Type
+ 20, // 13: bytebase.v1.CheckReleaseResponse.CheckResult.advices:type_name -> bytebase.v1.Advice
+ 17, // 14: bytebase.v1.CheckReleaseResponse.CheckResult.risk_level:type_name -> bytebase.v1.RiskLevel
21, // 15: bytebase.v1.Release.VCSSource.vcs_type:type_name -> bytebase.v1.VCSType
1, // 16: bytebase.v1.ReleaseService.GetRelease:input_type -> bytebase.v1.GetReleaseRequest
2, // 17: bytebase.v1.ReleaseService.ListReleases:input_type -> bytebase.v1.ListReleasesRequest
diff --git a/backend/generated-go/v1/release_service_equal.pb.go b/backend/generated-go/v1/release_service_equal.pb.go
index edd4dfdbe0..7a921db78a 100644
--- a/backend/generated-go/v1/release_service_equal.pb.go
+++ b/backend/generated-go/v1/release_service_equal.pb.go
@@ -266,9 +266,6 @@ func (x *Release_File) Equal(y *Release_File) bool {
if x.Path != y.Path {
return false
}
- if x.Type != y.Type {
- return false
- }
if x.Version != y.Version {
return false
}
@@ -339,5 +336,8 @@ func (x *Release) Equal(y *Release) bool {
if x.Digest != y.Digest {
return false
}
+ if x.Type != y.Type {
+ return false
+ }
return true
}
diff --git a/backend/migrator/migration/3.14/0018##move_release_type_to_release_level.sql b/backend/migrator/migration/3.14/0018##move_release_type_to_release_level.sql
new file mode 100644
index 0000000000..9ba384fd19
--- /dev/null
+++ b/backend/migrator/migration/3.14/0018##move_release_type_to_release_level.sql
@@ -0,0 +1,20 @@
+-- Move SchemaChangeType from per-file to release level in JSONB payloads.
+-- Extract type from first file and set it at release level, then remove from all files.
+
+UPDATE release
+SET payload = jsonb_set(
+ payload #- '{files}',
+ '{type}',
+ COALESCE(
+ payload #> '{files,0,type}',
+ '0'::jsonb -- Default to SCHEMA_CHANGE_TYPE_UNSPECIFIED if no files
+ )
+) || jsonb_build_object(
+ 'files',
+ (
+ SELECT jsonb_agg(file_obj - 'type')
+ FROM jsonb_array_elements(payload -> 'files') AS file_obj
+ )
+)
+WHERE payload -> 'files' IS NOT NULL
+ AND jsonb_array_length(payload -> 'files') > 0;
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index dcd4740228..ffad73b3d6 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,8 +12,8 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.14.17"), *files[len(files)-1].version)
- require.Equal(t, "migration/3.14/0017##backfill_issue_titles.sql", files[len(files)-1].path)
+ require.Equal(t, semver.MustParse("3.14.18"), *files[len(files)-1].version)
+ require.Equal(t, "migration/3.14/0018##move_release_type_to_release_level.sql", files[len(files)-1].path)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/runner/taskrun/database_migrate_executor.go b/backend/runner/taskrun/database_migrate_executor.go
index fc866aa7a1..589ba9bfa6 100644
--- a/backend/runner/taskrun/database_migrate_executor.go
+++ b/backend/runner/taskrun/database_migrate_executor.go
@@ -128,7 +128,7 @@ func (exec *DatabaseMigrateExecutor) runMigrationWithPriorBackup(ctx context.Con
}
}
- terminated, result, err := runMigration(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, "")
+ terminated, result, err := runMigration(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, "", storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED)
if result != nil {
// Save prior backup detail to task run result.
result.PriorBackupDetail = priorBackupDetail
@@ -235,7 +235,7 @@ func (exec *DatabaseMigrateExecutor) runGhostMigration(ctx context.Context, driv
}
}
- return runMigrationWithFunc(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, "", execFunc)
+ return runMigrationWithFunc(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, "", storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED, execFunc)
}
func (exec *DatabaseMigrateExecutor) runReleaseTask(ctx context.Context, driverCtx context.Context, task *store.TaskMessage, taskRunUID int, releaseName string) (bool, *storepb.TaskRunResult, error) {
@@ -285,9 +285,12 @@ func (exec *DatabaseMigrateExecutor) runReleaseTask(ctx context.Context, driverC
}
}
+ // Extract release type once before the loop
+ releaseType := release.Payload.Type
+
// Execute unapplied files in order
for _, file := range release.Payload.Files {
- switch file.Type {
+ switch releaseType {
case storepb.SchemaChangeType_VERSIONED:
// Skip if already applied
if appliedVersions[file.Version] {
@@ -321,7 +324,7 @@ func (exec *DatabaseMigrateExecutor) runReleaseTask(ctx context.Context, driverC
})
// Execute migration for this file
- _, _, err = runMigration(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, file.Version)
+ _, _, err = runMigration(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, file.Version, releaseType)
if err != nil {
return true, nil, errors.Wrapf(err, "failed to execute release file %s (version %s)", file.Path, file.Version)
}
@@ -396,7 +399,7 @@ func (exec *DatabaseMigrateExecutor) runReleaseTask(ctx context.Context, driverC
task.Type = storepb.Task_DATABASE_SDL
// Execute SDL migration for this file using the diff logic
- _, _, err = runMigrationWithFunc(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, file.Version, execFunc)
+ _, _, err = runMigrationWithFunc(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, file.Version, releaseType, execFunc)
// Restore original task type
task.Type = originalTaskType
@@ -406,7 +409,7 @@ func (exec *DatabaseMigrateExecutor) runReleaseTask(ctx context.Context, driverC
}
default:
- return true, nil, errors.Errorf("unsupported release file type %q", file.Type)
+ return true, nil, errors.Errorf("unsupported release type %q", releaseType)
}
}
diff --git a/backend/runner/taskrun/executor.go b/backend/runner/taskrun/executor.go
index 37d4405bda..7847027e4a 100644
--- a/backend/runner/taskrun/executor.go
+++ b/backend/runner/taskrun/executor.go
@@ -80,6 +80,10 @@ type migrateContext struct {
file string
}
+ // releaseType is the schema change type from the release (if available).
+ // Set to SCHEMA_CHANGE_TYPE_UNSPECIFIED if not from a release.
+ releaseType storepb.SchemaChangeType
+
// needDump indicates whether schema dump is needed before/after migration.
// False for pure DML (INSERT, UPDATE, DELETE) since they don't change schema.
needDump bool
@@ -91,8 +95,8 @@ func getCreateTaskRunLog(ctx context.Context, taskRunUID int, s *store.Store, pr
}
}
-func runMigration(ctx context.Context, driverCtx context.Context, store *store.Store, dbFactory *dbfactory.DBFactory, syncer *schemasync.Syncer, profile *config.Profile, task *store.TaskMessage, taskRunUID int, sheet *store.SheetMessage, schemaVersion string) (terminated bool, result *storepb.TaskRunResult, err error) {
- return runMigrationWithFunc(ctx, driverCtx, store, dbFactory, syncer, profile, task, taskRunUID, sheet, schemaVersion, nil /* default */)
+func runMigration(ctx context.Context, driverCtx context.Context, store *store.Store, dbFactory *dbfactory.DBFactory, syncer *schemasync.Syncer, profile *config.Profile, task *store.TaskMessage, taskRunUID int, sheet *store.SheetMessage, schemaVersion string, releaseType storepb.SchemaChangeType) (terminated bool, result *storepb.TaskRunResult, err error) {
+ return runMigrationWithFunc(ctx, driverCtx, store, dbFactory, syncer, profile, task, taskRunUID, sheet, schemaVersion, releaseType, nil /* default */)
}
func runMigrationWithFunc(
@@ -106,12 +110,14 @@ func runMigrationWithFunc(
taskRunUID int,
sheet *store.SheetMessage,
schemaVersion string,
+ releaseType storepb.SchemaChangeType,
execFunc execFuncType,
) (terminated bool, result *storepb.TaskRunResult, err error) {
mc, err := getMigrationInfo(ctx, store, profile, syncer, task, schemaVersion, sheet, taskRunUID, dbFactory)
if err != nil {
return true, nil, err
}
+ mc.releaseType = releaseType
// Pre-compute whether schema dump is needed.
// Skip dump for pure DML statements (INSERT, UPDATE, DELETE) as they don't change schema.
@@ -425,6 +431,15 @@ func endMigration(ctx context.Context, storeInstance *store.Store, mc *migrateCo
if isDone {
// if isDone, record in revision
if mc.version != "" {
+ // Determine revision type from release if available, otherwise use task type
+ revisionType := storepb.SchemaChangeType_VERSIONED
+ if mc.releaseType != storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED {
+ revisionType = mc.releaseType
+ } else if mc.task.Type == storepb.Task_DATABASE_SDL {
+ // Fallback to task type for backward compatibility
+ revisionType = storepb.SchemaChangeType_DECLARATIVE
+ }
+
r := &store.RevisionMessage{
InstanceID: mc.database.InstanceID,
DatabaseName: mc.database.DatabaseName,
@@ -434,12 +449,9 @@ func endMigration(ctx context.Context, storeInstance *store.Store, mc *migrateCo
File: mc.release.file,
SheetSha256: mc.sheet.Sha256,
TaskRun: mc.taskRunName,
- Type: storepb.SchemaChangeType_VERSIONED,
+ Type: revisionType,
},
}
- if mc.task.Type == storepb.Task_DATABASE_SDL {
- r.Payload.Type = storepb.SchemaChangeType_DECLARATIVE
- }
revision, err := storeInstance.CreateRevision(ctx, r)
if err != nil {
diff --git a/backend/runner/taskrun/schema_update_sdl_executor.go b/backend/runner/taskrun/schema_update_sdl_executor.go
index 25530613ee..b051755809 100644
--- a/backend/runner/taskrun/schema_update_sdl_executor.go
+++ b/backend/runner/taskrun/schema_update_sdl_executor.go
@@ -73,7 +73,7 @@ func (exec *SchemaDeclareExecutor) RunOnce(ctx context.Context, driverCtx contex
return nil
}
- return runMigrationWithFunc(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, "", execFunc)
+ return runMigrationWithFunc(ctx, driverCtx, exec.store, exec.dbFactory, exec.schemaSyncer, exec.profile, task, taskRunUID, sheet, "", storepb.SchemaChangeType_SCHEMA_CHANGE_TYPE_UNSPECIFIED, execFunc)
}
func diff(ctx context.Context, s *store.Store, instance *store.InstanceMessage, database *store.DatabaseMessage, sheetContent string) (string, error) {
diff --git a/backend/tests/gitops_test.go b/backend/tests/gitops_test.go
index 2c14b6116c..911d78cc9d 100644
--- a/backend/tests/gitops_test.go
+++ b/backend/tests/gitops_test.go
@@ -80,10 +80,10 @@ func TestGitOpsCheck(t *testing.T) {
// Create a release with migration files simulating GitOps workflow.
release := &v1pb.Release{
Title: "GitOps Check Release v1.0",
+ Type: v1pb.Release_VERSIONED,
Files: []*v1pb.Release_File{
{
Path: "migrations/001__create_users_table.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "001",
EnableGhost: false,
Statement: []byte(`CREATE TABLE users (
@@ -95,7 +95,6 @@ func TestGitOpsCheck(t *testing.T) {
},
{
Path: "migrations/002__add_email_index.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "002",
EnableGhost: false,
Statement: []byte(`CREATE INDEX idx_users_email ON users(email);`),
@@ -201,10 +200,10 @@ func TestGitOpsRollout(t *testing.T) {
Parent: project.Name,
Release: &v1pb.Release{
Title: "GitOps Rollout Release v1.0",
+ Type: v1pb.Release_VERSIONED,
Files: []*v1pb.Release_File{
{
Path: "migrations/001__create_products_table.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "001",
EnableGhost: false,
Statement: []byte(`CREATE TABLE products (
@@ -387,10 +386,10 @@ func TestGitOpsRolloutMultiTarget(t *testing.T) {
Parent: project.Name,
Release: &v1pb.Release{
Title: "GitOps Multi-Target Release v1.0",
+ Type: v1pb.Release_VERSIONED,
Files: []*v1pb.Release_File{
{
Path: "migrations/1.0.0__create_table_one.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "1.0.0",
EnableGhost: false,
Statement: []byte(`CREATE TABLE table_one (
@@ -400,7 +399,6 @@ func TestGitOpsRolloutMultiTarget(t *testing.T) {
},
{
Path: "migrations/1.0.1__create_table_two.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "1.0.1",
EnableGhost: false,
Statement: []byte(`CREATE TABLE table_two (
@@ -410,7 +408,6 @@ func TestGitOpsRolloutMultiTarget(t *testing.T) {
},
{
Path: "migrations/1.0.2__create_table_three.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "1.0.2",
EnableGhost: false,
Statement: []byte(`CREATE TABLE table_three (
@@ -620,10 +617,10 @@ func TestGitOpsCheckAppliedButChanged(t *testing.T) {
// Step 1: Create a release with version 1.0.0 file.
originalRelease := &v1pb.Release{
Title: "Original Release v1.0.0",
+ Type: v1pb.Release_VERSIONED,
Files: []*v1pb.Release_File{
{
Path: "migrations/1.0.0__create_users_table.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "1.0.0",
EnableGhost: false,
Statement: []byte(`CREATE TABLE users (
@@ -691,10 +688,10 @@ func TestGitOpsCheckAppliedButChanged(t *testing.T) {
// Step 3: Create a release with version 1.0.0 file but with different content.
modifiedRelease := &v1pb.Release{
Title: "Modified Release v1.0.0",
+ Type: v1pb.Release_VERSIONED,
Files: []*v1pb.Release_File{
{
Path: "migrations/1.0.0__create_users_table.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "1.0.0",
EnableGhost: false,
Statement: []byte(`CREATE TABLE users (
@@ -765,10 +762,10 @@ func TestGitOpsCheckEmptyTargets(t *testing.T) {
// Create a release with a migration file.
release := &v1pb.Release{
Title: "Test Release",
+ Type: v1pb.Release_VERSIONED,
Files: []*v1pb.Release_File{
{
Path: "migrations/001__create_table.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "001",
Statement: []byte(`CREATE TABLE test_table (id INT);`),
},
@@ -840,10 +837,10 @@ func TestGitOpsCheckDeclarative(t *testing.T) {
// Create a release with declarative SDL files.
release := &v1pb.Release{
Title: "Declarative SDL Release",
+ Type: v1pb.Release_DECLARATIVE,
Files: []*v1pb.Release_File{
{
Path: "schema/users.sql",
- Type: v1pb.Release_File_DECLARATIVE,
Version: "1.0.0",
Statement: []byte(`CREATE TABLE public.users (
id SERIAL NOT NULL,
@@ -980,10 +977,10 @@ ALTER TABLE public.users ADD COLUMN name VARCHAR(255);`,
release := &v1pb.Release{
Title: fmt.Sprintf("Test Release - %s", tc.name),
+ Type: v1pb.Release_DECLARATIVE,
Files: []*v1pb.Release_File{
{
Path: "schema/test.sql",
- Type: v1pb.Release_File_DECLARATIVE,
Version: "1.0.0",
Statement: []byte(tc.statement),
},
@@ -1038,7 +1035,6 @@ func TestGitOpsCheckVersionedDependency(t *testing.T) {
files: []*v1pb.Release_File{
{
Path: "migrations/001__create_t1.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "001",
Statement: []byte(`CREATE TABLE t1 (
id SERIAL PRIMARY KEY,
@@ -1047,7 +1043,6 @@ func TestGitOpsCheckVersionedDependency(t *testing.T) {
},
{
Path: "migrations/002__alter_t1.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "002",
Statement: []byte(`ALTER TABLE t1 ADD COLUMN email VARCHAR(255);`),
},
@@ -1059,7 +1054,6 @@ func TestGitOpsCheckVersionedDependency(t *testing.T) {
files: []*v1pb.Release_File{
{
Path: "migrations/001__create_t1.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "001",
Statement: []byte(`CREATE TABLE t1 (
id SERIAL PRIMARY KEY,
@@ -1068,7 +1062,6 @@ func TestGitOpsCheckVersionedDependency(t *testing.T) {
},
{
Path: "migrations/002__alter_t2.sql",
- Type: v1pb.Release_File_VERSIONED,
Version: "002",
Statement: []byte(`ALTER TABLE t2 ADD COLUMN email VARCHAR(255);`),
},
@@ -1166,6 +1159,7 @@ func TestGitOpsCheckVersionedDependency(t *testing.T) {
release := &v1pb.Release{
Title: fmt.Sprintf("Test Release - %s", tc.name),
+ Type: v1pb.Release_VERSIONED,
Files: tc.files,
}
@@ -1262,10 +1256,10 @@ func TestGitOpsCheckDeclarativeMultipleFiles(t *testing.T) {
// Create a release with multiple declarative SDL files.
release := &v1pb.Release{
Title: "Multi-File Declarative SDL Release",
+ Type: v1pb.Release_DECLARATIVE,
Files: []*v1pb.Release_File{
{
Path: "schema/users.sql",
- Type: v1pb.Release_File_DECLARATIVE,
Version: "1.0.0",
Statement: []byte(`CREATE TABLE public.users (
id SERIAL NOT NULL,
@@ -1275,7 +1269,6 @@ func TestGitOpsCheckDeclarativeMultipleFiles(t *testing.T) {
},
{
Path: "schema/products.sql",
- Type: v1pb.Release_File_DECLARATIVE,
Version: "1.0.0",
Statement: []byte(`CREATE TABLE public.products (
id SERIAL NOT NULL,
diff --git a/docs/plans/2026-01-04-schema-change-type-release-level-design.md b/docs/plans/2026-01-04-schema-change-type-release-level-design.md
new file mode 100644
index 0000000000..ce7583b083
--- /dev/null
+++ b/docs/plans/2026-01-04-schema-change-type-release-level-design.md
@@ -0,0 +1,100 @@
+# Move SchemaChangeType to Release Level
+
+**Date:** 2026-01-04
+**Status:** Approved
+
+## Overview
+
+Move `SchemaChangeType`/`Type` from the per-file level to the release level in both store protos and v1 API protos. All files in a release should share the same migration strategy.
+
+## Current Structure
+
+### Store Protos (`proto/store/store/`)
+- `SchemaChangeType` enum defined in `common.proto`
+- `ReleasePayload.File` has `SchemaChangeType type = 5;` (per-file)
+- `RevisionPayload` has `SchemaChangeType type = 6;` (per-revision)
+
+### V1 API Protos (`proto/v1/v1/`)
+- `Release.File` has nested `enum Type` and `Type type = 5;` (per-file)
+- `Revision` has nested `enum Type` and `Type type = 14;` (per-revision)
+
+## Proposed Structure
+
+### Store Protos
+- `ReleasePayload` gets `SchemaChangeType type = 4;` (release-level)
+- Remove `SchemaChangeType type = 5;` from `ReleasePayload.File`
+- Keep `RevisionPayload.type` unchanged (revisions track their own type)
+
+### V1 API Protos
+- `Release` gets `Type type = 9;` (release-level)
+- Add `enum Type` at Release level or as top-level enum
+- Remove `Type type = 5;` and nested `enum Type` from `Release.File`
+- Keep `Revision.Type` unchanged (revisions track their own type)
+
+## Rationale
+
+A release represents a cohesive deployment unit. All files within a release should use the same migration strategy (either all VERSIONED or all DECLARATIVE). Having per-file types doesn't make semantic sense and allows inconsistent configurations.
+
+Revisions remain unchanged because they represent individual schema changes that have been applied and need to track their own type for history.
+
+## Migration Strategy
+
+### Database Migration
+Create a new migration file that updates existing releases:
+1. For each release, extract `type` from the first file in the payload
+2. Move it to the release-level payload
+3. Remove `type` from all file payloads within that release
+
+This ensures clean data and simpler application code.
+
+### Validation
+During release creation, validate that the release has a valid type specified at the release level.
+
+## Implementation Steps
+
+### 1. Proto Changes
+- Modify `proto/store/store/release.proto`:
+ - Remove `SchemaChangeType type = 5;` from `File` message
+ - Add `SchemaChangeType type = 4;` to `ReleasePayload` message
+- Modify `proto/v1/v1/release_service.proto`:
+ - Remove `Type type = 5;` from `Release.File` message
+ - Remove nested `enum Type` from `Release.File`
+ - Add `Type type = 9;` to `Release` message
+ - Add `enum Type` with VERSIONED/DECLARATIVE values
+- Run proto generation: `cd proto && buf generate`
+
+### 2. Database Migration
+- Create new migration file in `backend/migrator/<<version>>/`
+- Write SQL to migrate JSONB payloads
+- Update `backend/migrator/migration/LATEST.sql` if needed
+- Update `TestLatestVersion` in `backend/migrator/migrator_test.go`
+
+### 3. Backend Code Updates
+Files requiring updates:
+- `backend/store/revision.go` - revision creation/storage
+- `backend/api/v1/revision_service.go` - API handlers
+- `backend/api/v1/release_service.go` - release API handlers
+- `backend/api/v1/release_service_check.go` - release validation
+- `backend/runner/taskrun/database_migrate_executor.go` - execution logic
+- `backend/runner/taskrun/executor.go` - task execution
+
+Key changes:
+- Update release creation to require `type` at release level
+- Update revision creation to copy `type` from release (not file)
+- Update any code iterating over files and checking file-level type
+- Update validation/checks to use release-level type
+
+### 4. Testing
+- Test migration on sample data
+- Test release creation with new schema
+- Test revision creation from migrated releases
+- Run relevant backend tests
+
+## Breaking Change
+
+This is a **breaking change** that requires:
+- Proto file changes (API contract change)
+- Database migration
+- Backwards incompatible API changes
+
+The PR should be labeled with `breaking`.
diff --git a/docs/plans/2026-01-04-schema-change-type-release-level.md b/docs/plans/2026-01-04-schema-change-type-release-level.md
new file mode 100644
index 0000000000..f73d17731d
--- /dev/null
+++ b/docs/plans/2026-01-04-schema-change-type-release-level.md
@@ -0,0 +1,778 @@
+# Move SchemaChangeType to Release Level Implementation Plan
+
+> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
+
+**Goal:** Move SchemaChangeType from per-file to release level in both store protos and v1 API protos.
+
+**Architecture:** Update proto definitions to have type at release level instead of file level, create database migration to move existing data, update backend code to use release-level type, preserve revision-level type for history tracking.
+
+**Tech Stack:** Protocol Buffers, Go, PostgreSQL, Buf
+
+---
+
+### Task 1: Update Store Proto (release.proto)
+
+**Files:**
+- Modify: `proto/store/store/release.proto`
+
+**Step 1: Add type field to ReleasePayload**
+
+In `proto/store/store/release.proto`, add the type field after `vcs_source`:
+
+```proto
+message ReleasePayload {
+ string title = 1;
+
+ repeated File files = 2;
+
+ VCSSource vcs_source = 3;
+
+ SchemaChangeType type = 4;
+
+ message File {
+ // ... existing fields ...
+ }
+}
+```
+
+**Step 2: Remove type field from ReleasePayload.File**
+
+In the same file, remove line 24 (`SchemaChangeType type = 5;`) from the `File` message.
+
+The File message should now be:
+
+```proto
+message File {
+ // The unique identifier for the file.
+ string id = 1;
+ // The path of the file, e.g., `2.2/V0001_create_table.sql`.
+ string path = 2;
+ reserved 3; // Previously: string sheet (resource name)
+ // The SHA256 hash of the sheet content (hex-encoded).
+ string sheet_sha256 = 4;
+ // Removed: SchemaChangeType type = 5;
+ string version = 6;
+ // Whether to use gh-ost for online schema migration.
+ bool enable_ghost = 7;
+}
+```
+
+**Step 3: Commit proto changes**
+
+```bash
+git add proto/store/store/release.proto
+git commit -m "refactor: move SchemaChangeType to release level in store proto
+
+Move type field from ReleasePayload.File to ReleasePayload.
+Field number 5 is now unused in File message."
+```
+
+---
+
+### Task 2: Update V1 API Proto (release_service.proto)
+
+**Files:**
+- Modify: `proto/v1/v1/release_service.proto`
+
+**Step 1: Add Type enum to Release message**
+
+In `proto/v1/v1/release_service.proto`, add the enum and type field to the `Release` message after the `digest` field (around line 299):
+
+```proto
+message Release {
+ // ... existing fields ...
+
+ // The digest of the release.
+ string digest = 8;
+
+ // The type of schema change for all files in this release.
+ Type type = 9;
+
+ // The type of schema change.
+ enum Type {
+ // Unspecified type.
+ TYPE_UNSPECIFIED = 0;
+ // Versioned schema migration.
+ VERSIONED = 1;
+ // Declarative schema definition.
+ DECLARATIVE = 2;
+ }
+
+ // A SQL file in a release.
+ message File {
+ // ... existing fields ...
+ }
+}
+```
+
+**Step 2: Remove Type enum and type field from Release.File**
+
+In the same file, remove:
+1. The `Type type = 5;` field from `Release.File` (line 308)
+2. The entire nested `enum Type` from `Release.File` (lines 326-333)
+
+The File message should now be:
+
+```proto
+message File {
+ // The unique identifier for the file.
+ string id = 1;
+ // The path of the file. e.g., `2.2/V0001_create_table.sql`.
+ string path = 2;
+ // Removed: Type type = 5;
+ string version = 6;
+ // Whether to use gh-ost for online schema migration.
+ bool enable_ghost = 9;
+
+ // For inputs, we must either use `sheet` or `statement`.
+ // For outputs, we always use `sheet`. `statement` is the preview of the sheet content.
+ //
+ // The sheet that holds the content.
+ // Format: projects/{project}/sheets/{sheet}
+ string sheet = 3 [(google.api.resource_reference) = {type: "bytebase.com/Sheet"}];
+ // The raw SQL statement content.
+ bytes statement = 7 [(google.api.field_behavior) = INPUT_ONLY];
+ // The SHA256 hash value of the sheet content or the statement.
+ string sheet_sha256 = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+```
+
+**Step 3: Commit proto changes**
+
+```bash
+git add proto/v1/v1/release_service.proto
+git commit -m "refactor: move Type to release level in v1 API proto
+
+Move Type enum and type field from Release.File to Release.
+Field number 5 is now unused in File message."
+```
+
+---
+
+### Task 3: Generate Proto Code
+
+**Step 1: Format proto files**
+
+Run:
+```bash
+buf format -w proto
+```
+
+Expected: Proto files formatted successfully
+
+**Step 2: Lint proto files**
+
+Run:
+```bash
+buf lint proto
+```
+
+Expected: No linting errors
+
+**Step 3: Generate Go code from protos**
+
+Run:
+```bash
+cd proto && buf generate
+```
+
+Expected: Go files regenerated in `backend/generated-go/`
+
+**Step 4: Verify generated code compiles**
+
+Run:
+```bash
+go build -ldflags "-w -s" -p=16 -o ./bytebase-build/bytebase ./backend/bin/server/main.go
+```
+
+Expected: Build fails with compilation errors (expected - we need to fix backend code)
+
+**Step 5: Commit generated code**
+
+```bash
+git add backend/generated-go/
+git commit -m "build: regenerate proto code after moving type to release level"
+```
+
+---
+
+### Task 4: Create Database Migration
+
+**Files:**
+- Create: `backend/migrator/migration/3.14/0018##move_release_type_to_release_level.sql`
+- Modify: `backend/migrator/migrator_test.go`
+
+**Step 1: Create migration SQL file**
+
+Create `backend/migrator/migration/3.14/0018##move_release_type_to_release_level.sql`:
+
+```sql
+-- Move SchemaChangeType from per-file to release level in JSONB payloads.
+-- Extract type from first file and set it at release level, then remove from all files.
+
+UPDATE project_release
+SET payload = jsonb_set(
+ payload #- '{files}',
+ '{type}',
+ COALESCE(
+ payload #> '{files,0,type}',
+ '0'::jsonb -- Default to SCHEMA_CHANGE_TYPE_UNSPECIFIED if no files
+ )
+) || jsonb_build_object(
+ 'files',
+ (
+ SELECT jsonb_agg(file_obj - 'type')
+ FROM jsonb_array_elements(payload -> 'files') AS file_obj
+ )
+)
+WHERE payload -> 'files' IS NOT NULL
+ AND jsonb_array_length(payload -> 'files') > 0;
+```
+
+**Step 2: Update migrator test**
+
+In `backend/migrator/migrator_test.go`, update line 15:
+
+```go
+func TestLatestVersion(t *testing.T) {
+ files, err := getSortedVersionedFiles()
+ require.NoError(t, err)
+ require.Equal(t, semver.MustParse("3.14.18"), *files[len(files)-1].version)
+ require.Equal(t, "migration/3.14/0018##move_release_type_to_release_level.sql", files[len(files)-1].path)
+}
+```
+
+**Step 3: Test migration file**
+
+Run:
+```bash
+go test -v -count=1 github.com/bytebase/bytebase/backend/migrator -run ^TestLatestVersion$
+```
+
+Expected: PASS
+
+**Step 4: Commit migration**
+
+```bash
+git add backend/migrator/migration/3.14/0018##move_release_type_to_release_level.sql backend/migrator/migrator_test.go
+git commit -m "feat: add migration to move release type to release level
+
+Migrate JSONB payloads in project_release table to move type field
+from per-file to release level."
+```
+
+---
+
+### Task 5: Update Release Service Converter (convertToRelease)
+
+**Files:**
+- Modify: `backend/api/v1/release_service.go:396-420`
+
+**Step 1: Update convertToRelease function**
+
+In `backend/api/v1/release_service.go` around line 396, update the function:
+
+```go
+func convertToRelease(release *store.ReleaseMessage) *v1pb.Release {
+ r := &v1pb.Release{
+ Name: common.FormatReleaseName(release.ProjectID, release.UID),
+ Title: release.Payload.Title,
+ Creator: common.FormatUserEmail(release.Creator),
+ CreateTime: timestamppb.New(release.At),
+ VcsSource: convertToReleaseVcsSource(release.Payload.VcsSource),
+ State: convertDeletedToState(release.Deleted),
+ Digest: release.Digest,
+ Type: v1pb.Release_Type(release.Payload.Type),
+ }
+
+ for _, f := range release.Payload.Files {
+ // Sheets are now project-agnostic, no need to check projectID
+ r.Files = append(r.Files, &v1pb.Release_File{
+ Id: f.Id,
+ Path: f.Path,
+ Sheet: common.FormatSheet(release.ProjectID, f.SheetSha256),
+ SheetSha256: f.SheetSha256,
+ // Removed: Type field
+ Version: f.Version,
+ EnableGhost: f.EnableGhost,
+ })
+ }
+ return r
+}
+```
+
+**Step 2: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/api/v1/...
+```
+
+Expected: Successful compilation
+
+**Step 3: Commit changes**
+
+```bash
+git add backend/api/v1/release_service.go
+git commit -m "refactor: update convertToRelease to use release-level type
+
+Use release.Payload.Type instead of file.Type when converting
+from store to v1 API format."
+```
+
+---
+
+### Task 6: Update CreateRelease to Set Release-Level Type
+
+**Files:**
+- Modify: `backend/api/v1/release_service.go:45-144`
+
+**Step 1: Find where payload is created in CreateRelease**
+
+Read `backend/api/v1/release_service.go` starting at line 100 to find where `storepb.ReleasePayload` is created.
+
+**Step 2: Add type field to ReleasePayload creation**
+
+Around line 102-140 in the `CreateRelease` function, find where the payload is created and add the type field:
+
+```go
+payload := &storepb.ReleasePayload{
+ Title: req.Msg.Release.Title,
+ VcsSource: convertReleaseVcsSource(req.Msg.Release.VcsSource),
+ Type: storepb.SchemaChangeType(req.Msg.Release.Type),
+}
+
+for _, file := range sanitizedFiles {
+ h := sha256.Sum256(file.Statement)
+ payload.Files = append(payload.Files, &storepb.ReleasePayload_File{
+ Id: file.Id,
+ Path: file.Path,
+ SheetSha256: hex.EncodeToString(h[:]),
+ // Removed: Type field
+ Version: file.Version,
+ EnableGhost: file.EnableGhost,
+ })
+}
+```
+
+**Step 3: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/api/v1/...
+```
+
+Expected: Successful compilation
+
+**Step 4: Commit changes**
+
+```bash
+git add backend/api/v1/release_service.go
+git commit -m "refactor: set release-level type in CreateRelease
+
+Store type at release level instead of per-file when creating releases."
+```
+
+---
+
+### Task 7: Update UpdateRelease to Handle Release-Level Type
+
+**Files:**
+- Modify: `backend/api/v1/release_service.go:277-333`
+
+**Step 1: Find where payload is updated in UpdateRelease**
+
+Read the `UpdateRelease` function around line 277-333 to find where payload fields are updated.
+
+**Step 2: Add type field to update paths**
+
+In the `UpdateRelease` function, find the section that handles field updates and add type handling:
+
+```go
+for _, path := range req.Msg.UpdateMask.Paths {
+ switch path {
+ case "title":
+ patch.Payload.Title = req.Msg.Release.Title
+ case "type":
+ patch.Payload.Type = storepb.SchemaChangeType(req.Msg.Release.Type)
+ case "files":
+ // existing file handling code
+ // Remove Type from file conversion
+ // ... other cases
+ }
+}
+```
+
+**Step 3: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/api/v1/...
+```
+
+Expected: Successful compilation
+
+**Step 4: Commit changes**
+
+```bash
+git add backend/api/v1/release_service.go
+git commit -m "refactor: handle release-level type in UpdateRelease
+
+Allow updating type field at release level via UpdateRelease."
+```
+
+---
+
+### Task 8: Update Release File Validation
+
+**Files:**
+- Modify: `backend/api/v1/release_service.go:450-540`
+
+**Step 1: Update validateAndSanitizeReleaseFiles function**
+
+Find the `validateAndSanitizeReleaseFiles` function and update type validation:
+
+Remove the `fileTypeCount` map (line 456) and related validation since type is now at release level, not per-file.
+
+The function should no longer validate or count file types.
+
+**Step 2: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/api/v1/...
+```
+
+Expected: Successful compilation
+
+**Step 3: Commit changes**
+
+```bash
+git add backend/api/v1/release_service.go
+git commit -m "refactor: remove per-file type validation
+
+Type is now at release level, so file-level type validation is no longer needed."
+```
+
+---
+
+### Task 9: Update CheckRelease to Use Release-Level Type
+
+**Files:**
+- Modify: `backend/api/v1/release_service_check.go:100-141`
+
+**Step 1: Update CheckRelease function**
+
+In `backend/api/v1/release_service_check.go`, update the function around line 120:
+
+Change from:
+```go
+releaseFileType := sanitizedFiles[0].Type
+```
+
+To:
+```go
+releaseType := request.Release.Type
+```
+
+**Step 2: Update switch statement**
+
+Update the switch statement to use `releaseType`:
+
+```go
+var response *v1pb.CheckReleaseResponse
+switch releaseType {
+case v1pb.Release_DECLARATIVE:
+ resp, err := s.checkReleaseDeclarative(ctx, sanitizedFiles, targetDatabases, request.CustomRules)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to check release declarative"))
+ }
+ response = resp
+case v1pb.Release_VERSIONED:
+ resp, err := s.checkReleaseVersioned(ctx, project, sanitizedFiles, targetDatabases, request.CustomRules)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to check release versioned"))
+ }
+ response = resp
+default:
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unexpected release type %q", releaseType.String()))
+}
+```
+
+**Step 3: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/api/v1/...
+```
+
+Expected: Successful compilation
+
+**Step 4: Commit changes**
+
+```bash
+git add backend/api/v1/release_service_check.go
+git commit -m "refactor: use release-level type in CheckRelease
+
+Read type from release instead of first file when checking release."
+```
+
+---
+
+### Task 10: Update Database Migration Executor
+
+**Files:**
+- Modify: `backend/runner/taskrun/database_migrate_executor.go:287-411`
+
+**Step 1: Update runReleaseTask to use release-level type**
+
+In `backend/runner/taskrun/database_migrate_executor.go`, update the file iteration loop around line 289:
+
+Change from reading `file.Type` to reading `release.Payload.Type` once before the loop.
+
+Before the loop (around line 287):
+```go
+}
+
+// Get release type once
+releaseType := release.Payload.Type
+
+// Execute unapplied files in order
+for _, file := range release.Payload.Files {
+ switch releaseType {
+ case storepb.SchemaChangeType_VERSIONED:
+ // ... existing versioned logic, now uses releaseType
+ case storepb.SchemaChangeType_DECLARATIVE:
+ // ... existing declarative logic, now uses releaseType
+ default:
+ return true, nil, errors.Errorf("unsupported release type %q", releaseType)
+ }
+}
+```
+
+**Step 2: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/runner/taskrun/...
+```
+
+Expected: Successful compilation
+
+**Step 3: Commit changes**
+
+```bash
+git add backend/runner/taskrun/database_migrate_executor.go
+git commit -m "refactor: use release-level type in migration executor
+
+Read type from release.Payload.Type instead of file.Type when executing migrations."
+```
+
+---
+
+### Task 11: Update Revision Creation to Use Release Type
+
+**Files:**
+- Modify: `backend/store/revision.go`
+
+**Step 1: Find revision creation code**
+
+Read `backend/store/revision.go` to find where revisions are created from release files.
+
+Run:
+```bash
+grep -n "SchemaChangeType" backend/store/revision.go
+```
+
+**Step 2: Update revision creation**
+
+Find where `RevisionPayload` is created and ensure it copies the type from the release, not from individual files.
+
+The revision should store the release's type for proper history tracking.
+
+**Step 3: Verify the code compiles**
+
+Run:
+```bash
+go build ./backend/store/...
+```
+
+Expected: Successful compilation
+
+**Step 4: Commit changes**
+
+```bash
+git add backend/store/revision.go
+git commit -m "refactor: copy release type when creating revisions
+
+Revisions now copy type from release instead of individual files."
+```
+
+---
+
+### Task 12: Run Linters and Format Code
+
+**Step 1: Format Go code**
+
+Run:
+```bash
+gofmt -w backend/api/v1/release_service.go backend/api/v1/release_service_check.go backend/runner/taskrun/database_migrate_executor.go backend/store/revision.go
+```
+
+Expected: Files formatted
+
+**Step 2: Run golangci-lint (first pass)**
+
+Run:
+```bash
+golangci-lint run --allow-parallel-runners
+```
+
+Expected: May show some issues
+
+**Step 3: Auto-fix linting issues**
+
+Run:
+```bash
+golangci-lint run --fix --allow-parallel-runners
+```
+
+Expected: Some issues auto-fixed
+
+**Step 4: Run golangci-lint again until clean**
+
+Run:
+```bash
+golangci-lint run --allow-parallel-runners
+```
+
+Expected: No issues (repeat if needed)
+
+**Step 5: Commit formatting and lint fixes**
+
+```bash
+git add -u
+git commit -m "style: format code and fix linting issues"
+```
+
+---
+
+### Task 13: Build and Run Tests
+
+**Step 1: Build the project**
+
+Run:
+```bash
+go build -ldflags "-w -s" -p=16 -o ./bytebase-build/bytebase ./backend/bin/server/main.go
+```
+
+Expected: Successful build
+
+**Step 2: Run release service tests**
+
+Run:
+```bash
+go test -v -count=1 github.com/bytebase/bytebase/backend/api/v1 -run Release
+```
+
+Expected: Tests pass
+
+**Step 3: Run migration executor tests**
+
+Run:
+```bash
+go test -v -count=1 github.com/bytebase/bytebase/backend/runner/taskrun -run DatabaseMigrate
+```
+
+Expected: Tests pass
+
+**Step 4: Run revision store tests**
+
+Run:
+```bash
+go test -v -count=1 github.com/bytebase/bytebase/backend/store -run Revision
+```
+
+Expected: Tests pass
+
+---
+
+### Task 14: Final Verification and Cleanup
+
+**Step 1: Search for remaining file.Type references**
+
+Run:
+```bash
+grep -r "file\.Type" backend/ --include="*.go" | grep -v "file\.Type_" | grep -v "// file\.Type"
+```
+
+Expected: No results (or only comments)
+
+**Step 2: Search for Files[].Type references**
+
+Run:
+```bash
+grep -r "Files\[.*\]\.Type" backend/ --include="*.go"
+```
+
+Expected: No results
+
+**Step 3: Verify all tests pass**
+
+Run:
+```bash
+go test -v -count=1 github.com/bytebase/bytebase/backend/...
+```
+
+Expected: All tests pass (this may take several minutes)
+
+**Step 4: Create final commit if needed**
+
+If any final cleanup was done:
+```bash
+git add -u
+git commit -m "chore: final cleanup for release-level type refactoring"
+```
+
+---
+
+### Task 15: Verify Branch State
+
+**Step 1: Check git status**
+
+Run:
+```bash
+git status
+```
+
+Expected: Clean working tree on feature branch
+
+**Step 2: Review commit history**
+
+Run:
+```bash
+git log --oneline main..HEAD
+```
+
+Expected: Shows all commits for this feature
+
+**Step 3: Verify on correct branch**
+
+Run:
+```bash
+git branch --show-current
+```
+
+Expected: `feature/schema-change-type-release-level`
+
+---
+
+## Implementation Complete
+
+All tasks completed. The SchemaChangeType has been successfully moved from per-file to release level in both store protos and v1 API protos.
+
+**Next Steps:**
+1. Test the changes manually with a local Bytebase instance
+2. Create a pull request
+3. Mark PR with `breaking` label
+4. Request code review
diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
index 7eec3fb97b..c054a0eaff 100644
--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/create/CreateButton.vue
@@ -87,7 +87,7 @@ import {
} from "@/types/proto-es/v1/plan_service_pb";
import {
CheckReleaseRequestSchema,
- Release_File_Type,
+ Release_Type,
} from "@/types/proto-es/v1/release_service_pb";
import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";
import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";
@@ -311,11 +311,11 @@ const runSQLCheckForIssue = async () => {
const request = create(CheckReleaseRequestSchema, {
parent: issue.value.project,
release: {
+ type: Release_Type.VERSIONED,
files: [
{
// Use "0" for dummy version.
version: "0",
- type: Release_File_Type.VERSIONED,
statement: new TextEncoder().encode(statement),
enableGhost: getSpecChangeType(
specForTask(issue.value.planEntity, selectedTask.value)
diff --git a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue
index e6c6d8c5b1..35db1e4466 100644
--- a/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue
+++ b/frontend/src/components/Plan/components/SQLCheckSection/SQLCheckButton.vue
@@ -62,7 +62,7 @@ import type { CheckReleaseResponse } from "@/types/proto-es/v1/release_service_p
import {
CheckReleaseRequestSchema,
CheckReleaseResponseSchema,
- Release_File_Type,
+ Release_Type,
} from "@/types/proto-es/v1/release_service_pb";
import {
Advice_Level,
@@ -117,11 +117,11 @@ const runCheckInternal = async (statement: string) => {
const request = create(CheckReleaseRequestSchema, {
parent: project.value.name,
release: {
+ type: Release_Type.VERSIONED,
files: [
{
// Use "0" for dummy version.
version: "0",
- type: Release_File_Type.VERSIONED,
statement: new TextEncoder().encode(statement),
enableGhost: migrationType.value,
},
diff --git a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue
index a2b16105d0..0e91536907 100644
--- a/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue
+++ b/frontend/src/components/Plan/components/SQLCheckV1Section/SQLCheckV1Section.vue
@@ -114,7 +114,7 @@ import {
import {
CheckReleaseRequestSchema,
type CheckReleaseResponse_CheckResult,
- Release_File_Type,
+ Release_Type,
} from "@/types/proto-es/v1/release_service_pb";
import { type Advice, Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import {
@@ -216,11 +216,11 @@ const runChecks = async () => {
const request = create(CheckReleaseRequestSchema, {
parent: `${projectNamePrefix}${extractProjectResourceName(plan.value.name)}`,
release: {
+ type: Release_Type.VERSIONED,
files: [
{
// Use "0" for dummy version.
version: "0",
- type: Release_File_Type.VERSIONED,
statement: new TextEncoder().encode(statement),
enableGhost:
config.type === DatabaseChangeType.MIGRATE && config.enableGhost,
diff --git a/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue b/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue
index f83d89b0ef..31bd139501 100644
--- a/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue
+++ b/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue
@@ -84,13 +84,13 @@
</div>
</div>
<div
- v-if="file.type"
+ v-if="release.type"
:class="[
'inline-flex items-center px-1.5 py-0.5 rounded-sm text-xs shrink-0',
'bg-blue-100 text-blue-800 ',
]"
>
- {{ getReleaseFileTypeText(file.type) }}
+ {{ getReleaseFileTypeText(release.type) }}
</div>
</div>
<div
@@ -162,7 +162,7 @@ import { BBSpin } from "@/bbkit";
import { useReleaseByName } from "@/store";
import { getDateForPbTimestampProtoEs, isValidReleaseName } from "@/types";
import { VCSType } from "@/types/proto-es/v1/common_pb";
-import { Release_File_Type } from "@/types/proto-es/v1/release_service_pb";
+import { Release_Type } from "@/types/proto-es/v1/release_service_pb";
import { useSelectedSpec } from "../../SpecDetailView/context";
const { t } = useI18n();
@@ -202,13 +202,13 @@ const getChangeTypeText = (enableGhost: boolean) => {
: t("release.change-type.ddl");
};
-const getReleaseFileTypeText = (fileType: Release_File_Type) => {
+const getReleaseFileTypeText = (fileType: Release_Type) => {
switch (fileType) {
- case Release_File_Type.VERSIONED:
+ case Release_Type.VERSIONED:
return t("release.file-type.versioned");
- case Release_File_Type.DECLARATIVE:
+ case Release_Type.DECLARATIVE:
return t("release.file-type.declarative");
- case Release_File_Type.TYPE_UNSPECIFIED:
+ case Release_Type.TYPE_UNSPECIFIED:
return t("release.file-type.unspecified");
default:
fileType satisfies never;
diff --git a/frontend/src/components/Release/ReleaseDetail/ReleaseDetail.vue b/frontend/src/components/Release/ReleaseDetail/ReleaseDetail.vue
index 0e05604554..21709f130d 100644
--- a/frontend/src/components/Release/ReleaseDetail/ReleaseDetail.vue
+++ b/frontend/src/components/Release/ReleaseDetail/ReleaseDetail.vue
@@ -4,6 +4,7 @@
<BasicInfo />
<ReleaseFileTable
:files="release.files"
+ :release-type="release.type"
:show-selection="false"
@row-click="(_, file) => (state.selectedReleaseFile = file)"
/>
diff --git a/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue b/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
index d5d7078c26..24a477c008 100644
--- a/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
+++ b/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
@@ -17,12 +17,13 @@ import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import {
type Release_File,
- Release_File_Type,
+ Release_Type,
} from "@/types/proto-es/v1/release_service_pb";
const props = withDefaults(
defineProps<{
files: Release_File[];
+ releaseType: Release_Type;
showSelection?: boolean;
rowClickable?: boolean;
selectedFiles?: Release_File[];
@@ -86,17 +87,17 @@ const columnList = computed(() => {
});
const getReleaseFileTypeText = (file: Release_File) => {
- switch (file.type) {
- case Release_File_Type.DECLARATIVE:
+ switch (props.releaseType) {
+ case Release_Type.DECLARATIVE:
return "SDL";
- case Release_File_Type.VERSIONED:
+ case Release_Type.VERSIONED:
return file.enableGhost
? `${t("issue.title.change-database")} (gh-ost)`
: t("issue.title.change-database");
- case Release_File_Type.TYPE_UNSPECIFIED:
+ case Release_Type.TYPE_UNSPECIFIED:
return "";
default:
- file.type satisfies never;
+ props.releaseType satisfies never;
return "";
}
};
diff --git a/frontend/src/components/Revision/CreateRevisionDrawer.vue b/frontend/src/components/Revision/CreateRevisionDrawer.vue
index 3d23d72d99..ada380ca97 100644
--- a/frontend/src/components/Revision/CreateRevisionDrawer.vue
+++ b/frontend/src/components/Revision/CreateRevisionDrawer.vue
@@ -298,6 +298,7 @@
</div>
<ReleaseFileTable
:files="selectableFiles"
+ :release-type="selectedRelease!.type"
:show-selection="true"
:selected-files="selectedFiles"
@update:selected-files="handleFileSelection"
@@ -326,6 +327,7 @@
</div>
<ReleaseFileTable
:files="filesWithExistingVersions"
+ :release-type="selectedRelease!.type"
:show-selection="false"
:row-clickable="false"
/>
@@ -422,7 +424,7 @@ import {
import {
type Release,
type Release_File,
- Release_File_Type,
+ Release_Type,
} from "@/types/proto-es/v1/release_service_pb";
import {
BatchCreateRevisionsRequestSchema,
@@ -578,14 +580,14 @@ const isVersionDuplicate = (version: string): boolean => {
return existingRevisionVersions.value.has(version);
};
-// Map release file type to revision type
-const mapFileTypeToRevisionType = (
- fileType: Release_File_Type
+// Map release type to revision type
+const mapReleaseTypeToRevisionType = (
+ releaseType: Release_Type
): Revision_Type => {
- switch (fileType) {
- case Release_File_Type.VERSIONED:
+ switch (releaseType) {
+ case Release_Type.VERSIONED:
return Revision_Type.VERSIONED;
- case Release_File_Type.DECLARATIVE:
+ case Release_Type.DECLARATIVE:
return Revision_Type.DECLARATIVE;
default:
return Revision_Type.TYPE_UNSPECIFIED;
@@ -833,7 +835,7 @@ const handleConfirm = async () => {
version: file.version,
file: `${selectedRelease.value!.name}/files/${file.id}`,
sheet: file.sheet,
- type: mapFileTypeToRevisionType(file.type),
+ type: mapReleaseTypeToRevisionType(selectedRelease.value!.type),
},
})
);
diff --git a/frontend/src/components/SQLCheck/SQLCheckButton.vue b/frontend/src/components/SQLCheck/SQLCheckButton.vue
index ef10a31bea..1d794b1740 100644
--- a/frontend/src/components/SQLCheck/SQLCheckButton.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckButton.vue
@@ -80,7 +80,7 @@ import type { CheckReleaseResponse } from "@/types/proto-es/v1/release_service_p
import {
CheckReleaseRequestSchema,
CheckReleaseResponseSchema,
- Release_File_Type,
+ Release_Type,
} from "@/types/proto-es/v1/release_service_pb";
import type { Advice } from "@/types/proto-es/v1/sql_service_pb";
import { Advice_Level, AdviceSchema } from "@/types/proto-es/v1/sql_service_pb";
@@ -159,11 +159,11 @@ const runCheckInternal = async (statement: string) => {
const request = create(CheckReleaseRequestSchema, {
parent: database.project,
release: {
+ type: Release_Type.VERSIONED,
files: [
{
// Use "0" for dummy version.
version: "0",
- type: Release_File_Type.VERSIONED,
statement: new TextEncoder().encode(statement),
enableGhost: enableGhost ?? false,
},
diff --git a/frontend/src/types/proto-es/v1/release_service_pb.d.ts b/frontend/src/types/proto-es/v1/release_service_pb.d.ts
index 182272ad2f..bfc71a5536 100644
--- a/frontend/src/types/proto-es/v1/release_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/release_service_pb.d.ts
@@ -456,6 +456,13 @@ export declare type Release = Message<"bytebase.v1.Release"> & {
* @generated from field: string digest = 8;
*/
digest: string;
+
+ /**
+ * The type of schema change for all files in this release.
+ *
+ * @generated from field: bytebase.v1.Release.Type type = 9;
+ */
+ type: Release_Type;
};
/**
@@ -484,13 +491,6 @@ export declare type Release_File = Message<"bytebase.v1.Release.File"> & {
*/
path: string;
- /**
- * The type of the file.
- *
- * @generated from field: bytebase.v1.Release.File.Type type = 5;
- */
- type: Release_File_Type;
-
/**
* The version identifier for the file.
*
@@ -538,64 +538,64 @@ export declare type Release_File = Message<"bytebase.v1.Release.File"> & {
export declare const Release_FileSchema: GenMessage<Release_File>;
/**
- * The type of migration file.
+ * Version control system source information.
*
- * @generated from enum bytebase.v1.Release.File.Type
+ * @generated from message bytebase.v1.Release.VCSSource
*/
-export enum Release_File_Type {
- /**
- * Unspecified type.
- *
- * @generated from enum value: TYPE_UNSPECIFIED = 0;
- */
- TYPE_UNSPECIFIED = 0,
-
+export declare type Release_VCSSource = Message<"bytebase.v1.Release.VCSSource"> & {
/**
- * Versioned migration file with sequential version numbers.
+ * The type of VCS.
*
- * @generated from enum value: VERSIONED = 1;
+ * @generated from field: bytebase.v1.VCSType vcs_type = 1;
*/
- VERSIONED = 1,
+ vcsType: VCSType;
/**
- * Declarative schema definition file describing desired state.
+ * The url link to the e.g., GitHub commit or pull request.
*
- * @generated from enum value: DECLARATIVE = 2;
+ * @generated from field: string url = 2;
*/
- DECLARATIVE = 2,
-}
+ url: string;
+};
/**
- * Describes the enum bytebase.v1.Release.File.Type.
+ * Describes the message bytebase.v1.Release.VCSSource.
+ * Use `create(Release_VCSSourceSchema)` to create a new message.
*/
-export declare const Release_File_TypeSchema: GenEnum<Release_File_Type>;
+export declare const Release_VCSSourceSchema: GenMessage<Release_VCSSource>;
/**
- * Version control system source information.
+ * The type of schema change.
*
- * @generated from message bytebase.v1.Release.VCSSource
+ * @generated from enum bytebase.v1.Release.Type
*/
-export declare type Release_VCSSource = Message<"bytebase.v1.Release.VCSSource"> & {
+export enum Release_Type {
/**
- * The type of VCS.
+ * Unspecified type.
*
- * @generated from field: bytebase.v1.VCSType vcs_type = 1;
+ * @generated from enum value: TYPE_UNSPECIFIED = 0;
*/
- vcsType: VCSType;
+ TYPE_UNSPECIFIED = 0,
/**
- * The url link to the e.g., GitHub commit or pull request.
+ * Versioned schema migration.
*
- * @generated from field: string url = 2;
+ * @generated from enum value: VERSIONED = 1;
*/
- url: string;
-};
+ VERSIONED = 1,
+
+ /**
+ * Declarative schema definition.
+ *
+ * @generated from enum value: DECLARATIVE = 2;
+ */
+ DECLARATIVE = 2,
+}
/**
- * Describes the message bytebase.v1.Release.VCSSource.
- * Use `create(Release_VCSSourceSchema)` to create a new message.
+ * Describes the enum bytebase.v1.Release.Type.
*/
-export declare const Release_VCSSourceSchema: GenMessage<Release_VCSSource>;
+export declare const Release_TypeSchema: GenEnum<Release_Type>;
/**
* ReleaseService manages releases for coordinating deployments.
diff --git a/frontend/src/types/proto-es/v1/release_service_pb.js b/frontend/src/types/proto-es/v1/release_service_pb.js
index 4a2d7e35f3..9133cded26 100644
--- a/frontend/src/types/proto-es/v1/release_service_pb.js
+++ b/frontend/src/types/proto-es/v1/release_service_pb.js
@@ -17,7 +17,7 @@ import { file_v1_sql_service } from "./sql_service_pb";
* Describes the file v1/release_service.proto.
*/
export const file_v1_release_service = /*@__PURE__*/
- fileDesc("Chh2MS9yZWxlYXNlX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIj8KEUdldFJlbGVhc2VSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1JlbGVhc2UigAEKE0xpc3RSZWxlYXNlc1JlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEhQKDHNob3dfZGVsZXRlZ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ja0KpAQoPY29tLmJ5dGViYXNlLnYxQhNSZWxlYXNlU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_sql_service]);
+ fileDesc("Chh2MS9yZWxlYXNlX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIj8KEUdldFJlbGVhc2VSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1JlbGVhc2UigAEKE0xpc3RSZWxlYXNlc1JlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEhQKDHNob3dfZGVsZXRlZBgEIAEoCCJXChRMaXN0UmVsZWFzZXNSZXNwb25zZRImCghyZWxlYXNlcxgBIAMoCzIULmJ5dGViYXNlLnYxLlJlbGVhc2USFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIowBChVTZWFyY2hSZWxlYXNlc1JlcXVlc3QSLAoGcGFyZW50GAEgASgJQhzgQQL6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEhMKBmRpZ2VzdBgEIAEoCUgAiAEBQgkKB19kaWdlc3QiWQoWU2VhcmNoUmVsZWFzZXNSZXNwb25zZRImCghyZWxlYXNlcxgB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VsZWFzZTIoL3YxL3tyZWxlYXNlLm5hbWU9cHJvamVjdHMvKi9yZWxlYXNlcy8qfRKVAQoNRGVsZXRlUmVsZWFzZRIhLmJ5dGViYXNlLnYxLkRlbGV0ZVJlbGVhc2VSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IknaQQRuYW1liuowEmJiLnJlbGVhc2VzLmRlbGV0ZZDqMAGC0+STAiIqIC92MS97bmFtZT1wcm9qZWN0cy8qL3JlbGVhc2VzLyp9EpsBCg9VbmRlbGV0ZVJlbGVhc2USIy5ieXRlYmFzZS52MS5VbmRlbGV0ZVJlbGVhc2VSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuUmVsZWFzZSJNiuowFGJiLnJlbGVhc2VzLnVuZGVsZXRlkOowAYLT5JMCKyIpL3YxL3tuYW1lPXByb2plY3RzLyovcmVsZWFzZXMvKn06dW5kZWxldGUSnwEKDENoZWNrUmVsZWFzZRIgLmJ5dGViYXNlLnYxLkNoZWNrUmVsZWFzZVJlcXVlc3QaIS5ieXRlYmFzZS52MS5DaGVja1JlbGVhc2VSZXNwb25zZSJKiuowEWJiLnJlbGVhc2VzLmNoZWNrkOowAYLT5JMCKzoBKiImL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vcmVsZWFzZXM6Y2hlY2tCqQEKD2NvbS5ieXRlYmFzZS52MUITUmVsZWFzZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_sql_service]);
/**
* Describes the message bytebase.v1.GetReleaseRequest.
@@ -118,25 +118,25 @@ export const Release_FileSchema = /*@__PURE__*/
messageDesc(file_v1_release_service, 11, 0);
/**
- * Describes the enum bytebase.v1.Release.File.Type.
+ * Describes the message bytebase.v1.Release.VCSSource.
+ * Use `create(Release_VCSSourceSchema)` to create a new message.
*/
-export const Release_File_TypeSchema = /*@__PURE__*/
- enumDesc(file_v1_release_service, 11, 0, 0);
+export const Release_VCSSourceSchema = /*@__PURE__*/
+ messageDesc(file_v1_release_service, 11, 1);
/**
- * The type of migration file.
- *
- * @generated from enum bytebase.v1.Release.File.Type
+ * Describes the enum bytebase.v1.Release.Type.
*/
-export const Release_File_Type = /*@__PURE__*/
- tsEnum(Release_File_TypeSchema);
+export const Release_TypeSchema = /*@__PURE__*/
+ enumDesc(file_v1_release_service, 11, 0);
/**
- * Describes the message bytebase.v1.Release.VCSSource.
- * Use `create(Release_VCSSourceSchema)` to create a new message.
+ * The type of schema change.
+ *
+ * @generated from enum bytebase.v1.Release.Type
*/
-export const Release_VCSSourceSchema = /*@__PURE__*/
- messageDesc(file_v1_release_service, 11, 1);
+export const Release_Type = /*@__PURE__*/
+ tsEnum(Release_TypeSchema);
/**
* ReleaseService manages releases for coordinating deployments.
diff --git a/frontend/src/types/proto-es/v1/rollout_service_pb.js b/frontend/src/types/proto-es/v1/rollout_service_pb.js
index 0d1bcf406a..9d17e46570 100644
--- a/frontend/src/types/proto-es/v1/rollout_service_pb.js
+++ b/frontend/src/types/proto-es/v1/rollout_service_pb.js
@@ -16,7 +16,7 @@ import { file_v1_common } from "./common_pb";
* Describes the file v1/rollout_service.proto.
*/
export const file_v1_rollout_service = /*@__PURE__*/
- fileDesc("Chh2MS9yb2xsb3V0X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpEBChRCYXRjaFJ1blRhc2tzUmVxdWVzdBIqCgZwYXJlbnQYASABKAlCGuBBAvpBFAoSYnl0ZWJhc2UuY29tL1N0YWdlEg0KBX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XF1ZXN0GiMuYnl0ZWJhc2UudjEuQmF0Y2hTa2lwVGFza3NSZXNwb25zZSJc2kEGcGFyZW50kOowApjqMAGC0+STAkU6ASoiQC92MS97cGFyZW50PXByb2plY3RzLyovcGxhbnMvKi9yb2xsb3V0L3N0YWdlcy8qfS90YXNrczpiYXRjaFNraXAS0wEKE0JhdGNoQ2FuY2VsVGFza1J1bnMSJy5ieXRlYmFzZS52MS5CYXRjaENhbmNlbFRhc2tSdW5zUmVxdWVzdBooLmJ5dGViYXNlLnYxLkJhdGNoQ2FuY2VsVGFza1J1bnNSZXNwb25zZSJp2kEGcGFyZW50kOowApjqMAGC0+STAlI6ASoiTS92MS97cGFyZW50PXByb2plY3RzLyovcGxhbnMvKi9yb2xsb3V0L3N0YWdlcy8qL3Rhc2tzLyp9L3Rhc2tSdW5zOmJhdGNoQ2FuY2VsEu4BChZQcmV2aWV3VGFza1J1blJvbGxiYWNrEiouYnl0ZWJhc2UudjEuUHJldmlld1Rhc2tSdW5Sb2xsYmFja1JlcXVlc3QaKy5ieXRlYmFzZS52MS5QcmV2aWV3VGFza1J1blJvbGxiYWNrUmVzcG9uc2Uie9pBBG5hbWWK6jAQYmIudGFza1J1bnMubGlzdJDqMAGC0+STAlY6ASoiUS92MS97bmFtZT1wcm9qZWN0cy8qL3BsYW5zLyovcm9sbG91dC9zdGFnZXMvKi90YXNrcy8qL3Rhc2tSdW5zLyp9OnByZXZpZXdSb2xsYmFja0KpAQoPY29tLmJ5dGViYXNlLnYxQhNSb2xsb3V0U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_beh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cmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common]);
/**
* Describes the message bytebase.v1.BatchRunTasksRequest.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 7019d4b9c6..96688db0a5 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -12611,6 +12611,14 @@ components:
The user can provide the digest of the release. It can be used later to retrieve the release in GetRelease.
Whether to provide digest and how to generate it is up to the user.
If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned.
+ type:
+ enum:
+ - TYPE_UNSPECIFIED
+ - VERSIONED
+ - DECLARATIVE
+ type: string
+ description: The type of schema change for all files in this release.
+ format: enum
Release_File:
type: object
properties:
@@ -12620,14 +12628,6 @@ components:
path:
type: string
description: The path of the file. e.g., `2.2/V0001_create_table.sql`.
- type:
- enum:
- - TYPE_UNSPECIFIED
- - VERSIONED
- - DECLARATIVE
- type: string
- description: The type of the file.
- format: enum
version:
type: string
description: The version identifier for the file.
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 981a90eea8..5a51ef3ff7 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -3610,6 +3610,7 @@ Activity type enumeration.
| title | [string](#string) | | |
| files | [ReleasePayload.File](#bytebase-store-ReleasePayload-File) | repeated | |
| vcs_source | [ReleasePayload.VCSSource](#bytebase-store-ReleasePayload-VCSSource) | | |
+| type | [SchemaChangeType](#bytebase-store-SchemaChangeType) | | |
@@ -3627,7 +3628,6 @@ Activity type enumeration.
| id | [string](#string) | | The unique identifier for the file. |
| path | [string](#string) | | The path of the file, e.g., `2.2/V0001_create_table.sql`. |
| sheet_sha256 | [string](#string) | | The SHA256 hash of the sheet content (hex-encoded). |
-| type | [SchemaChangeType](#bytebase-store-SchemaChangeType) | | |
| version | [string](#string) | | |
| enable_ghost | [bool](#bool) | | Whether to use gh-ost for online schema migration. |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index b3faa831ed..e2723f7658 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -9946,6 +9946,13 @@ IM integration setting should be set for this function to work. </p></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.store.SchemaChangeType">SchemaChangeType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -9984,13 +9991,6 @@ IM integration setting should be set for this function to work. </p></td>
<td><p>The SHA256 hash of the sheet content (hex-encoded). </p></td>
</tr>
- <tr>
- <td>type</td>
- <td><a href="#bytebase.store.SchemaChangeType">SchemaChangeType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
<tr>
<td>version</td>
<td><a href="#string">string</a></td>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 52d984ac09..890b55b7f7 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -519,7 +519,7 @@
- [UndeleteReleaseRequest](#bytebase-v1-UndeleteReleaseRequest)
- [UpdateReleaseRequest](#bytebase-v1-UpdateReleaseRequest)
- - [Release.File.Type](#bytebase-v1-Release-File-Type)
+ - [Release.Type](#bytebase-v1-Release-Type)
- [ReleaseService](#bytebase-v1-ReleaseService)
@@ -8432,6 +8432,7 @@ When paginating, all other parameters provided to `ListReleases` must match the
| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| state | [State](#bytebase-v1-State) | | The lifecycle state of the release. |
| digest | [string](#string) | | The digest of the release. The user can provide the digest of the release. It can be used later to retrieve the release in GetRelease. Whether to provide digest and how to generate it is up to the user. If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned. |
+| type | [Release.Type](#bytebase-v1-Release-Type) | | The type of schema change for all files in this release. |
@@ -8448,7 +8449,6 @@ A SQL file in a release.
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | The unique identifier for the file. |
| path | [string](#string) | | The path of the file. e.g., `2.2/V0001_create_table.sql`. |
-| type | [Release.File.Type](#bytebase-v1-Release-File-Type) | | The type of the file. |
| version | [string](#string) | | The version identifier for the file. |
| enable_ghost | [bool](#bool) | | Whether to use gh-ost for online schema migration. |
| sheet | [string](#string) | | For inputs, we must either use `sheet` or `statement`. For outputs, we always use `sheet`. `statement` is the preview of the sheet content.
@@ -8548,16 +8548,16 @@ When paginating, all other parameters provided to `ListReleases` must match the
-<a name="bytebase-v1-Release-File-Type"></a>
+<a name="bytebase-v1-Release-Type"></a>
-### Release.File.Type
-The type of migration file.
+### Release.Type
+The type of schema change.
| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| VERSIONED | 1 | Versioned migration file with sequential version numbers. |
-| DECLARATIVE | 2 | Declarative schema definition file describing desired state. |
+| VERSIONED | 1 | Versioned schema migration. |
+| DECLARATIVE | 2 | Declarative schema definition. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index ccb8da8e2d..100cb5eda2 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -2159,7 +2159,7 @@
<li>
- <a href="#bytebase.v1.Release.File.Type"><span class="badge">E</span>Release.File.Type</a>
+ <a href="#bytebase.v1.Release.Type"><span class="badge">E</span>Release.Type</a>
</li>
@@ -23769,6 +23769,13 @@ Whether to provide digest and how to generate it is up to the user.
If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned. </p></td>
</tr>
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Release.Type">Release.Type</a></td>
+ <td></td>
+ <td><p>The type of schema change for all files in this release. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -23800,13 +23807,6 @@ If the digest is not empty, it must be unique in the project. Otherwise, an ALRE
<td><p>The path of the file. e.g., `2.2/V0001_create_table.sql`. </p></td>
</tr>
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Release.File.Type">Release.File.Type</a></td>
- <td></td>
- <td><p>The type of the file. </p></td>
- </tr>
-
<tr>
<td>version</td>
<td><a href="#string">string</a></td>
@@ -24033,8 +24033,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.Release.File.Type">Release.File.Type</h3>
- <p>The type of migration file.</p>
+ <h3 id="bytebase.v1.Release.Type">Release.Type</h3>
+ <p>The type of schema change.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -24050,13 +24050,13 @@ In this situation, `update_mask` is ignored. </p></td>
<tr>
<td>VERSIONED</td>
<td>1</td>
- <td><p>Versioned migration file with sequential version numbers.</p></td>
+ <td><p>Versioned schema migration.</p></td>
</tr>
<tr>
<td>DECLARATIVE</td>
<td>2</td>
- <td><p>Declarative schema definition file describing desired state.</p></td>
+ <td><p>Declarative schema definition.</p></td>
</tr>
</tbody>
diff --git a/proto/store/store/release.proto b/proto/store/store/release.proto
index 4c3510b1ba..c06d52049e 100644
--- a/proto/store/store/release.proto
+++ b/proto/store/store/release.proto
@@ -13,6 +13,8 @@ message ReleasePayload {
VCSSource vcs_source = 3;
+ SchemaChangeType type = 4;
+
message File {
// The unique identifier for the file.
string id = 1;
@@ -21,7 +23,6 @@ message ReleasePayload {
reserved 3; // Previously: string sheet (resource name)
// The SHA256 hash of the sheet content (hex-encoded).
string sheet_sha256 = 4;
- SchemaChangeType type = 5;
string version = 6;
// Whether to use gh-ost for online schema migration.
bool enable_ghost = 7;
diff --git a/proto/v1/v1/release_service.proto b/proto/v1/v1/release_service.proto
index 30cc478874..3730e1165e 100644
--- a/proto/v1/v1/release_service.proto
+++ b/proto/v1/v1/release_service.proto
@@ -298,14 +298,26 @@ message Release {
// If the digest is not empty, it must be unique in the project. Otherwise, an ALREADY_EXISTS error will be returned.
string digest = 8;
+ // The type of schema change for all files in this release.
+ Type type = 9;
+
+ // The type of schema change.
+ enum Type {
+ // Unspecified type.
+ TYPE_UNSPECIFIED = 0;
+ // Versioned schema migration.
+ VERSIONED = 1;
+ // Declarative schema definition.
+ DECLARATIVE = 2;
+ }
+
// A SQL file in a release.
message File {
// The unique identifier for the file.
string id = 1;
// The path of the file. e.g., `2.2/V0001_create_table.sql`.
string path = 2;
- // The type of the file.
- Type type = 5;
+
// The version identifier for the file.
string version = 6;
// Whether to use gh-ost for online schema migration.
@@ -321,16 +333,6 @@ message Release {
bytes statement = 7 [(google.api.field_behavior) = INPUT_ONLY];
// The SHA256 hash value of the sheet content or the statement.
string sheet_sha256 = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // The type of migration file.
- enum Type {
- // Unspecified type.
- TYPE_UNSPECIFIED = 0;
- // Versioned migration file with sequential version numbers.
- VERSIONED = 1;
- // Declarative schema definition file describing desired state.
- DECLARATIVE = 2;
- }
}
// Version control system source information.