Skip to content

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

refactor: move DiffMetadata to DatabaseService, read source schema from store (#21068)

Danny Xu7596002dd36c
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index fa79980784..d4c2ee0fa2 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -1327,6 +1327,45 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.BatchUpdateDatabasesResponse'
+ /bytebase.v1.DatabaseService/DiffMetadata:
+ post:
+ tags:
+ - bytebase.v1.DatabaseService
+ summary: DiffMetadata
+ description: |-
+ Generates migration statements from the database's current schema to the
+ given target metadata.
+ Permissions required: bb.databases.diffMetadata
+ operationId: bytebase.v1.DatabaseService.DiffMetadata
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffMetadataRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffMetadataResponse'
/bytebase.v1.DatabaseService/DiffSchema:
post:
tags:
@@ -5603,44 +5642,6 @@ paths:
schema:
$ref: '#/components/schemas/bytebase.v1.AICompletionResponse'
/bytebase.v1.SQLService/AdminExecute: {}
- /bytebase.v1.SQLService/DiffMetadata:
- post:
- tags:
- - bytebase.v1.SQLService
- summary: DiffMetadata
- description: |-
- Computes schema differences between two database metadata.
- Permissions required: None
- operationId: bytebase.v1.SQLService.DiffMetadata
- parameters:
- - name: Connect-Protocol-Version
- in: header
- required: true
- schema:
- $ref: '#/components/schemas/connect-protocol-version'
- - name: Connect-Timeout-Ms
- in: header
- schema:
- $ref: '#/components/schemas/connect-timeout-header'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.DiffMetadataRequest'
- required: true
- responses:
- default:
- description: Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/connect.error'
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.DiffMetadataResponse'
/bytebase.v1.SQLService/Export:
post:
tags:
@@ -11271,18 +11272,21 @@ components:
bytebase.v1.DiffMetadataRequest:
type: object
properties:
- sourceMetadata:
- title: source_metadata
- description: The metadata of the source schema.
- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ name:
+ type: string
+ title: name
+ description: |-
+ The database whose current schema is the diff source.
+ Format: instances/{instance}/databases/{database}
targetMetadata:
title: target_metadata
- description: The metadata of the target schema.
+ description: |-
+ The metadata of the target schema. The source metadata and the engine are
+ read from the database, so only the target travels in the request.
+ Must describe the COMPLETE target schema: the diff runs against the full
+ stored source, so any object omitted from the target (for example by a
+ truncated metadata fetch) is treated as dropped.
$ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
- engine:
- title: engine
- description: The database engine of the schema.
- $ref: '#/components/schemas/bytebase.v1.Engine'
title: DiffMetadataRequest
additionalProperties: false
bytebase.v1.DiffMetadataResponse:
@@ -11291,7 +11295,7 @@ components:
diff:
type: string
title: diff
- description: The diff of the metadata.
+ description: The generated migration statements.
title: DiffMetadataResponse
additionalProperties: false
bytebase.v1.DiffSchemaRequest:
@@ -22622,12 +22626,6 @@ tags:
description: AccessGrantService manages temporary access grants within projects.
- name: bytebase.v1.RolloutService
description: RolloutService manages the execution of deployment plans.
- - name: bytebase.v1.InstanceRoleService
- description: InstanceRoleService manages database roles within instances.
- - name: bytebase.v1.InstanceService
- description: InstanceService manages database instances and their connections.
- - name: bytebase.v1.DatabaseService
- description: DatabaseService manages databases and their schemas.
- name: bytebase.v1.QueryHistoryService
description: QueryHistoryService manages query history records of SQL Editor queries and exports.
- name: bytebase.v1.SQLService
@@ -22656,6 +22654,12 @@ tags:
description: DatabaseCatalogService manages database schema metadata and classification.
- name: bytebase.v1.DatabaseGroupService
description: DatabaseGroupService manages database groups for organizing databases by criteria.
+ - name: bytebase.v1.InstanceRoleService
+ description: InstanceRoleService manages database roles within instances.
+ - name: bytebase.v1.InstanceService
+ description: InstanceService manages database instances and their connections.
+ - name: bytebase.v1.DatabaseService
+ description: DatabaseService manages databases and their schemas.
- name: bytebase.v1.GroupService
description: GroupService manages user groups for organizing users and permissions.
- name: bytebase.v1.IdentityProviderService
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index b7cff89bc8..08e1909ace 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -729,6 +729,61 @@ func (s *DatabaseService) DiffSchema(ctx context.Context, req *connect.Request[v
return connect.NewResponse(&v1pb.DiffSchemaResponse{Diff: migrationSQL}), nil
}
+// DiffMetadata generates migration statements from the database's current
+// schema (read from the store) to the given target metadata. The engine and
+// object case sensitivity come from the database's instance.
+func (s *DatabaseService) DiffMetadata(ctx context.Context, req *connect.Request[v1pb.DiffMetadataRequest]) (*connect.Response[v1pb.DiffMetadataResponse], error) {
+ request := req.Msg
+ if request.TargetMetadata == nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("target_metadata is required"))
+ }
+ instanceID, databaseName, err := common.GetInstanceDatabaseID(request.Name)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, err)
+ }
+
+ instance, err := s.store.GetInstance(ctx, &store.FindInstanceMessage{
+ Workspace: common.GetWorkspaceIDFromContext(ctx),
+ ResourceID: &instanceID,
+ })
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get instance"))
+ }
+ if instance == nil {
+ return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("instance %q not found", instanceID))
+ }
+ engine := instance.Metadata.GetEngine()
+ switch engine {
+ case storepb.Engine_MYSQL, storepb.Engine_POSTGRES, storepb.Engine_TIDB, storepb.Engine_ORACLE, storepb.Engine_MSSQL:
+ default:
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unsupported engine: %v", engine))
+ }
+
+ sourceDBSchema, err := s.store.GetDBSchema(ctx, &store.FindDBSchemaMessage{
+ Workspace: common.GetWorkspaceIDFromContext(ctx),
+ InstanceID: instanceID,
+ DatabaseName: databaseName,
+ })
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get database schema"))
+ }
+ if sourceDBSchema == nil {
+ return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("schema not found for database %q; sync the database first", request.Name))
+ }
+
+ storeTargetMetadata := convertV1DatabaseMetadata(request.TargetMetadata)
+ targetDBSchema := model.NewDatabaseMetadata(storeTargetMetadata, nil, nil, engine, store.IsObjectCaseSensitive(instance))
+
+ migrationSQL, err := schema.DiffMigration(engine, sourceDBSchema, targetDBSchema)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to compute diff between source and target schemas"))
+ }
+
+ return connect.NewResponse(&v1pb.DiffMetadataResponse{
+ Diff: migrationSQL,
+ }), nil
+}
+
// shouldDiffSchemaViaSDL reports whether a raw-schema-text DiffSchema target should take the
// omni SDL diff path. engine MUST be the instance's real engine (not the parser-aliased one):
// the SDL path is gated on common.EngineSupportSDLExport — the same gate GetDatabaseSDLSchema
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index f6bfb35c6c..2e31a6fa21 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -32,7 +32,6 @@ import (
"github.com/bytebase/bytebase/backend/plugin/advisor/code"
"github.com/bytebase/bytebase/backend/plugin/db"
parserbase "github.com/bytebase/bytebase/backend/plugin/parser/base"
- "github.com/bytebase/bytebase/backend/plugin/schema"
"github.com/bytebase/bytebase/backend/runner/schemasync"
"github.com/bytebase/bytebase/backend/store"
"github.com/bytebase/bytebase/backend/store/model"
@@ -2129,34 +2128,6 @@ func (*SQLService) getUser(ctx context.Context) (*store.UserMessage, error) {
return user, nil
}
-func (*SQLService) DiffMetadata(_ context.Context, req *connect.Request[v1pb.DiffMetadataRequest]) (*connect.Response[v1pb.DiffMetadataResponse], error) {
- request := req.Msg
- switch request.Engine {
- case v1pb.Engine_MYSQL, v1pb.Engine_POSTGRES, v1pb.Engine_TIDB, v1pb.Engine_ORACLE, v1pb.Engine_MSSQL:
- default:
- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unsupported engine: %v", request.Engine))
- }
- if request.SourceMetadata == nil || request.TargetMetadata == nil {
- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("source_metadata and target_metadata are required"))
- }
- storeSourceMetadata := convertV1DatabaseMetadata(request.SourceMetadata)
- storeTargetMetadata := convertV1DatabaseMetadata(request.TargetMetadata)
-
- // Convert metadata to model.DatabaseMetadata for diffing
- isObjectCaseSensitive := true
- sourceDBSchema := model.NewDatabaseMetadata(storeSourceMetadata, nil, nil, storepb.Engine(request.Engine), isObjectCaseSensitive)
- targetDBSchema := model.NewDatabaseMetadata(storeTargetMetadata, nil, nil, storepb.Engine(request.Engine), isObjectCaseSensitive)
-
- migrationSQL, err := schema.DiffMigration(storepb.Engine(request.Engine), sourceDBSchema, targetDBSchema)
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to compute diff between source and target schemas"))
- }
-
- return connect.NewResponse(&v1pb.DiffMetadataResponse{
- Diff: migrationSQL,
- }), nil
-}
-
func resolveDataSourceID(ctx context.Context, instance *store.InstanceMessage, dataSourceID string, statement string, allowAdminDataSource bool) (string, error) {
if dataSourceID != "" {
return dataSourceID, nil
diff --git a/backend/common/permission/permission.go b/backend/common/permission/permission.go
index 44676acf7a..4c7b5812a9 100644
--- a/backend/common/permission/permission.go
+++ b/backend/common/permission/permission.go
@@ -29,6 +29,7 @@ const (
DatabaseGroupsList Permission = "bb.databaseGroups.list"
DatabaseGroupsUpdate Permission = "bb.databaseGroups.update"
DatabasesCheck Permission = "bb.databases.check"
+ DatabasesDiffMetadata Permission = "bb.databases.diffMetadata"
DatabasesGet Permission = "bb.databases.get"
DatabasesGetSchema Permission = "bb.databases.getSchema"
DatabasesList Permission = "bb.databases.list"
diff --git a/backend/common/permission/permission.yaml b/backend/common/permission/permission.yaml
index 6003cebf70..258c2a361f 100644
--- a/backend/common/permission/permission.yaml
+++ b/backend/common/permission/permission.yaml
@@ -16,6 +16,7 @@ permissions:
- bb.databaseGroups.list
- bb.databaseGroups.update
- bb.databases.check
+ - bb.databases.diffMetadata
- bb.databases.get
- bb.databases.getSchema
- bb.databases.list
diff --git a/backend/generated-go/v1/database_service.pb.go b/backend/generated-go/v1/database_service.pb.go
index 3229ee2e8d..db85440c0e 100644
--- a/backend/generated-go/v1/database_service.pb.go
+++ b/backend/generated-go/v1/database_service.pb.go
@@ -201,7 +201,7 @@ func (x TablePartitionMetadata_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use TablePartitionMetadata_Type.Descriptor instead.
func (TablePartitionMetadata_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{29, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{31, 0}
}
type ColumnMetadata_IdentityGeneration int32
@@ -250,7 +250,7 @@ func (x ColumnMetadata_IdentityGeneration) Number() protoreflect.EnumNumber {
// Deprecated: Use ColumnMetadata_IdentityGeneration.Descriptor instead.
func (ColumnMetadata_IdentityGeneration) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{30, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{32, 0}
}
type GenerationMetadata_Type int32
@@ -299,7 +299,7 @@ func (x GenerationMetadata_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use GenerationMetadata_Type.Descriptor instead.
func (GenerationMetadata_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{31, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{33, 0}
}
type TaskMetadata_State int32
@@ -348,7 +348,7 @@ func (x TaskMetadata_State) Number() protoreflect.EnumNumber {
// Deprecated: Use TaskMetadata_State.Descriptor instead.
func (TaskMetadata_State) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{39, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{41, 0}
}
type StreamMetadata_Type int32
@@ -394,7 +394,7 @@ func (x StreamMetadata_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use StreamMetadata_Type.Descriptor instead.
func (StreamMetadata_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{40, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{42, 0}
}
type StreamMetadata_Mode int32
@@ -446,7 +446,7 @@ func (x StreamMetadata_Mode) Number() protoreflect.EnumNumber {
// Deprecated: Use StreamMetadata_Mode.Descriptor instead.
func (StreamMetadata_Mode) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{40, 1}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{42, 1}
}
type GetSchemaStringRequest_ObjectType int32
@@ -513,7 +513,7 @@ func (x GetSchemaStringRequest_ObjectType) Number() protoreflect.EnumNumber {
// Deprecated: Use GetSchemaStringRequest_ObjectType.Descriptor instead.
func (GetSchemaStringRequest_ObjectType) EnumDescriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{53, 0}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{55, 0}
}
type GetDatabaseRequest struct {
@@ -1520,6 +1520,110 @@ func (x *DiffSchemaResponse) GetDiff() string {
return ""
}
+type DiffMetadataRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The database whose current schema is the diff source.
+ // Format: instances/{instance}/databases/{database}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The metadata of the target schema. The source metadata and the engine are
+ // read from the database, so only the target travels in the request.
+ // Must describe the COMPLETE target schema: the diff runs against the full
+ // stored source, so any object omitted from the target (for example by a
+ // truncated metadata fetch) is treated as dropped.
+ TargetMetadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=target_metadata,json=targetMetadata,proto3" json:"target_metadata,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DiffMetadataRequest) Reset() {
+ *x = DiffMetadataRequest{}
+ mi := &file_v1_database_service_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DiffMetadataRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffMetadataRequest) ProtoMessage() {}
+
+func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[17]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
+func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *DiffMetadataRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DiffMetadataRequest) GetTargetMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.TargetMetadata
+ }
+ return nil
+}
+
+type DiffMetadataResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The generated migration statements.
+ Diff string `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DiffMetadataResponse) Reset() {
+ *x = DiffMetadataResponse{}
+ mi := &file_v1_database_service_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DiffMetadataResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffMetadataResponse) ProtoMessage() {}
+
+func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_database_service_proto_msgTypes[18]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
+func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
+ return file_v1_database_service_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *DiffMetadataResponse) GetDiff() string {
+ if x != nil {
+ return x.Diff
+ }
+ return ""
+}
+
type Database struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The name of the database.
@@ -1560,7 +1664,7 @@ type Database struct {
func (x *Database) Reset() {
*x = Database{}
- mi := &file_v1_database_service_proto_msgTypes[17]
+ mi := &file_v1_database_service_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1572,7 +1676,7 @@ func (x *Database) String() string {
func (*Database) ProtoMessage() {}
func (x *Database) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[17]
+ mi := &file_v1_database_service_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1585,7 +1689,7 @@ func (x *Database) ProtoReflect() protoreflect.Message {
// Deprecated: Use Database.ProtoReflect.Descriptor instead.
func (*Database) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{17}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{19}
}
func (x *Database) GetName() string {
@@ -1697,7 +1801,7 @@ type DatabaseMetadata struct {
func (x *DatabaseMetadata) Reset() {
*x = DatabaseMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[18]
+ mi := &file_v1_database_service_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1709,7 +1813,7 @@ func (x *DatabaseMetadata) String() string {
func (*DatabaseMetadata) ProtoMessage() {}
func (x *DatabaseMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[18]
+ mi := &file_v1_database_service_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1722,7 +1826,7 @@ func (x *DatabaseMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use DatabaseMetadata.ProtoReflect.Descriptor instead.
func (*DatabaseMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{18}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{20}
}
func (x *DatabaseMetadata) GetName() string {
@@ -1823,7 +1927,7 @@ type SchemaMetadata struct {
func (x *SchemaMetadata) Reset() {
*x = SchemaMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[19]
+ mi := &file_v1_database_service_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1835,7 +1939,7 @@ func (x *SchemaMetadata) String() string {
func (*SchemaMetadata) ProtoMessage() {}
func (x *SchemaMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[19]
+ mi := &file_v1_database_service_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1848,7 +1952,7 @@ func (x *SchemaMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use SchemaMetadata.ProtoReflect.Descriptor instead.
func (*SchemaMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{19}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{21}
}
func (x *SchemaMetadata) GetName() string {
@@ -1986,7 +2090,7 @@ type EnumTypeMetadata struct {
func (x *EnumTypeMetadata) Reset() {
*x = EnumTypeMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[20]
+ mi := &file_v1_database_service_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1998,7 +2102,7 @@ func (x *EnumTypeMetadata) String() string {
func (*EnumTypeMetadata) ProtoMessage() {}
func (x *EnumTypeMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[20]
+ mi := &file_v1_database_service_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2011,7 +2115,7 @@ func (x *EnumTypeMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use EnumTypeMetadata.ProtoReflect.Descriptor instead.
func (*EnumTypeMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{20}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{22}
}
func (x *EnumTypeMetadata) GetName() string {
@@ -2056,7 +2160,7 @@ type CompositeTypeMetadata struct {
func (x *CompositeTypeMetadata) Reset() {
*x = CompositeTypeMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[21]
+ mi := &file_v1_database_service_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2068,7 +2172,7 @@ func (x *CompositeTypeMetadata) String() string {
func (*CompositeTypeMetadata) ProtoMessage() {}
func (x *CompositeTypeMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[21]
+ mi := &file_v1_database_service_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2081,7 +2185,7 @@ func (x *CompositeTypeMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use CompositeTypeMetadata.ProtoReflect.Descriptor instead.
func (*CompositeTypeMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{21}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{23}
}
func (x *CompositeTypeMetadata) GetName() string {
@@ -2123,7 +2227,7 @@ type CompositeTypeAttribute struct {
func (x *CompositeTypeAttribute) Reset() {
*x = CompositeTypeAttribute{}
- mi := &file_v1_database_service_proto_msgTypes[22]
+ mi := &file_v1_database_service_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2135,7 +2239,7 @@ func (x *CompositeTypeAttribute) String() string {
func (*CompositeTypeAttribute) ProtoMessage() {}
func (x *CompositeTypeAttribute) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[22]
+ mi := &file_v1_database_service_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2148,7 +2252,7 @@ func (x *CompositeTypeAttribute) ProtoReflect() protoreflect.Message {
// Deprecated: Use CompositeTypeAttribute.ProtoReflect.Descriptor instead.
func (*CompositeTypeAttribute) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{22}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{24}
}
func (x *CompositeTypeAttribute) GetName() string {
@@ -2201,7 +2305,7 @@ type EventMetadata struct {
func (x *EventMetadata) Reset() {
*x = EventMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[23]
+ mi := &file_v1_database_service_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2213,7 +2317,7 @@ func (x *EventMetadata) String() string {
func (*EventMetadata) ProtoMessage() {}
func (x *EventMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[23]
+ mi := &file_v1_database_service_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2226,7 +2330,7 @@ func (x *EventMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use EventMetadata.ProtoReflect.Descriptor instead.
func (*EventMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{23}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{25}
}
func (x *EventMetadata) GetName() string {
@@ -2312,7 +2416,7 @@ type SequenceMetadata struct {
func (x *SequenceMetadata) Reset() {
*x = SequenceMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[24]
+ mi := &file_v1_database_service_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2324,7 +2428,7 @@ func (x *SequenceMetadata) String() string {
func (*SequenceMetadata) ProtoMessage() {}
func (x *SequenceMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[24]
+ mi := &file_v1_database_service_proto_msgTypes[26]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2337,7 +2441,7 @@ func (x *SequenceMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use SequenceMetadata.ProtoReflect.Descriptor instead.
func (*SequenceMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{24}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{26}
}
func (x *SequenceMetadata) GetName() string {
@@ -2458,7 +2562,7 @@ type TriggerMetadata struct {
func (x *TriggerMetadata) Reset() {
*x = TriggerMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[25]
+ mi := &file_v1_database_service_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2470,7 +2574,7 @@ func (x *TriggerMetadata) String() string {
func (*TriggerMetadata) ProtoMessage() {}
func (x *TriggerMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[25]
+ mi := &file_v1_database_service_proto_msgTypes[27]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2483,7 +2587,7 @@ func (x *TriggerMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use TriggerMetadata.ProtoReflect.Descriptor instead.
func (*TriggerMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{25}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{27}
}
func (x *TriggerMetadata) GetName() string {
@@ -2565,7 +2669,7 @@ type ExternalTableMetadata struct {
func (x *ExternalTableMetadata) Reset() {
*x = ExternalTableMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[26]
+ mi := &file_v1_database_service_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2577,7 +2681,7 @@ func (x *ExternalTableMetadata) String() string {
func (*ExternalTableMetadata) ProtoMessage() {}
func (x *ExternalTableMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[26]
+ mi := &file_v1_database_service_proto_msgTypes[28]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2590,7 +2694,7 @@ func (x *ExternalTableMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExternalTableMetadata.ProtoReflect.Descriptor instead.
func (*ExternalTableMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{26}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{28}
}
func (x *ExternalTableMetadata) GetName() string {
@@ -2674,7 +2778,7 @@ type TableMetadata struct {
func (x *TableMetadata) Reset() {
*x = TableMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[27]
+ mi := &file_v1_database_service_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2686,7 +2790,7 @@ func (x *TableMetadata) String() string {
func (*TableMetadata) ProtoMessage() {}
func (x *TableMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[27]
+ mi := &file_v1_database_service_proto_msgTypes[29]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2699,7 +2803,7 @@ func (x *TableMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use TableMetadata.ProtoReflect.Descriptor instead.
func (*TableMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{27}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{29}
}
func (x *TableMetadata) GetName() string {
@@ -2862,7 +2966,7 @@ type CheckConstraintMetadata struct {
func (x *CheckConstraintMetadata) Reset() {
*x = CheckConstraintMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[28]
+ mi := &file_v1_database_service_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2874,7 +2978,7 @@ func (x *CheckConstraintMetadata) String() string {
func (*CheckConstraintMetadata) ProtoMessage() {}
func (x *CheckConstraintMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[28]
+ mi := &file_v1_database_service_proto_msgTypes[30]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2887,7 +2991,7 @@ func (x *CheckConstraintMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use CheckConstraintMetadata.ProtoReflect.Descriptor instead.
func (*CheckConstraintMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{28}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{30}
}
func (x *CheckConstraintMetadata) GetName() string {
@@ -2947,7 +3051,7 @@ type TablePartitionMetadata struct {
func (x *TablePartitionMetadata) Reset() {
*x = TablePartitionMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[29]
+ mi := &file_v1_database_service_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2959,7 +3063,7 @@ func (x *TablePartitionMetadata) String() string {
func (*TablePartitionMetadata) ProtoMessage() {}
func (x *TablePartitionMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[29]
+ mi := &file_v1_database_service_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2972,7 +3076,7 @@ func (x *TablePartitionMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use TablePartitionMetadata.ProtoReflect.Descriptor instead.
func (*TablePartitionMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{29}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{31}
}
func (x *TablePartitionMetadata) GetName() string {
@@ -3104,7 +3208,7 @@ type ColumnMetadata struct {
func (x *ColumnMetadata) Reset() {
*x = ColumnMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[30]
+ mi := &file_v1_database_service_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3116,7 +3220,7 @@ func (x *ColumnMetadata) String() string {
func (*ColumnMetadata) ProtoMessage() {}
func (x *ColumnMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[30]
+ mi := &file_v1_database_service_proto_msgTypes[32]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3129,7 +3233,7 @@ func (x *ColumnMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ColumnMetadata.ProtoReflect.Descriptor instead.
func (*ColumnMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{30}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{32}
}
func (x *ColumnMetadata) GetName() string {
@@ -3275,7 +3379,7 @@ type GenerationMetadata struct {
func (x *GenerationMetadata) Reset() {
*x = GenerationMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[31]
+ mi := &file_v1_database_service_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3287,7 +3391,7 @@ func (x *GenerationMetadata) String() string {
func (*GenerationMetadata) ProtoMessage() {}
func (x *GenerationMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[31]
+ mi := &file_v1_database_service_proto_msgTypes[33]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3300,7 +3404,7 @@ func (x *GenerationMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use GenerationMetadata.ProtoReflect.Descriptor instead.
func (*GenerationMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{31}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{33}
}
func (x *GenerationMetadata) GetType() GenerationMetadata_Type {
@@ -3339,7 +3443,7 @@ type ViewMetadata struct {
func (x *ViewMetadata) Reset() {
*x = ViewMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[32]
+ mi := &file_v1_database_service_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3351,7 +3455,7 @@ func (x *ViewMetadata) String() string {
func (*ViewMetadata) ProtoMessage() {}
func (x *ViewMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[32]
+ mi := &file_v1_database_service_proto_msgTypes[34]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3364,7 +3468,7 @@ func (x *ViewMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ViewMetadata.ProtoReflect.Descriptor instead.
func (*ViewMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{32}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{34}
}
func (x *ViewMetadata) GetName() string {
@@ -3431,7 +3535,7 @@ type DependencyColumn struct {
func (x *DependencyColumn) Reset() {
*x = DependencyColumn{}
- mi := &file_v1_database_service_proto_msgTypes[33]
+ mi := &file_v1_database_service_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3443,7 +3547,7 @@ func (x *DependencyColumn) String() string {
func (*DependencyColumn) ProtoMessage() {}
func (x *DependencyColumn) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[33]
+ mi := &file_v1_database_service_proto_msgTypes[35]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3456,7 +3560,7 @@ func (x *DependencyColumn) ProtoReflect() protoreflect.Message {
// Deprecated: Use DependencyColumn.ProtoReflect.Descriptor instead.
func (*DependencyColumn) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{33}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{35}
}
func (x *DependencyColumn) GetSchema() string {
@@ -3503,7 +3607,7 @@ type MaterializedViewMetadata struct {
func (x *MaterializedViewMetadata) Reset() {
*x = MaterializedViewMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[34]
+ mi := &file_v1_database_service_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3515,7 +3619,7 @@ func (x *MaterializedViewMetadata) String() string {
func (*MaterializedViewMetadata) ProtoMessage() {}
func (x *MaterializedViewMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[34]
+ mi := &file_v1_database_service_proto_msgTypes[36]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3528,7 +3632,7 @@ func (x *MaterializedViewMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use MaterializedViewMetadata.ProtoReflect.Descriptor instead.
func (*MaterializedViewMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{34}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{36}
}
func (x *MaterializedViewMetadata) GetName() string {
@@ -3592,7 +3696,7 @@ type DependencyTable struct {
func (x *DependencyTable) Reset() {
*x = DependencyTable{}
- mi := &file_v1_database_service_proto_msgTypes[35]
+ mi := &file_v1_database_service_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3604,7 +3708,7 @@ func (x *DependencyTable) String() string {
func (*DependencyTable) ProtoMessage() {}
func (x *DependencyTable) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[35]
+ mi := &file_v1_database_service_proto_msgTypes[37]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3617,7 +3721,7 @@ func (x *DependencyTable) ProtoReflect() protoreflect.Message {
// Deprecated: Use DependencyTable.ProtoReflect.Descriptor instead.
func (*DependencyTable) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{35}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{37}
}
func (x *DependencyTable) GetSchema() string {
@@ -3660,7 +3764,7 @@ type FunctionMetadata struct {
func (x *FunctionMetadata) Reset() {
*x = FunctionMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[36]
+ mi := &file_v1_database_service_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3672,7 +3776,7 @@ func (x *FunctionMetadata) String() string {
func (*FunctionMetadata) ProtoMessage() {}
func (x *FunctionMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[36]
+ mi := &file_v1_database_service_proto_msgTypes[38]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3685,7 +3789,7 @@ func (x *FunctionMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use FunctionMetadata.ProtoReflect.Descriptor instead.
func (*FunctionMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{36}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{38}
}
func (x *FunctionMetadata) GetName() string {
@@ -3782,7 +3886,7 @@ type ProcedureMetadata struct {
func (x *ProcedureMetadata) Reset() {
*x = ProcedureMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[37]
+ mi := &file_v1_database_service_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3794,7 +3898,7 @@ func (x *ProcedureMetadata) String() string {
func (*ProcedureMetadata) ProtoMessage() {}
func (x *ProcedureMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[37]
+ mi := &file_v1_database_service_proto_msgTypes[39]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3807,7 +3911,7 @@ func (x *ProcedureMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ProcedureMetadata.ProtoReflect.Descriptor instead.
func (*ProcedureMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{37}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{39}
}
func (x *ProcedureMetadata) GetName() string {
@@ -3886,7 +3990,7 @@ type PackageMetadata struct {
func (x *PackageMetadata) Reset() {
*x = PackageMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[38]
+ mi := &file_v1_database_service_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3898,7 +4002,7 @@ func (x *PackageMetadata) String() string {
func (*PackageMetadata) ProtoMessage() {}
func (x *PackageMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[38]
+ mi := &file_v1_database_service_proto_msgTypes[40]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3911,7 +4015,7 @@ func (x *PackageMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use PackageMetadata.ProtoReflect.Descriptor instead.
func (*PackageMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{38}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{40}
}
func (x *PackageMetadata) GetName() string {
@@ -3957,7 +4061,7 @@ type TaskMetadata struct {
func (x *TaskMetadata) Reset() {
*x = TaskMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[39]
+ mi := &file_v1_database_service_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3969,7 +4073,7 @@ func (x *TaskMetadata) String() string {
func (*TaskMetadata) ProtoMessage() {}
func (x *TaskMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[39]
+ mi := &file_v1_database_service_proto_msgTypes[41]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3982,7 +4086,7 @@ func (x *TaskMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use TaskMetadata.ProtoReflect.Descriptor instead.
func (*TaskMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{39}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{41}
}
func (x *TaskMetadata) GetName() string {
@@ -4079,7 +4183,7 @@ type StreamMetadata struct {
func (x *StreamMetadata) Reset() {
*x = StreamMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[40]
+ mi := &file_v1_database_service_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4091,7 +4195,7 @@ func (x *StreamMetadata) String() string {
func (*StreamMetadata) ProtoMessage() {}
func (x *StreamMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[40]
+ mi := &file_v1_database_service_proto_msgTypes[42]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4104,7 +4208,7 @@ func (x *StreamMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use StreamMetadata.ProtoReflect.Descriptor instead.
func (*StreamMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{40}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{42}
}
func (x *StreamMetadata) GetName() string {
@@ -4180,7 +4284,7 @@ type SpatialIndexConfig struct {
func (x *SpatialIndexConfig) Reset() {
*x = SpatialIndexConfig{}
- mi := &file_v1_database_service_proto_msgTypes[41]
+ mi := &file_v1_database_service_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4192,7 +4296,7 @@ func (x *SpatialIndexConfig) String() string {
func (*SpatialIndexConfig) ProtoMessage() {}
func (x *SpatialIndexConfig) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[41]
+ mi := &file_v1_database_service_proto_msgTypes[43]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4205,7 +4309,7 @@ func (x *SpatialIndexConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use SpatialIndexConfig.ProtoReflect.Descriptor instead.
func (*SpatialIndexConfig) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{41}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{43}
}
func (x *SpatialIndexConfig) GetMethod() string {
@@ -4253,7 +4357,7 @@ type TessellationConfig struct {
func (x *TessellationConfig) Reset() {
*x = TessellationConfig{}
- mi := &file_v1_database_service_proto_msgTypes[42]
+ mi := &file_v1_database_service_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4265,7 +4369,7 @@ func (x *TessellationConfig) String() string {
func (*TessellationConfig) ProtoMessage() {}
func (x *TessellationConfig) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[42]
+ mi := &file_v1_database_service_proto_msgTypes[44]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4278,7 +4382,7 @@ func (x *TessellationConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use TessellationConfig.ProtoReflect.Descriptor instead.
func (*TessellationConfig) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{42}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{44}
}
func (x *TessellationConfig) GetScheme() string {
@@ -4322,7 +4426,7 @@ type GridLevel struct {
func (x *GridLevel) Reset() {
*x = GridLevel{}
- mi := &file_v1_database_service_proto_msgTypes[43]
+ mi := &file_v1_database_service_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4334,7 +4438,7 @@ func (x *GridLevel) String() string {
func (*GridLevel) ProtoMessage() {}
func (x *GridLevel) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[43]
+ mi := &file_v1_database_service_proto_msgTypes[45]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4347,7 +4451,7 @@ func (x *GridLevel) ProtoReflect() protoreflect.Message {
// Deprecated: Use GridLevel.ProtoReflect.Descriptor instead.
func (*GridLevel) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{43}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{45}
}
func (x *GridLevel) GetLevel() int32 {
@@ -4381,7 +4485,7 @@ type BoundingBox struct {
func (x *BoundingBox) Reset() {
*x = BoundingBox{}
- mi := &file_v1_database_service_proto_msgTypes[44]
+ mi := &file_v1_database_service_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4393,7 +4497,7 @@ func (x *BoundingBox) String() string {
func (*BoundingBox) ProtoMessage() {}
func (x *BoundingBox) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[44]
+ mi := &file_v1_database_service_proto_msgTypes[46]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4406,7 +4510,7 @@ func (x *BoundingBox) ProtoReflect() protoreflect.Message {
// Deprecated: Use BoundingBox.ProtoReflect.Descriptor instead.
func (*BoundingBox) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{44}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{46}
}
func (x *BoundingBox) GetXmin() float64 {
@@ -4464,7 +4568,7 @@ type StorageConfig struct {
func (x *StorageConfig) Reset() {
*x = StorageConfig{}
- mi := &file_v1_database_service_proto_msgTypes[45]
+ mi := &file_v1_database_service_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4476,7 +4580,7 @@ func (x *StorageConfig) String() string {
func (*StorageConfig) ProtoMessage() {}
func (x *StorageConfig) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[45]
+ mi := &file_v1_database_service_proto_msgTypes[47]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4489,7 +4593,7 @@ func (x *StorageConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use StorageConfig.ProtoReflect.Descriptor instead.
func (*StorageConfig) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{45}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{47}
}
func (x *StorageConfig) GetFillfactor() int32 {
@@ -4607,7 +4711,7 @@ type DimensionalConfig struct {
func (x *DimensionalConfig) Reset() {
*x = DimensionalConfig{}
- mi := &file_v1_database_service_proto_msgTypes[46]
+ mi := &file_v1_database_service_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4619,7 +4723,7 @@ func (x *DimensionalConfig) String() string {
func (*DimensionalConfig) ProtoMessage() {}
func (x *DimensionalConfig) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[46]
+ mi := &file_v1_database_service_proto_msgTypes[48]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4632,7 +4736,7 @@ func (x *DimensionalConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use DimensionalConfig.ProtoReflect.Descriptor instead.
func (*DimensionalConfig) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{46}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{48}
}
func (x *DimensionalConfig) GetDimensions() int32 {
@@ -4680,7 +4784,7 @@ type DimensionConstraint struct {
func (x *DimensionConstraint) Reset() {
*x = DimensionConstraint{}
- mi := &file_v1_database_service_proto_msgTypes[47]
+ mi := &file_v1_database_service_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4692,7 +4796,7 @@ func (x *DimensionConstraint) String() string {
func (*DimensionConstraint) ProtoMessage() {}
func (x *DimensionConstraint) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[47]
+ mi := &file_v1_database_service_proto_msgTypes[49]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4705,7 +4809,7 @@ func (x *DimensionConstraint) ProtoReflect() protoreflect.Message {
// Deprecated: Use DimensionConstraint.ProtoReflect.Descriptor instead.
func (*DimensionConstraint) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{47}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{49}
}
func (x *DimensionConstraint) GetDimension() string {
@@ -4783,7 +4887,7 @@ type IndexMetadata struct {
func (x *IndexMetadata) Reset() {
*x = IndexMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[48]
+ mi := &file_v1_database_service_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4795,7 +4899,7 @@ func (x *IndexMetadata) String() string {
func (*IndexMetadata) ProtoMessage() {}
func (x *IndexMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[48]
+ mi := &file_v1_database_service_proto_msgTypes[50]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4808,7 +4912,7 @@ func (x *IndexMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use IndexMetadata.ProtoReflect.Descriptor instead.
func (*IndexMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{48}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{50}
}
func (x *IndexMetadata) GetName() string {
@@ -4948,7 +5052,7 @@ type ExtensionMetadata struct {
func (x *ExtensionMetadata) Reset() {
*x = ExtensionMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[49]
+ mi := &file_v1_database_service_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4960,7 +5064,7 @@ func (x *ExtensionMetadata) String() string {
func (*ExtensionMetadata) ProtoMessage() {}
func (x *ExtensionMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[49]
+ mi := &file_v1_database_service_proto_msgTypes[51]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4973,7 +5077,7 @@ func (x *ExtensionMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExtensionMetadata.ProtoReflect.Descriptor instead.
func (*ExtensionMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{49}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{51}
}
func (x *ExtensionMetadata) GetName() string {
@@ -5032,7 +5136,7 @@ type ForeignKeyMetadata struct {
func (x *ForeignKeyMetadata) Reset() {
*x = ForeignKeyMetadata{}
- mi := &file_v1_database_service_proto_msgTypes[50]
+ mi := &file_v1_database_service_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5044,7 +5148,7 @@ func (x *ForeignKeyMetadata) String() string {
func (*ForeignKeyMetadata) ProtoMessage() {}
func (x *ForeignKeyMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[50]
+ mi := &file_v1_database_service_proto_msgTypes[52]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5057,7 +5161,7 @@ func (x *ForeignKeyMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use ForeignKeyMetadata.ProtoReflect.Descriptor instead.
func (*ForeignKeyMetadata) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{50}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{52}
}
func (x *ForeignKeyMetadata) GetName() string {
@@ -5127,7 +5231,7 @@ type DatabaseSchema struct {
func (x *DatabaseSchema) Reset() {
*x = DatabaseSchema{}
- mi := &file_v1_database_service_proto_msgTypes[51]
+ mi := &file_v1_database_service_proto_msgTypes[53]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5139,7 +5243,7 @@ func (x *DatabaseSchema) String() string {
func (*DatabaseSchema) ProtoMessage() {}
func (x *DatabaseSchema) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[51]
+ mi := &file_v1_database_service_proto_msgTypes[53]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5152,7 +5256,7 @@ func (x *DatabaseSchema) ProtoReflect() protoreflect.Message {
// Deprecated: Use DatabaseSchema.ProtoReflect.Descriptor instead.
func (*DatabaseSchema) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{51}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{53}
}
func (x *DatabaseSchema) GetSchema() string {
@@ -5181,7 +5285,7 @@ type DatabaseSDLSchema struct {
func (x *DatabaseSDLSchema) Reset() {
*x = DatabaseSDLSchema{}
- mi := &file_v1_database_service_proto_msgTypes[52]
+ mi := &file_v1_database_service_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5193,7 +5297,7 @@ func (x *DatabaseSDLSchema) String() string {
func (*DatabaseSDLSchema) ProtoMessage() {}
func (x *DatabaseSDLSchema) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[52]
+ mi := &file_v1_database_service_proto_msgTypes[54]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5206,7 +5310,7 @@ func (x *DatabaseSDLSchema) ProtoReflect() protoreflect.Message {
// Deprecated: Use DatabaseSDLSchema.ProtoReflect.Descriptor instead.
func (*DatabaseSDLSchema) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{52}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{54}
}
func (x *DatabaseSDLSchema) GetSchema() []byte {
@@ -5242,7 +5346,7 @@ type GetSchemaStringRequest struct {
func (x *GetSchemaStringRequest) Reset() {
*x = GetSchemaStringRequest{}
- mi := &file_v1_database_service_proto_msgTypes[53]
+ mi := &file_v1_database_service_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5254,7 +5358,7 @@ func (x *GetSchemaStringRequest) String() string {
func (*GetSchemaStringRequest) ProtoMessage() {}
func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[53]
+ mi := &file_v1_database_service_proto_msgTypes[55]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5267,7 +5371,7 @@ func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSchemaStringRequest.ProtoReflect.Descriptor instead.
func (*GetSchemaStringRequest) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{53}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{55}
}
func (x *GetSchemaStringRequest) GetName() string {
@@ -5314,7 +5418,7 @@ type GetSchemaStringResponse struct {
func (x *GetSchemaStringResponse) Reset() {
*x = GetSchemaStringResponse{}
- mi := &file_v1_database_service_proto_msgTypes[54]
+ mi := &file_v1_database_service_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5326,7 +5430,7 @@ func (x *GetSchemaStringResponse) String() string {
func (*GetSchemaStringResponse) ProtoMessage() {}
func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_database_service_proto_msgTypes[54]
+ mi := &file_v1_database_service_proto_msgTypes[56]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5339,7 +5443,7 @@ func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetSchemaStringResponse.ProtoReflect.Descriptor instead.
func (*GetSchemaStringResponse) Descriptor() ([]byte, []int) {
- return file_v1_database_service_proto_rawDescGZIP(), []int{54}
+ return file_v1_database_service_proto_rawDescGZIP(), []int{56}
}
func (x *GetSchemaStringResponse) GetSchemaString() string {
@@ -5417,6 +5521,12 @@ const file_v1_database_service_proto_rawDesc = "" +
"\tchangelog\x18\x03 \x01(\tH\x00R\tchangelogB\b\n" +
"\x06target\"(\n" +
"\x12DiffSchemaResponse\x12\x12\n" +
+ "\x04diff\x18\x01 \x01(\tR\x04diff\"\x95\x01\n" +
+ "\x13DiffMetadataRequest\x121\n" +
+ "\x04name\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
+ "\x15bytebase.com/DatabaseR\x04name\x12K\n" +
+ "\x0ftarget_metadata\x18\x02 \x01(\v2\x1d.bytebase.v1.DatabaseMetadataB\x03\xe0A\x02R\x0etargetMetadata\"*\n" +
+ "\x14DiffMetadataResponse\x12\x12\n" +
"\x04diff\x18\x01 \x01(\tR\x04diff\"\x8f\x06\n" +
"\bDatabase\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12-\n" +
@@ -5846,7 +5956,7 @@ const file_v1_database_service_proto_rawDesc = "" +
"\x17SYNC_STATUS_UNSPECIFIED\x10\x00\x12\x06\n" +
"\x02OK\x10\x01\x12\n" +
"\n" +
- "\x06FAILED\x10\x022\x90\x12\n" +
+ "\x06FAILED\x10\x022\xc3\x13\n" +
"\x0fDatabaseService\x12\x90\x01\n" +
"\vGetDatabase\x12\x1f.bytebase.v1.GetDatabaseRequest\x1a\x15.bytebase.v1.Database\"I\xdaA\x04name\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02$\x12\"/v1/{name=instances/*/databases/*}\x12\xdd\x01\n" +
"\x11BatchGetDatabases\x12%.bytebase.v1.BatchGetDatabasesRequest\x1a&.bytebase.v1.BatchGetDatabasesResponse\"y\x8a\xea0\x10bb.databases.get\x90\xea0\x02\x82\xd3\xe4\x93\x02[Z-\x12+/v1/{parent=instances/*}/databases:batchGet\x12*/v1/{parent=projects/*}/databases:batchGet\x12\xeb\x01\n" +
@@ -5859,7 +5969,8 @@ const file_v1_database_service_proto_rawDesc = "" +
"\x11GetDatabaseSchema\x12%.bytebase.v1.GetDatabaseSchemaRequest\x1a\x1b.bytebase.v1.DatabaseSchema\"O\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x02+\x12)/v1/{name=instances/*/databases/*/schema}\x12\xb4\x01\n" +
"\x14GetDatabaseSDLSchema\x12(.bytebase.v1.GetDatabaseSDLSchemaRequest\x1a\x1e.bytebase.v1.DatabaseSDLSchema\"R\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x02.\x12,/v1/{name=instances/*/databases/*/sdlSchema}\x12\xe1\x01\n" +
"\n" +
- "DiffSchema\x12\x1e.bytebase.v1.DiffSchemaRequest\x1a\x1f.bytebase.v1.DiffSchemaResponse\"\x91\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02s:\x01*Z?:\x01*\":/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema\"-/v1/{name=instances/*/databases/*}:diffSchema\x12\xba\x01\n" +
+ "DiffSchema\x12\x1e.bytebase.v1.DiffSchemaRequest\x1a\x1f.bytebase.v1.DiffSchemaResponse\"\x91\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x82\xd3\xe4\x93\x02s:\x01*Z?:\x01*\":/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema\"-/v1/{name=instances/*/databases/*}:diffSchema\x12\xb0\x01\n" +
+ "\fDiffMetadata\x12 .bytebase.v1.DiffMetadataRequest\x1a!.bytebase.v1.DiffMetadataResponse\"[\x8a\xea0\x19bb.databases.diffMetadata\x90\xea0\x01\x82\xd3\xe4\x93\x024:\x01*\"//v1/{name=instances/*/databases/*}:diffMetadata\x12\xba\x01\n" +
"\x0fGetSchemaString\x12#.bytebase.v1.GetSchemaStringRequest\x1a$.bytebase.v1.GetSchemaStringResponse\"\\\xdaA\x04name\x8a\xea0\x16bb.databases.getSchema\x90\xea0\x01\x82\xd3\xe4\x93\x021\x12//v1/{name=instances/*/databases/*/schemaString}B\xaa\x01\n" +
"\x0fcom.bytebase.v1B\x14DatabaseServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"
@@ -5876,7 +5987,7 @@ func file_v1_database_service_proto_rawDescGZIP() []byte {
}
var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)
-var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 56)
+var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 58)
var file_v1_database_service_proto_goTypes = []any{
(SyncStatus)(0), // 0: bytebase.v1.SyncStatus
(GetDatabaseSDLSchemaRequest_SDLFormat)(0), // 1: bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat
@@ -5904,141 +6015,146 @@ var file_v1_database_service_proto_goTypes = []any{
(*GetDatabaseSDLSchemaRequest)(nil), // 23: bytebase.v1.GetDatabaseSDLSchemaRequest
(*DiffSchemaRequest)(nil), // 24: bytebase.v1.DiffSchemaRequest
(*DiffSchemaResponse)(nil), // 25: bytebase.v1.DiffSchemaResponse
- (*Database)(nil), // 26: bytebase.v1.Database
- (*DatabaseMetadata)(nil), // 27: bytebase.v1.DatabaseMetadata
- (*SchemaMetadata)(nil), // 28: bytebase.v1.SchemaMetadata
- (*EnumTypeMetadata)(nil), // 29: bytebase.v1.EnumTypeMetadata
- (*CompositeTypeMetadata)(nil), // 30: bytebase.v1.CompositeTypeMetadata
- (*CompositeTypeAttribute)(nil), // 31: bytebase.v1.CompositeTypeAttribute
- (*EventMetadata)(nil), // 32: bytebase.v1.EventMetadata
- (*SequenceMetadata)(nil), // 33: bytebase.v1.SequenceMetadata
- (*TriggerMetadata)(nil), // 34: bytebase.v1.TriggerMetadata
- (*ExternalTableMetadata)(nil), // 35: bytebase.v1.ExternalTableMetadata
- (*TableMetadata)(nil), // 36: bytebase.v1.TableMetadata
- (*CheckConstraintMetadata)(nil), // 37: bytebase.v1.CheckConstraintMetadata
- (*TablePartitionMetadata)(nil), // 38: bytebase.v1.TablePartitionMetadata
- (*ColumnMetadata)(nil), // 39: bytebase.v1.ColumnMetadata
- (*GenerationMetadata)(nil), // 40: bytebase.v1.GenerationMetadata
- (*ViewMetadata)(nil), // 41: bytebase.v1.ViewMetadata
- (*DependencyColumn)(nil), // 42: bytebase.v1.DependencyColumn
- (*MaterializedViewMetadata)(nil), // 43: bytebase.v1.MaterializedViewMetadata
- (*DependencyTable)(nil), // 44: bytebase.v1.DependencyTable
- (*FunctionMetadata)(nil), // 45: bytebase.v1.FunctionMetadata
- (*ProcedureMetadata)(nil), // 46: bytebase.v1.ProcedureMetadata
- (*PackageMetadata)(nil), // 47: bytebase.v1.PackageMetadata
- (*TaskMetadata)(nil), // 48: bytebase.v1.TaskMetadata
- (*StreamMetadata)(nil), // 49: bytebase.v1.StreamMetadata
- (*SpatialIndexConfig)(nil), // 50: bytebase.v1.SpatialIndexConfig
- (*TessellationConfig)(nil), // 51: bytebase.v1.TessellationConfig
- (*GridLevel)(nil), // 52: bytebase.v1.GridLevel
- (*BoundingBox)(nil), // 53: bytebase.v1.BoundingBox
- (*StorageConfig)(nil), // 54: bytebase.v1.StorageConfig
- (*DimensionalConfig)(nil), // 55: bytebase.v1.DimensionalConfig
- (*DimensionConstraint)(nil), // 56: bytebase.v1.DimensionConstraint
- (*IndexMetadata)(nil), // 57: bytebase.v1.IndexMetadata
- (*ExtensionMetadata)(nil), // 58: bytebase.v1.ExtensionMetadata
- (*ForeignKeyMetadata)(nil), // 59: bytebase.v1.ForeignKeyMetadata
- (*DatabaseSchema)(nil), // 60: bytebase.v1.DatabaseSchema
- (*DatabaseSDLSchema)(nil), // 61: bytebase.v1.DatabaseSDLSchema
- (*GetSchemaStringRequest)(nil), // 62: bytebase.v1.GetSchemaStringRequest
- (*GetSchemaStringResponse)(nil), // 63: bytebase.v1.GetSchemaStringResponse
- nil, // 64: bytebase.v1.Database.LabelsEntry
- (*fieldmaskpb.FieldMask)(nil), // 65: google.protobuf.FieldMask
- (State)(0), // 66: bytebase.v1.State
- (*timestamppb.Timestamp)(nil), // 67: google.protobuf.Timestamp
- (*InstanceResource)(nil), // 68: bytebase.v1.InstanceResource
+ (*DiffMetadataRequest)(nil), // 26: bytebase.v1.DiffMetadataRequest
+ (*DiffMetadataResponse)(nil), // 27: bytebase.v1.DiffMetadataResponse
+ (*Database)(nil), // 28: bytebase.v1.Database
+ (*DatabaseMetadata)(nil), // 29: bytebase.v1.DatabaseMetadata
+ (*SchemaMetadata)(nil), // 30: bytebase.v1.SchemaMetadata
+ (*EnumTypeMetadata)(nil), // 31: bytebase.v1.EnumTypeMetadata
+ (*CompositeTypeMetadata)(nil), // 32: bytebase.v1.CompositeTypeMetadata
+ (*CompositeTypeAttribute)(nil), // 33: bytebase.v1.CompositeTypeAttribute
+ (*EventMetadata)(nil), // 34: bytebase.v1.EventMetadata
+ (*SequenceMetadata)(nil), // 35: bytebase.v1.SequenceMetadata
+ (*TriggerMetadata)(nil), // 36: bytebase.v1.TriggerMetadata
+ (*ExternalTableMetadata)(nil), // 37: bytebase.v1.ExternalTableMetadata
+ (*TableMetadata)(nil), // 38: bytebase.v1.TableMetadata
+ (*CheckConstraintMetadata)(nil), // 39: bytebase.v1.CheckConstraintMetadata
+ (*TablePartitionMetadata)(nil), // 40: bytebase.v1.TablePartitionMetadata
+ (*ColumnMetadata)(nil), // 41: bytebase.v1.ColumnMetadata
+ (*GenerationMetadata)(nil), // 42: bytebase.v1.GenerationMetadata
+ (*ViewMetadata)(nil), // 43: bytebase.v1.ViewMetadata
+ (*DependencyColumn)(nil), // 44: bytebase.v1.DependencyColumn
+ (*MaterializedViewMetadata)(nil), // 45: bytebase.v1.MaterializedViewMetadata
+ (*DependencyTable)(nil), // 46: bytebase.v1.DependencyTable
+ (*FunctionMetadata)(nil), // 47: bytebase.v1.FunctionMetadata
+ (*ProcedureMetadata)(nil), // 48: bytebase.v1.ProcedureMetadata
+ (*PackageMetadata)(nil), // 49: bytebase.v1.PackageMetadata
+ (*TaskMetadata)(nil), // 50: bytebase.v1.TaskMetadata
+ (*StreamMetadata)(nil), // 51: bytebase.v1.StreamMetadata
+ (*SpatialIndexConfig)(nil), // 52: bytebase.v1.SpatialIndexConfig
+ (*TessellationConfig)(nil), // 53: bytebase.v1.TessellationConfig
+ (*GridLevel)(nil), // 54: bytebase.v1.GridLevel
+ (*BoundingBox)(nil), // 55: bytebase.v1.BoundingBox
+ (*StorageConfig)(nil), // 56: bytebase.v1.StorageConfig
+ (*DimensionalConfig)(nil), // 57: bytebase.v1.DimensionalConfig
+ (*DimensionConstraint)(nil), // 58: bytebase.v1.DimensionConstraint
+ (*IndexMetadata)(nil), // 59: bytebase.v1.IndexMetadata
+ (*ExtensionMetadata)(nil), // 60: bytebase.v1.ExtensionMetadata
+ (*ForeignKeyMetadata)(nil), // 61: bytebase.v1.ForeignKeyMetadata
+ (*DatabaseSchema)(nil), // 62: bytebase.v1.DatabaseSchema
+ (*DatabaseSDLSchema)(nil), // 63: bytebase.v1.DatabaseSDLSchema
+ (*GetSchemaStringRequest)(nil), // 64: bytebase.v1.GetSchemaStringRequest
+ (*GetSchemaStringResponse)(nil), // 65: bytebase.v1.GetSchemaStringResponse
+ nil, // 66: bytebase.v1.Database.LabelsEntry
+ (*fieldmaskpb.FieldMask)(nil), // 67: google.protobuf.FieldMask
+ (State)(0), // 68: bytebase.v1.State
+ (*timestamppb.Timestamp)(nil), // 69: google.protobuf.Timestamp
+ (*InstanceResource)(nil), // 70: bytebase.v1.InstanceResource
}
var file_v1_database_service_proto_depIdxs = []int32{
- 26, // 0: bytebase.v1.BatchGetDatabasesResponse.databases:type_name -> bytebase.v1.Database
- 26, // 1: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database
- 26, // 2: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database
- 65, // 3: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 28, // 0: bytebase.v1.BatchGetDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 28, // 1: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 28, // 2: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database
+ 67, // 3: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask
14, // 4: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest
- 26, // 5: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database
+ 28, // 5: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database
1, // 6: bytebase.v1.GetDatabaseSDLSchemaRequest.format:type_name -> bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat
- 66, // 7: bytebase.v1.Database.state:type_name -> bytebase.v1.State
- 67, // 8: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
- 64, // 9: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
- 68, // 10: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource
- 0, // 11: bytebase.v1.Database.sync_status:type_name -> bytebase.v1.SyncStatus
- 28, // 12: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata
- 58, // 13: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata
- 36, // 14: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata
- 35, // 15: bytebase.v1.SchemaMetadata.external_tables:type_name -> bytebase.v1.ExternalTableMetadata
- 41, // 16: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata
- 45, // 17: bytebase.v1.SchemaMetadata.functions:type_name -> bytebase.v1.FunctionMetadata
- 46, // 18: bytebase.v1.SchemaMetadata.procedures:type_name -> bytebase.v1.ProcedureMetadata
- 49, // 19: bytebase.v1.SchemaMetadata.streams:type_name -> bytebase.v1.StreamMetadata
- 48, // 20: bytebase.v1.SchemaMetadata.tasks:type_name -> bytebase.v1.TaskMetadata
- 43, // 21: bytebase.v1.SchemaMetadata.materialized_views:type_name -> bytebase.v1.MaterializedViewMetadata
- 47, // 22: bytebase.v1.SchemaMetadata.packages:type_name -> bytebase.v1.PackageMetadata
- 33, // 23: bytebase.v1.SchemaMetadata.sequences:type_name -> bytebase.v1.SequenceMetadata
- 32, // 24: bytebase.v1.SchemaMetadata.events:type_name -> bytebase.v1.EventMetadata
- 29, // 25: bytebase.v1.SchemaMetadata.enum_types:type_name -> bytebase.v1.EnumTypeMetadata
- 30, // 26: bytebase.v1.SchemaMetadata.composite_types:type_name -> bytebase.v1.CompositeTypeMetadata
- 31, // 27: bytebase.v1.CompositeTypeMetadata.attributes:type_name -> bytebase.v1.CompositeTypeAttribute
- 39, // 28: bytebase.v1.ExternalTableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
- 39, // 29: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
- 57, // 30: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
- 59, // 31: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata
- 38, // 32: bytebase.v1.TableMetadata.partitions:type_name -> bytebase.v1.TablePartitionMetadata
- 37, // 33: bytebase.v1.TableMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
- 34, // 34: bytebase.v1.TableMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
- 2, // 35: bytebase.v1.TablePartitionMetadata.type:type_name -> bytebase.v1.TablePartitionMetadata.Type
- 38, // 36: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata
- 57, // 37: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
- 37, // 38: bytebase.v1.TablePartitionMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
- 40, // 39: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata
- 3, // 40: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration
- 4, // 41: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type
- 42, // 42: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
- 39, // 43: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
- 34, // 44: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
- 42, // 45: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
- 34, // 46: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
- 57, // 47: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
- 44, // 48: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable
- 5, // 49: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State
- 6, // 50: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type
- 7, // 51: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode
- 51, // 52: bytebase.v1.SpatialIndexConfig.tessellation:type_name -> bytebase.v1.TessellationConfig
- 54, // 53: bytebase.v1.SpatialIndexConfig.storage:type_name -> bytebase.v1.StorageConfig
- 55, // 54: bytebase.v1.SpatialIndexConfig.dimensional:type_name -> bytebase.v1.DimensionalConfig
- 52, // 55: bytebase.v1.TessellationConfig.grid_levels:type_name -> bytebase.v1.GridLevel
- 53, // 56: bytebase.v1.TessellationConfig.bounding_box:type_name -> bytebase.v1.BoundingBox
- 56, // 57: bytebase.v1.DimensionalConfig.constraints:type_name -> bytebase.v1.DimensionConstraint
- 50, // 58: bytebase.v1.IndexMetadata.spatial_config:type_name -> bytebase.v1.SpatialIndexConfig
- 8, // 59: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType
- 27, // 60: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
- 9, // 61: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
- 10, // 62: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest
- 12, // 63: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
- 14, // 64: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
- 15, // 65: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
- 19, // 66: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest
- 17, // 67: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest
- 21, // 68: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
- 22, // 69: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
- 23, // 70: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:input_type -> bytebase.v1.GetDatabaseSDLSchemaRequest
- 24, // 71: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest
- 62, // 72: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest
- 26, // 73: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
- 11, // 74: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse
- 13, // 75: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
- 26, // 76: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
- 16, // 77: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
- 20, // 78: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse
- 18, // 79: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse
- 27, // 80: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
- 60, // 81: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
- 61, // 82: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:output_type -> bytebase.v1.DatabaseSDLSchema
- 25, // 83: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse
- 63, // 84: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse
- 73, // [73:85] is the sub-list for method output_type
- 61, // [61:73] is the sub-list for method input_type
- 61, // [61:61] is the sub-list for extension type_name
- 61, // [61:61] is the sub-list for extension extendee
- 0, // [0:61] is the sub-list for field type_name
+ 29, // 7: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 68, // 8: bytebase.v1.Database.state:type_name -> bytebase.v1.State
+ 69, // 9: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp
+ 66, // 10: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry
+ 70, // 11: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource
+ 0, // 12: bytebase.v1.Database.sync_status:type_name -> bytebase.v1.SyncStatus
+ 30, // 13: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata
+ 60, // 14: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata
+ 38, // 15: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata
+ 37, // 16: bytebase.v1.SchemaMetadata.external_tables:type_name -> bytebase.v1.ExternalTableMetadata
+ 43, // 17: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata
+ 47, // 18: bytebase.v1.SchemaMetadata.functions:type_name -> bytebase.v1.FunctionMetadata
+ 48, // 19: bytebase.v1.SchemaMetadata.procedures:type_name -> bytebase.v1.ProcedureMetadata
+ 51, // 20: bytebase.v1.SchemaMetadata.streams:type_name -> bytebase.v1.StreamMetadata
+ 50, // 21: bytebase.v1.SchemaMetadata.tasks:type_name -> bytebase.v1.TaskMetadata
+ 45, // 22: bytebase.v1.SchemaMetadata.materialized_views:type_name -> bytebase.v1.MaterializedViewMetadata
+ 49, // 23: bytebase.v1.SchemaMetadata.packages:type_name -> bytebase.v1.PackageMetadata
+ 35, // 24: bytebase.v1.SchemaMetadata.sequences:type_name -> bytebase.v1.SequenceMetadata
+ 34, // 25: bytebase.v1.SchemaMetadata.events:type_name -> bytebase.v1.EventMetadata
+ 31, // 26: bytebase.v1.SchemaMetadata.enum_types:type_name -> bytebase.v1.EnumTypeMetadata
+ 32, // 27: bytebase.v1.SchemaMetadata.composite_types:type_name -> bytebase.v1.CompositeTypeMetadata
+ 33, // 28: bytebase.v1.CompositeTypeMetadata.attributes:type_name -> bytebase.v1.CompositeTypeAttribute
+ 41, // 29: bytebase.v1.ExternalTableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 41, // 30: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 59, // 31: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 61, // 32: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata
+ 40, // 33: bytebase.v1.TableMetadata.partitions:type_name -> bytebase.v1.TablePartitionMetadata
+ 39, // 34: bytebase.v1.TableMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
+ 36, // 35: bytebase.v1.TableMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
+ 2, // 36: bytebase.v1.TablePartitionMetadata.type:type_name -> bytebase.v1.TablePartitionMetadata.Type
+ 40, // 37: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata
+ 59, // 38: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 39, // 39: bytebase.v1.TablePartitionMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata
+ 42, // 40: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata
+ 3, // 41: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration
+ 4, // 42: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type
+ 44, // 43: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
+ 41, // 44: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata
+ 36, // 45: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
+ 44, // 46: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn
+ 36, // 47: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata
+ 59, // 48: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata
+ 46, // 49: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable
+ 5, // 50: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State
+ 6, // 51: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type
+ 7, // 52: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode
+ 53, // 53: bytebase.v1.SpatialIndexConfig.tessellation:type_name -> bytebase.v1.TessellationConfig
+ 56, // 54: bytebase.v1.SpatialIndexConfig.storage:type_name -> bytebase.v1.StorageConfig
+ 57, // 55: bytebase.v1.SpatialIndexConfig.dimensional:type_name -> bytebase.v1.DimensionalConfig
+ 54, // 56: bytebase.v1.TessellationConfig.grid_levels:type_name -> bytebase.v1.GridLevel
+ 55, // 57: bytebase.v1.TessellationConfig.bounding_box:type_name -> bytebase.v1.BoundingBox
+ 58, // 58: bytebase.v1.DimensionalConfig.constraints:type_name -> bytebase.v1.DimensionConstraint
+ 52, // 59: bytebase.v1.IndexMetadata.spatial_config:type_name -> bytebase.v1.SpatialIndexConfig
+ 8, // 60: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType
+ 29, // 61: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 9, // 62: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest
+ 10, // 63: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest
+ 12, // 64: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest
+ 14, // 65: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest
+ 15, // 66: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest
+ 19, // 67: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest
+ 17, // 68: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest
+ 21, // 69: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest
+ 22, // 70: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest
+ 23, // 71: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:input_type -> bytebase.v1.GetDatabaseSDLSchemaRequest
+ 24, // 72: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest
+ 26, // 73: bytebase.v1.DatabaseService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
+ 64, // 74: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest
+ 28, // 75: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database
+ 11, // 76: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse
+ 13, // 77: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse
+ 28, // 78: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database
+ 16, // 79: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse
+ 20, // 80: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse
+ 18, // 81: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse
+ 29, // 82: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata
+ 62, // 83: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema
+ 63, // 84: bytebase.v1.DatabaseService.GetDatabaseSDLSchema:output_type -> bytebase.v1.DatabaseSDLSchema
+ 25, // 85: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse
+ 27, // 86: bytebase.v1.DatabaseService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
+ 65, // 87: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse
+ 75, // [75:88] is the sub-list for method output_type
+ 62, // [62:75] is the sub-list for method input_type
+ 62, // [62:62] is the sub-list for extension type_name
+ 62, // [62:62] is the sub-list for extension extendee
+ 0, // [0:62] is the sub-list for field type_name
}
func init() { file_v1_database_service_proto_init() }
@@ -6053,15 +6169,15 @@ func file_v1_database_service_proto_init() {
(*DiffSchemaRequest_Schema)(nil),
(*DiffSchemaRequest_Changelog)(nil),
}
- file_v1_database_service_proto_msgTypes[17].OneofWrappers = []any{}
- file_v1_database_service_proto_msgTypes[30].OneofWrappers = []any{}
+ file_v1_database_service_proto_msgTypes[19].OneofWrappers = []any{}
+ file_v1_database_service_proto_msgTypes[32].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_database_service_proto_rawDesc), len(file_v1_database_service_proto_rawDesc)),
NumEnums: 9,
- NumMessages: 56,
+ NumMessages: 58,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/database_service.pb.gw.go b/backend/generated-go/v1/database_service.pb.gw.go
index 55cbd92a4c..4630756a9e 100644
--- a/backend/generated-go/v1/database_service.pb.gw.go
+++ b/backend/generated-go/v1/database_service.pb.gw.go
@@ -790,6 +790,51 @@ func local_request_DatabaseService_DiffSchema_1(ctx context.Context, marshaler r
return msg, metadata, err
}
+func request_DatabaseService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DiffMetadataRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if req.Body != nil {
+ _, _ = io.Copy(io.Discard, req.Body)
+ }
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := client.DiffMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_DatabaseService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DiffMetadataRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := server.DiffMetadata(ctx, &protoReq)
+ return msg, metadata, err
+}
+
var filter_DatabaseService_GetSchemaString_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
func request_DatabaseService_GetSchemaString_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
@@ -1149,6 +1194,26 @@ func RegisterDatabaseServiceHandlerServer(ctx context.Context, mux *runtime.Serv
}
forward_DatabaseService_DiffSchema_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle(http.MethodPost, pattern_DatabaseService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*}:diffMetadata"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_DatabaseService_DiffMetadata_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_DatabaseService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
mux.Handle(http.MethodGet, pattern_DatabaseService_GetSchemaString_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1464,6 +1529,23 @@ func RegisterDatabaseServiceHandlerClient(ctx context.Context, mux *runtime.Serv
}
forward_DatabaseService_DiffSchema_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle(http.MethodPost, pattern_DatabaseService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*}:diffMetadata"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_DatabaseService_DiffMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_DatabaseService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
mux.Handle(http.MethodGet, pattern_DatabaseService_GetSchemaString_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1500,6 +1582,7 @@ var (
pattern_DatabaseService_GetDatabaseSDLSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "instances", "databases", "sdlSchema", "name"}, ""))
pattern_DatabaseService_DiffSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "instances", "databases", "name"}, "diffSchema"))
pattern_DatabaseService_DiffSchema_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "changelogs", "name"}, "diffSchema"))
+ pattern_DatabaseService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "instances", "databases", "name"}, "diffMetadata"))
pattern_DatabaseService_GetSchemaString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "instances", "databases", "schemaString", "name"}, ""))
)
@@ -1519,5 +1602,6 @@ var (
forward_DatabaseService_GetDatabaseSDLSchema_0 = runtime.ForwardResponseMessage
forward_DatabaseService_DiffSchema_0 = runtime.ForwardResponseMessage
forward_DatabaseService_DiffSchema_1 = runtime.ForwardResponseMessage
+ forward_DatabaseService_DiffMetadata_0 = runtime.ForwardResponseMessage
forward_DatabaseService_GetSchemaString_0 = runtime.ForwardResponseMessage
)
diff --git a/backend/generated-go/v1/database_service_equal.pb.go b/backend/generated-go/v1/database_service_equal.pb.go
index ef477c8c26..4f003a06a1 100644
--- a/backend/generated-go/v1/database_service_equal.pb.go
+++ b/backend/generated-go/v1/database_service_equal.pb.go
@@ -306,6 +306,35 @@ func (x *DiffSchemaResponse) Equal(y *DiffSchemaResponse) bool {
return true
}
+func (x *DiffMetadataRequest) Equal(y *DiffMetadataRequest) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Name != y.Name {
+ return false
+ }
+ if !x.TargetMetadata.Equal(y.TargetMetadata) {
+ return false
+ }
+ return true
+}
+
+func (x *DiffMetadataResponse) Equal(y *DiffMetadataResponse) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Diff != y.Diff {
+ return false
+ }
+ return true
+}
+
func (x *Database) Equal(y *Database) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/database_service_grpc.pb.go b/backend/generated-go/v1/database_service_grpc.pb.go
index 41b61b0afb..ad6c3a51a8 100644
--- a/backend/generated-go/v1/database_service_grpc.pb.go
+++ b/backend/generated-go/v1/database_service_grpc.pb.go
@@ -30,6 +30,7 @@ const (
DatabaseService_GetDatabaseSchema_FullMethodName = "/bytebase.v1.DatabaseService/GetDatabaseSchema"
DatabaseService_GetDatabaseSDLSchema_FullMethodName = "/bytebase.v1.DatabaseService/GetDatabaseSDLSchema"
DatabaseService_DiffSchema_FullMethodName = "/bytebase.v1.DatabaseService/DiffSchema"
+ DatabaseService_DiffMetadata_FullMethodName = "/bytebase.v1.DatabaseService/DiffMetadata"
DatabaseService_GetSchemaString_FullMethodName = "/bytebase.v1.DatabaseService/GetSchemaString"
)
@@ -72,6 +73,10 @@ type DatabaseServiceClient interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(ctx context.Context, in *DiffSchemaRequest, opts ...grpc.CallOption) (*DiffSchemaResponse, error)
+ // Generates migration statements from the database's current schema to the
+ // given target metadata.
+ // Permissions required: bb.databases.diffMetadata
+ DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error)
@@ -195,6 +200,16 @@ func (c *databaseServiceClient) DiffSchema(ctx context.Context, in *DiffSchemaRe
return out, nil
}
+func (c *databaseServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(DiffMetadataResponse)
+ err := c.cc.Invoke(ctx, DatabaseService_DiffMetadata_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *databaseServiceClient) GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSchemaStringResponse)
@@ -244,6 +259,10 @@ type DatabaseServiceServer interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(context.Context, *DiffSchemaRequest) (*DiffSchemaResponse, error)
+ // Generates migration statements from the database's current schema to the
+ // given target metadata.
+ // Permissions required: bb.databases.diffMetadata
+ DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error)
@@ -290,6 +309,9 @@ func (UnimplementedDatabaseServiceServer) GetDatabaseSDLSchema(context.Context,
func (UnimplementedDatabaseServiceServer) DiffSchema(context.Context, *DiffSchemaRequest) (*DiffSchemaResponse, error) {
return nil, status.Error(codes.Unimplemented, "method DiffSchema not implemented")
}
+func (UnimplementedDatabaseServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
+ return nil, status.Error(codes.Unimplemented, "method DiffMetadata not implemented")
+}
func (UnimplementedDatabaseServiceServer) GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetSchemaString not implemented")
}
@@ -512,6 +534,24 @@ func _DatabaseService_DiffSchema_Handler(srv interface{}, ctx context.Context, d
return interceptor(ctx, in, info, handler)
}
+func _DatabaseService_DiffMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DiffMetadataRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(DatabaseServiceServer).DiffMetadata(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: DatabaseService_DiffMetadata_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(DatabaseServiceServer).DiffMetadata(ctx, req.(*DiffMetadataRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _DatabaseService_GetSchemaString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSchemaStringRequest)
if err := dec(in); err != nil {
@@ -581,6 +621,10 @@ var DatabaseService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DiffSchema",
Handler: _DatabaseService_DiffSchema_Handler,
},
+ {
+ MethodName: "DiffMetadata",
+ Handler: _DatabaseService_DiffMetadata_Handler,
+ },
{
MethodName: "GetSchemaString",
Handler: _DatabaseService_GetSchemaString_Handler,
diff --git a/backend/generated-go/v1/sql_service.pb.go b/backend/generated-go/v1/sql_service.pb.go
index 331ac3fe1d..85b6cf1a58 100644
--- a/backend/generated-go/v1/sql_service.pb.go
+++ b/backend/generated-go/v1/sql_service.pb.go
@@ -1590,114 +1590,6 @@ func (x *ExportResponse) GetAppliedAccessGrant() string {
return ""
}
-type DiffMetadataRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The metadata of the source schema.
- SourceMetadata *DatabaseMetadata `protobuf:"bytes,1,opt,name=source_metadata,json=sourceMetadata,proto3" json:"source_metadata,omitempty"`
- // The metadata of the target schema.
- TargetMetadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=target_metadata,json=targetMetadata,proto3" json:"target_metadata,omitempty"`
- // The database engine of the schema.
- Engine Engine `protobuf:"varint,3,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DiffMetadataRequest) Reset() {
- *x = DiffMetadataRequest{}
- mi := &file_v1_sql_service_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DiffMetadataRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DiffMetadataRequest) ProtoMessage() {}
-
-func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[12]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
-func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{12}
-}
-
-func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {
- if x != nil {
- return x.SourceMetadata
- }
- return nil
-}
-
-func (x *DiffMetadataRequest) GetTargetMetadata() *DatabaseMetadata {
- if x != nil {
- return x.TargetMetadata
- }
- return nil
-}
-
-func (x *DiffMetadataRequest) GetEngine() Engine {
- if x != nil {
- return x.Engine
- }
- return Engine_ENGINE_UNSPECIFIED
-}
-
-type DiffMetadataResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The diff of the metadata.
- Diff string `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DiffMetadataResponse) Reset() {
- *x = DiffMetadataResponse{}
- mi := &file_v1_sql_service_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DiffMetadataResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DiffMetadataResponse) ProtoMessage() {}
-
-func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[13]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
-func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{13}
-}
-
-func (x *DiffMetadataResponse) GetDiff() string {
- if x != nil {
- return x.Diff
- }
- return ""
-}
-
type AICompletionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Messages []*AICompletionRequest_Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
@@ -1707,7 +1599,7 @@ type AICompletionRequest struct {
func (x *AICompletionRequest) Reset() {
*x = AICompletionRequest{}
- mi := &file_v1_sql_service_proto_msgTypes[14]
+ mi := &file_v1_sql_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1719,7 +1611,7 @@ func (x *AICompletionRequest) String() string {
func (*AICompletionRequest) ProtoMessage() {}
func (x *AICompletionRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[14]
+ mi := &file_v1_sql_service_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1732,7 +1624,7 @@ func (x *AICompletionRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use AICompletionRequest.ProtoReflect.Descriptor instead.
func (*AICompletionRequest) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{14}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{12}
}
func (x *AICompletionRequest) GetMessages() []*AICompletionRequest_Message {
@@ -1753,7 +1645,7 @@ type AICompletionResponse struct {
func (x *AICompletionResponse) Reset() {
*x = AICompletionResponse{}
- mi := &file_v1_sql_service_proto_msgTypes[15]
+ mi := &file_v1_sql_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1765,7 +1657,7 @@ func (x *AICompletionResponse) String() string {
func (*AICompletionResponse) ProtoMessage() {}
func (x *AICompletionResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[15]
+ mi := &file_v1_sql_service_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1778,7 +1670,7 @@ func (x *AICompletionResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use AICompletionResponse.ProtoReflect.Descriptor instead.
func (*AICompletionResponse) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{15}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{13}
}
func (x *AICompletionResponse) GetCandidates() []*AICompletionResponse_Candidate {
@@ -1815,7 +1707,7 @@ type QueryResult_PostgresError struct {
func (x *QueryResult_PostgresError) Reset() {
*x = QueryResult_PostgresError{}
- mi := &file_v1_sql_service_proto_msgTypes[16]
+ mi := &file_v1_sql_service_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1827,7 +1719,7 @@ func (x *QueryResult_PostgresError) String() string {
func (*QueryResult_PostgresError) ProtoMessage() {}
func (x *QueryResult_PostgresError) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[16]
+ mi := &file_v1_sql_service_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1973,7 +1865,7 @@ type QueryResult_SyntaxError struct {
func (x *QueryResult_SyntaxError) Reset() {
*x = QueryResult_SyntaxError{}
- mi := &file_v1_sql_service_proto_msgTypes[17]
+ mi := &file_v1_sql_service_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1985,7 +1877,7 @@ func (x *QueryResult_SyntaxError) String() string {
func (*QueryResult_SyntaxError) ProtoMessage() {}
func (x *QueryResult_SyntaxError) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[17]
+ mi := &file_v1_sql_service_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2020,7 +1912,7 @@ type QueryResult_CommandError struct {
func (x *QueryResult_CommandError) Reset() {
*x = QueryResult_CommandError{}
- mi := &file_v1_sql_service_proto_msgTypes[18]
+ mi := &file_v1_sql_service_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2032,7 +1924,7 @@ func (x *QueryResult_CommandError) String() string {
func (*QueryResult_CommandError) ProtoMessage() {}
func (x *QueryResult_CommandError) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[18]
+ mi := &file_v1_sql_service_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2065,7 +1957,7 @@ type QueryResult_Message struct {
func (x *QueryResult_Message) Reset() {
*x = QueryResult_Message{}
- mi := &file_v1_sql_service_proto_msgTypes[19]
+ mi := &file_v1_sql_service_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2077,7 +1969,7 @@ func (x *QueryResult_Message) String() string {
func (*QueryResult_Message) ProtoMessage() {}
func (x *QueryResult_Message) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[19]
+ mi := &file_v1_sql_service_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2118,7 +2010,7 @@ type RowValue_Timestamp struct {
func (x *RowValue_Timestamp) Reset() {
*x = RowValue_Timestamp{}
- mi := &file_v1_sql_service_proto_msgTypes[20]
+ mi := &file_v1_sql_service_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2130,7 +2022,7 @@ func (x *RowValue_Timestamp) String() string {
func (*RowValue_Timestamp) ProtoMessage() {}
func (x *RowValue_Timestamp) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[20]
+ mi := &file_v1_sql_service_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2179,7 +2071,7 @@ type RowValue_TimestampTZ struct {
func (x *RowValue_TimestampTZ) Reset() {
*x = RowValue_TimestampTZ{}
- mi := &file_v1_sql_service_proto_msgTypes[21]
+ mi := &file_v1_sql_service_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2191,7 +2083,7 @@ func (x *RowValue_TimestampTZ) String() string {
func (*RowValue_TimestampTZ) ProtoMessage() {}
func (x *RowValue_TimestampTZ) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[21]
+ mi := &file_v1_sql_service_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2245,7 +2137,7 @@ type AICompletionRequest_Message struct {
func (x *AICompletionRequest_Message) Reset() {
*x = AICompletionRequest_Message{}
- mi := &file_v1_sql_service_proto_msgTypes[22]
+ mi := &file_v1_sql_service_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2257,7 +2149,7 @@ func (x *AICompletionRequest_Message) String() string {
func (*AICompletionRequest_Message) ProtoMessage() {}
func (x *AICompletionRequest_Message) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[22]
+ mi := &file_v1_sql_service_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2270,7 +2162,7 @@ func (x *AICompletionRequest_Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use AICompletionRequest_Message.ProtoReflect.Descriptor instead.
func (*AICompletionRequest_Message) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{14, 0}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{12, 0}
}
func (x *AICompletionRequest_Message) GetRole() string {
@@ -2296,7 +2188,7 @@ type AICompletionResponse_Candidate struct {
func (x *AICompletionResponse_Candidate) Reset() {
*x = AICompletionResponse_Candidate{}
- mi := &file_v1_sql_service_proto_msgTypes[23]
+ mi := &file_v1_sql_service_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2308,7 +2200,7 @@ func (x *AICompletionResponse_Candidate) String() string {
func (*AICompletionResponse_Candidate) ProtoMessage() {}
func (x *AICompletionResponse_Candidate) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[23]
+ mi := &file_v1_sql_service_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2321,7 +2213,7 @@ func (x *AICompletionResponse_Candidate) ProtoReflect() protoreflect.Message {
// Deprecated: Use AICompletionResponse_Candidate.ProtoReflect.Descriptor instead.
func (*AICompletionResponse_Candidate) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{15, 0}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{13, 0}
}
func (x *AICompletionResponse_Candidate) GetContent() *AICompletionResponse_Candidate_Content {
@@ -2341,7 +2233,7 @@ type AICompletionResponse_Candidate_Content struct {
func (x *AICompletionResponse_Candidate_Content) Reset() {
*x = AICompletionResponse_Candidate_Content{}
- mi := &file_v1_sql_service_proto_msgTypes[24]
+ mi := &file_v1_sql_service_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2353,7 +2245,7 @@ func (x *AICompletionResponse_Candidate_Content) String() string {
func (*AICompletionResponse_Candidate_Content) ProtoMessage() {}
func (x *AICompletionResponse_Candidate_Content) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[24]
+ mi := &file_v1_sql_service_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2366,7 +2258,7 @@ func (x *AICompletionResponse_Candidate_Content) ProtoReflect() protoreflect.Mes
// Deprecated: Use AICompletionResponse_Candidate_Content.ProtoReflect.Descriptor instead.
func (*AICompletionResponse_Candidate_Content) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{15, 0, 0}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{13, 0, 0}
}
func (x *AICompletionResponse_Candidate_Content) GetParts() []*AICompletionResponse_Candidate_Content_Part {
@@ -2385,7 +2277,7 @@ type AICompletionResponse_Candidate_Content_Part struct {
func (x *AICompletionResponse_Candidate_Content_Part) Reset() {
*x = AICompletionResponse_Candidate_Content_Part{}
- mi := &file_v1_sql_service_proto_msgTypes[25]
+ mi := &file_v1_sql_service_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2397,7 +2289,7 @@ func (x *AICompletionResponse_Candidate_Content_Part) String() string {
func (*AICompletionResponse_Candidate_Content_Part) ProtoMessage() {}
func (x *AICompletionResponse_Candidate_Content_Part) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[25]
+ mi := &file_v1_sql_service_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2410,7 +2302,7 @@ func (x *AICompletionResponse_Candidate_Content_Part) ProtoReflect() protoreflec
// Deprecated: Use AICompletionResponse_Candidate_Content_Part.ProtoReflect.Descriptor instead.
func (*AICompletionResponse_Candidate_Content_Part) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{15, 0, 0, 0}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{13, 0, 0, 0}
}
func (x *AICompletionResponse_Candidate_Content_Part) GetText() string {
@@ -2424,7 +2316,7 @@ var File_v1_sql_service_proto protoreflect.FileDescriptor
const file_v1_sql_service_proto_rawDesc = "" +
"\n" +
- "\x14v1/sql_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x19v1/database_service.proto\x1a\x1ev1/query_history_service.proto\"\xd5\x01\n" +
+ "\x14v1/sql_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x1ev1/query_history_service.proto\"\xd5\x01\n" +
"\x13AdminExecuteRequest\x121\n" +
"\x04name\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
"\x15bytebase.com/DatabaseR\x04name\x12\x1c\n" +
@@ -2596,13 +2488,7 @@ const file_v1_sql_service_proto_rawDesc = "" +
"\a_schema\"\\\n" +
"\x0eExportResponse\x12\x18\n" +
"\acontent\x18\x01 \x01(\fR\acontent\x120\n" +
- "\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\xdc\x01\n" +
- "\x13DiffMetadataRequest\x12K\n" +
- "\x0fsource_metadata\x18\x01 \x01(\v2\x1d.bytebase.v1.DatabaseMetadataB\x03\xe0A\x02R\x0esourceMetadata\x12K\n" +
- "\x0ftarget_metadata\x18\x02 \x01(\v2\x1d.bytebase.v1.DatabaseMetadataB\x03\xe0A\x02R\x0etargetMetadata\x12+\n" +
- "\x06engine\x18\x03 \x01(\x0e2\x13.bytebase.v1.EngineR\x06engine\"*\n" +
- "\x14DiffMetadataResponse\x12\x12\n" +
- "\x04diff\x18\x01 \x01(\tR\x04diff\"\x94\x01\n" +
+ "\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\x94\x01\n" +
"\x13AICompletionRequest\x12D\n" +
"\bmessages\x18\x01 \x03(\v2(.bytebase.v1.AICompletionRequest.MessageR\bmessages\x1a7\n" +
"\aMessage\x12\x12\n" +
@@ -2617,7 +2503,7 @@ const file_v1_sql_service_proto_rawDesc = "" +
"\aContent\x12N\n" +
"\x05parts\x18\x01 \x03(\v28.bytebase.v1.AICompletionResponse.Candidate.Content.PartR\x05parts\x1a\x1a\n" +
"\x04Part\x12\x12\n" +
- "\x04text\x18\x01 \x01(\tR\x04text2\x8c\t\n" +
+ "\x04text\x18\x01 \x01(\tR\x04text2\x88\b\n" +
"\n" +
"SQLService\x12\x8f\x01\n" +
"\x05Query\x12\x19.bytebase.v1.QueryRequest\x1a\x1a.bytebase.v1.QueryResponse\"O\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02-:\x01*\"(/v1/{name=instances/*/databases/*}:query\x12\x89\x01\n" +
@@ -2625,8 +2511,7 @@ const file_v1_sql_service_proto_rawDesc = "" +
"\x14SearchQueryHistories\x12(.bytebase.v1.SearchQueryHistoriesRequest\x1a).bytebase.v1.SearchQueryHistoriesResponse\"\a\x90\xea0\x02\x88\x02\x01\x12\x88\x01\n" +
"\x12ListQueryHistories\x12&.bytebase.v1.ListQueryHistoriesRequest\x1a'.bytebase.v1.ListQueryHistoriesResponse\"!\x8a\xea0\x16bb.queryHistories.list\x90\xea0\x01\x88\x02\x01\x12Z\n" +
"\x0fGetQueryHistory\x12#.bytebase.v1.GetQueryHistoryRequest\x1a\x19.bytebase.v1.QueryHistory\"\a\x90\xea0\x02\x88\x02\x01\x12\x84\x02\n" +
- "\x06Export\x12\x1a.bytebase.v1.ExportRequest\x1a\x1b.bytebase.v1.ExportResponse\"\xc0\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02\x9d\x01:\x01*Z1:\x01*\",/v1/{name=projects/*/plans/*/rollout}:exportZ::\x01*\"5/v1/{name=projects/*/plans/*/rollout/stages/*}:export\")/v1/{name=instances/*/databases/*}:export\x12\x81\x01\n" +
- "\fDiffMetadata\x12 .bytebase.v1.DiffMetadataRequest\x1a!.bytebase.v1.DiffMetadataResponse\",\x80\xea0\x01\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/v1/schemaDesign:diffMetadata\x12x\n" +
+ "\x06Export\x12\x1a.bytebase.v1.ExportRequest\x1a\x1b.bytebase.v1.ExportResponse\"\xc0\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02\x9d\x01:\x01*Z1:\x01*\",/v1/{name=projects/*/plans/*/rollout}:exportZ::\x01*\"5/v1/{name=projects/*/plans/*/rollout/stages/*}:export\")/v1/{name=instances/*/databases/*}:export\x12x\n" +
"\fAICompletion\x12 .bytebase.v1.AICompletionRequest\x1a!.bytebase.v1.AICompletionResponse\"#\x90\xea0\x02\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/v1/sql/aiCompletionB\xa5\x01\n" +
"\x0fcom.bytebase.v1B\x0fSqlServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"
@@ -2643,7 +2528,7 @@ func file_v1_sql_service_proto_rawDescGZIP() []byte {
}
var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
-var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
+var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
var file_v1_sql_service_proto_goTypes = []any{
(QueryOption_RedisRunCommandsOn)(0), // 0: bytebase.v1.QueryOption.RedisRunCommandsOn
(QueryOption_MSSQLExplainFormat)(0), // 1: bytebase.v1.QueryOption.MSSQLExplainFormat
@@ -2663,35 +2548,31 @@ var file_v1_sql_service_proto_goTypes = []any{
(*Advice)(nil), // 15: bytebase.v1.Advice
(*ExportRequest)(nil), // 16: bytebase.v1.ExportRequest
(*ExportResponse)(nil), // 17: bytebase.v1.ExportResponse
- (*DiffMetadataRequest)(nil), // 18: bytebase.v1.DiffMetadataRequest
- (*DiffMetadataResponse)(nil), // 19: bytebase.v1.DiffMetadataResponse
- (*AICompletionRequest)(nil), // 20: bytebase.v1.AICompletionRequest
- (*AICompletionResponse)(nil), // 21: bytebase.v1.AICompletionResponse
- (*QueryResult_PostgresError)(nil), // 22: bytebase.v1.QueryResult.PostgresError
- (*QueryResult_SyntaxError)(nil), // 23: bytebase.v1.QueryResult.SyntaxError
- (*QueryResult_CommandError)(nil), // 24: bytebase.v1.QueryResult.CommandError
- (*QueryResult_Message)(nil), // 25: bytebase.v1.QueryResult.Message
- (*RowValue_Timestamp)(nil), // 26: bytebase.v1.RowValue.Timestamp
- (*RowValue_TimestampTZ)(nil), // 27: bytebase.v1.RowValue.TimestampTZ
- (*AICompletionRequest_Message)(nil), // 28: bytebase.v1.AICompletionRequest.Message
- (*AICompletionResponse_Candidate)(nil), // 29: bytebase.v1.AICompletionResponse.Candidate
- (*AICompletionResponse_Candidate_Content)(nil), // 30: bytebase.v1.AICompletionResponse.Candidate.Content
- (*AICompletionResponse_Candidate_Content_Part)(nil), // 31: bytebase.v1.AICompletionResponse.Candidate.Content.Part
- (*durationpb.Duration)(nil), // 32: google.protobuf.Duration
- (*PermissionDeniedDetail)(nil), // 33: bytebase.v1.PermissionDeniedDetail
- (structpb.NullValue)(0), // 34: google.protobuf.NullValue
- (*structpb.Value)(nil), // 35: google.protobuf.Value
- (*Position)(nil), // 36: bytebase.v1.Position
- (ExportFormat)(0), // 37: bytebase.v1.ExportFormat
- (*DatabaseMetadata)(nil), // 38: bytebase.v1.DatabaseMetadata
- (Engine)(0), // 39: bytebase.v1.Engine
- (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
- (*SearchQueryHistoriesRequest)(nil), // 41: bytebase.v1.SearchQueryHistoriesRequest
- (*ListQueryHistoriesRequest)(nil), // 42: bytebase.v1.ListQueryHistoriesRequest
- (*GetQueryHistoryRequest)(nil), // 43: bytebase.v1.GetQueryHistoryRequest
- (*SearchQueryHistoriesResponse)(nil), // 44: bytebase.v1.SearchQueryHistoriesResponse
- (*ListQueryHistoriesResponse)(nil), // 45: bytebase.v1.ListQueryHistoriesResponse
- (*QueryHistory)(nil), // 46: bytebase.v1.QueryHistory
+ (*AICompletionRequest)(nil), // 18: bytebase.v1.AICompletionRequest
+ (*AICompletionResponse)(nil), // 19: bytebase.v1.AICompletionResponse
+ (*QueryResult_PostgresError)(nil), // 20: bytebase.v1.QueryResult.PostgresError
+ (*QueryResult_SyntaxError)(nil), // 21: bytebase.v1.QueryResult.SyntaxError
+ (*QueryResult_CommandError)(nil), // 22: bytebase.v1.QueryResult.CommandError
+ (*QueryResult_Message)(nil), // 23: bytebase.v1.QueryResult.Message
+ (*RowValue_Timestamp)(nil), // 24: bytebase.v1.RowValue.Timestamp
+ (*RowValue_TimestampTZ)(nil), // 25: bytebase.v1.RowValue.TimestampTZ
+ (*AICompletionRequest_Message)(nil), // 26: bytebase.v1.AICompletionRequest.Message
+ (*AICompletionResponse_Candidate)(nil), // 27: bytebase.v1.AICompletionResponse.Candidate
+ (*AICompletionResponse_Candidate_Content)(nil), // 28: bytebase.v1.AICompletionResponse.Candidate.Content
+ (*AICompletionResponse_Candidate_Content_Part)(nil), // 29: bytebase.v1.AICompletionResponse.Candidate.Content.Part
+ (*durationpb.Duration)(nil), // 30: google.protobuf.Duration
+ (*PermissionDeniedDetail)(nil), // 31: bytebase.v1.PermissionDeniedDetail
+ (structpb.NullValue)(0), // 32: google.protobuf.NullValue
+ (*structpb.Value)(nil), // 33: google.protobuf.Value
+ (*Position)(nil), // 34: bytebase.v1.Position
+ (ExportFormat)(0), // 35: bytebase.v1.ExportFormat
+ (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp
+ (*SearchQueryHistoriesRequest)(nil), // 37: bytebase.v1.SearchQueryHistoriesRequest
+ (*ListQueryHistoriesRequest)(nil), // 38: bytebase.v1.ListQueryHistoriesRequest
+ (*GetQueryHistoryRequest)(nil), // 39: bytebase.v1.GetQueryHistoryRequest
+ (*SearchQueryHistoriesResponse)(nil), // 40: bytebase.v1.SearchQueryHistoriesResponse
+ (*ListQueryHistoriesResponse)(nil), // 41: bytebase.v1.ListQueryHistoriesResponse
+ (*QueryHistory)(nil), // 42: bytebase.v1.QueryHistory
}
var file_v1_sql_service_proto_depIdxs = []int32{
11, // 0: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
@@ -2700,56 +2581,51 @@ var file_v1_sql_service_proto_depIdxs = []int32{
0, // 3: bytebase.v1.QueryOption.redis_run_commands_on:type_name -> bytebase.v1.QueryOption.RedisRunCommandsOn
1, // 4: bytebase.v1.QueryOption.mssql_explain_format:type_name -> bytebase.v1.QueryOption.MSSQLExplainFormat
13, // 5: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
- 32, // 6: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
- 22, // 7: bytebase.v1.QueryResult.postgres_error:type_name -> bytebase.v1.QueryResult.PostgresError
- 23, // 8: bytebase.v1.QueryResult.syntax_error:type_name -> bytebase.v1.QueryResult.SyntaxError
- 33, // 9: bytebase.v1.QueryResult.permission_denied:type_name -> bytebase.v1.PermissionDeniedDetail
- 24, // 10: bytebase.v1.QueryResult.command_error:type_name -> bytebase.v1.QueryResult.CommandError
- 25, // 11: bytebase.v1.QueryResult.messages:type_name -> bytebase.v1.QueryResult.Message
+ 30, // 6: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
+ 20, // 7: bytebase.v1.QueryResult.postgres_error:type_name -> bytebase.v1.QueryResult.PostgresError
+ 21, // 8: bytebase.v1.QueryResult.syntax_error:type_name -> bytebase.v1.QueryResult.SyntaxError
+ 31, // 9: bytebase.v1.QueryResult.permission_denied:type_name -> bytebase.v1.PermissionDeniedDetail
+ 22, // 10: bytebase.v1.QueryResult.command_error:type_name -> bytebase.v1.QueryResult.CommandError
+ 23, // 11: bytebase.v1.QueryResult.messages:type_name -> bytebase.v1.QueryResult.Message
12, // 12: bytebase.v1.QueryResult.masked:type_name -> bytebase.v1.MaskingReason
14, // 13: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
- 34, // 14: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
- 35, // 15: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
- 26, // 16: bytebase.v1.RowValue.timestamp_value:type_name -> bytebase.v1.RowValue.Timestamp
- 27, // 17: bytebase.v1.RowValue.timestamp_tz_value:type_name -> bytebase.v1.RowValue.TimestampTZ
+ 32, // 14: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
+ 33, // 15: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
+ 24, // 16: bytebase.v1.RowValue.timestamp_value:type_name -> bytebase.v1.RowValue.Timestamp
+ 25, // 17: bytebase.v1.RowValue.timestamp_tz_value:type_name -> bytebase.v1.RowValue.TimestampTZ
4, // 18: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Level
- 36, // 19: bytebase.v1.Advice.start_position:type_name -> bytebase.v1.Position
- 36, // 20: bytebase.v1.Advice.end_position:type_name -> bytebase.v1.Position
+ 34, // 19: bytebase.v1.Advice.start_position:type_name -> bytebase.v1.Position
+ 34, // 20: bytebase.v1.Advice.end_position:type_name -> bytebase.v1.Position
5, // 21: bytebase.v1.Advice.rule_type:type_name -> bytebase.v1.Advice.RuleType
- 37, // 22: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
- 38, // 23: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 38, // 24: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 39, // 25: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
- 28, // 26: bytebase.v1.AICompletionRequest.messages:type_name -> bytebase.v1.AICompletionRequest.Message
- 29, // 27: bytebase.v1.AICompletionResponse.candidates:type_name -> bytebase.v1.AICompletionResponse.Candidate
- 36, // 28: bytebase.v1.QueryResult.SyntaxError.start_position:type_name -> bytebase.v1.Position
- 2, // 29: bytebase.v1.QueryResult.CommandError.command_type:type_name -> bytebase.v1.QueryResult.CommandError.Type
- 3, // 30: bytebase.v1.QueryResult.Message.level:type_name -> bytebase.v1.QueryResult.Message.Level
- 40, // 31: bytebase.v1.RowValue.Timestamp.google_timestamp:type_name -> google.protobuf.Timestamp
- 40, // 32: bytebase.v1.RowValue.TimestampTZ.google_timestamp:type_name -> google.protobuf.Timestamp
- 30, // 33: bytebase.v1.AICompletionResponse.Candidate.content:type_name -> bytebase.v1.AICompletionResponse.Candidate.Content
- 31, // 34: bytebase.v1.AICompletionResponse.Candidate.Content.parts:type_name -> bytebase.v1.AICompletionResponse.Candidate.Content.Part
- 8, // 35: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
- 6, // 36: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
- 41, // 37: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest
- 42, // 38: bytebase.v1.SQLService.ListQueryHistories:input_type -> bytebase.v1.ListQueryHistoriesRequest
- 43, // 39: bytebase.v1.SQLService.GetQueryHistory:input_type -> bytebase.v1.GetQueryHistoryRequest
- 16, // 40: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
- 18, // 41: bytebase.v1.SQLService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
- 20, // 42: bytebase.v1.SQLService.AICompletion:input_type -> bytebase.v1.AICompletionRequest
- 9, // 43: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
- 7, // 44: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
- 44, // 45: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse
- 45, // 46: bytebase.v1.SQLService.ListQueryHistories:output_type -> bytebase.v1.ListQueryHistoriesResponse
- 46, // 47: bytebase.v1.SQLService.GetQueryHistory:output_type -> bytebase.v1.QueryHistory
- 17, // 48: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
- 19, // 49: bytebase.v1.SQLService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
- 21, // 50: bytebase.v1.SQLService.AICompletion:output_type -> bytebase.v1.AICompletionResponse
- 43, // [43:51] is the sub-list for method output_type
- 35, // [35:43] is the sub-list for method input_type
- 35, // [35:35] is the sub-list for extension type_name
- 35, // [35:35] is the sub-list for extension extendee
- 0, // [0:35] is the sub-list for field type_name
+ 35, // 22: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
+ 26, // 23: bytebase.v1.AICompletionRequest.messages:type_name -> bytebase.v1.AICompletionRequest.Message
+ 27, // 24: bytebase.v1.AICompletionResponse.candidates:type_name -> bytebase.v1.AICompletionResponse.Candidate
+ 34, // 25: bytebase.v1.QueryResult.SyntaxError.start_position:type_name -> bytebase.v1.Position
+ 2, // 26: bytebase.v1.QueryResult.CommandError.command_type:type_name -> bytebase.v1.QueryResult.CommandError.Type
+ 3, // 27: bytebase.v1.QueryResult.Message.level:type_name -> bytebase.v1.QueryResult.Message.Level
+ 36, // 28: bytebase.v1.RowValue.Timestamp.google_timestamp:type_name -> google.protobuf.Timestamp
+ 36, // 29: bytebase.v1.RowValue.TimestampTZ.google_timestamp:type_name -> google.protobuf.Timestamp
+ 28, // 30: bytebase.v1.AICompletionResponse.Candidate.content:type_name -> bytebase.v1.AICompletionResponse.Candidate.Content
+ 29, // 31: bytebase.v1.AICompletionResponse.Candidate.Content.parts:type_name -> bytebase.v1.AICompletionResponse.Candidate.Content.Part
+ 8, // 32: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
+ 6, // 33: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
+ 37, // 34: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest
+ 38, // 35: bytebase.v1.SQLService.ListQueryHistories:input_type -> bytebase.v1.ListQueryHistoriesRequest
+ 39, // 36: bytebase.v1.SQLService.GetQueryHistory:input_type -> bytebase.v1.GetQueryHistoryRequest
+ 16, // 37: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
+ 18, // 38: bytebase.v1.SQLService.AICompletion:input_type -> bytebase.v1.AICompletionRequest
+ 9, // 39: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
+ 7, // 40: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
+ 40, // 41: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse
+ 41, // 42: bytebase.v1.SQLService.ListQueryHistories:output_type -> bytebase.v1.ListQueryHistoriesResponse
+ 42, // 43: bytebase.v1.SQLService.GetQueryHistory:output_type -> bytebase.v1.QueryHistory
+ 17, // 44: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
+ 19, // 45: bytebase.v1.SQLService.AICompletion:output_type -> bytebase.v1.AICompletionResponse
+ 39, // [39:46] is the sub-list for method output_type
+ 32, // [32:39] is the sub-list for method input_type
+ 32, // [32:32] is the sub-list for extension type_name
+ 32, // [32:32] is the sub-list for extension extendee
+ 0, // [0:32] is the sub-list for field type_name
}
func init() { file_v1_sql_service_proto_init() }
@@ -2759,7 +2635,6 @@ func file_v1_sql_service_proto_init() {
}
file_v1_annotation_proto_init()
file_v1_common_proto_init()
- file_v1_database_service_proto_init()
file_v1_query_history_service_proto_init()
file_v1_sql_service_proto_msgTypes[0].OneofWrappers = []any{}
file_v1_sql_service_proto_msgTypes[2].OneofWrappers = []any{}
@@ -2791,7 +2666,7 @@ func file_v1_sql_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_sql_service_proto_rawDesc), len(file_v1_sql_service_proto_rawDesc)),
NumEnums: 6,
- NumMessages: 26,
+ NumMessages: 24,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/sql_service.pb.gw.go b/backend/generated-go/v1/sql_service.pb.gw.go
index d238de25f9..f0121f0a74 100644
--- a/backend/generated-go/v1/sql_service.pb.gw.go
+++ b/backend/generated-go/v1/sql_service.pb.gw.go
@@ -258,33 +258,6 @@ func local_request_SQLService_Export_2(ctx context.Context, marshaler runtime.Ma
return msg, metadata, err
}
-func request_SQLService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq DiffMetadataRequest
- metadata runtime.ServerMetadata
- )
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if req.Body != nil {
- _, _ = io.Copy(io.Discard, req.Body)
- }
- msg, err := client.DiffMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_SQLService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server SQLServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq DiffMetadataRequest
- metadata runtime.ServerMetadata
- )
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := server.DiffMetadata(ctx, &protoReq)
- return msg, metadata, err
-}
-
func request_SQLService_AICompletion_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq AICompletionRequest
@@ -405,26 +378,6 @@ func RegisterSQLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
}
forward_SQLService_Export_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodPost, pattern_SQLService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SQLService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_SQLService_DiffMetadata_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_SQLService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodPost, pattern_SQLService_AICompletion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -570,23 +523,6 @@ func RegisterSQLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
}
forward_SQLService_Export_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodPost, pattern_SQLService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SQLService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_SQLService_DiffMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_SQLService_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodPost, pattern_SQLService_AICompletion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -613,7 +549,6 @@ var (
pattern_SQLService_Export_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "instances", "databases", "name"}, "export"))
pattern_SQLService_Export_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "projects", "plans", "rollout", "name"}, "export"))
pattern_SQLService_Export_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 2, 4, 1, 0, 4, 7, 5, 5}, []string{"v1", "projects", "plans", "rollout", "stages", "name"}, "export"))
- pattern_SQLService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))
pattern_SQLService_AICompletion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "aiCompletion"}, ""))
)
@@ -623,6 +558,5 @@ var (
forward_SQLService_Export_0 = runtime.ForwardResponseMessage
forward_SQLService_Export_1 = runtime.ForwardResponseMessage
forward_SQLService_Export_2 = runtime.ForwardResponseMessage
- forward_SQLService_DiffMetadata_0 = runtime.ForwardResponseMessage
forward_SQLService_AICompletion_0 = runtime.ForwardResponseMessage
)
diff --git a/backend/generated-go/v1/sql_service_equal.pb.go b/backend/generated-go/v1/sql_service_equal.pb.go
index a34dcb5fce..437b28f7f1 100644
--- a/backend/generated-go/v1/sql_service_equal.pb.go
+++ b/backend/generated-go/v1/sql_service_equal.pb.go
@@ -519,38 +519,6 @@ func (x *ExportResponse) Equal(y *ExportResponse) bool {
return true
}
-func (x *DiffMetadataRequest) Equal(y *DiffMetadataRequest) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if !x.SourceMetadata.Equal(y.SourceMetadata) {
- return false
- }
- if !x.TargetMetadata.Equal(y.TargetMetadata) {
- return false
- }
- if x.Engine != y.Engine {
- return false
- }
- return true
-}
-
-func (x *DiffMetadataResponse) Equal(y *DiffMetadataResponse) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Diff != y.Diff {
- return false
- }
- return true
-}
-
func (x *AICompletionRequest_Message) Equal(y *AICompletionRequest_Message) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/sql_service_grpc.pb.go b/backend/generated-go/v1/sql_service_grpc.pb.go
index 4def3edad7..6844a9a105 100644
--- a/backend/generated-go/v1/sql_service_grpc.pb.go
+++ b/backend/generated-go/v1/sql_service_grpc.pb.go
@@ -25,7 +25,6 @@ const (
SQLService_ListQueryHistories_FullMethodName = "/bytebase.v1.SQLService/ListQueryHistories"
SQLService_GetQueryHistory_FullMethodName = "/bytebase.v1.SQLService/GetQueryHistory"
SQLService_Export_FullMethodName = "/bytebase.v1.SQLService/Export"
- SQLService_DiffMetadata_FullMethodName = "/bytebase.v1.SQLService/DiffMetadata"
SQLService_AICompletion_FullMethodName = "/bytebase.v1.SQLService/AICompletion"
)
@@ -62,9 +61,6 @@ type SQLServiceClient interface {
// Exports query results to a file format.
// Permissions required: bb.databases.get
Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error)
- // Computes schema differences between two database metadata.
- // Permissions required: None
- DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
// Provides AI-powered SQL completion and generation.
// Permissions required: None (authenticated users only, requires AI to be enabled)
AICompletion(ctx context.Context, in *AICompletionRequest, opts ...grpc.CallOption) (*AICompletionResponse, error)
@@ -144,16 +140,6 @@ func (c *sQLServiceClient) Export(ctx context.Context, in *ExportRequest, opts .
return out, nil
}
-func (c *sQLServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(DiffMetadataResponse)
- err := c.cc.Invoke(ctx, SQLService_DiffMetadata_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *sQLServiceClient) AICompletion(ctx context.Context, in *AICompletionRequest, opts ...grpc.CallOption) (*AICompletionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AICompletionResponse)
@@ -197,9 +183,6 @@ type SQLServiceServer interface {
// Exports query results to a file format.
// Permissions required: bb.databases.get
Export(context.Context, *ExportRequest) (*ExportResponse, error)
- // Computes schema differences between two database metadata.
- // Permissions required: None
- DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
// Provides AI-powered SQL completion and generation.
// Permissions required: None (authenticated users only, requires AI to be enabled)
AICompletion(context.Context, *AICompletionRequest) (*AICompletionResponse, error)
@@ -231,9 +214,6 @@ func (UnimplementedSQLServiceServer) GetQueryHistory(context.Context, *GetQueryH
func (UnimplementedSQLServiceServer) Export(context.Context, *ExportRequest) (*ExportResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Export not implemented")
}
-func (UnimplementedSQLServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
- return nil, status.Error(codes.Unimplemented, "method DiffMetadata not implemented")
-}
func (UnimplementedSQLServiceServer) AICompletion(context.Context, *AICompletionRequest) (*AICompletionResponse, error) {
return nil, status.Error(codes.Unimplemented, "method AICompletion not implemented")
}
@@ -355,24 +335,6 @@ func _SQLService_Export_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
-func _SQLService_DiffMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DiffMetadataRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SQLServiceServer).DiffMetadata(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SQLService_DiffMetadata_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SQLServiceServer).DiffMetadata(ctx, req.(*DiffMetadataRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _SQLService_AICompletion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AICompletionRequest)
if err := dec(in); err != nil {
@@ -418,10 +380,6 @@ var SQLService_ServiceDesc = grpc.ServiceDesc{
MethodName: "Export",
Handler: _SQLService_Export_Handler,
},
- {
- MethodName: "DiffMetadata",
- Handler: _SQLService_DiffMetadata_Handler,
- },
{
MethodName: "AICompletion",
Handler: _SQLService_AICompletion_Handler,
diff --git a/backend/generated-go/v1/v1connect/database_service.connect.go b/backend/generated-go/v1/v1connect/database_service.connect.go
index 13f882b54d..d4436d7454 100644
--- a/backend/generated-go/v1/v1connect/database_service.connect.go
+++ b/backend/generated-go/v1/v1connect/database_service.connect.go
@@ -66,6 +66,9 @@ const (
// DatabaseServiceDiffSchemaProcedure is the fully-qualified name of the DatabaseService's
// DiffSchema RPC.
DatabaseServiceDiffSchemaProcedure = "/bytebase.v1.DatabaseService/DiffSchema"
+ // DatabaseServiceDiffMetadataProcedure is the fully-qualified name of the DatabaseService's
+ // DiffMetadata RPC.
+ DatabaseServiceDiffMetadataProcedure = "/bytebase.v1.DatabaseService/DiffMetadata"
// DatabaseServiceGetSchemaStringProcedure is the fully-qualified name of the DatabaseService's
// GetSchemaString RPC.
DatabaseServiceGetSchemaStringProcedure = "/bytebase.v1.DatabaseService/GetSchemaString"
@@ -106,6 +109,10 @@ type DatabaseServiceClient interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(context.Context, *connect.Request[v1.DiffSchemaRequest]) (*connect.Response[v1.DiffSchemaResponse], error)
+ // Generates migration statements from the database's current schema to the
+ // given target metadata.
+ // Permissions required: bb.databases.diffMetadata
+ DiffMetadata(context.Context, *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(context.Context, *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error)
@@ -188,6 +195,12 @@ func NewDatabaseServiceClient(httpClient connect.HTTPClient, baseURL string, opt
connect.WithSchema(databaseServiceMethods.ByName("DiffSchema")),
connect.WithClientOptions(opts...),
),
+ diffMetadata: connect.NewClient[v1.DiffMetadataRequest, v1.DiffMetadataResponse](
+ httpClient,
+ baseURL+DatabaseServiceDiffMetadataProcedure,
+ connect.WithSchema(databaseServiceMethods.ByName("DiffMetadata")),
+ connect.WithClientOptions(opts...),
+ ),
getSchemaString: connect.NewClient[v1.GetSchemaStringRequest, v1.GetSchemaStringResponse](
httpClient,
baseURL+DatabaseServiceGetSchemaStringProcedure,
@@ -210,6 +223,7 @@ type databaseServiceClient struct {
getDatabaseSchema *connect.Client[v1.GetDatabaseSchemaRequest, v1.DatabaseSchema]
getDatabaseSDLSchema *connect.Client[v1.GetDatabaseSDLSchemaRequest, v1.DatabaseSDLSchema]
diffSchema *connect.Client[v1.DiffSchemaRequest, v1.DiffSchemaResponse]
+ diffMetadata *connect.Client[v1.DiffMetadataRequest, v1.DiffMetadataResponse]
getSchemaString *connect.Client[v1.GetSchemaStringRequest, v1.GetSchemaStringResponse]
}
@@ -268,6 +282,11 @@ func (c *databaseServiceClient) DiffSchema(ctx context.Context, req *connect.Req
return c.diffSchema.CallUnary(ctx, req)
}
+// DiffMetadata calls bytebase.v1.DatabaseService.DiffMetadata.
+func (c *databaseServiceClient) DiffMetadata(ctx context.Context, req *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error) {
+ return c.diffMetadata.CallUnary(ctx, req)
+}
+
// GetSchemaString calls bytebase.v1.DatabaseService.GetSchemaString.
func (c *databaseServiceClient) GetSchemaString(ctx context.Context, req *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error) {
return c.getSchemaString.CallUnary(ctx, req)
@@ -308,6 +327,10 @@ type DatabaseServiceHandler interface {
// Compares and generates migration statements between two schemas.
// Permissions required: bb.databases.get
DiffSchema(context.Context, *connect.Request[v1.DiffSchemaRequest]) (*connect.Response[v1.DiffSchemaResponse], error)
+ // Generates migration statements from the database's current schema to the
+ // given target metadata.
+ // Permissions required: bb.databases.diffMetadata
+ DiffMetadata(context.Context, *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error)
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
GetSchemaString(context.Context, *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error)
@@ -386,6 +409,12 @@ func NewDatabaseServiceHandler(svc DatabaseServiceHandler, opts ...connect.Handl
connect.WithSchema(databaseServiceMethods.ByName("DiffSchema")),
connect.WithHandlerOptions(opts...),
)
+ databaseServiceDiffMetadataHandler := connect.NewUnaryHandler(
+ DatabaseServiceDiffMetadataProcedure,
+ svc.DiffMetadata,
+ connect.WithSchema(databaseServiceMethods.ByName("DiffMetadata")),
+ connect.WithHandlerOptions(opts...),
+ )
databaseServiceGetSchemaStringHandler := connect.NewUnaryHandler(
DatabaseServiceGetSchemaStringProcedure,
svc.GetSchemaString,
@@ -416,6 +445,8 @@ func NewDatabaseServiceHandler(svc DatabaseServiceHandler, opts ...connect.Handl
databaseServiceGetDatabaseSDLSchemaHandler.ServeHTTP(w, r)
case DatabaseServiceDiffSchemaProcedure:
databaseServiceDiffSchemaHandler.ServeHTTP(w, r)
+ case DatabaseServiceDiffMetadataProcedure:
+ databaseServiceDiffMetadataHandler.ServeHTTP(w, r)
case DatabaseServiceGetSchemaStringProcedure:
databaseServiceGetSchemaStringHandler.ServeHTTP(w, r)
default:
@@ -471,6 +502,10 @@ func (UnimplementedDatabaseServiceHandler) DiffSchema(context.Context, *connect.
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.DiffSchema is not implemented"))
}
+func (UnimplementedDatabaseServiceHandler) DiffMetadata(context.Context, *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.DiffMetadata is not implemented"))
+}
+
func (UnimplementedDatabaseServiceHandler) GetSchemaString(context.Context, *connect.Request[v1.GetSchemaStringRequest]) (*connect.Response[v1.GetSchemaStringResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.DatabaseService.GetSchemaString is not implemented"))
}
diff --git a/backend/generated-go/v1/v1connect/sql_service.connect.go b/backend/generated-go/v1/v1connect/sql_service.connect.go
index 4677aa02b2..f229e1cb8c 100644
--- a/backend/generated-go/v1/v1connect/sql_service.connect.go
+++ b/backend/generated-go/v1/v1connect/sql_service.connect.go
@@ -48,8 +48,6 @@ const (
SQLServiceGetQueryHistoryProcedure = "/bytebase.v1.SQLService/GetQueryHistory"
// SQLServiceExportProcedure is the fully-qualified name of the SQLService's Export RPC.
SQLServiceExportProcedure = "/bytebase.v1.SQLService/Export"
- // SQLServiceDiffMetadataProcedure is the fully-qualified name of the SQLService's DiffMetadata RPC.
- SQLServiceDiffMetadataProcedure = "/bytebase.v1.SQLService/DiffMetadata"
// SQLServiceAICompletionProcedure is the fully-qualified name of the SQLService's AICompletion RPC.
SQLServiceAICompletionProcedure = "/bytebase.v1.SQLService/AICompletion"
)
@@ -86,9 +84,6 @@ type SQLServiceClient interface {
// Exports query results to a file format.
// Permissions required: bb.databases.get
Export(context.Context, *connect.Request[v1.ExportRequest]) (*connect.Response[v1.ExportResponse], error)
- // Computes schema differences between two database metadata.
- // Permissions required: None
- DiffMetadata(context.Context, *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error)
// Provides AI-powered SQL completion and generation.
// Permissions required: None (authenticated users only, requires AI to be enabled)
AICompletion(context.Context, *connect.Request[v1.AICompletionRequest]) (*connect.Response[v1.AICompletionResponse], error)
@@ -141,12 +136,6 @@ func NewSQLServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...
connect.WithSchema(sQLServiceMethods.ByName("Export")),
connect.WithClientOptions(opts...),
),
- diffMetadata: connect.NewClient[v1.DiffMetadataRequest, v1.DiffMetadataResponse](
- httpClient,
- baseURL+SQLServiceDiffMetadataProcedure,
- connect.WithSchema(sQLServiceMethods.ByName("DiffMetadata")),
- connect.WithClientOptions(opts...),
- ),
aICompletion: connect.NewClient[v1.AICompletionRequest, v1.AICompletionResponse](
httpClient,
baseURL+SQLServiceAICompletionProcedure,
@@ -164,7 +153,6 @@ type sQLServiceClient struct {
listQueryHistories *connect.Client[v1.ListQueryHistoriesRequest, v1.ListQueryHistoriesResponse]
getQueryHistory *connect.Client[v1.GetQueryHistoryRequest, v1.QueryHistory]
export *connect.Client[v1.ExportRequest, v1.ExportResponse]
- diffMetadata *connect.Client[v1.DiffMetadataRequest, v1.DiffMetadataResponse]
aICompletion *connect.Client[v1.AICompletionRequest, v1.AICompletionResponse]
}
@@ -204,11 +192,6 @@ func (c *sQLServiceClient) Export(ctx context.Context, req *connect.Request[v1.E
return c.export.CallUnary(ctx, req)
}
-// DiffMetadata calls bytebase.v1.SQLService.DiffMetadata.
-func (c *sQLServiceClient) DiffMetadata(ctx context.Context, req *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error) {
- return c.diffMetadata.CallUnary(ctx, req)
-}
-
// AICompletion calls bytebase.v1.SQLService.AICompletion.
func (c *sQLServiceClient) AICompletion(ctx context.Context, req *connect.Request[v1.AICompletionRequest]) (*connect.Response[v1.AICompletionResponse], error) {
return c.aICompletion.CallUnary(ctx, req)
@@ -246,9 +229,6 @@ type SQLServiceHandler interface {
// Exports query results to a file format.
// Permissions required: bb.databases.get
Export(context.Context, *connect.Request[v1.ExportRequest]) (*connect.Response[v1.ExportResponse], error)
- // Computes schema differences between two database metadata.
- // Permissions required: None
- DiffMetadata(context.Context, *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error)
// Provides AI-powered SQL completion and generation.
// Permissions required: None (authenticated users only, requires AI to be enabled)
AICompletion(context.Context, *connect.Request[v1.AICompletionRequest]) (*connect.Response[v1.AICompletionResponse], error)
@@ -297,12 +277,6 @@ func NewSQLServiceHandler(svc SQLServiceHandler, opts ...connect.HandlerOption)
connect.WithSchema(sQLServiceMethods.ByName("Export")),
connect.WithHandlerOptions(opts...),
)
- sQLServiceDiffMetadataHandler := connect.NewUnaryHandler(
- SQLServiceDiffMetadataProcedure,
- svc.DiffMetadata,
- connect.WithSchema(sQLServiceMethods.ByName("DiffMetadata")),
- connect.WithHandlerOptions(opts...),
- )
sQLServiceAICompletionHandler := connect.NewUnaryHandler(
SQLServiceAICompletionProcedure,
svc.AICompletion,
@@ -323,8 +297,6 @@ func NewSQLServiceHandler(svc SQLServiceHandler, opts ...connect.HandlerOption)
sQLServiceGetQueryHistoryHandler.ServeHTTP(w, r)
case SQLServiceExportProcedure:
sQLServiceExportHandler.ServeHTTP(w, r)
- case SQLServiceDiffMetadataProcedure:
- sQLServiceDiffMetadataHandler.ServeHTTP(w, r)
case SQLServiceAICompletionProcedure:
sQLServiceAICompletionHandler.ServeHTTP(w, r)
default:
@@ -360,10 +332,6 @@ func (UnimplementedSQLServiceHandler) Export(context.Context, *connect.Request[v
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.SQLService.Export is not implemented"))
}
-func (UnimplementedSQLServiceHandler) DiffMetadata(context.Context, *connect.Request[v1.DiffMetadataRequest]) (*connect.Response[v1.DiffMetadataResponse], error) {
- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.SQLService.DiffMetadata is not implemented"))
-}
-
func (UnimplementedSQLServiceHandler) AICompletion(context.Context, *connect.Request[v1.AICompletionRequest]) (*connect.Response[v1.AICompletionResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.SQLService.AICompletion is not implemented"))
}
diff --git a/backend/store/predefined_roles.go b/backend/store/predefined_roles.go
index c97d7ecfb3..f8936e7da8 100644
--- a/backend/store/predefined_roles.go
+++ b/backend/store/predefined_roles.go
@@ -48,6 +48,7 @@ var PredefinedRoles = []*RoleMessage{
permission.DatabaseGroupsList,
permission.DatabaseGroupsUpdate,
permission.DatabasesCheck,
+ permission.DatabasesDiffMetadata,
permission.DatabasesGet,
permission.DatabasesGetSchema,
permission.DatabasesList,
@@ -198,6 +199,7 @@ var PredefinedRoles = []*RoleMessage{
permission.DatabaseGroupsList,
permission.DatabaseGroupsUpdate,
permission.DatabasesCheck,
+ permission.DatabasesDiffMetadata,
permission.DatabasesGet,
permission.DatabasesGetSchema,
permission.DatabasesList,
@@ -350,6 +352,7 @@ var PredefinedRoles = []*RoleMessage{
permission.DatabaseGroupsList,
permission.DatabaseGroupsUpdate,
permission.DatabasesCheck,
+ permission.DatabasesDiffMetadata,
permission.DatabasesGet,
permission.DatabasesGetSchema,
permission.DatabasesList,
@@ -439,6 +442,7 @@ var PredefinedRoles = []*RoleMessage{
permission.DatabaseGroupsGet,
permission.DatabaseGroupsList,
permission.DatabasesCheck,
+ permission.DatabasesDiffMetadata,
permission.DatabasesGet,
permission.DatabasesGetSchema,
permission.DatabasesList,
diff --git a/backend/tests/diff_metadata_test.go b/backend/tests/diff_metadata_test.go
new file mode 100644
index 0000000000..415cf5b076
--- /dev/null
+++ b/backend/tests/diff_metadata_test.go
@@ -0,0 +1,194 @@
+package tests
+
+import (
+ "context"
+ "fmt"
+ "testing"
+
+ "connectrpc.com/connect"
+ "github.com/stretchr/testify/require"
+ "google.golang.org/protobuf/proto"
+
+ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
+)
+
+// TestDiffMetadata covers DatabaseService.DiffMetadata: the server reads the
+// source schema from the store by database name, gated by
+// bb.databases.diffMetadata — granted to schema-change-authoring roles
+// (admin, DBA, project owner, project developer) but deliberately absent
+// from viewer/releaser/SQL-editor roles.
+func TestDiffMetadata(t *testing.T) {
+ t.Parallel()
+ a := require.New(t)
+ ctx := context.Background()
+ ctl := &controller{}
+ ctx, err := ctl.StartServerWithExternalPg(ctx)
+ a.NoError(err)
+ defer ctl.Close(ctx)
+
+ ownerToken := ctl.authInterceptor.token
+
+ pgContainer, err := getPgContainer(ctx)
+ defer func() {
+ pgContainer.Close(ctx)
+ }()
+ a.NoError(err)
+
+ instanceResp, err := ctl.instanceServiceClient.CreateInstance(ctx, connect.NewRequest(&v1pb.CreateInstanceRequest{
+ InstanceId: generateRandomString("instance"),
+ Instance: &v1pb.Instance{
+ Title: "pgInstance",
+ Engine: v1pb.Engine_POSTGRES,
+ Environment: new("environments/prod"),
+ Activation: true,
+ DataSources: []*v1pb.DataSource{{Type: v1pb.DataSourceType_ADMIN, Host: pgContainer.host, Port: pgContainer.port, Username: "postgres", Password: "root-password", Id: "admin"}},
+ },
+ }))
+ a.NoError(err)
+ instance := instanceResp.Msg
+
+ const databaseName = "diff_metadata_db"
+ err = ctl.createDatabase(ctx, ctl.project, instance, nil, databaseName, "postgres")
+ a.NoError(err)
+
+ databaseResp, err := ctl.databaseServiceClient.GetDatabase(ctx, connect.NewRequest(&v1pb.GetDatabaseRequest{
+ Name: fmt.Sprintf("%s/databases/%s", instance.Name, databaseName),
+ }))
+ a.NoError(err)
+ database := databaseResp.Msg
+
+ // Fetch the synced current metadata as the baseline for the target.
+ metadataResp, err := ctl.databaseServiceClient.GetDatabaseMetadata(ctx, connect.NewRequest(&v1pb.GetDatabaseMetadataRequest{
+ Name: database.Name + "/metadata",
+ }))
+ a.NoError(err)
+ currentMetadata := metadataResp.Msg
+
+ // 0. A no-op target (the fetched metadata unchanged) must produce an empty
+ // diff. This pins the store→v1→store round-trip fidelity the reshape
+ // depends on: the source no longer passes through the v1 conversion, so
+ // any field the converter drops would surface here as spurious DDL.
+ noopResp, err := ctl.databaseServiceClient.DiffMetadata(ctx, connect.NewRequest(&v1pb.DiffMetadataRequest{
+ Name: database.Name,
+ TargetMetadata: currentMetadata,
+ }))
+ a.NoError(err)
+ a.Empty(noopResp.Msg.Diff)
+
+ // Target = current schema plus one new table in the public schema.
+ targetMetadata, ok := proto.Clone(currentMetadata).(*v1pb.DatabaseMetadata)
+ a.True(ok)
+ var publicSchema *v1pb.SchemaMetadata
+ for _, schema := range targetMetadata.Schemas {
+ if schema.Name == "public" {
+ publicSchema = schema
+ break
+ }
+ }
+ a.NotNil(publicSchema)
+ publicSchema.Tables = append(publicSchema.Tables, &v1pb.TableMetadata{
+ Name: "t_diff",
+ Columns: []*v1pb.ColumnMetadata{
+ {Name: "id", Type: "integer", Nullable: false},
+ },
+ })
+
+ // 1. The owner diffs the database's current schema against the target.
+ diffResp, err := ctl.databaseServiceClient.DiffMetadata(ctx, connect.NewRequest(&v1pb.DiffMetadataRequest{
+ Name: database.Name,
+ TargetMetadata: targetMetadata,
+ }))
+ a.NoError(err)
+ a.Contains(diffResp.Msg.Diff, "CREATE TABLE")
+ a.Contains(diffResp.Msg.Diff, "t_diff")
+ // The one-table addition must not drag along spurious drops or alters.
+ a.NotContains(diffResp.Msg.Diff, "DROP")
+ a.NotContains(diffResp.Msg.Diff, "ALTER")
+
+ // 2. Target metadata is required.
+ _, err = ctl.databaseServiceClient.DiffMetadata(ctx, connect.NewRequest(&v1pb.DiffMetadataRequest{
+ Name: database.Name,
+ }))
+ a.Error(err)
+ a.Equal(connect.CodeInvalidArgument, connect.CodeOf(err))
+
+ // 3. bb.databases.diffMetadata gates the RPC: a plain workspace member
+ // without a project role is denied.
+ memberEmail := fmt.Sprintf("member-%[email protected]", generateRandomString("u"))
+ memberPassword := "1024bytebase"
+ memberUser, err := ctl.userServiceClient.CreateUser(ctx, connect.NewRequest(&v1pb.CreateUserRequest{
+ User: &v1pb.User{
+ Email: memberEmail,
+ Password: memberPassword,
+ Title: "Member User",
+ },
+ }))
+ a.NoError(err)
+ _, err = ctl.addMemberToWorkspaceIAM(ctx, memberUser.Msg.Workspace, fmt.Sprintf("user:%s", memberEmail), "roles/workspaceMember")
+ a.NoError(err)
+
+ loginResp, err := ctl.authServiceClient.Login(ctx, connect.NewRequest(&v1pb.LoginRequest{
+ Email: memberEmail,
+ Password: memberPassword,
+ }))
+ a.NoError(err)
+ ctl.authInterceptor.token = loginResp.Msg.Token
+
+ _, err = ctl.databaseServiceClient.DiffMetadata(ctx, connect.NewRequest(&v1pb.DiffMetadataRequest{
+ Name: database.Name,
+ TargetMetadata: targetMetadata,
+ }))
+ a.Error(err)
+ a.Equal(connect.CodePermissionDenied, connect.CodeOf(err))
+
+ // 4. Project viewer reads schemas but does not author changes: still
+ // denied with the grant boundary chosen for this permission.
+ ctl.authInterceptor.token = ownerToken
+ policyResp, err := ctl.projectServiceClient.GetIamPolicy(ctx, connect.NewRequest(&v1pb.GetIamPolicyRequest{
+ Resource: ctl.project.Name,
+ }))
+ a.NoError(err)
+ policy := policyResp.Msg
+ policy.Bindings = append(policy.Bindings, &v1pb.Binding{
+ Role: "roles/projectViewer",
+ Members: []string{fmt.Sprintf("user:%s", memberEmail)},
+ })
+ _, err = ctl.projectServiceClient.SetIamPolicy(ctx, connect.NewRequest(&v1pb.SetIamPolicyRequest{
+ Resource: ctl.project.Name,
+ Policy: policy,
+ }))
+ a.NoError(err)
+
+ ctl.authInterceptor.token = loginResp.Msg.Token
+ _, err = ctl.databaseServiceClient.DiffMetadata(ctx, connect.NewRequest(&v1pb.DiffMetadataRequest{
+ Name: database.Name,
+ TargetMetadata: targetMetadata,
+ }))
+ a.Error(err)
+ a.Equal(connect.CodePermissionDenied, connect.CodeOf(err))
+
+ // 5. Project developer authors schema changes: the diff succeeds.
+ ctl.authInterceptor.token = ownerToken
+ policyResp, err = ctl.projectServiceClient.GetIamPolicy(ctx, connect.NewRequest(&v1pb.GetIamPolicyRequest{
+ Resource: ctl.project.Name,
+ }))
+ a.NoError(err)
+ policy = policyResp.Msg
+ policy.Bindings = append(policy.Bindings, &v1pb.Binding{
+ Role: "roles/projectDeveloper",
+ Members: []string{fmt.Sprintf("user:%s", memberEmail)},
+ })
+ _, err = ctl.projectServiceClient.SetIamPolicy(ctx, connect.NewRequest(&v1pb.SetIamPolicyRequest{
+ Resource: ctl.project.Name,
+ Policy: policy,
+ }))
+ a.NoError(err)
+
+ ctl.authInterceptor.token = loginResp.Msg.Token
+ developerDiffResp, err := ctl.databaseServiceClient.DiffMetadata(ctx, connect.NewRequest(&v1pb.DiffMetadataRequest{
+ Name: database.Name,
+ TargetMetadata: targetMetadata,
+ }))
+ a.NoError(err)
+ a.Equal(diffResp.Msg.Diff, developerDiffResp.Msg.Diff)
+}
diff --git a/docs/plans/saas/07.api-resource-patterns.md b/docs/plans/saas/07.api-resource-patterns.md
index 400c33e1b8..64823e897a 100644
--- a/docs/plans/saas/07.api-resource-patterns.md
+++ b/docs/plans/saas/07.api-resource-patterns.md
@@ -114,6 +114,7 @@ These APIs are scoped to a database. ACL looks up the database with workspace fi
| DatabaseService | GetDatabase, UpdateDatabase, SyncDatabase | name: `instances/{instance}/databases/{database}` |
| DatabaseService | GetDatabaseMetadata, GetDatabaseSchema, GetDatabaseSDLSchema, GetSchemaString | name: `instances/{instance}/databases/{database}/...` |
| DatabaseService | DiffSchema | name: `instances/{instance}/databases/{database}[/changelogs/{changelog}]` |
+| DatabaseService | DiffMetadata | name: `instances/{instance}/databases/{database}` |
| DatabaseService | BatchUpdateDatabases, BatchSyncDatabases | parent: `instances/{instance}` |
| ChangelogService | ListChangelogs | parent: `instances/{instance}/databases/{database}` |
| ChangelogService | GetChangelog | name: `instances/{instance}/databases/{database}/changelogs/{changelog}` |
@@ -160,12 +161,15 @@ Accepts:
- `workspaces/{workspace}` resource
-### SQLService — DiffMetadata / AICompletion
+### SQLService — AICompletion
-- Workspace-level utility methods (no resource parent)
+- Workspace-level utility method (no resource parent)
- The query history RPCs moved to QueryHistoryService (see the
`projects/{project}` parent table); SQLService keeps deprecated delegating
aliases without HTTP bindings until their removal (date TBD)
+- DiffMetadata moved to DatabaseService (database-parented, reads the source
+ schema from the store, gated by bb.databases.diffMetadata); the old
+ anonymous SQLService method and its REST path are removed
---
diff --git a/docs/superpowers/specs/2026-07-29-diff-metadata-database-service-design.md b/docs/superpowers/specs/2026-07-29-diff-metadata-database-service-design.md
new file mode 100644
index 0000000000..2199c8c505
--- /dev/null
+++ b/docs/superpowers/specs/2026-07-29-diff-metadata-database-service-design.md
@@ -0,0 +1,147 @@
+# DiffMetadata Move to DatabaseService + Request Reshape
+
+**Date**: 2026-07-29
+**Status**: Approved (Danny: move to DatabaseService; single metadata in the
+request; new IAM permission granted to schema-change-authoring roles only;
+clean cut — no compatibility alias; separate PR based on main, independent of
+the QueryHistoryService extraction PR)
+**Ships in**: 3.21 as a labeled breaking change
+
+## Summary
+
+Move `DiffMetadata` from `SQLService` to `DatabaseService` and reshape its
+request: instead of the caller uploading both schemas, the request carries the
+database resource `name` plus the **target** `DatabaseMetadata` only. The
+server reads the source (current) schema from the store, which also derives
+the engine — the old `engine` field disappears.
+
+The reshape changes the security class of the RPC: the old form was a pure
+function over caller-supplied data (`allow_without_credential = true`); the
+new form reads stored schema contents, so it is IAM-gated with a **new
+permission `bb.databases.diffMetadata`**.
+
+The old `SQLService.DiffMetadata` is **removed outright** in the same release
+(decision 2026-07-29, superseding this doc's first revision, which kept it as
+a deprecated anonymous alias): the only known caller is our own schema
+editor, and the request shape changed anyway, so the alias would preserve a
+dead contract. Anonymous or external callers of the old method get
+unimplemented/404 and must adopt the new RPC.
+
+## Who calls it today
+
+- Frontend: exactly one call site — the schema editor's `generateDiffDDL`
+ (used by `SchemaEditorSheet`), which already holds the `Database` object and
+ passes the pristine store-fetched metadata as source. Server-side source
+ reading is semantically equivalent (and fresher).
+- No bytebase-action, no Terraform, no other backend callers. The
+ `backend/plugin/schema` "DiffMetadata" hits are the underlying differ
+ registry, not the RPC.
+- The old RPC was anonymous, so unknown external callers cannot be ruled out
+ via auth logs; the clean cut accepts that they break at upgrade and is
+ called out in release notes.
+
+## Design
+
+### 1. Proto
+
+**`database_service.proto`** gains, next to `DiffSchema`:
+
+- `rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse)`
+- Binding: `post: "/v1/{name=instances/*/databases/*}:diffMetadata"` (mirrors
+ `DiffSchema`)
+- `permission = "bb.databases.diffMetadata"`, `auth_method = IAM` — the ACL
+ interceptor resolves the database name to its project with no custom code
+- `DiffMetadataRequest{ name, target_metadata }`,
+ `DiffMetadataResponse{ diff }`
+
+**`sql_service.proto`** loses the RPC and both messages entirely, along with
+its `import "v1/database_service.proto"` — `DatabaseMetadata` was the only
+database-service type it used, so the SQL execution service no longer depends
+on database types at all.
+
+### 2. IAM
+
+- New permission `bb.databases.diffMetadata` in
+ `backend/common/permission/permission.go` + `permission.yaml`
+ (frontend copy synced via `copy_config_files.sh` → generated TS)
+- Granted to the schema-change-authoring roles only: **workspace admin,
+ workspace DBA, project owner, project developer**. Deliberately absent from
+ project viewer, project releaser, and both SQL editor roles (decision
+ 2026-07-29): generating migration DDL is change authoring, not schema
+ reading, even though the diff output itself reveals nothing beyond
+ `bb.databases.getSchema`
+- Custom roles must add the permission explicitly — called out in release
+ notes
+
+### 3. Backend
+
+`DatabaseService.DiffMetadata` (new, in `database_service.go` next to
+`DiffSchema`):
+
+1. Parse `name` → instance + database; load instance (workspace-scoped)
+2. Gate on the same engine set the old RPC accepted (MYSQL, POSTGRES, TIDB,
+ ORACLE, MSSQL) using the instance's engine — `InvalidArgument` otherwise
+3. Source = `store.GetDBSchema` (already a `model.DatabaseMetadata`; no
+ conversion) — `NotFound` if the database has never been synced
+4. Target = `convertV1DatabaseMetadata(target_metadata)` →
+ `model.NewDatabaseMetadata(..., store.IsObjectCaseSensitive(instance))` —
+ the old handler hardcoded case sensitivity to `true`; the new one uses the
+ instance's actual collation behavior, matching `DiffSchema`
+5. `schema.DiffMigration(engine, source, target)` → `{ diff }`
+
+`SQLService.DiffMetadata` and its implementation are deleted; `sql_service.go`
+drops its `plugin/schema` import with it.
+
+### 4. Frontend
+
+`generateDiffDDL` keeps its signature (database + source + target): the local
+`isEqual(source, target)` no-op short-circuit and validation stay client-side;
+only the wire call changes to
+`databaseServiceClientConnect.diffMetadata({ name, targetMetadata })`.
+
+The target must be complete: `SchemaEditorSheet` previously fetched its
+baseline with `limit: 200` (a windowed-editor perf guard from #17514), which
+was safe when both diff sides shared the truncation but would read as DROPs
+for every omitted table against the full server-side source (caught in review,
+PR #21068). The sheet now fetches unlimited metadata — matching every other
+metadata consumer, which already defaults to no limit — and the request proto
+documents the completeness requirement.
+
+## Compatibility (3.21)
+
+| Surface | Impact |
+|---|---|
+| gRPC/Connect `bytebase.v1.SQLService/DiffMetadata` | **Removed — breaking.** Callers must switch to `bytebase.v1.DatabaseService/DiffMetadata` with the new request shape |
+| REST `POST /v1/schemaDesign:diffMetadata` | **Removed — breaking.** Replaced by `POST /v1/{name=instances/*/databases/*}:diffMetadata` (authenticated) |
+| Anonymous access to schema diffing | Gone by design — the new RPC reads stored schemas and requires `bb.databases.diffMetadata` |
+| Cached pre-3.21 frontend bundles during rolling upgrade | Schema editor DDL preview fails until refresh — accepted with the clean cut |
+| Custom roles | Need `bb.databases.diffMetadata` to use the new RPC (four predefined roles updated in-release) |
+
+Ships with `--label breaking` and a `## Breaking Changes` section covering
+the method removal, the REST path change, and the new permission.
+
+## Testing
+
+- New e2e `TestDiffMetadata`: sync an empty database, diff against a
+ one-table target → expect `CREATE TABLE` DDL; missing target →
+ InvalidArgument; workspace member without a project role → PermissionDenied;
+ **project viewer → still PermissionDenied** (pins the role boundary);
+ project developer → succeeds with the same diff as the owner
+- Existing `TestDiffMetadataPreservesSRIDInvisible` (converter + differ unit
+ test) is unaffected
+- Standard gates: buf, golangci-lint, go build, e2e, pnpm suite
+
+## Alternatives considered
+
+1. **Deprecated anonymous alias with the old two-metadata shape** —
+ implemented first (with a `Legacy*` message rename to free the canonical
+ names), then deliberately removed: the alias would carry a dead contract
+ whose only known caller is our own frontend, and the anonymous surface is
+ exactly what this change retires. Clean cut chosen (Danny, 2026-07-29).
+2. **Fold into `DiffSchema` as a `target_metadata` oneof member** — tempting
+ end-state (one diff surface per database), but a larger contract change
+ than asked for and `DiffSchema` carries its own TODO ("secure it", still
+ on `bb.databases.get`); revisit when that TODO is addressed.
+3. **Reuse `bb.databases.getSchema` / grant the new permission to every
+ getSchema role** — rejected: per-method permissions keep role design
+ explicit, and DDL generation belongs to authoring roles, not read roles.
diff --git a/frontend/src/modules/agent/logic/prompt.ts b/frontend/src/modules/agent/logic/prompt.ts
index bc47e021f7..a434d5f20c 100644
--- a/frontend/src/modules/agent/logic/prompt.ts
+++ b/frontend/src/modules/agent/logic/prompt.ts
@@ -1,12 +1,12 @@
const serviceDirectory = `API Directory — use search_api(service="...") to browse endpoints, search_api(operationId="...") for schemas.
Database Management:
-- DatabaseService: CRUD databases, list schemas/tables/columns, metadata, secrets, slow queries, backups
+- DatabaseService: CRUD databases, list schemas/tables/columns, metadata, schema diff, secrets, slow queries, backups
- DatabaseCatalogService: semantic types, column masking config, data classification
- DatabaseGroupService: database groups, matching databases by expression
SQL & Queries:
-- SQLService: execute SQL queries, export query results, SQL check/lint, parse SQL, differencing
+- SQLService: execute SQL queries, export query results, SQL check/lint, parse SQL
- QueryHistoryService: query/export history records of SQL Editor sessions
- SheetService: internal saved SQL sheets (system use)
- WorksheetService: user-facing saved SQL worksheets
diff --git a/frontend/src/modules/schema-editor/core/generateDiffDDL.ts b/frontend/src/modules/schema-editor/core/generateDiffDDL.ts
index cc32251a8f..013d8a7fd1 100644
--- a/frontend/src/modules/schema-editor/core/generateDiffDDL.ts
+++ b/frontend/src/modules/schema-editor/core/generateDiffDDL.ts
@@ -1,14 +1,13 @@
import { create } from "@bufbuild/protobuf";
import { createContextValues } from "@connectrpc/connect";
import { isEqual } from "lodash-es";
-import { sqlServiceClientConnect } from "@/api";
+import { databaseServiceClientConnect } from "@/api";
import { silentContextKey } from "@/api/context-key";
import type {
Database,
DatabaseMetadata,
} from "@/types/proto-es/v1/database_service_pb";
-import { DiffMetadataRequestSchema } from "@/types/proto-es/v1/sql_service_pb";
-import { getDatabaseEngine } from "@/utils";
+import { DiffMetadataRequestSchema } from "@/types/proto-es/v1/database_service_pb";
import { extractGrpcErrorMessage } from "@/utils/connect";
import { validateDatabaseMetadata } from "./metadata";
@@ -42,12 +41,13 @@ export const generateDiffDDL = async ({
return finish("", ["Invalid schema", ...validationMessages]);
}
try {
+ // The server reads the current (source) schema and engine from the
+ // database resource; only the target metadata travels in the request.
const newRequest = create(DiffMetadataRequestSchema, {
- sourceMetadata: sourceMetadata,
+ name: database.name,
targetMetadata: targetMetadata,
- engine: getDatabaseEngine(database),
});
- const diffResponse = await sqlServiceClientConnect.diffMetadata(
+ const diffResponse = await databaseServiceClientConnect.diffMetadata(
newRequest,
{
contextValues: createContextValues().set(silentContextKey, true),
diff --git a/frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsx b/frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsx
index 9e72bab876..ab63b2ffb5 100644
--- a/frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsx
+++ b/frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsx
@@ -145,11 +145,13 @@ function SchemaEditorSheetBody({
setIsPreparingMetadata(true);
setTargets([]);
try {
+ // Fetch the complete metadata (no table limit): DiffMetadata diffs the
+ // edited target against the full schema stored server-side, so any
+ // table missing from a truncated baseline would read as a DROP.
const [metadata, database] = await Promise.all([
getOrFetchDatabaseMetadata({
database: databaseName,
skipCache: true,
- limit: 200,
}),
useAppStore.getState().getOrFetchDatabaseByName(databaseName),
]);
diff --git a/frontend/src/types/iam/permission-generated.ts b/frontend/src/types/iam/permission-generated.ts
index cb90143570..b3b61185d7 100644
--- a/frontend/src/types/iam/permission-generated.ts
+++ b/frontend/src/types/iam/permission-generated.ts
@@ -19,6 +19,7 @@ export type Permission =
| "bb.databaseGroups.list"
| "bb.databaseGroups.update"
| "bb.databases.check"
+ | "bb.databases.diffMetadata"
| "bb.databases.get"
| "bb.databases.getSchema"
| "bb.databases.list"
diff --git a/frontend/src/types/proto-es/v1/database_service_pb.d.ts b/frontend/src/types/proto-es/v1/database_service_pb.d.ts
index 493643682f..56eba69379 100644
--- a/frontend/src/types/proto-es/v1/database_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/database_service_pb.d.ts
@@ -542,6 +542,54 @@ export declare type DiffSchemaResponse = Message<"bytebase.v1.DiffSchemaResponse
*/
export declare const DiffSchemaResponseSchema: GenMessage<DiffSchemaResponse>;
+/**
+ * @generated from message bytebase.v1.DiffMetadataRequest
+ */
+export declare type DiffMetadataRequest = Message<"bytebase.v1.DiffMetadataRequest"> & {
+ /**
+ * The database whose current schema is the diff source.
+ * Format: instances/{instance}/databases/{database}
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+
+ /**
+ * The metadata of the target schema. The source metadata and the engine are
+ * read from the database, so only the target travels in the request.
+ * Must describe the COMPLETE target schema: the diff runs against the full
+ * stored source, so any object omitted from the target (for example by a
+ * truncated metadata fetch) is treated as dropped.
+ *
+ * @generated from field: bytebase.v1.DatabaseMetadata target_metadata = 2;
+ */
+ targetMetadata?: DatabaseMetadata | undefined;
+};
+
+/**
+ * Describes the message bytebase.v1.DiffMetadataRequest.
+ * Use `create(DiffMetadataRequestSchema)` to create a new message.
+ */
+export declare const DiffMetadataRequestSchema: GenMessage<DiffMetadataRequest>;
+
+/**
+ * @generated from message bytebase.v1.DiffMetadataResponse
+ */
+export declare type DiffMetadataResponse = Message<"bytebase.v1.DiffMetadataResponse"> & {
+ /**
+ * The generated migration statements.
+ *
+ * @generated from field: string diff = 1;
+ */
+ diff: string;
+};
+
+/**
+ * Describes the message bytebase.v1.DiffMetadataResponse.
+ * Use `create(DiffMetadataResponseSchema)` to create a new message.
+ */
+export declare const DiffMetadataResponseSchema: GenMessage<DiffMetadataResponse>;
+
/**
* @generated from message bytebase.v1.Database
*/
@@ -3289,6 +3337,18 @@ export declare const DatabaseService: GenService<{
input: typeof DiffSchemaRequestSchema;
output: typeof DiffSchemaResponseSchema;
},
+ /**
+ * Generates migration statements from the database's current schema to the
+ * given target metadata.
+ * Permissions required: bb.databases.diffMetadata
+ *
+ * @generated from rpc bytebase.v1.DatabaseService.DiffMetadata
+ */
+ diffMetadata: {
+ methodKind: "unary";
+ input: typeof DiffMetadataRequestSchema;
+ output: typeof DiffMetadataResponseSchema;
+ },
/**
* Generates schema DDL for a database object.
* Permissions required: bb.databases.getSchema
diff --git a/frontend/src/types/proto-es/v1/database_service_pb.js b/frontend/src/types/proto-es/v1/database_service_pb.js
index a35179f505..557d08300b 100644
--- a/frontend/src/types/proto-es/v1/database_service_pb.js
+++ b/frontend/src/types/proto-es/v1/database_service_pb.js
@@ -16,7 +16,7 @@ import { file_v1_instance_service } from "./instance_service_pb";
* Describes the file v1/database_service.proto.
*/
export const file_v1_database_service = /*@__PURE__*/
- fileDesc("Chl2MS9kYXRhYmFzZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXREYXRhYmFzZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2UidwoYQmF0Y2hHZXREYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USLAoFbmFtZXMYAiADKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlIkUKGUJhdGNoR2V0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuRGF0YWJhc2UipAEKFExpc3REYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJEhQKDHNob3dfZGVsZXRlZBgFIAEoCBIQCghvcmRlcl9ieRgGIAEoCSJaChVMaXN0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuRGF0YWJhc2USFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIo0BChVVcGRhdGVEYXRhYmFzZVJlcXVlc3QSLAoIZGF0YWJhc2UYASABKAsyFS5ieXRlYmFzZS52MS5EYXRhYmFzZUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCg1hbGxvd19taXNzaW5nGAMgASgIImgKG0JhdGNoVXBkYXRlRGF0YWJhc2VzUmVxdWVzdBIOCgZwYXJlbnQYASABKAkSOQoIcmVxdWVzdHMYAiADKAsyIi5ieXRlYmFzZS52MS5VcGRhdGVEYXRhYmFzZVJlcXVlc3RCA+BBAiJIChxCYXRjaFVwZGF0ZURhdGFiYXNlc1Jlc3BvbnNlEigKCWRhdGFiYXNlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLkRhdGFiYXNlIlkKGUJhdGNoU3luY0RhdGFiYXNlc1JlcXVlc3QSDgoGcGFyZW50GAEgASgJEiwKBW5hbWVzGAIgAygJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZSIcChpCYXRjaFN5bmNEYXRhYmFzZXNSZXNwb25zZSJCChNTeW5jRGF0YWJhc2VSZXF1ZXN0EisKBG5hbWUYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlIhYKFFN5bmNEYXRhYmFzZVJlc3BvbnNlInAKGkdldERhdGFiYXNlTWV0YWRhdGFSZXF1ZXN0EjMKBG5hbWUYASABKAlCJeBBAvpBHwodYnl0ZWJhc2UuY29tL0RhdGFiYXNlTWV0YWRhdGESDgoGZmlsdGVyGAIgASgJEg0KBWxpbWl0GAMgASgFIk0KGEdldERhdGFiYXNlU2NoZW1hUmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG2J5dGViYXNlLmNvbS9EYXRhYmFzZVNjaGVtYSLYAQobR2V0RGF0YWJhc2VTRExTY2hlbWFSZXF1ZXN0EisKBG5hbWUYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlEkIKBmZvcm1hdBgCIAEoDjIyLmJ5dGViYXNlLnYxLkdldERhdGFiYXNlU0RMU2NoZW1hUmVxdWVzdC5TRExGb3JtYXQiSAoJU0RMRm9ybWF0EhoKFlNETF9GT1JNQVRfVU5TUEVDSUZJRUQQABIPCgtTSU5HTEVfRklMRRABEg4KCk1VTFRJX0ZJTEUQAiJxChFEaWZmU2NoZW1hUmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIQCgZzY2hlbWEYAiABKAlIABITCgljaGFuZ2Vsb2cYAyABKAlIAEIICgZ0YXJnZXQiIgoSRGlmZlNjaGVtYVJlc3BvbnNlEgwKBGRpZmYYASABKAki6wQKCERhdGFiYXNlEgwKBG5hbWUYASABKAkSJgoFc3RhdGUYAiABKA4yEi5ieXRlYmFzZS52MS5TdGF0ZUID4EEDEj0KFHN1Y2Nlc3NmdWxfc3luY190aW1lGAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEg8KB3Byb2plY3QYBCABKAkSFAoHcmVsZWFzZRgFIAEoCUID4EEDEh0KC2Vudmlyb25tZW50GAYgASgJQgPgQQFIAIgBARInChVlZmZlY3RpdmVfZW52aXJvbm1lbnQYByABKAlCA+BBA0gBiAEBEjEKBmxhYmVscxgIIAMoCzIhLmJ5dGViYXNlLnYxLkRhdGFiYXNlLkxhYmVsc0VudHJ5Ej0KEWluc3RhbmNlX3Jlc291cmNlGAkgASgLMh0uYnl0ZWJhc2UudjEuSW5zdGFuY2VSZXNvdXJjZUID4EEDEh0KEGJhY2t1cF9hdmFpbGFibGUYCiABKAhCA+BBAxIxCgtzeW5jX3N0YXR1cxgLIAEoDjIXLmJ5dGViYXNlLnYxLlN5bmNTdGF0dXNCA+BBAxIXCgpzeW5jX2Vycm9yGAwgASgJQgPgQQMaLQoLTGFiZWxzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ATpF6kFCChVieXRlYmFzZS5jb20vRGF0YWJhc2USKWluc3RhbmNlcy97aW5zdGFuY2V9L2RhdGFiYXNlcy97ZGF0YWJhc2V9Qg4KDF9lbnZpcm9ubWVudEIYChZfZWZmZWN0aXZlX2Vudmlyb25tZW50IqgCChBEYXRhYmFzZU1ldGFkYXRhEgwKBG5hbWUYASABKAkSLAoHc2NoZW1hcxgCIAMoCzIbLmJ5dGViYXNlLnYxLlNjaGVtYU1ldGFkYXRhEhUKDWNoYXJhY3Rlcl9zZXQYAyABKAkSEQoJY29sbGF0aW9uGAQgASgJEjIKCmV4dGVuc2lvbnMYBSADKAsyHi5ieXRlYmFzZS52MS5FeHRlbnNpb25NZXRhZGF0YRINCgVvd25lchgGIAEoCRITCgtzZWFyY2hfcGF0aBgHIAEoCTpW6kFTCh1ieXRlYmFzZS5jb20vRGF0YWJhc2VNZXRhZGF0YRIyaW5zdGFuY2VzL3tpbnN0YW5jZX0vZGF0YWJhc2VzL3tkYXRhYmFzZX0vbWV0YWRhdGEi4wUKDlNjaGVtYU1ldGFkYXRhEgwKBG5hbWUYASABKAkSKgoGdGFibGVzGAIgAygLMhouYnl0ZWJhc2UudjEuVGFibGVNZXRhZGF0YRI7Cg9leHRlcm5hbF90YWJsZXMYAyADKAsyIi5ieXRlYmFzZS52MS5FeHRlcm5hbFRhYmxlTWV0YWRhdGESKAoFdmlld3MYBCADKAsyGS5ieXRlYmFzZS52MS5WaWV3TWV0YWRhdGESMAoJZnVuY3Rpb25zGAUgAygLMh0uYnl0ZWJhc2UudjEuRnVuY3Rpb25NZXRhZGF0YRIyCgpwcm9jZWR1cmVzGAYgAygLMh4uYnl0ZWJhc2UudjEuUHJvY2VkdXJlTWV0YWRhdGESLAoHc3RyZWFtcxgHIAMoCzIbLmJ5dGViYXNlLnYxLlN0cmVhbU1ldGFkYXRhEigKBXRhc2tzGAggAygLMhkuYnl0ZWJhc2UudjEuVGFza01ldGFkYXRhEkEKEm1hdGVyaWFsaXplZF92aWV3cxgJIAMoCzIlLmJ5dGViYXNlLnYxLk1hdGVyaWFsaXplZFZpZXdNZXRhZGF0YRIuCghwYWNrYWdlcxgKIAMoCzIcLmJ5dGViYXNlLnYxLlBhY2thZ2VNZXRhZGF0YRINCgVvd25lchgLIAEoCRIwCglzZXF1ZW5jZXMYDCADKAsyHS5ieXRlYmFzZS52MS5TZXF1ZW5jZU1ldGFkYXRhEioKBmV2ZW50cxgNIAMoCzIaLmJ5dGViYXNlLnYxLkV2ZW50TWV0YWRhdGESMQoKZW51bV90eXBlcxgOIAMoCzIdLmJ5dGViYXNlLnYxLkVudW1UeXBlTWV0YWRhdGESEQoJc2tpcF9kdW1wGA8gASgIEg8KB2NvbW1lbnQYECABKAkSOwoPY29tcG9zaXRlX3R5cGVzGBEgAygLMiIuYnl0ZWJhc2UudjEuQ29tcG9zaXRlVHlwZU1ldGFkYXRhIlQKEEVudW1UeXBlTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIOCgZ2YWx1ZXMYAiADKAkSDwoHY29tbWVudBgDIAEoCRIRCglza2lwX2R1bXAYBCABKAgibwoVQ29tcG9zaXRlVHlwZU1ldGFkYXRhEgwKBG5hbWUYASABKAkSNwoKYXR0cmlidXRlcxgCIAMoCzIjLmJ5dGViYXNlLnYxLkNvbXBvc2l0ZVR5cGVBdHRyaWJ1dGUSDwoHY29tbWVudBgDIAEoCSJYChZDb21wb3NpdGVUeXBlQXR0cmlidXRlEgwKBG5hbWUYASABKAkSDAoEdHlwZRgCIAEoCRIRCgljb2xsYXRpb24YAyABKAkSDwoHY29tbWVudBgEIAEoCSKjAQoNRXZlbnRNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhIKCmRlZmluaXRpb24YAiABKAkSEQoJdGltZV96b25lGAMgASgJEhAKCHNxbF9tb2RlGAQgASgJEhwKFGNoYXJhY3Rlcl9zZXRfY2xpZW50GAUgASgJEhwKFGNvbGxhdGlvbl9jb25uZWN0aW9uGAYgASgJEg8KB2NvbW1lbnQYByABKAkigQIKEFNlcXVlbmNlTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIRCglkYXRhX3R5cGUYAiABKAkSDQoFc3RhcnQYAyABKAkSEQoJbWluX3ZhbHVlGAQgASgJEhEKCW1heF92YWx1ZRgFIAEoCRIRCglpbmNyZW1lbnQYBiABKAkSDQoFY3ljbGUYByABKAgSEgoKY2FjaGVfc2l6ZRgIIAEoCRISCgpsYXN0X3ZhbHVlGAkgASgJEhMKC293bmVyX3RhYmxlGAogASgJEhQKDG93bmVyX2NvbHVtbhgLIAEoCRIPCgdjb21tZW50GAwgASgJEhEKCXNraXBfZHVtcBgNIAEoCCK+AQoPVHJpZ2dlck1ldGFkYXRhEgwKBG5hbWUYASABKAkSDQoFZXZlbnQYAiABKAkSDgoGdGltaW5nGAMgASgJEgwKBGJvZHkYBCABKAkSEAoIc3FsX21vZGUYBSABKAkSHAoUY2hhcmFjdGVyX3NldF9jbGllbnQYBiABKAkSHAoUY29sbGF0aW9uX2Nvbm5lY3Rpb24YByABKAkSDwoHY29tbWVudBgIIAEoCRIRCglza2lwX2R1bXAYCSABKAgikQEKFUV4dGVybmFsVGFibGVNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhwKFGV4dGVybmFsX3NlcnZlcl9uYW1lGAIgASgJEh4KFmV4dGVybmFsX2RhdGFiYXNlX25hbWUYAyABKAkSLAoHY29sdW1ucxgEIAMoCzIbLmJ5dGViYXNlLnYxLkNvbHVtbk1ldGFkYXRhIuwECg1UYWJsZU1ldGFkYXRhEgwKBG5hbWUYASABKAkSLAoHY29sdW1ucxgCIAMoCzIbLmJ5dGViYXNlLnYxLkNvbHVtbk1ldGFkYXRhEisKB2luZGV4ZXMYAyADKAsyGi5ieXRlYmFzZS52MS5JbmRleE1ldGFkYXRhEg4KBmVuZ2luZRgEIAEoCRIRCgljb2xsYXRpb24YBSABKAkSDwoHY2hhcnNldBgGIAEoCRIRCglyb3dfY291bnQYByABKAMSEQoJZGF0YV9zaXplGAggASgDEhIKCmluZGV4X3NpemUYCSABKAMSEQoJZGF0YV9mcmVlGAogASgDEhYKDmNyZWF0ZV9vcHRpb25zGAsgASgJEg8KB2NvbW1lbnQYDCABKAkSNQoMZm9yZWlnbl9rZXlzGA0gAygLMh8uYnl0ZWJhc2UudjEuRm9yZWlnbktleU1ldGFkYXRhEjcKCnBhcnRpdGlvbnMYDiADKAsyIy5ieXRlYmFzZS52MS5UYWJsZVBhcnRpdGlvbk1ldGFkYXRhEj8KEWNoZWNrX2NvbnN0cmFpbnRzGA8gAygLMiQuYnl0ZWJhc2UudjEuQ2hlY2tDb25zdHJhaW50TWV0YWRhdGESDQoFb3duZXIYECABKAkSFAoMc29ydGluZ19rZXlzGBEgAygJEi4KCHRyaWdnZXJzGBIgAygLMhwuYnl0ZWJhc2UudjEuVHJpZ2dlck1ldGFkYXRhEhEKCXNraXBfZHVtcBgTIAEoCBIVCg1zaGFyZGluZ19pbmZvGBQgASgJEhgKEHByaW1hcnlfa2V5X3R5cGUYFSABKAkiOwoXQ2hlY2tDb25zdHJhaW50TWV0YWRhdGESDAoEbmFtZRgBIAEoCRISCgpleHByZXNzaW9uGAIgASgJIs0DChZUYWJsZVBhcnRpdGlvbk1ldGFkYXRhEgwKBG5hbWUYASABKAkSNgoEdHlwZRgCIAEoDjIoLmJ5dGViYXNlLnYxLlRhYmxlUGFydGl0aW9uTWV0YWRhdGEuVHlwZRISCgpleHByZXNzaW9uGAMgASgJEg0KBXZhbHVlGAQgASgJEhMKC3VzZV9kZWZhdWx0GAUgASgJEjoKDXN1YnBhcnRpdGlvbnMYBiADKAsyIy5ieXRlYmFzZS52MS5UYWJsZVBhcnRpdGlvbk1ldGFkYXRhEisKB2luZGV4ZXMYByADKAsyGi5ieXRlYmFzZS52MS5JbmRleE1ldGFkYXRhEj8KEWNoZWNrX2NvbnN0cmFpbnRzGAggAygLMiQuYnl0ZWJhc2UudjEuQ2hlY2tDb25zdHJhaW50TWV0YWRhdGEiigEKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEgkKBVJBTkdFEAESEQoNUkFOR0VfQ09MVU1OUxACEggKBExJU1QQAxIQCgxMSVNUX0NPTFVNTlMQBBIICgRIQVNIEAUSDwoLTElORUFSX0hBU0gQBhIHCgNLRVkQBxIOCgpMSU5FQVJfS0VZEAgi0QQKDkNvbHVtbk1ldGFkYXRhEgwKBG5hbWUYASABKAkSEAoIcG9zaXRpb24YAiABKAUSEwoLaGFzX2RlZmF1bHQYAyABKAgSDwoHZGVmYXVsdBgEIAEoCRIXCg9kZWZhdWx0X29uX251bGwYBSABKAgSEQoJb25fdXBkYXRlGAYgASgJEhAKCG51bGxhYmxlGAcgASgIEgwKBHR5cGUYCCABKAkSFQoNY2hhcmFjdGVyX3NldBgJIAEoCRIRCgljb2xsYXRpb24YCiABKAkSDwoHY29tbWVudBgLIAEoCRIzCgpnZW5lcmF0aW9uGAwgASgLMh8uYnl0ZWJhc2UudjEuR2VuZXJhdGlvbk1ldGFkYXRhEhMKC2lzX2lkZW50aXR5GA0gASgIEksKE2lkZW50aXR5X2dlbmVyYXRpb24YDiABKA4yLi5ieXRlYmFzZS52MS5Db2x1bW5NZXRhZGF0YS5JZGVudGl0eUdlbmVyYXRpb24SFQoNaWRlbnRpdHlfc2VlZBgPIAEoAxIaChJpZGVudGl0eV9pbmNyZW1lbnQYECABKAMSHwoXZGVmYXVsdF9jb25zdHJhaW50X25hbWUYESABKAkSEQoEc3JpZBgSIAEoDUgAiAEBEhQKDGlzX2ludmlzaWJsZRgTIAEoCCJVChJJZGVudGl0eUdlbmVyYXRpb24SIwofSURFTlRJVFlfR0VORVJBVElPTl9VTlNQRUNJRklFRBAAEgoKBkFMV0FZUxABEg4KCkJZX0RFRkFVTFQQAkIHCgVfc3JpZCKTAQoSR2VuZXJhdGlvbk1ldGFkYXRhEjIKBHR5cGUYASABKA4yJC5ieXRlYmFzZS52MS5HZW5lcmF0aW9uTWV0YWRhdGEuVHlwZRISCgpleHByZXNzaW9uGAIgASgJIjUKBFR5cGUSFAoQVFlQRV9VTlNQRUNJRklFRBAAEgsKB1ZJUlRVQUwQARIKCgZTVE9SRUQQAiLtAQoMVmlld01ldGFkYXRhEgwKBG5hbWUYASABKAkSEgoKZGVmaW5pdGlvbhgCIAEoCRIPCgdjb21tZW50GAMgASgJEjkKEmRlcGVuZGVuY3lfY29sdW1ucxgEIAMoCzIdLmJ5dGViYXNlLnYxLkRlcGVuZGVuY3lDb2x1bW4SLAoHY29sdW1ucxgFIAMoCzIbLmJ5dGViYXNlLnYxLkNvbHVtbk1ldGFkYXRhEi4KCHRyaWdnZXJzGAYgAygLMhwuYnl0ZWJhc2UudjEuVHJpZ2dlck1ldGFkYXRhEhEKCXNraXBfZHVtcBgHIAEoCCJBChBEZXBlbmRlbmN5Q29sdW1uEg4KBnNjaGVtYRgBIAEoCRINCgV0YWJsZRgCIAEoCRIOCgZjb2x1bW4YAyABKAki+AEKGE1hdGVyaWFsaXplZFZpZXdNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhIKCmRlZmluaXRpb24YAiABKAkSDwoHY29tbWVudBgDIAEoCRI5ChJkZXBlbmRlbmN5X2NvbHVtbnMYBCADKAsyHS5ieXRlYmFzZS52MS5EZXBlbmRlbmN5Q29sdW1uEi4KCHRyaWdnZXJzGAUgAygLMhwuYnl0ZWJhc2UudjEuVHJpZ2dlck1ldGFkYXRhEisKB2luZGV4ZXMYBiADKAsyGi5ieXRlYmFzZS52MS5JbmRleE1ldGFkYXRhEhEKCXNraXBfZHVtcBgHIAEoCCIwCg9EZXBlbmRlbmN5VGFibGUSDgoGc2NoZW1hGAEgASgJEg0KBXRhYmxlGAIgASgJIo4CChBGdW5jdGlvbk1ldGFkYXRhEgwKBG5hbWUYASABKAkSEgoKZGVmaW5pdGlvbhgCIAEoCRIRCglzaWduYXR1cmUYAyABKAkSHAoUY2hhcmFjdGVyX3NldF9jbGllbnQYBCABKAkSHAoUY29sbGF0aW9uX2Nvbm5lY3Rpb24YBSABKAkSGgoSZGF0YWJhc2VfY29sbGF0aW9uGAYgASgJEhAKCHNxbF9tb2RlGAcgASgJEg8KB2NvbW1lbnQYCCABKAkSNwoRZGVwZW5kZW5jeV90YWJsZXMYCSADKAsyHC5ieXRlYmFzZS52MS5EZXBlbmRlbmN5VGFibGUSEQoJc2tpcF9kdW1wGAogASgIItYBChFQcm9jZWR1cmVNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhIKCmRlZmluaXRpb24YAiABKAkSEQoJc2lnbmF0dXJlGAMgASgJEhwKFGNoYXJhY3Rlcl9zZXRfY2xpZW50GAQgASgJEhwKFGNvbGxhdGlvbl9jb25uZWN0aW9uGAUgASgJEhoKEmRhdGFiYXNlX2NvbGxhdGlvbhgGIAEoCRIQCghzcWxfbW9kZRgHIAEoCRIPCgdjb21tZW50GAkgASgJEhEKCXNraXBfZHVtcBgIIAEoCCIzCg9QYWNrYWdlTWV0YWRhdGESDAoEbmFtZRgBIAEoCRISCgpkZWZpbml0aW9uGAIgASgJIpYCCgxUYXNrTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIKCgJpZBgCIAEoCRINCgVvd25lchgDIAEoCRIPCgdjb21tZW50GAQgASgJEhEKCXdhcmVob3VzZRgFIAEoCRIQCghzY2hlZHVsZRgGIAEoCRIUCgxwcmVkZWNlc3NvcnMYByADKAkSLgoFc3RhdGUYCCABKA4yHy5ieXRlYmFzZS52MS5UYXNrTWV0YWRhdGEuU3RhdGUSEQoJY29uZGl0aW9uGAkgASgJEhIKCmRlZmluaXRpb24YCiABKAkiOgoFU3RhdGUSFQoRU1RBVEVfVU5TUEVDSUZJRUQQABILCgdTVEFSVEVEEAESDQoJU1VTUEVOREVEEAIiywIKDlN0cmVhbU1ldGFkYXRhEgwKBG5hbWUYASABKAkSEgoKdGFibGVfbmFtZRgCIAEoCRINCgVvd25lchgDIAEoCRIPCgdjb21tZW50GAQgASgJEi4KBHR5cGUYBSABKA4yIC5ieXRlYmFzZS52MS5TdHJlYW1NZXRhZGF0YS5UeXBlEg0KBXN0YWxlGAYgASgIEi4KBG1vZGUYByABKA4yIC5ieXRlYmFzZS52MS5TdHJlYW1NZXRhZGF0YS5Nb2RlEhIKCmRlZmluaXRpb24YCCABKAkiJwoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASCQoFREVMVEEQASJLCgRNb2RlEhQKEE1PREVfVU5TUEVDSUZJRUQQABILCgdERUZBVUxUEAESDwoLQVBQRU5EX09OTFkQAhIPCgtJTlNFUlRfT05MWRADIr0BChJTcGF0aWFsSW5kZXhDb25maWcSDgoGbWV0aG9kGAEgASgJEjUKDHRlc3NlbGxhdGlvbhgCIAEoCzIfLmJ5dGViYXNlLnYxLlRlc3NlbGxhdGlvbkNvbmZpZxIrCgdzdG9yYWdlGAMgASgLMhouYnl0ZWJhc2UudjEuU3RvcmFnZUNvbmZpZxIzCgtkaW1lbnNpb25hbBgEIAEoCzIeLmJ5dGViYXNlLnYxLkRpbWVuc2lvbmFsQ29uZmlnIpsBChJUZXNzZWxsYXRpb25Db25maWcSDgoGc2NoZW1lGAEgASgJEisKC2dyaWRfbGV2ZWxzGAIgAygLMhYuYnl0ZWJhc2UudjEuR3JpZExldmVsEhgKEGNlbGxzX3Blcl9vYmplY3QYAyABKAUSLgoMYm91bmRpbmdfYm94GAQgASgLMhguYnl0ZWJhc2UudjEuQm91bmRpbmdCb3giKwoJR3JpZExldmVsEg0KBWxldmVsGAEgASgFEg8KB2RlbnNpdHkYAiABKAkiRQoLQm91bmRpbmdCb3gSDAoEeG1pbhgBIAEoARIMCgR5bWluGAIgASgBEgwKBHhtYXgYAyABKAESDAoEeW1heBgEIAEoASK+AgoNU3RvcmFnZUNvbmZpZxISCgpmaWxsZmFjdG9yGAEgASgFEhEKCWJ1ZmZlcmluZxgCIAEoCRISCgp0YWJsZXNwYWNlGAMgASgJEhcKD3dvcmtfdGFibGVzcGFjZRgEIAEoCRIRCglzZG9fbGV2ZWwYBSABKAUSFwoPY29tbWl0X2ludGVydmFsGAYgASgFEhEKCXBhZF9pbmRleBgHIAEoCBIWCg5zb3J0X2luX3RlbXBkYhgIIAEoCRIVCg1kcm9wX2V4aXN0aW5nGAkgASgIEg4KBm9ubGluZRgKIAEoCBIXCg9hbGxvd19yb3dfbG9ja3MYCyABKAgSGAoQYWxsb3dfcGFnZV9sb2NrcxgMIAEoCBIOCgZtYXhkb3AYDSABKAUSGAoQZGF0YV9jb21wcmVzc2lvbhgOIAEoCSJ/ChFEaW1lbnNpb25hbENvbmZpZxISCgpkaW1lbnNpb25zGAEgASgFEhEKCWRhdGFfdHlwZRgCIAEoCRIMCgRzcmlkGAMgASgFEjUKC2NvbnN0cmFpbnRzGAQgAygLMiAuYnl0ZWJhc2UudjEuRGltZW5zaW9uQ29uc3RyYWludCJhChNEaW1lbnNpb25Db25zdHJhaW50EhEKCWRpbWVuc2lvbhgBIAEoCRIRCgltaW5fdmFsdWUYAiABKAESEQoJbWF4X3ZhbHVlGAMgASgBEhEKCXRvbGVyYW5jZRgEIAEoASKNAwoNSW5kZXhNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhMKC2V4cHJlc3Npb25zGAIgAygJEhIKCmtleV9sZW5ndGgYAyADKAMSEgoKZGVzY2VuZGluZxgEIAMoCBIMCgR0eXBlGAUgASgJEg4KBnVuaXF1ZRgGIAEoCBIPCgdwcmltYXJ5GAcgASgIEg8KB3Zpc2libGUYCCABKAgSDwoHY29tbWVudBgJIAEoCRISCgpkZWZpbml0aW9uGAogASgJEhsKE3BhcmVudF9pbmRleF9zY2hlbWEYCyABKAkSGQoRcGFyZW50X2luZGV4X25hbWUYDCABKAkSEwoLZ3JhbnVsYXJpdHkYDSABKAMSFQoNaXNfY29uc3RyYWludBgOIAEoCBI3Cg5zcGF0aWFsX2NvbmZpZxgPIAEoCzIfLmJ5dGViYXNlLnYxLlNwYXRpYWxJbmRleENvbmZpZxIVCg1vcGNsYXNzX25hbWVzGBAgAygJEhgKEG9wY2xhc3NfZGVmYXVsdHMYESADKAgiVwoRRXh0ZW5zaW9uTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIOCgZzY2hlbWEYAiABKAkSDwoHdmVyc2lvbhgDIAEoCRITCgtkZXNjcmlwdGlvbhgEIAEoCSK+AQoSRm9yZWlnbktleU1ldGFkYXRhEgwKBG5hbWUYASABKAkSDwoHY29sdW1ucxgCIAMoCRIZChFyZWZlcmVuY2VkX3NjaGVtYRgDIAEoCRIYChByZWZlcmVuY2VkX3RhYmxlGAQgASgJEhoKEnJlZmVyZW5jZWRfY29sdW1ucxgFIAMoCRIRCglvbl9kZWxldGUYBiABKAkSEQoJb25fdXBkYXRlGAcgASgJEhIKCm1hdGNoX3R5cGUYCCABKAkiIAoORGF0YWJhc2VTY2hlbWESDgoGc2NoZW1hGAEgASgJIj4KEURhdGFiYXNlU0RMU2NoZW1hEg4KBnNjaGVtYRgBIAEoDBIZCgxjb250ZW50X3R5cGUYAiABKAlCA+BBAyLxAgoWR2V0U2NoZW1hU3RyaW5nUmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRI8CgR0eXBlGAIgASgOMi4uYnl0ZWJhc2UudjEuR2V0U2NoZW1hU3RyaW5nUmVxdWVzdC5PYmplY3RUeXBlEg4KBnNjaGVtYRgDIAEoCRIOCgZvYmplY3QYBCABKAkSLwoIbWV0YWRhdGEYBSABKAsyHS5ieXRlYmFzZS52MS5EYXRhYmFzZU1ldGFkYXRhIpoBCgpPYmplY3RUeXBlEhsKF09CSkVDVF9UWVBFX1VOU1BFQ0lGSUVEEAASDAoIREFUQUJBU0UQARIKCgZTQ0hFTUEQAhIJCgVUQUJMRRADEggKBFZJRVcQBBIVChFNQVRFUklBTElaRURfVklFVxAFEgwKCEZVTkNUSU9OEAYSDQoJUFJPQ0VEVVJFEAcSDAoIU0VRVUVOQ0UQCCIwChdHZXRTY2hlbWFTdHJpbmdSZXNwb25zZRIVCg1zY2hlbWFfc3RyaW5nGAEgASgJKj0KClN5bmNTdGF0dXMSGwoXU1lOQ19TVEFUVVNfVU5TUEVDSUZJRUQQABIGCgJPSxABEgoKBkZBSUxFRBACMpASCg9EYXRhYmFzZVNlcnZpY2USkAEKC0dldERhdGFiYXNlEh8uYnl0ZWJhc2UudjEuR2V0RGF0YWJhc2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuRGF0YWJhc2UiSdpBBG5hbWWK6jAQYmIuZGF0YWJhc2VzLmdldJDqMAGC0+STAiQSIi92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn0S3QEKEUJhdGNoR2V0RGF0YWJhc2VzEiUuYnl0ZWJhc2UudjEuQmF0Y2hHZXREYXRhYmFzZXNSZXF1ZXN0GiYuYnl0ZWJhc2UudjEuQmF0Y2hHZXREYXRhYmFzZXNSZXNwb25zZSJ5iuowEGJiLmRhdGFiYXNlcy5nZXSQ6jACgtPkkwJbWi0SKy92MS97cGFyZW50PWluc3RhbmNlcy8qfS9kYXRhYmFzZXM6YmF0Y2hHZXQSKi92MS97cGFyZW50PXByb2plY3RzLyp9L2RhdGFiYXNlczpiYXRjaEdldBLrAQoNTGlzdERhdGFiYXNlcxIhLmJ5dGViYXNlLnYxLkxpc3REYXRhYmFzZXNSZXF1ZXN0GiIuYnl0ZWJhc2UudjEuTGlzdERhdGFiYXNlc1Jlc3BvbnNlIpIB2kEAiuowEWJiLmRhdGFiYXNlcy5saXN0kOowAoLT5JMCcFokEiIvdjEve3BhcmVudD1pbnN0YW5jZXMvKn0vZGF0YWJhc2VzWiUSIy92MS97cGFyZW50PXdvcmtzcGFjZXMvKn0vZGF0YWJhc2VzEiEvdjEve3BhcmVudD1wcm9qZWN0cy8qfS9kYXRhYmFzZXMSwAEKDlVwZGF0ZURhdGFiYXNlEiIuYnl0ZWJhc2UudjEuVXBkYXRlRGF0YWJhc2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuRGF0YWJhc2Uic9pBFGRhdGFiYXNlLHVwZGF0ZV9tYXNriuowE2JiLmRhdGFiYXNlcy51cGRhdGWQ6jABmOowAYLT5JMCNzoIZGF0YWJhc2UyKy92MS97ZGF0YWJhc2UubmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn0SxQEKFEJhdGNoVXBkYXRlRGF0YWJhc2VzEiguYnl0ZWJhc2UudjEuQmF0Y2hVcGRhdGVEYXRhYmFzZXNSZXF1ZXN0GikuYnl0ZWJhc2UudjEuQmF0Y2hVcGRhdGVEYXRhYmFzZXNSZXNwb25zZSJYiuowE2JiLmRhdGFiYXNlcy51cGRhdGWQ6jABmOowAYLT5JMCMzoBKiIuL3YxL3twYXJlbnQ9aW5zdGFuY2VzLyp9L2RhdGFiYXNlczpiYXRjaFVwZGF0ZRKgAQoMU3luY0RhdGFiYXNlEiAuYnl0ZWJhc2UudjEuU3luY0RhdGFiYXNlUmVxdWVzdBohLmJ5dGViYXNlLnYxLlN5bmNEYXRhYmFzZVJlc3BvbnNlIkuK6jARYmIuZGF0YWJhc2VzLnN5bmOQ6jABgtPkkwIsOgEqIicvdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyp9OnN5bmMStwEKEkJhdGNoU3luY0RhdGFiYXNlcxImLmJ5dGViYXNlLnYxLkJhdGNoU3luY0RhdGFiYXNlc1JlcXVlc3QaJy5ieXRlYmFzZS52MS5CYXRjaFN5bmNEYXRhYmFzZXNSZXNwb25zZSJQiuowEWJiLmRhdGFiYXNlcy5zeW5jkOowAYLT5JMCMToBKiIsL3YxL3twYXJlbnQ9aW5zdGFuY2VzLyp9L2RhdGFiYXNlczpiYXRjaFN5bmMSsAEKE0dldERhdGFiYXNlTWV0YWRhdGESJy5ieXRlYmFzZS52MS5HZXREYXRhYmFzZU1ldGFkYXRhUmVxdWVzdBodLmJ5dGViYXNlLnYxLkRhdGFiYXNlTWV0YWRhdGEiUYrqMBZiYi5kYXRhYmFzZXMuZ2V0U2NoZW1hkOowAYLT5JMCLRIrL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qL21ldGFkYXRhfRKoAQoRR2V0RGF0YWJhc2VTY2hlbWESJS5ieXRlYmFzZS52MS5HZXREYXRhYmFzZVNjaGVtYVJlcXVlc3QaGy5ieXRlYmFzZS52MS5EYXRhYmFzZVNjaGVtYSJPiuowFmJiLmRhdGFiYXNlcy5nZXRTY2hlbWGQ6jABgtPkkwIrEikvdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovc2NoZW1hfRK0AQoUR2V0RGF0YWJhc2VTRExTY2hlbWESKC5ieXRlYmFzZS52MS5HZXREYXRhYmFzZVNETFNjaGVtYVJlcXVlc3QaHi5ieXRlYmFzZS52MS5EYXRhYmFzZVNETFNjaGVtYSJSiuowFmJiLmRhdGFiYXNlcy5nZXRTY2hlbWGQ6jABgtPkkwIuEiwvdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovc2RsU2NoZW1hfRLhAQoKRGlmZlNjaGVtYRIeLmJ5dGViYXNlLnYxLkRpZmZTY2hlbWFSZXF1ZXN0Gh8uYnl0ZWJhc2UudjEuRGlmZlNjaGVtYVJlc3BvbnNlIpEBiuowEGJiLmRhdGFiYXNlcy5nZXSQ6jABgtPkkwJzOgEqWj86ASoiOi92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9jaGFuZ2Vsb2dzLyp9OmRpZmZTY2hlbWEiLS92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06ZGlmZlNjaGVtYRK6AQoPR2V0U2NoZW1hU3RyaW5nEiMuYnl0ZWJhc2UudjEuR2V0U2NoZW1hU3RyaW5nUmVxdWVzdBokLmJ5dGViYXNlLnYxLkdldFNjaGVtYVN0cmluZ1Jlc3BvbnNlIlzaQQRuYW1liuowFmJiLmRhdGFiYXNlcy5nZXRTY2hlbWGQ6jABgtPkkwIxEi8vdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovc2NoZW1hU3RyaW5nfUKqAQoPY29tLmJ5dGViYXNlLnYxQhREYXRhYmFzZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_service]);
+ fileDesc("Chl2MS9kYXRhYmFzZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXREYXRhYmFzZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2UidwoYQmF0Y2hHZXREYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USLAoFbmFtZXMYAiADKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlIkUKGUJhdGNoR2V0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuRGF0YWJhc2UipAEKFExpc3REYXRhYmFzZXNSZXF1ZXN0Ei0KBnBhcmVudBgBIAEoCUId4EEC+kEXEhVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJcGFnZV9zaXplGAIgASgFEhIKCnBhZ2VfdG9rZW4YAyABKAkSDgoGZmlsdGVyGAQgASgJEhQKDHNob3dfZGVsZXRlZBgFIAEoCBIQCghvcmRlcl9ieRgGIAEoCSJaChVMaXN0RGF0YWJhc2VzUmVzcG9uc2USKAoJZGF0YWJhc2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuRGF0YWJhc2USFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIo0BChVVcGRhdGVEYXRhYmFzZVJlcXVlc3QSLAoIZGF0YWJhc2UYASABKAsyFS5ieXRlYmFzZS52MS5EYXRhYmFzZUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzaxIVCg1hbGxvd19taXNzaW5nGAMgASgIImgKG0JhdGNoVXBkYXRlRGF0YWJhc2VzUmVxdWVzdBIOCgZwYXJlbnQYASABKAkSOQoIcmVxdWVzdHMYAiADKAsyIi5ieXRlYmFzZS52MS5VcGRhdGVEYXRhYmFzZVJlcXVlc3RCA+BBAiJIChxCYXRjaFVwZGF0ZURhdGFiYXNlc1Jlc3BvbnNlEigKCWRhdGFiYXNlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLkRhdGFiYXNlIlkKGUJhdGNoU3luY0RhdGFiYXNlc1JlcXVlc3QSDgoGcGFyZW50GAEgASgJEiwKBW5hbWVzGAIgAygJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZSIcChpCYXRjaFN5bmNEYXRhYmFzZXNSZXNwb25zZSJCChNTeW5jRGF0YWJhc2VSZXF1ZXN0EisKBG5hbWUYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlIhYKFFN5bmNEYXRhYmFzZVJlc3BvbnNlInAKGkdldERhdGFiYXNlTWV0YWRhdGFSZXF1ZXN0EjMKBG5hbWUYASABKAlCJeBBAvpBHwodYnl0ZWJhc2UuY29tL0RhdGFiYXNlTWV0YWRhdGESDgoGZmlsdGVyGAIgASgJEg0KBWxpbWl0GAMgASgFIk0KGEdldERhdGFiYXNlU2NoZW1hUmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG2J5dGViYXNlLmNvbS9EYXRhYmFzZVNjaGVtYSLYAQobR2V0RGF0YWJhc2VTRExTY2hlbWFSZXF1ZXN0EisKBG5hbWUYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlEkIKBmZvcm1hdBgCIAEoDjIyLmJ5dGViYXNlLnYxLkdldERhdGFiYXNlU0RMU2NoZW1hUmVxdWVzdC5TRExGb3JtYXQiSAoJU0RMRm9ybWF0EhoKFlNETF9GT1JNQVRfVU5TUEVDSUZJRUQQABIPCgtTSU5HTEVfRklMRRABEg4KCk1VTFRJX0ZJTEUQAiJxChFEaWZmU2NoZW1hUmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIQCgZzY2hlbWEYAiABKAlIABITCgljaGFuZ2Vsb2cYAyABKAlIAEIICgZ0YXJnZXQiIgoSRGlmZlNjaGVtYVJlc3BvbnNlEgwKBGRpZmYYASABKAkifwoTRGlmZk1ldGFkYXRhUmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRI7Cg90YXJnZXRfbWV0YWRhdGEYAiABKAsyHS5ieXRlYmFzZS52MS5EYXRhYmFzZU1ldGFkYXRhQgPgQQIiJAoURGlmZk1ldGFkYXRhUmVzcG9uc2USDAoEZGlmZhgBIAEoCSLrBAoIRGF0YWJhc2USDAoEbmFtZRgBIAEoCRImCgVzdGF0ZRgCIAEoDjISLmJ5dGViYXNlLnYxLlN0YXRlQgPgQQMSPQoUc3VjY2Vzc2Z1bF9zeW5jX3RpbWUYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSDwoHcHJvamVjdBgEIAEoCRIUCgdyZWxlYXNlGAUgASgJQgPgQQMSHQoLZW52aXJvbm1lbnQYBiABKAlCA+BBAUgAiAEBEicKFWVmZmVjdGl2ZV9lbnZpcm9ubWVudBgHIAEoCUID4EEDSAGIAQESMQoGbGFiZWxzGAggAygLMiEuYnl0ZWJhc2UudjEuRGF0YWJhc2UuTGFiZWxzRW50cnkSPQoRaW5zdGFuY2VfcmVzb3VyY2UYCSABKAsyHS5ieXRlYmFzZS52MS5JbnN0YW5jZVJlc291cmNlQgPgQQMSHQoQYmFja3VwX2F2YWlsYWJsZRgKIAEoCEID4EEDEjEKC3N5bmNfc3RhdHVzGAsgASgOMhcuYnl0ZWJhc2UudjEuU3luY1N0YXR1c0ID4EEDEhcKCnN5bmNfZXJyb3IYDCABKAlCA+BBAxotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBOkXqQUIKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIpaW5zdGFuY2VzL3tpbnN0YW5jZX0vZGF0YWJhc2VzL3tkYXRhYmFzZX1CDgoMX2Vudmlyb25tZW50QhgKFl9lZmZlY3RpdmVfZW52aXJvbm1lbnQiqAIKEERhdGFiYXNlTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIsCgdzY2hlbWFzGAIgAygLMhsuYnl0ZWJhc2UudjEuU2NoZW1hTWV0YWRhdGESFQoNY2hhcmFjdGVyX3NldBgDIAEoCRIRCgljb2xsYXRpb24YBCABKAkSMgoKZXh0ZW5zaW9ucxgFIAMoCzIeLmJ5dGViYXNlLnYxLkV4dGVuc2lvbk1ldGFkYXRhEg0KBW93bmVyGAYgASgJEhMKC3NlYXJjaF9wYXRoGAcgASgJOlbqQVMKHWJ5dGViYXNlLmNvbS9EYXRhYmFzZU1ldGFkYXRhEjJpbnN0YW5jZXMve2luc3RhbmNlfS9kYXRhYmFzZXMve2RhdGFiYXNlfS9tZXRhZGF0YSLjBQoOU2NoZW1hTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIqCgZ0YWJsZXMYAiADKAsyGi5ieXRlYmFzZS52MS5UYWJsZU1ldGFkYXRhEjsKD2V4dGVybmFsX3RhYmxlcxgDIAMoCzIiLmJ5dGViYXNlLnYxLkV4dGVybmFsVGFibGVNZXRhZGF0YRIoCgV2aWV3cxgEIAMoCzIZLmJ5dGViYXNlLnYxLlZpZXdNZXRhZGF0YRIwCglmdW5jdGlvbnMYBSADKAsyHS5ieXRlYmFzZS52MS5GdW5jdGlvbk1ldGFkYXRhEjIKCnByb2NlZHVyZXMYBiADKAsyHi5ieXRlYmFzZS52MS5Qcm9jZWR1cmVNZXRhZGF0YRIsCgdzdHJlYW1zGAcgAygLMhsuYnl0ZWJhc2UudjEuU3RyZWFtTWV0YWRhdGESKAoFdGFza3MYCCADKAsyGS5ieXRlYmFzZS52MS5UYXNrTWV0YWRhdGESQQoSbWF0ZXJpYWxpemVkX3ZpZXdzGAkgAygLMiUuYnl0ZWJhc2UudjEuTWF0ZXJpYWxpemVkVmlld01ldGFkYXRhEi4KCHBhY2thZ2VzGAogAygLMhwuYnl0ZWJhc2UudjEuUGFja2FnZU1ldGFkYXRhEg0KBW93bmVyGAsgASgJEjAKCXNlcXVlbmNlcxgMIAMoCzIdLmJ5dGViYXNlLnYxLlNlcXVlbmNlTWV0YWRhdGESKgoGZXZlbnRzGA0gAygLMhouYnl0ZWJhc2UudjEuRXZlbnRNZXRhZGF0YRIxCgplbnVtX3R5cGVzGA4gAygLMh0uYnl0ZWJhc2UudjEuRW51bVR5cGVNZXRhZGF0YRIRCglza2lwX2R1bXAYDyABKAgSDwoHY29tbWVudBgQIAEoCRI7Cg9jb21wb3NpdGVfdHlwZXMYESADKAsyIi5ieXRlYmFzZS52MS5Db21wb3NpdGVUeXBlTWV0YWRhdGEiVAoQRW51bVR5cGVNZXRhZGF0YRIMCgRuYW1lGAEgASgJEg4KBnZhbHVlcxgCIAMoCRIPCgdjb21tZW50GAMgASgJEhEKCXNraXBfZHVtcBgEIAEoCCJvChVDb21wb3NpdGVUeXBlTWV0YWRhdGESDAoEbmFtZRgBIAEoCRI3CgphdHRyaWJ1dGVzGAIgAygLMiMuYnl0ZWJhc2UudjEuQ29tcG9zaXRlVHlwZUF0dHJpYnV0ZRIPCgdjb21tZW50GAMgASgJIlgKFkNvbXBvc2l0ZVR5cGVBdHRyaWJ1dGUSDAoEbmFtZRgBIAEoCRIMCgR0eXBlGAIgASgJEhEKCWNvbGxhdGlvbhgDIAEoCRIPCgdjb21tZW50GAQgASgJIqMBCg1FdmVudE1ldGFkYXRhEgwKBG5hbWUYASABKAkSEgoKZGVmaW5pdGlvbhgCIAEoCRIRCgl0aW1lX3pvbmUYAyABKAkSEAoIc3FsX21vZGUYBCABKAkSHAoUY2hhcmFjdGVyX3NldF9jbGllbnQYBSABKAkSHAoUY29sbGF0aW9uX2Nvbm5lY3Rpb24YBiABKAkSDwoHY29tbWVudBgHIAEoCSKBAgoQU2VxdWVuY2VNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhEKCWRhdGFfdHlwZRgCIAEoCRINCgVzdGFydBgDIAEoCRIRCgltaW5fdmFsdWUYBCABKAkSEQoJbWF4X3ZhbHVlGAUgASgJEhEKCWluY3JlbWVudBgGIAEoCRINCgVjeWNsZRgHIAEoCBISCgpjYWNoZV9zaXplGAggASgJEhIKCmxhc3RfdmFsdWUYCSABKAkSEwoLb3duZXJfdGFibGUYCiABKAkSFAoMb3duZXJfY29sdW1uGAsgASgJEg8KB2NvbW1lbnQYDCABKAkSEQoJc2tpcF9kdW1wGA0gASgIIr4BCg9UcmlnZ2VyTWV0YWRhdGESDAoEbmFtZRgBIAEoCRINCgVldmVudBgCIAEoCRIOCgZ0aW1pbmcYAyABKAkSDAoEYm9keRgEIAEoCRIQCghzcWxfbW9kZRgFIAEoCRIcChRjaGFyYWN0ZXJfc2V0X2NsaWVudBgGIAEoCRIcChRjb2xsYXRpb25fY29ubmVjdGlvbhgHIAEoCRIPCgdjb21tZW50GAggASgJEhEKCXNraXBfZHVtcBgJIAEoCCKRAQoVRXh0ZXJuYWxUYWJsZU1ldGFkYXRhEgwKBG5hbWUYASABKAkSHAoUZXh0ZXJuYWxfc2VydmVyX25hbWUYAiABKAkSHgoWZXh0ZXJuYWxfZGF0YWJhc2VfbmFtZRgDIAEoCRIsCgdjb2x1bW5zGAQgAygLMhsuYnl0ZWJhc2UudjEuQ29sdW1uTWV0YWRhdGEi7AQKDVRhYmxlTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIsCgdjb2x1bW5zGAIgAygLMhsuYnl0ZWJhc2UudjEuQ29sdW1uTWV0YWRhdGESKwoHaW5kZXhlcxgDIAMoCzIaLmJ5dGViYXNlLnYxLkluZGV4TWV0YWRhdGESDgoGZW5naW5lGAQgASgJEhEKCWNvbGxhdGlvbhgFIAEoCRIPCgdjaGFyc2V0GAYgASgJEhEKCXJvd19jb3VudBgHIAEoAxIRCglkYXRhX3NpemUYCCABKAMSEgoKaW5kZXhfc2l6ZRgJIAEoAxIRCglkYXRhX2ZyZWUYCiABKAMSFgoOY3JlYXRlX29wdGlvbnMYCyABKAkSDwoHY29tbWVudBgMIAEoCRI1Cgxmb3JlaWduX2tleXMYDSADKAsyHy5ieXRlYmFzZS52MS5Gb3JlaWduS2V5TWV0YWRhdGESNwoKcGFydGl0aW9ucxgOIAMoCzIjLmJ5dGViYXNlLnYxLlRhYmxlUGFydGl0aW9uTWV0YWRhdGESPwoRY2hlY2tfY29uc3RyYWludHMYDyADKAsyJC5ieXRlYmFzZS52MS5DaGVja0NvbnN0cmFpbnRNZXRhZGF0YRINCgVvd25lchgQIAEoCRIUCgxzb3J0aW5nX2tleXMYESADKAkSLgoIdHJpZ2dlcnMYEiADKAsyHC5ieXRlYmFzZS52MS5UcmlnZ2VyTWV0YWRhdGESEQoJc2tpcF9kdW1wGBMgASgIEhUKDXNoYXJkaW5nX2luZm8YFCABKAkSGAoQcHJpbWFyeV9rZXlfdHlwZRgVIAEoCSI7ChdDaGVja0NvbnN0cmFpbnRNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhIKCmV4cHJlc3Npb24YAiABKAkizQMKFlRhYmxlUGFydGl0aW9uTWV0YWRhdGESDAoEbmFtZRgBIAEoCRI2CgR0eXBlGAIgASgOMiguYnl0ZWJhc2UudjEuVGFibGVQYXJ0aXRpb25NZXRhZGF0YS5UeXBlEhIKCmV4cHJlc3Npb24YAyABKAkSDQoFdmFsdWUYBCABKAkSEwoLdXNlX2RlZmF1bHQYBSABKAkSOgoNc3VicGFydGl0aW9ucxgGIAMoCzIjLmJ5dGViYXNlLnYxLlRhYmxlUGFydGl0aW9uTWV0YWRhdGESKwoHaW5kZXhlcxgHIAMoCzIaLmJ5dGViYXNlLnYxLkluZGV4TWV0YWRhdGESPwoRY2hlY2tfY29uc3RyYWludHMYCCADKAsyJC5ieXRlYmFzZS52MS5DaGVja0NvbnN0cmFpbnRNZXRhZGF0YSKKAQoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASCQoFUkFOR0UQARIRCg1SQU5HRV9DT0xVTU5TEAISCAoETElTVBADEhAKDExJU1RfQ09MVU1OUxAEEggKBEhBU0gQBRIPCgtMSU5FQVJfSEFTSBAGEgcKA0tFWRAHEg4KCkxJTkVBUl9LRVkQCCLRBAoOQ29sdW1uTWV0YWRhdGESDAoEbmFtZRgBIAEoCRIQCghwb3NpdGlvbhgCIAEoBRITCgtoYXNfZGVmYXVsdBgDIAEoCBIPCgdkZWZhdWx0GAQgASgJEhcKD2RlZmF1bHRfb25fbnVsbBgFIAEoCBIRCglvbl91cGRhdGUYBiABKAkSEAoIbnVsbGFibGUYByABKAgSDAoEdHlwZRgIIAEoCRIVCg1jaGFyYWN0ZXJfc2V0GAkgASgJEhEKCWNvbGxhdGlvbhgKIAEoCRIPCgdjb21tZW50GAsgASgJEjMKCmdlbmVyYXRpb24YDCABKAsyHy5ieXRlYmFzZS52MS5HZW5lcmF0aW9uTWV0YWRhdGESEwoLaXNfaWRlbnRpdHkYDSABKAgSSwoTaWRlbnRpdHlfZ2VuZXJhdGlvbhgOIAEoDjIuLmJ5dGViYXNlLnYxLkNvbHVtbk1ldGFkYXRhLklkZW50aXR5R2VuZXJhdGlvbhIVCg1pZGVudGl0eV9zZWVkGA8gASgDEhoKEmlkZW50aXR5X2luY3JlbWVudBgQIAEoAxIfChdkZWZhdWx0X2NvbnN0cmFpbnRfbmFtZRgRIAEoCRIRCgRzcmlkGBIgASgNSACIAQESFAoMaXNfaW52aXNpYmxlGBMgASgIIlUKEklkZW50aXR5R2VuZXJhdGlvbhIjCh9JREVOVElUWV9HRU5FUkFUSU9OX1VOU1BFQ0lGSUVEEAASCgoGQUxXQVlTEAESDgoKQllfREVGQVVMVBACQgcKBV9zcmlkIpMBChJHZW5lcmF0aW9uTWV0YWRhdGESMgoEdHlwZRgBIAEoDjIkLmJ5dGViYXNlLnYxLkdlbmVyYXRpb25NZXRhZGF0YS5UeXBlEhIKCmV4cHJlc3Npb24YAiABKAkiNQoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASCwoHVklSVFVBTBABEgoKBlNUT1JFRBACIu0BCgxWaWV3TWV0YWRhdGESDAoEbmFtZRgBIAEoCRISCgpkZWZpbml0aW9uGAIgASgJEg8KB2NvbW1lbnQYAyABKAkSOQoSZGVwZW5kZW5jeV9jb2x1bW5zGAQgAygLMh0uYnl0ZWJhc2UudjEuRGVwZW5kZW5jeUNvbHVtbhIsCgdjb2x1bW5zGAUgAygLMhsuYnl0ZWJhc2UudjEuQ29sdW1uTWV0YWRhdGESLgoIdHJpZ2dlcnMYBiADKAsyHC5ieXRlYmFzZS52MS5UcmlnZ2VyTWV0YWRhdGESEQoJc2tpcF9kdW1wGAcgASgIIkEKEERlcGVuZGVuY3lDb2x1bW4SDgoGc2NoZW1hGAEgASgJEg0KBXRhYmxlGAIgASgJEg4KBmNvbHVtbhgDIAEoCSL4AQoYTWF0ZXJpYWxpemVkVmlld01ldGFkYXRhEgwKBG5hbWUYASABKAkSEgoKZGVmaW5pdGlvbhgCIAEoCRIPCgdjb21tZW50GAMgASgJEjkKEmRlcGVuZGVuY3lfY29sdW1ucxgEIAMoCzIdLmJ5dGViYXNlLnYxLkRlcGVuZGVuY3lDb2x1bW4SLgoIdHJpZ2dlcnMYBSADKAsyHC5ieXRlYmFzZS52MS5UcmlnZ2VyTWV0YWRhdGESKwoHaW5kZXhlcxgGIAMoCzIaLmJ5dGViYXNlLnYxLkluZGV4TWV0YWRhdGESEQoJc2tpcF9kdW1wGAcgASgIIjAKD0RlcGVuZGVuY3lUYWJsZRIOCgZzY2hlbWEYASABKAkSDQoFdGFibGUYAiABKAkijgIKEEZ1bmN0aW9uTWV0YWRhdGESDAoEbmFtZRgBIAEoCRISCgpkZWZpbml0aW9uGAIgASgJEhEKCXNpZ25hdHVyZRgDIAEoCRIcChRjaGFyYWN0ZXJfc2V0X2NsaWVudBgEIAEoCRIcChRjb2xsYXRpb25fY29ubmVjdGlvbhgFIAEoCRIaChJkYXRhYmFzZV9jb2xsYXRpb24YBiABKAkSEAoIc3FsX21vZGUYByABKAkSDwoHY29tbWVudBgIIAEoCRI3ChFkZXBlbmRlbmN5X3RhYmxlcxgJIAMoCzIcLmJ5dGViYXNlLnYxLkRlcGVuZGVuY3lUYWJsZRIRCglza2lwX2R1bXAYCiABKAgi1gEKEVByb2NlZHVyZU1ldGFkYXRhEgwKBG5hbWUYASABKAkSEgoKZGVmaW5pdGlvbhgCIAEoCRIRCglzaWduYXR1cmUYAyABKAkSHAoUY2hhcmFjdGVyX3NldF9jbGllbnQYBCABKAkSHAoUY29sbGF0aW9uX2Nvbm5lY3Rpb24YBSABKAkSGgoSZGF0YWJhc2VfY29sbGF0aW9uGAYgASgJEhAKCHNxbF9tb2RlGAcgASgJEg8KB2NvbW1lbnQYCSABKAkSEQoJc2tpcF9kdW1wGAggASgIIjMKD1BhY2thZ2VNZXRhZGF0YRIMCgRuYW1lGAEgASgJEhIKCmRlZmluaXRpb24YAiABKAkilgIKDFRhc2tNZXRhZGF0YRIMCgRuYW1lGAEgASgJEgoKAmlkGAIgASgJEg0KBW93bmVyGAMgASgJEg8KB2NvbW1lbnQYBCABKAkSEQoJd2FyZWhvdXNlGAUgASgJEhAKCHNjaGVkdWxlGAYgASgJEhQKDHByZWRlY2Vzc29ycxgHIAMoCRIuCgVzdGF0ZRgIIAEoDjIfLmJ5dGViYXNlLnYxLlRhc2tNZXRhZGF0YS5TdGF0ZRIRCgljb25kaXRpb24YCSABKAkSEgoKZGVmaW5pdGlvbhgKIAEoCSI6CgVTdGF0ZRIVChFTVEFURV9VTlNQRUNJRklFRBAAEgsKB1NUQVJURUQQARINCglTVVNQRU5ERUQQAiLLAgoOU3RyZWFtTWV0YWRhdGESDAoEbmFtZRgBIAEoCRISCgp0YWJsZV9uYW1lGAIgASgJEg0KBW93bmVyGAMgASgJEg8KB2NvbW1lbnQYBCABKAkSLgoEdHlwZRgFIAEoDjIgLmJ5dGViYXNlLnYxLlN0cmVhbU1ldGFkYXRhLlR5cGUSDQoFc3RhbGUYBiABKAgSLgoEbW9kZRgHIAEoDjIgLmJ5dGViYXNlLnYxLlN0cmVhbU1ldGFkYXRhLk1vZGUSEgoKZGVmaW5pdGlvbhgIIAEoCSInCgRUeXBlEhQKEFRZUEVfVU5TUEVDSUZJRUQQABIJCgVERUxUQRABIksKBE1vZGUSFAoQTU9ERV9VTlNQRUNJRklFRBAAEgsKB0RFRkFVTFQQARIPCgtBUFBFTkRfT05MWRACEg8KC0lOU0VSVF9PTkxZEAMivQEKElNwYXRpYWxJbmRleENvbmZpZxIOCgZtZXRob2QYASABKAkSNQoMdGVzc2VsbGF0aW9uGAIgASgLMh8uYnl0ZWJhc2UudjEuVGVzc2VsbGF0aW9uQ29uZmlnEisKB3N0b3JhZ2UYAyABKAsyGi5ieXRlYmFzZS52MS5TdG9yYWdlQ29uZmlnEjMKC2RpbWVuc2lvbmFsGAQgASgLMh4uYnl0ZWJhc2UudjEuRGltZW5zaW9uYWxDb25maWcimwEKElRlc3NlbGxhdGlvbkNvbmZpZxIOCgZzY2hlbWUYASABKAkSKwoLZ3JpZF9sZXZlbHMYAiADKAsyFi5ieXRlYmFzZS52MS5HcmlkTGV2ZWwSGAoQY2VsbHNfcGVyX29iamVjdBgDIAEoBRIuCgxib3VuZGluZ19ib3gYBCABKAsyGC5ieXRlYmFzZS52MS5Cb3VuZGluZ0JveCIrCglHcmlkTGV2ZWwSDQoFbGV2ZWwYASABKAUSDwoHZGVuc2l0eRgCIAEoCSJFCgtCb3VuZGluZ0JveBIMCgR4bWluGAEgASgBEgwKBHltaW4YAiABKAESDAoEeG1heBgDIAEoARIMCgR5bWF4GAQgASgBIr4CCg1TdG9yYWdlQ29uZmlnEhIKCmZpbGxmYWN0b3IYASABKAUSEQoJYnVmZmVyaW5nGAIgASgJEhIKCnRhYmxlc3BhY2UYAyABKAkSFwoPd29ya190YWJsZXNwYWNlGAQgASgJEhEKCXNkb19sZXZlbBgFIAEoBRIXCg9jb21taXRfaW50ZXJ2YWwYBiABKAUSEQoJcGFkX2luZGV4GAcgASgIEhYKDnNvcnRfaW5fdGVtcGRiGAggASgJEhUKDWRyb3BfZXhpc3RpbmcYCSABKAgSDgoGb25saW5lGAogASgIEhcKD2FsbG93X3Jvd19sb2NrcxgLIAEoCBIYChBhbGxvd19wYWdlX2xvY2tzGAwgASgIEg4KBm1heGRvcBgNIAEoBRIYChBkYXRhX2NvbXByZXNzaW9uGA4gASgJIn8KEURpbWVuc2lvbmFsQ29uZmlnEhIKCmRpbWVuc2lvbnMYASABKAUSEQoJZGF0YV90eXBlGAIgASgJEgwKBHNyaWQYAyABKAUSNQoLY29uc3RyYWludHMYBCADKAsyIC5ieXRlYmFzZS52MS5EaW1lbnNpb25Db25zdHJhaW50ImEKE0RpbWVuc2lvbkNvbnN0cmFpbnQSEQoJZGltZW5zaW9uGAEgASgJEhEKCW1pbl92YWx1ZRgCIAEoARIRCgltYXhfdmFsdWUYAyABKAESEQoJdG9sZXJhbmNlGAQgASgBIo0DCg1JbmRleE1ldGFkYXRhEgwKBG5hbWUYASABKAkSEwoLZXhwcmVzc2lvbnMYAiADKAkSEgoKa2V5X2xlbmd0aBgDIAMoAxISCgpkZXNjZW5kaW5nGAQgAygIEgwKBHR5cGUYBSABKAkSDgoGdW5pcXVlGAYgASgIEg8KB3ByaW1hcnkYByABKAgSDwoHdmlzaWJsZRgIIAEoCBIPCgdjb21tZW50GAkgASgJEhIKCmRlZmluaXRpb24YCiABKAkSGwoTcGFyZW50X2luZGV4X3NjaGVtYRgLIAEoCRIZChFwYXJlbnRfaW5kZXhfbmFtZRgMIAEoCRITCgtncmFudWxhcml0eRgNIAEoAxIVCg1pc19jb25zdHJhaW50GA4gASgIEjcKDnNwYXRpYWxfY29uZmlnGA8gASgLMh8uYnl0ZWJhc2UudjEuU3BhdGlhbEluZGV4Q29uZmlnEhUKDW9wY2xhc3NfbmFtZXMYECADKAkSGAoQb3BjbGFzc19kZWZhdWx0cxgRIAMoCCJXChFFeHRlbnNpb25NZXRhZGF0YRIMCgRuYW1lGAEgASgJEg4KBnNjaGVtYRgCIAEoCRIPCgd2ZXJzaW9uGAMgASgJEhMKC2Rlc2NyaXB0aW9uGAQgASgJIr4BChJGb3JlaWduS2V5TWV0YWRhdGESDAoEbmFtZRgBIAEoCRIPCgdjb2x1bW5zGAIgAygJEhkKEXJlZmVyZW5jZWRfc2NoZW1hGAMgASgJEhgKEHJlZmVyZW5jZWRfdGFibGUYBCABKAkSGgoScmVmZXJlbmNlZF9jb2x1bW5zGAUgAygJEhEKCW9uX2RlbGV0ZRgGIAEoCRIRCglvbl91cGRhdGUYByABKAkSEgoKbWF0Y2hfdHlwZRgIIAEoCSIgCg5EYXRhYmFzZVNjaGVtYRIOCgZzY2hlbWEYASABKAkiPgoRRGF0YWJhc2VTRExTY2hlbWESDgoGc2NoZW1hGAEgASgMEhkKDGNvbnRlbnRfdHlwZRgCIAEoCUID4EEDIvECChZHZXRTY2hlbWFTdHJpbmdSZXF1ZXN0EisKBG5hbWUYASABKAlCHeBBAvpBFwoVYnl0ZWJhc2UuY29tL0RhdGFiYXNlEjwKBHR5cGUYAiABKA4yLi5ieXRlYmFzZS52MS5HZXRTY2hlbWFTdHJpbmdSZXF1ZXN0Lk9iamVjdFR5cGUSDgoGc2NoZW1hGAMgASgJEg4KBm9iamVjdBgEIAEoCRIvCghtZXRhZGF0YRgFIAEoCzIdLmJ5dGViYXNlLnYxLkRhdGFiYXNlTWV0YWRhdGEimgEKCk9iamVjdFR5cGUSGwoXT0JKRUNUX1RZUEVfVU5TUEVDSUZJRUQQABIMCghEQVRBQkFTRRABEgoKBlNDSEVNQRACEgkKBVRBQkxFEAMSCAoEVklFVxAEEhUKEU1BVEVSSUFMSVpFRF9WSUVXEAUSDAoIRlVOQ1RJT04QBhINCglQUk9DRURVUkUQBxIMCghTRVFVRU5DRRAIIjAKF0dldFNjaGVtYVN0cmluZ1Jlc3BvbnNlEhUKDXNjaGVtYV9zdHJpbmcYASABKAkqPQoKU3luY1N0YXR1cxIbChdTWU5DX1NUQVRVU19VTlNQRUNJRklFRBAAEgYKAk9LEAESCgoGRkFJTEVEEAIywxMKD0RhdGFiYXNlU2VydmljZRKQAQoLR2V0RGF0YWJhc2USHy5ieXRlYmFzZS52MS5HZXREYXRhYmFzZVJlcXVlc3QaFS5ieXRlYmFzZS52MS5EYXRhYmFzZSJJ2kEEbmFtZYrqMBBiYi5kYXRhYmFzZXMuZ2V0kOowAYLT5JMCJBIiL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfRLdAQoRQmF0Y2hHZXREYXRhYmFzZXMSJS5ieXRlYmFzZS52MS5CYXRjaEdldERhdGFiYXNlc1JlcXVlc3QaJi5ieXRlYmFzZS52MS5CYXRjaEdldERhdGFiYXNlc1Jlc3BvbnNlInmK6jAQYmIuZGF0YWJhc2VzLmdldJDqMAKC0+STAltaLRIrL3YxL3twYXJlbnQ9aW5zdGFuY2VzLyp9L2RhdGFiYXNlczpiYXRjaEdldBIqL3YxL3twYXJlbnQ9cHJvamVjdHMvKn0vZGF0YWJhc2VzOmJhdGNoR2V0EusBCg1MaXN0RGF0YWJhc2VzEiEuYnl0ZWJhc2UudjEuTGlzdERhdGFiYXNlc1JlcXVlc3QaIi5ieXRlYmFzZS52MS5MaXN0RGF0YWJhc2VzUmVzcG9uc2UikgHaQQCK6jARYmIuZGF0YWJhc2VzLmxpc3SQ6jACgtPkkwJwWiQSIi92MS97cGFyZW50PWluc3RhbmNlcy8qfS9kYXRhYmFzZXNaJRIjL3YxL3twYXJlbnQ9d29ya3NwYWNlcy8qfS9kYXRhYmFzZXMSIS92MS97cGFyZW50PXByb2plY3RzLyp9L2RhdGFiYXNlcxLAAQoOVXBkYXRlRGF0YWJhc2USIi5ieXRlYmFzZS52MS5VcGRhdGVEYXRhYmFzZVJlcXVlc3QaFS5ieXRlYmFzZS52MS5EYXRhYmFzZSJz2kEUZGF0YWJhc2UsdXBkYXRlX21hc2uK6jATYmIuZGF0YWJhc2VzLnVwZGF0ZZDqMAGY6jABgtPkkwI3OghkYXRhYmFzZTIrL3YxL3tkYXRhYmFzZS5uYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfRLFAQoUQmF0Y2hVcGRhdGVEYXRhYmFzZXMSKC5ieXRlYmFzZS52MS5CYXRjaFVwZGF0ZURhdGFiYXNlc1JlcXVlc3QaKS5ieXRlYmFzZS52MS5CYXRjaFVwZGF0ZURhdGFiYXNlc1Jlc3BvbnNlIliK6jATYmIuZGF0YWJhc2VzLnVwZGF0ZZDqMAGY6jABgtPkkwIzOgEqIi4vdjEve3BhcmVudD1pbnN0YW5jZXMvKn0vZGF0YWJhc2VzOmJhdGNoVXBkYXRlEqABCgxTeW5jRGF0YWJhc2USIC5ieXRlYmFzZS52MS5TeW5jRGF0YWJhc2VSZXF1ZXN0GiEuYnl0ZWJhc2UudjEuU3luY0RhdGFiYXNlUmVzcG9uc2UiS4rqMBFiYi5kYXRhYmFzZXMuc3luY5DqMAGC0+STAiw6ASoiJy92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06c3luYxK3AQoSQmF0Y2hTeW5jRGF0YWJhc2VzEiYuYnl0ZWJhc2UudjEuQmF0Y2hTeW5jRGF0YWJhc2VzUmVxdWVzdBonLmJ5dGViYXNlLnYxLkJhdGNoU3luY0RhdGFiYXNlc1Jlc3BvbnNlIlCK6jARYmIuZGF0YWJhc2VzLnN5bmOQ6jABgtPkkwIxOgEqIiwvdjEve3BhcmVudD1pbnN0YW5jZXMvKn0vZGF0YWJhc2VzOmJhdGNoU3luYxKwAQoTR2V0RGF0YWJhc2VNZXRhZGF0YRInLmJ5dGViYXNlLnYxLkdldERhdGFiYXNlTWV0YWRhdGFSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuRGF0YWJhc2VNZXRhZGF0YSJRiuowFmJiLmRhdGFiYXNlcy5nZXRTY2hlbWGQ6jABgtPkkwItEisvdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovbWV0YWRhdGF9EqgBChFHZXREYXRhYmFzZVNjaGVtYRIlLmJ5dGViYXNlLnYxLkdldERhdGFiYXNlU2NoZW1hUmVxdWVzdBobLmJ5dGViYXNlLnYxLkRhdGFiYXNlU2NoZW1hIk+K6jAWYmIuZGF0YWJhc2VzLmdldFNjaGVtYZDqMAGC0+STAisSKS92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9zY2hlbWF9ErQBChRHZXREYXRhYmFzZVNETFNjaGVtYRIoLmJ5dGViYXNlLnYxLkdldERhdGFiYXNlU0RMU2NoZW1hUmVxdWVzdBoeLmJ5dGViYXNlLnYxLkRhdGFiYXNlU0RMU2NoZW1hIlKK6jAWYmIuZGF0YWJhc2VzLmdldFNjaGVtYZDqMAGC0+STAi4SLC92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9zZGxTY2hlbWF9EuEBCgpEaWZmU2NoZW1hEh4uYnl0ZWJhc2UudjEuRGlmZlNjaGVtYVJlcXVlc3QaHy5ieXRlYmFzZS52MS5EaWZmU2NoZW1hUmVzcG9uc2UikQGK6jAQYmIuZGF0YWJhc2VzLmdldJDqMAGC0+STAnM6ASpaPzoBKiI6L3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qL2NoYW5nZWxvZ3MvKn06ZGlmZlNjaGVtYSItL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpkaWZmU2NoZW1hErABCgxEaWZmTWV0YWRhdGESIC5ieXRlYmFzZS52MS5EaWZmTWV0YWRhdGFSZXF1ZXN0GiEuYnl0ZWJhc2UudjEuRGlmZk1ldGFkYXRhUmVzcG9uc2UiW4rqMBliYi5kYXRhYmFzZXMuZGlmZk1ldGFkYXRhkOowAYLT5JMCNDoBKiIvL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpkaWZmTWV0YWRhdGESugEKD0dldFNjaGVtYVN0cmluZxIjLmJ5dGViYXNlLnYxLkdldFNjaGVtYVN0cmluZ1JlcXVlc3QaJC5ieXRlYmFzZS52MS5HZXRTY2hlbWFTdHJpbmdSZXNwb25zZSJc2kEEbmFtZYrqMBZiYi5kYXRhYmFzZXMuZ2V0U2NoZW1hkOowAYLT5JMCMRIvL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qL3NjaGVtYVN0cmluZ31CqgEKD2NvbS5ieXRlYmFzZS52MUIURGF0YWJhc2VTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_service]);
/**
* Describes the message bytebase.v1.GetDatabaseRequest.
@@ -151,102 +151,116 @@ export const DiffSchemaRequestSchema = /*@__PURE__*/
export const DiffSchemaResponseSchema = /*@__PURE__*/
messageDesc(file_v1_database_service, 16);
+/**
+ * Describes the message bytebase.v1.DiffMetadataRequest.
+ * Use `create(DiffMetadataRequestSchema)` to create a new message.
+ */
+export const DiffMetadataRequestSchema = /*@__PURE__*/
+ messageDesc(file_v1_database_service, 17);
+
+/**
+ * Describes the message bytebase.v1.DiffMetadataResponse.
+ * Use `create(DiffMetadataResponseSchema)` to create a new message.
+ */
+export const DiffMetadataResponseSchema = /*@__PURE__*/
+ messageDesc(file_v1_database_service, 18);
+
/**
* Describes the message bytebase.v1.Database.
* Use `create(DatabaseSchema$)` to create a new message.
*/
export const DatabaseSchema$ = /*@__PURE__*/
- messageDesc(file_v1_database_service, 17);
+ messageDesc(file_v1_database_service, 19);
/**
* Describes the message bytebase.v1.DatabaseMetadata.
* Use `create(DatabaseMetadataSchema)` to create a new message.
*/
export const DatabaseMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 18);
+ messageDesc(file_v1_database_service, 20);
/**
* Describes the message bytebase.v1.SchemaMetadata.
* Use `create(SchemaMetadataSchema)` to create a new message.
*/
export const SchemaMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 19);
+ messageDesc(file_v1_database_service, 21);
/**
* Describes the message bytebase.v1.EnumTypeMetadata.
* Use `create(EnumTypeMetadataSchema)` to create a new message.
*/
export const EnumTypeMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 20);
+ messageDesc(file_v1_database_service, 22);
/**
* Describes the message bytebase.v1.CompositeTypeMetadata.
* Use `create(CompositeTypeMetadataSchema)` to create a new message.
*/
export const CompositeTypeMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 21);
+ messageDesc(file_v1_database_service, 23);
/**
* Describes the message bytebase.v1.CompositeTypeAttribute.
* Use `create(CompositeTypeAttributeSchema)` to create a new message.
*/
export const CompositeTypeAttributeSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 22);
+ messageDesc(file_v1_database_service, 24);
/**
* Describes the message bytebase.v1.EventMetadata.
* Use `create(EventMetadataSchema)` to create a new message.
*/
export const EventMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 23);
+ messageDesc(file_v1_database_service, 25);
/**
* Describes the message bytebase.v1.SequenceMetadata.
* Use `create(SequenceMetadataSchema)` to create a new message.
*/
export const SequenceMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 24);
+ messageDesc(file_v1_database_service, 26);
/**
* Describes the message bytebase.v1.TriggerMetadata.
* Use `create(TriggerMetadataSchema)` to create a new message.
*/
export const TriggerMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 25);
+ messageDesc(file_v1_database_service, 27);
/**
* Describes the message bytebase.v1.ExternalTableMetadata.
* Use `create(ExternalTableMetadataSchema)` to create a new message.
*/
export const ExternalTableMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 26);
+ messageDesc(file_v1_database_service, 28);
/**
* Describes the message bytebase.v1.TableMetadata.
* Use `create(TableMetadataSchema)` to create a new message.
*/
export const TableMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 27);
+ messageDesc(file_v1_database_service, 29);
/**
* Describes the message bytebase.v1.CheckConstraintMetadata.
* Use `create(CheckConstraintMetadataSchema)` to create a new message.
*/
export const CheckConstraintMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 28);
+ messageDesc(file_v1_database_service, 30);
/**
* Describes the message bytebase.v1.TablePartitionMetadata.
* Use `create(TablePartitionMetadataSchema)` to create a new message.
*/
export const TablePartitionMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 29);
+ messageDesc(file_v1_database_service, 31);
/**
* Describes the enum bytebase.v1.TablePartitionMetadata.Type.
*/
export const TablePartitionMetadata_TypeSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 29, 0);
+ enumDesc(file_v1_database_service, 31, 0);
/**
* Type is the type of a table partition, some database engines may not
@@ -267,13 +281,13 @@ export const TablePartitionMetadata_Type = /*@__PURE__*/
* Use `create(ColumnMetadataSchema)` to create a new message.
*/
export const ColumnMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 30);
+ messageDesc(file_v1_database_service, 32);
/**
* Describes the enum bytebase.v1.ColumnMetadata.IdentityGeneration.
*/
export const ColumnMetadata_IdentityGenerationSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 30, 0);
+ enumDesc(file_v1_database_service, 32, 0);
/**
* @generated from enum bytebase.v1.ColumnMetadata.IdentityGeneration
@@ -286,13 +300,13 @@ export const ColumnMetadata_IdentityGeneration = /*@__PURE__*/
* Use `create(GenerationMetadataSchema)` to create a new message.
*/
export const GenerationMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 31);
+ messageDesc(file_v1_database_service, 33);
/**
* Describes the enum bytebase.v1.GenerationMetadata.Type.
*/
export const GenerationMetadata_TypeSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 31, 0);
+ enumDesc(file_v1_database_service, 33, 0);
/**
* @generated from enum bytebase.v1.GenerationMetadata.Type
@@ -305,62 +319,62 @@ export const GenerationMetadata_Type = /*@__PURE__*/
* Use `create(ViewMetadataSchema)` to create a new message.
*/
export const ViewMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 32);
+ messageDesc(file_v1_database_service, 34);
/**
* Describes the message bytebase.v1.DependencyColumn.
* Use `create(DependencyColumnSchema)` to create a new message.
*/
export const DependencyColumnSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 33);
+ messageDesc(file_v1_database_service, 35);
/**
* Describes the message bytebase.v1.MaterializedViewMetadata.
* Use `create(MaterializedViewMetadataSchema)` to create a new message.
*/
export const MaterializedViewMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 34);
+ messageDesc(file_v1_database_service, 36);
/**
* Describes the message bytebase.v1.DependencyTable.
* Use `create(DependencyTableSchema)` to create a new message.
*/
export const DependencyTableSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 35);
+ messageDesc(file_v1_database_service, 37);
/**
* Describes the message bytebase.v1.FunctionMetadata.
* Use `create(FunctionMetadataSchema)` to create a new message.
*/
export const FunctionMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 36);
+ messageDesc(file_v1_database_service, 38);
/**
* Describes the message bytebase.v1.ProcedureMetadata.
* Use `create(ProcedureMetadataSchema)` to create a new message.
*/
export const ProcedureMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 37);
+ messageDesc(file_v1_database_service, 39);
/**
* Describes the message bytebase.v1.PackageMetadata.
* Use `create(PackageMetadataSchema)` to create a new message.
*/
export const PackageMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 38);
+ messageDesc(file_v1_database_service, 40);
/**
* Describes the message bytebase.v1.TaskMetadata.
* Use `create(TaskMetadataSchema)` to create a new message.
*/
export const TaskMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 39);
+ messageDesc(file_v1_database_service, 41);
/**
* Describes the enum bytebase.v1.TaskMetadata.State.
*/
export const TaskMetadata_StateSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 39, 0);
+ enumDesc(file_v1_database_service, 41, 0);
/**
* @generated from enum bytebase.v1.TaskMetadata.State
@@ -373,13 +387,13 @@ export const TaskMetadata_State = /*@__PURE__*/
* Use `create(StreamMetadataSchema)` to create a new message.
*/
export const StreamMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 40);
+ messageDesc(file_v1_database_service, 42);
/**
* Describes the enum bytebase.v1.StreamMetadata.Type.
*/
export const StreamMetadata_TypeSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 40, 0);
+ enumDesc(file_v1_database_service, 42, 0);
/**
* @generated from enum bytebase.v1.StreamMetadata.Type
@@ -391,7 +405,7 @@ export const StreamMetadata_Type = /*@__PURE__*/
* Describes the enum bytebase.v1.StreamMetadata.Mode.
*/
export const StreamMetadata_ModeSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 40, 1);
+ enumDesc(file_v1_database_service, 42, 1);
/**
* @generated from enum bytebase.v1.StreamMetadata.Mode
@@ -404,97 +418,97 @@ export const StreamMetadata_Mode = /*@__PURE__*/
* Use `create(SpatialIndexConfigSchema)` to create a new message.
*/
export const SpatialIndexConfigSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 41);
+ messageDesc(file_v1_database_service, 43);
/**
* Describes the message bytebase.v1.TessellationConfig.
* Use `create(TessellationConfigSchema)` to create a new message.
*/
export const TessellationConfigSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 42);
+ messageDesc(file_v1_database_service, 44);
/**
* Describes the message bytebase.v1.GridLevel.
* Use `create(GridLevelSchema)` to create a new message.
*/
export const GridLevelSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 43);
+ messageDesc(file_v1_database_service, 45);
/**
* Describes the message bytebase.v1.BoundingBox.
* Use `create(BoundingBoxSchema)` to create a new message.
*/
export const BoundingBoxSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 44);
+ messageDesc(file_v1_database_service, 46);
/**
* Describes the message bytebase.v1.StorageConfig.
* Use `create(StorageConfigSchema)` to create a new message.
*/
export const StorageConfigSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 45);
+ messageDesc(file_v1_database_service, 47);
/**
* Describes the message bytebase.v1.DimensionalConfig.
* Use `create(DimensionalConfigSchema)` to create a new message.
*/
export const DimensionalConfigSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 46);
+ messageDesc(file_v1_database_service, 48);
/**
* Describes the message bytebase.v1.DimensionConstraint.
* Use `create(DimensionConstraintSchema)` to create a new message.
*/
export const DimensionConstraintSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 47);
+ messageDesc(file_v1_database_service, 49);
/**
* Describes the message bytebase.v1.IndexMetadata.
* Use `create(IndexMetadataSchema)` to create a new message.
*/
export const IndexMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 48);
+ messageDesc(file_v1_database_service, 50);
/**
* Describes the message bytebase.v1.ExtensionMetadata.
* Use `create(ExtensionMetadataSchema)` to create a new message.
*/
export const ExtensionMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 49);
+ messageDesc(file_v1_database_service, 51);
/**
* Describes the message bytebase.v1.ForeignKeyMetadata.
* Use `create(ForeignKeyMetadataSchema)` to create a new message.
*/
export const ForeignKeyMetadataSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 50);
+ messageDesc(file_v1_database_service, 52);
/**
* Describes the message bytebase.v1.DatabaseSchema.
* Use `create(DatabaseSchemaSchema)` to create a new message.
*/
export const DatabaseSchemaSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 51);
+ messageDesc(file_v1_database_service, 53);
/**
* Describes the message bytebase.v1.DatabaseSDLSchema.
* Use `create(DatabaseSDLSchemaSchema)` to create a new message.
*/
export const DatabaseSDLSchemaSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 52);
+ messageDesc(file_v1_database_service, 54);
/**
* Describes the message bytebase.v1.GetSchemaStringRequest.
* Use `create(GetSchemaStringRequestSchema)` to create a new message.
*/
export const GetSchemaStringRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 53);
+ messageDesc(file_v1_database_service, 55);
/**
* Describes the enum bytebase.v1.GetSchemaStringRequest.ObjectType.
*/
export const GetSchemaStringRequest_ObjectTypeSchema = /*@__PURE__*/
- enumDesc(file_v1_database_service, 53, 0);
+ enumDesc(file_v1_database_service, 55, 0);
/**
* @generated from enum bytebase.v1.GetSchemaStringRequest.ObjectType
@@ -507,7 +521,7 @@ export const GetSchemaStringRequest_ObjectType = /*@__PURE__*/
* Use `create(GetSchemaStringResponseSchema)` to create a new message.
*/
export const GetSchemaStringResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_database_service, 54);
+ messageDesc(file_v1_database_service, 56);
/**
* Describes the enum bytebase.v1.SyncStatus.
diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
index dd3ceda67d..88f1e7472c 100644
--- a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts
@@ -5,8 +5,7 @@
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import type { Message } from "@bufbuild/protobuf";
import type { Duration, NullValue, Timestamp, Value } from "@bufbuild/protobuf/wkt";
-import type { Engine, ExportFormat, PermissionDeniedDetail, Position } from "./common_pb";
-import type { DatabaseMetadata } from "./database_service_pb";
+import type { ExportFormat, PermissionDeniedDetail, Position } from "./common_pb";
import type { GetQueryHistoryRequestSchema, ListQueryHistoriesRequestSchema, ListQueryHistoriesResponseSchema, QueryHistorySchema, SearchQueryHistoriesRequestSchema, SearchQueryHistoriesResponseSchema } from "./query_history_service_pb";
/**
@@ -1099,56 +1098,6 @@ export declare type ExportResponse = Message<"bytebase.v1.ExportResponse"> & {
*/
export declare const ExportResponseSchema: GenMessage<ExportResponse>;
-/**
- * @generated from message bytebase.v1.DiffMetadataRequest
- */
-export declare type DiffMetadataRequest = Message<"bytebase.v1.DiffMetadataRequest"> & {
- /**
- * The metadata of the source schema.
- *
- * @generated from field: bytebase.v1.DatabaseMetadata source_metadata = 1;
- */
- sourceMetadata?: DatabaseMetadata | undefined;
-
- /**
- * The metadata of the target schema.
- *
- * @generated from field: bytebase.v1.DatabaseMetadata target_metadata = 2;
- */
- targetMetadata?: DatabaseMetadata | undefined;
-
- /**
- * The database engine of the schema.
- *
- * @generated from field: bytebase.v1.Engine engine = 3;
- */
- engine: Engine;
-};
-
-/**
- * Describes the message bytebase.v1.DiffMetadataRequest.
- * Use `create(DiffMetadataRequestSchema)` to create a new message.
- */
-export declare const DiffMetadataRequestSchema: GenMessage<DiffMetadataRequest>;
-
-/**
- * @generated from message bytebase.v1.DiffMetadataResponse
- */
-export declare type DiffMetadataResponse = Message<"bytebase.v1.DiffMetadataResponse"> & {
- /**
- * The diff of the metadata.
- *
- * @generated from field: string diff = 1;
- */
- diff: string;
-};
-
-/**
- * Describes the message bytebase.v1.DiffMetadataResponse.
- * Use `create(DiffMetadataResponseSchema)` to create a new message.
- */
-export declare const DiffMetadataResponseSchema: GenMessage<DiffMetadataResponse>;
-
/**
* @generated from message bytebase.v1.AICompletionRequest
*/
@@ -1336,17 +1285,6 @@ export declare const SQLService: GenService<{
input: typeof ExportRequestSchema;
output: typeof ExportResponseSchema;
},
- /**
- * Computes schema differences between two database metadata.
- * Permissions required: None
- *
- * @generated from rpc bytebase.v1.SQLService.DiffMetadata
- */
- diffMetadata: {
- methodKind: "unary";
- input: typeof DiffMetadataRequestSchema;
- output: typeof DiffMetadataResponseSchema;
- },
/**
* Provides AI-powered SQL completion and generation.
* Permissions required: None (authenticated users only, requires AI to be enabled)
diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.js b/frontend/src/types/proto-es/v1/sql_service_pb.js
index f765f5dae0..09e16e30d3 100644
--- a/frontend/src/types/proto-es/v1/sql_service_pb.js
+++ b/frontend/src/types/proto-es/v1/sql_service_pb.js
@@ -9,14 +9,13 @@ import { file_google_api_resource } from "../google/api/resource_pb";
import { file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import { file_v1_annotation } from "./annotation_pb";
import { file_v1_common } from "./common_pb";
-import { file_v1_database_service } from "./database_service_pb";
import { file_v1_query_history_service } from "./query_history_service_pb";
/**
* Describes the file v1/sql_service.proto.
*/
export const file_v1_sql_service = /*@__PURE__*/
- fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiqgEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAIgASgJEg0KBWxpbWl0GAMgASgFEhMKBnNjaGVtYRgEIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgFIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQi/AEKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSFgoOZGF0YV9zb3VyY2VfaWQYBCABKAkSDwoHZXhwbGFpbhgFIAEoCBITCgZzY2hlbWEYBiABKAlIAIgBARIuCgxxdWVyeV9vcHRpb24YByABKAsyGC5ieXRlYmFzZS52MS5RdWVyeU9wdGlvbhIWCgljb250YWluZXIYCCABKAlIAYgBAUIJCgdfc2NoZW1hQgwKCl9jb250YWluZXIiWAoNUXVlcnlSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQSHAoUYXBwbGllZF9hY2Nlc3NfZ3JhbnQYAiABKAki+QIKC1F1ZXJ5T3B0aW9uEkoKFXJlZGlzX3J1bl9jb21tYW5kc19vbhgBIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLlJlZGlzUnVuQ29tbWFuZHNPbhJJChRtc3NxbF9leHBsYWluX2Zvcm1hdBgCIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLk1TU1FMRXhwbGFpbkZvcm1hdCJbChJSZWRpc1J1bkNvbW1hbmRzT24SJQohUkVESVNfUlVOX0NPTU1BTkRTX09OX1VOU1BFQ0lGSUVEEAASDwoLU0lOR0xFX05PREUQARINCglBTExfTk9ERVMQAiJ2ChJNU1NRTEV4cGxhaW5Gb3JtYXQSJAogTVNTUUxfRVhQTEFJTl9GT1JNQVRfVU5TUEVDSUZJRUQQABIcChhNU1NRTF9FWFBMQUlOX0ZPUk1BVF9BTEwQARIcChhNU1NRTF9FWFBMQUlOX0ZPUk1BVF9YTUwQAiKYCgoLUXVlcnlSZXN1bHQSFAoMY29sdW1uX25hbWVzGAEgAygJEhkKEWNvbHVtbl90eXBlX25hbWVzGAIgAygJEiMKBHJvd3MYAyADKAsyFS5ieXRlYmFzZS52MS5RdWVyeVJvdxISCgpyb3dzX2NvdW50GAQgASgDEg0KBWVycm9yGAUgASgJEioKB2xhdGVuY3kYBiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SEQoJc3RhdGVtZW50GAcgASgJEkAKDnBvc3RncmVzX2Vycm9yGAggASgLMiYuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuUG9zdGdyZXNFcnJvckgAEjwKDHN5bnRheF9lcnJvchgJIAEoCzIkLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzdWx0LlN5bnRheEVycm9ySAASQAoRcGVybWlzc2lvbl9kZW5pZWQYCiABKAsyIy5ieXRlYmFzZS52MS5QZXJtaXNzaW9uRGVuaWVkRGV0YWlsSAASPgoNY29tbWFuZF9lcnJvchgNIAEoCzIlLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzdWx0LkNvbW1hbmRFcnJvckgAEjIKCG1lc3NhZ2VzGAsgAygLMiAuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuTWVzc2FnZRIqCgZtYXNrZWQYDCADKAsyGi5ieXRlYmFzZS52MS5NYXNraW5nUmVhc29uGs4CCg1Qb3N0Z3Jlc0Vycm9yEhAKCHNldmVyaXR5GAEgASgJEgwKBGNvZGUYAiABKAkSDwoHbWVzc2FnZRgDIAEoCRIOCgZkZXRhaWwYBCABKAkSDAoEaGludBgFIAEoCRIQCghwb3NpdGlvbhgGIAEoBRIZChFpbnRlcm5hbF9wb3NpdGlvbhgHIAEoBRIWCg5pbnRlcm5hbF9xdWVyeRgIIAEoCRINCgV3aGVyZRgJIAEoCRITCgtzY2hlbWFfbmFtZRgKIAEoCRISCgp0YWJsZV9uYW1lGAsgASgJEhMKC2NvbHVtbl9uYW1lGAwgASgJEhYKDmRhdGFfdHlwZV9uYW1lGA0gASgJEhcKD2NvbnN0cmFpbnRfbmFtZRgOIAEoCRIMCgRmaWxlGA8gASgJEgwKBGxpbmUYECABKAUSDwoHcm91dGluZRgRIAEoCRo8CgtTeW50YXhFcnJvchItCg5zdGFydF9wb3NpdGlvbhgBIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uGpMBCgxDb21tYW5kRXJyb3ISQAoMY29tbWFuZF90eXBlGAEgASgOMiouYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuQ29tbWFuZEVycm9yLlR5cGUiQQoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASBwoDRERMEAESBwoDRE1MEAISEQoNTk9OX1JFQURfT05MWRADGrcBCgdNZXNzYWdlEjUKBWxldmVsGAEgASgOMiYuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuTWVzc2FnZS5MZXZlbBIPCgdjb250ZW50GAIgASgJImQKBUxldmVsEhUKEUxFVkVMX1VOU1BFQ0lGSUVEEAASCAoESU5GTxABEgsKB1dBUk5JTkcQAhIJCgVERUJVRxADEgcKA0xPRxAEEgoKBk5PVElDRRAFEg0KCUVYQ0VQVElPThAGQhAKDmRldGFpbGVkX2Vycm9yIr0BCg1NYXNraW5nUmVhc29uEhgKEHNlbWFudGljX3R5cGVfaWQYASABKAkSGwoTc2VtYW50aWNfdHlwZV90aXRsZRgCIAEoCRIXCg9tYXNraW5nX3J1bGVfaWQYAyABKAkSEQoJYWxnb3JpdGhtGAQgASgJEg8KB2NvbnRleHQYBSABKAkSHAoUY2xhc3NpZmljYXRpb25fbGV2ZWwYBiABKAUSGgoSc2VtYW50aWNfdHlwZV9pY29uGAcgASgJIjEKCFF1ZXJ5Um93EiUKBnZhbHVlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLlJvd1ZhbHVlIowFCghSb3dWYWx1ZRIwCgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZUgAEhQKCmJvb2xfdmFsdWUYAiABKAhIABIVCgtieXRlc192YWx1ZRgDIAEoDEgAEhYKDGRvdWJsZV92YWx1ZRgEIAEoAUgAEhUKC2Zsb2F0X3ZhbHVlGAUgASgCSAASFQoLaW50MzJfdmFsdWUYBiABKAVIABIVCgtpbnQ2NF92YWx1ZRgHIAEoA0gAEhYKDHN0cmluZ192YWx1ZRgIIAEoCUgAEhYKDHVpbnQzMl92YWx1ZRgJIAEoDUgAEhYKDHVpbnQ2NF92YWx1ZRgKIAEoBEgAEi0KC3ZhbHVlX3ZhbHVlGAsgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlSAASOgoPdGltZXN0YW1wX3ZhbHVlGAwgASgLMh8uYnl0ZWJhc2UudjEuUm93VmFsdWUuVGltZXN0YW1wSAASPwoSdGltZXN0YW1wX3R6X3ZhbHVlGA0gASgLMiEuYnl0ZWJhc2UudjEuUm93VmFsdWUuVGltZXN0YW1wVFpIABpTCglUaW1lc3RhbXASNAoQZ29vZ2xlX3RpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEAoIYWNjdXJhY3kYAiABKAUacwoLVGltZXN0YW1wVFoSNAoQZ29vZ2xlX3RpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDAoEem9uZRgCIAEoCRIOCgZvZmZzZXQYAyABKAUSEAoIYWNjdXJhY3kYBCABKAVCBgoEa2luZCKDAwoGQWR2aWNlEikKBnN0YXR1cxgBIAEoDjIZLmJ5dGViYXNlLnYxLkFkdmljZS5MZXZlbBIMCgRjb2RlGAIgASgFEg0KBXRpdGxlGAMgASgJEg8KB2NvbnRlbnQYBCABKAkSLQoOc3RhcnRfcG9zaXRpb24YBSABKAsyFS5ieXRlYmFzZS52MS5Qb3NpdGlvbhIrCgxlbmRfcG9zaXRpb24YBiABKAsyFS5ieXRlYmFzZS52MS5Qb3NpdGlvbhIvCglydWxlX3R5cGUYByABKA4yHC5ieXRlYmFzZS52MS5BZHZpY2UuUnVsZVR5cGUiSgoFTGV2ZWwSHAoYQURWSUNFX0xFVkVMX1VOU1BFQ0lGSUVEEAASCwoHU1VDQ0VTUxABEgsKB1dBUk5JTkcQAhIJCgVFUlJPUhADIkcKCFJ1bGVUeXBlEhkKFVJVTEVfVFlQRV9VTlNQRUNJRklFRBAAEhAKDFBBUlNFUl9CQVNFRBABEg4KCkFJX1BPV0VSRUQQAiLiAQoNRXhwb3J0UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSKQoGZm9ybWF0GAQgASgOMhkuYnl0ZWJhc2UudjEuRXhwb3J0Rm9ybWF0Eg0KBWFkbWluGAUgASgIEhAKCHBhc3N3b3JkGAYgASgJEhYKDmRhdGFfc291cmNlX2lkGAcgASgJEhMKBnNjaGVtYRgIIAEoCUgAiAEBQgkKB19zY2hlbWEiPwoORXhwb3J0UmVzcG9uc2USDwoHY29udGVudBgBIAEoDBIcChRhcHBsaWVkX2FjY2Vzc19ncmFudBgCIAEoCSK0AQoTRGlmZk1ldGFkYXRhUmVxdWVzdBI7Cg9zb3VyY2VfbWV0YWRhdGEYASABKAsyHS5ieXRlYmFzZS52MS5EYXRhYmFzZU1ldGFkYXRhQgPgQQISOwoPdGFyZ2V0X21ldGFkYXRhGAIgASgLMh0uYnl0ZWJhc2UudjEuRGF0YWJhc2VNZXRhZGF0YUID4EECEiMKBmVuZ2luZRgDIAEoDjITLmJ5dGViYXNlLnYxLkVuZ2luZSIkChREaWZmTWV0YWRhdGFSZXNwb25zZRIMCgRkaWZmGAEgASgJInsKE0FJQ29tcGxldGlvblJlcXVlc3QSOgoIbWVzc2FnZXMYASADKAsyKC5ieXRlYmFzZS52MS5BSUNvbXBsZXRpb25SZXF1ZXN0Lk1lc3NhZ2UaKAoHTWVzc2FnZRIMCgRyb2xlGAEgASgJEg8KB2NvbnRlbnQYAiABKAkilQIKFEFJQ29tcGxldGlvblJlc3BvbnNlEj8KCmNhbmRpZGF0ZXMYASADKAsyKy5ieXRlYmFzZS52MS5BSUNvbXBsZXRpb25SZXNwb25zZS5DYW5kaWRhdGUauwEKCUNhbmRpZGF0ZRJECgdjb250ZW50GAEgASgLMjMuYnl0ZWJhc2UudjEuQUlDb21wbGV0aW9uUmVzcG9uc2UuQ2FuZGlkYXRlLkNvbnRlbnQaaAoHQ29udGVudBJHCgVwYXJ0cxgBIAMoCzI4LmJ5dGViYXNlLnYxLkFJQ29tcGxldGlvblJlc3BvbnNlLkNhbmRpZGF0ZS5Db250ZW50LlBhcnQaFAoEUGFydBIMCgR0ZXh0GAEgASgJMowJCgpTUUxTZXJ2aWNlEo8BCgVRdWVyeRIZLmJ5dGViYXNlLnYxLlF1ZXJ5UmVxdWVzdBoaLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzcG9uc2UiT4rqMBBiYi5kYXRhYmFzZXMuZ2V0kOowAZjqMAGC0+STAi06ASoiKC92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKn06cXVlcnkSiQEKDEFkbWluRXhlY3V0ZRIgLmJ5dGViYXNlLnYxLkFkbWluRXhlY3V0ZVJlcXVlc3QaIS5ieXRlYmFzZS52MS5BZG1pbkV4ZWN1dGVSZXNwb25zZSIwiuowDGJiLnNxbC5hZG1pbpDqMAGY6jABgtPkkwISEhAvdjE6YWRtaW5FeGVjdXRlKAEwARJ0ChRTZWFyY2hRdWVyeUhpc3RvcmllcxIoLmJ5dGViYXNlLnYxLlNlYXJjaFF1ZXJ5SGlzdG9yaWVzUmVxdWVzdBopLmJ5dGViYXNlLnYxLlNlYXJjaFF1ZXJ5SGlzdG9yaWVzUmVzcG9uc2UiB4gCAZDqMAISiAEKEkxpc3RRdWVyeUhpc3RvcmllcxImLmJ5dGViYXNlLnYxLkxpc3RRdWVyeUhpc3Rvcmllc1JlcXVlc3QaJy5ieXRlYmFzZS52MS5MaXN0UXVlcnlIaXN0b3JpZXNSZXNwb25zZSIhiAIBiuowFmJiLnF1ZXJ5SGlzdG9yaWVzLmxpc3SQ6jABEloKD0dldFF1ZXJ5SGlzdG9yeRIjLmJ5dGViYXNlLnYxLkdldFF1ZXJ5SGlzdG9yeVJlcXVlc3QaGS5ieXRlYmFzZS52MS5RdWVyeUhpc3RvcnkiB4gCAZDqMAIShAIKBkV4cG9ydBIaLmJ5dGViYXNlLnYxLkV4cG9ydFJlcXVlc3QaGy5ieXRlYmFzZS52MS5FeHBvcnRSZXNwb25zZSLAAYrqMBBiYi5kYXRhYmFzZXMuZ2V0kOowAZjqMAGC0+STAp0BOgEqWjE6ASoiLC92MS97bmFtZT1wcm9qZWN0cy8qL3BsYW5zLyovcm9sbG91dH06ZXhwb3J0Wjo6ASoiNS92MS97bmFtZT1wcm9qZWN0cy8qL3BsYW5zLyovcm9sbG91dC9zdGFnZXMvKn06ZXhwb3J0IikvdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyp9OmV4cG9ydBKBAQoMRGlmZk1ldGFkYXRhEiAuYnl0ZWJhc2UudjEuRGlmZk1ldGFkYXRhUmVxdWVzdBohLmJ5dGViYXNlLnYxLkRpZmZNZXRhZGF0YVJlc3BvbnNlIiyA6jABgtPkkwIiOgEqIh0vdjEvc2NoZW1hRGVzaWduOmRpZmZNZXRhZGF0YRJ4CgxBSUNvbXBsZXRpb24SIC5ieXRlYmFzZS52MS5BSUNvbXBsZXRpb25SZXF1ZXN0GiEuYnl0ZWJhc2UudjEuQUlDb21wbGV0aW9uUmVzcG9uc2UiI5DqMAKC0+STAhk6ASoiFC92MS9zcWwvYWlDb21wbGV0aW9uQqUBCg9jb20uYnl0ZWJhc2UudjFCD1NxbFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service, file_v1_query_history_service]);
+ fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiqgEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAIgASgJEg0KBWxpbWl0GAMgASgFEhMKBnNjaGVtYRgEIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgFIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQi/AEKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSFgoOZGF0YV9zb3VyY2VfaWQYBCABKAkSDwoHZXhwbGFpbhgFIAEoCBITCgZzY2hlbWEYBiABKAlIAIgBARIuCgxxdWVyeV9vcHRpb24YByABKAsyGC5ieXRlYmFzZS52MS5RdWVyeU9wdGlvbhIWCgljb250YWluZXIYCCABKAlIAYgBAUIJCgdfc2NoZW1hQgwKCl9jb250YWluZXIiWAoNUXVlcnlSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQSHAoUYXBwbGllZF9hY2Nlc3NfZ3JhbnQYAiABKAki+QIKC1F1ZXJ5T3B0aW9uEkoKFXJlZGlzX3J1bl9jb21tYW5kc19vbhgBIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLlJlZGlzUnVuQ29tbWFuZHNPbhJJChRtc3NxbF9leHBsYWluX2Zvcm1hdBgCIAEoDjIrLmJ5dGViYXNlLnYxLlF1ZXJ5T3B0aW9uLk1TU1FMRXhwbGFpbkZvcm1hdCJbChJSZWRpc1J1bkNvbW1hbmRzT24SJQohUkVESVNfUlVOX0NPTU1BTkRTX09OX1VOU1BFQ0lGSUVEEAASDwoLU0lOR0xFX05PREUQARINCglBTExfTk9ERVMQAiJ2ChJNU1NRTEV4cGxhaW5Gb3JtYXQSJAogTVNTUUxfRVhQTEFJTl9GT1JNQVRfVU5TUEVDSUZJRUQQABIcChhNU1NRTF9FWFBMQUlOX0ZPUk1BVF9BTEwQARIcChhNU1NRTF9FWFBMQUlOX0ZPUk1BVF9YTUwQAiKYCgoLUXVlcnlSZXN1bHQSFAoMY29sdW1uX25hbWVzGAEgAygJEhkKEWNvbHVtbl90eXBlX25hbWVzGAIgAygJEiMKBHJvd3MYAyADKAsyFS5ieXRlYmFzZS52MS5RdWVyeVJvdxISCgpyb3dzX2NvdW50GAQgASgDEg0KBWVycm9yGAUgASgJEioKB2xhdGVuY3kYBiABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SEQoJc3RhdGVtZW50GAcgASgJEkAKDnBvc3RncmVzX2Vycm9yGAggASgLMiYuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuUG9zdGdyZXNFcnJvckgAEjwKDHN5bnRheF9lcnJvchgJIAEoCzIkLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzdWx0LlN5bnRheEVycm9ySAASQAoRcGVybWlzc2lvbl9kZW5pZWQYCiABKAsyIy5ieXRlYmFzZS52MS5QZXJtaXNzaW9uRGVuaWVkRGV0YWlsSAASPgoNY29tbWFuZF9lcnJvchgNIAEoCzIlLmJ5dGViYXNlLnYxLlF1ZXJ5UmVzdWx0LkNvbW1hbmRFcnJvckgAEjIKCG1lc3NhZ2VzGAsgAygLMiAuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuTWVzc2FnZRIqCgZtYXNrZWQYDCADKAsyGi5ieXRlYmFzZS52MS5NYXNraW5nUmVhc29uGs4CCg1Qb3N0Z3Jlc0Vycm9yEhAKCHNldmVyaXR5GAEgASgJEgwKBGNvZGUYAiABKAkSDwoHbWVzc2FnZRgDIAEoCRIOCgZkZXRhaWwYBCABKAkSDAoEaGludBgFIAEoCRIQCghwb3NpdGlvbhgGIAEoBRIZChFpbnRlcm5hbF9wb3NpdGlvbhgHIAEoBRIWCg5pbnRlcm5hbF9xdWVyeRgIIAEoCRINCgV3aGVyZRgJIAEoCRITCgtzY2hlbWFfbmFtZRgKIAEoCRISCgp0YWJsZV9uYW1lGAsgASgJEhMKC2NvbHVtbl9uYW1lGAwgASgJEhYKDmRhdGFfdHlwZV9uYW1lGA0gASgJEhcKD2NvbnN0cmFpbnRfbmFtZRgOIAEoCRIMCgRmaWxlGA8gASgJEgwKBGxpbmUYECABKAUSDwoHcm91dGluZRgRIAEoCRo8CgtTeW50YXhFcnJvchItCg5zdGFydF9wb3NpdGlvbhgBIAEoCzIVLmJ5dGViYXNlLnYxLlBvc2l0aW9uGpMBCgxDb21tYW5kRXJyb3ISQAoMY29tbWFuZF90eXBlGAEgASgOMiouYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuQ29tbWFuZEVycm9yLlR5cGUiQQoEVHlwZRIUChBUWVBFX1VOU1BFQ0lGSUVEEAASBwoDRERMEAESBwoDRE1MEAISEQoNTk9OX1JFQURfT05MWRADGrcBCgdNZXNzYWdlEjUKBWxldmVsGAEgASgOMiYuYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQuTWVzc2FnZS5MZXZlbBIPCgdjb250ZW50GAIgASgJImQKBUxldmVsEhUKEUxFVkVMX1VOU1BFQ0lGSUVEEAASCAoESU5GTxABEgsKB1dBUk5JTkcQAhIJCgVERUJVRxADEgcKA0xPRxAEEgoKBk5PVElDRRAFEg0KCUVYQ0VQVElPThAGQhAKDmRldGFpbGVkX2Vycm9yIr0BCg1NYXNraW5nUmVhc29uEhgKEHNlbWFudGljX3R5cGVfaWQYASABKAkSGwoTc2VtYW50aWNfdHlwZV90aXRsZRgCIAEoCRIXCg9tYXNraW5nX3J1bGVfaWQYAyABKAkSEQoJYWxnb3JpdGhtGAQgASgJEg8KB2NvbnRleHQYBSABKAkSHAoUY2xhc3NpZmljYXRpb25fbGV2ZWwYBiABKAUSGgoSc2VtYW50aWNfdHlwZV9pY29uGAcgASgJIjEKCFF1ZXJ5Um93EiUKBnZhbHVlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLlJvd1ZhbHVlIowFCghSb3dWYWx1ZRIwCgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZUgAEhQKCmJvb2xfdmFsdWUYAiABKAhIABIVCgtieXRlc192YWx1ZRgDIAEoDEgAEhYKDGRvdWJsZV92YWx1ZRgEIAEoAUgAEhUKC2Zsb2F0X3ZhbHVlGAUgASgCSAASFQoLaW50MzJfdmFsdWUYBiABKAVIABIVCgtpbnQ2NF92YWx1ZRgHIAEoA0gAEhYKDHN0cmluZ192YWx1ZRgIIAEoCUgAEhYKDHVpbnQzMl92YWx1ZRgJIAEoDUgAEhYKDHVpbnQ2NF92YWx1ZRgKIAEoBEgAEi0KC3ZhbHVlX3ZhbHVlGAsgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlSAASOgoPdGltZXN0YW1wX3ZhbHVlGAwgASgLMh8uYnl0ZWJhc2UudjEuUm93VmFsdWUuVGltZXN0YW1wSAASPwoSdGltZXN0YW1wX3R6X3ZhbHVlGA0gASgLMiEuYnl0ZWJhc2UudjEuUm93VmFsdWUuVGltZXN0YW1wVFpIABpTCglUaW1lc3RhbXASNAoQZ29vZ2xlX3RpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEAoIYWNjdXJhY3kYAiABKAUacwoLVGltZXN0YW1wVFoSNAoQZ29vZ2xlX3RpbWVzdGFtcBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDAoEem9uZRgCIAEoCRIOCgZvZmZzZXQYAyABKAUSEAoIYWNjdXJhY3kYBCABKAVCBgoEa2luZCKDAwoGQWR2aWNlEikKBnN0YXR1cxgBIAEoDjIZLmJ5dGViYXNlLnYxLkFkdmljZS5MZXZlbBIMCgRjb2RlGAIgASgFEg0KBXRpdGxlGAMgASgJEg8KB2NvbnRlbnQYBCABKAkSLQoOc3RhcnRfcG9zaXRpb24YBSABKAsyFS5ieXRlYmFzZS52MS5Qb3NpdGlvbhIrCgxlbmRfcG9zaXRpb24YBiABKAsyFS5ieXRlYmFzZS52MS5Qb3NpdGlvbhIvCglydWxlX3R5cGUYByABKA4yHC5ieXRlYmFzZS52MS5BZHZpY2UuUnVsZVR5cGUiSgoFTGV2ZWwSHAoYQURWSUNFX0xFVkVMX1VOU1BFQ0lGSUVEEAASCwoHU1VDQ0VTUxABEgsKB1dBUk5JTkcQAhIJCgVFUlJPUhADIkcKCFJ1bGVUeXBlEhkKFVJVTEVfVFlQRV9VTlNQRUNJRklFRBAAEhAKDFBBUlNFUl9CQVNFRBABEg4KCkFJX1BPV0VSRUQQAiLiAQoNRXhwb3J0UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSKQoGZm9ybWF0GAQgASgOMhkuYnl0ZWJhc2UudjEuRXhwb3J0Rm9ybWF0Eg0KBWFkbWluGAUgASgIEhAKCHBhc3N3b3JkGAYgASgJEhYKDmRhdGFfc291cmNlX2lkGAcgASgJEhMKBnNjaGVtYRgIIAEoCUgAiAEBQgkKB19zY2hlbWEiPwoORXhwb3J0UmVzcG9uc2USDwoHY29udGVudBgBIAEoDBIcChRhcHBsaWVkX2FjY2Vzc19ncmFudBgCIAEoCSJ7ChNBSUNvbXBsZXRpb25SZXF1ZXN0EjoKCG1lc3NhZ2VzGAEgAygLMiguYnl0ZWJhc2UudjEuQUlDb21wbGV0aW9uUmVxdWVzdC5NZXNzYWdlGigKB01lc3NhZ2USDAoEcm9sZRgBIAEoCRIPCgdjb250ZW50GAIgASgJIpUCChRBSUNvbXBsZXRpb25SZXNwb25zZRI/CgpjYW5kaWRhdGVzGAEgAygLMisuYnl0ZWJhc2UudjEuQUlDb21wbGV0aW9uUmVzcG9uc2UuQ2FuZGlkYXRlGrsBCglDYW5kaWRhdGUSRAoHY29udGVudBgBIAEoCzIzLmJ5dGViYXNlLnYxLkFJQ29tcGxldGlvblJlc3BvbnNlLkNhbmRpZGF0ZS5Db250ZW50GmgKB0NvbnRlbnQSRwoFcGFydHMYASADKAsyOC5ieXRlYmFzZS52MS5BSUNvbXBsZXRpb25SZXNwb25zZS5DYW5kaWRhdGUuQ29udGVudC5QYXJ0GhQKBFBhcnQSDAoEdGV4dBgBIAEoCTKICAoKU1FMU2VydmljZRKPAQoFUXVlcnkSGS5ieXRlYmFzZS52MS5RdWVyeVJlcXVlc3QaGi5ieXRlYmFzZS52MS5RdWVyeVJlc3BvbnNlIk+K6jAQYmIuZGF0YWJhc2VzLmdldJDqMAGY6jABgtPkkwItOgEqIigvdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyp9OnF1ZXJ5EokBCgxBZG1pbkV4ZWN1dGUSIC5ieXRlYmFzZS52MS5BZG1pbkV4ZWN1dGVSZXF1ZXN0GiEuYnl0ZWJhc2UudjEuQWRtaW5FeGVjdXRlUmVzcG9uc2UiMIrqMAxiYi5zcWwuYWRtaW6Q6jABmOowAYLT5JMCEhIQL3YxOmFkbWluRXhlY3V0ZSgBMAESdAoUU2VhcmNoUXVlcnlIaXN0b3JpZXMSKC5ieXRlYmFzZS52MS5TZWFyY2hRdWVyeUhpc3Rvcmllc1JlcXVlc3QaKS5ieXRlYmFzZS52MS5TZWFyY2hRdWVyeUhpc3Rvcmllc1Jlc3BvbnNlIgeIAgGQ6jACEogBChJMaXN0UXVlcnlIaXN0b3JpZXMSJi5ieXRlYmFzZS52MS5MaXN0UXVlcnlIaXN0b3JpZXNSZXF1ZXN0GicuYnl0ZWJhc2UudjEuTGlzdFF1ZXJ5SGlzdG9yaWVzUmVzcG9uc2UiIYgCAYrqMBZiYi5xdWVyeUhpc3Rvcmllcy5saXN0kOowARJaCg9HZXRRdWVyeUhpc3RvcnkSIy5ieXRlYmFzZS52MS5HZXRRdWVyeUhpc3RvcnlSZXF1ZXN0GhkuYnl0ZWJhc2UudjEuUXVlcnlIaXN0b3J5IgeIAgGQ6jACEoQCCgZFeHBvcnQSGi5ieXRlYmFzZS52MS5FeHBvcnRSZXF1ZXN0GhsuYnl0ZWJhc2UudjEuRXhwb3J0UmVzcG9uc2UiwAGK6jAQYmIuZGF0YWJhc2VzLmdldJDqMAGY6jABgtPkkwKdAToBKloxOgEqIiwvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qL3JvbGxvdXR9OmV4cG9ydFo6OgEqIjUvdjEve25hbWU9cHJvamVjdHMvKi9wbGFucy8qL3JvbGxvdXQvc3RhZ2VzLyp9OmV4cG9ydCIpL3YxL3tuYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qfTpleHBvcnQSeAoMQUlDb21wbGV0aW9uEiAuYnl0ZWJhc2UudjEuQUlDb21wbGV0aW9uUmVxdWVzdBohLmJ5dGViYXNlLnYxLkFJQ29tcGxldGlvblJlc3BvbnNlIiOQ6jACgtPkkwIZOgEqIhQvdjEvc3FsL2FpQ29tcGxldGlvbkKlAQoPY29tLmJ5dGViYXNlLnYxQg9TcWxTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_query_history_service]);
/**
* Describes the message bytebase.v1.AdminExecuteRequest.
@@ -220,61 +219,47 @@ export const ExportRequestSchema = /*@__PURE__*/
export const ExportResponseSchema = /*@__PURE__*/
messageDesc(file_v1_sql_service, 11);
-/**
- * Describes the message bytebase.v1.DiffMetadataRequest.
- * Use `create(DiffMetadataRequestSchema)` to create a new message.
- */
-export const DiffMetadataRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 12);
-
-/**
- * Describes the message bytebase.v1.DiffMetadataResponse.
- * Use `create(DiffMetadataResponseSchema)` to create a new message.
- */
-export const DiffMetadataResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 13);
-
/**
* Describes the message bytebase.v1.AICompletionRequest.
* Use `create(AICompletionRequestSchema)` to create a new message.
*/
export const AICompletionRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 14);
+ messageDesc(file_v1_sql_service, 12);
/**
* Describes the message bytebase.v1.AICompletionRequest.Message.
* Use `create(AICompletionRequest_MessageSchema)` to create a new message.
*/
export const AICompletionRequest_MessageSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 14, 0);
+ messageDesc(file_v1_sql_service, 12, 0);
/**
* Describes the message bytebase.v1.AICompletionResponse.
* Use `create(AICompletionResponseSchema)` to create a new message.
*/
export const AICompletionResponseSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 15);
+ messageDesc(file_v1_sql_service, 13);
/**
* Describes the message bytebase.v1.AICompletionResponse.Candidate.
* Use `create(AICompletionResponse_CandidateSchema)` to create a new message.
*/
export const AICompletionResponse_CandidateSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 15, 0);
+ messageDesc(file_v1_sql_service, 13, 0);
/**
* Describes the message bytebase.v1.AICompletionResponse.Candidate.Content.
* Use `create(AICompletionResponse_Candidate_ContentSchema)` to create a new message.
*/
export const AICompletionResponse_Candidate_ContentSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 15, 0, 0);
+ messageDesc(file_v1_sql_service, 13, 0, 0);
/**
* Describes the message bytebase.v1.AICompletionResponse.Candidate.Content.Part.
* Use `create(AICompletionResponse_Candidate_Content_PartSchema)` to create a new message.
*/
export const AICompletionResponse_Candidate_Content_PartSchema = /*@__PURE__*/
- messageDesc(file_v1_sql_service, 15, 0, 0, 0);
+ messageDesc(file_v1_sql_service, 13, 0, 0, 0);
/**
* SQLService executes SQL queries and manages query operations.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index b0b40fdfd1..6eeef2aef4 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -4902,6 +4902,56 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.DatabaseSDLSchema'
+ /v1/instances/{instance}/databases/{database}:diffMetadata:
+ post:
+ tags:
+ - DatabaseService
+ summary: DiffMetadata
+ description: |-
+ Generates migration statements from the database's current schema to the
+ given target metadata.
+ Permissions required: bb.databases.diffMetadata
+ operationId: DatabaseService_DiffMetadata
+ parameters:
+ - name: instance
+ in: path
+ description: The instance id.
+ required: true
+ schema:
+ type: string
+ - name: database
+ in: path
+ description: The database id.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ targetMetadata:
+ title: target_metadata
+ description: |-
+ The metadata of the target schema. The source metadata and the engine are
+ read from the database, so only the target travels in the request.
+ Must describe the COMPLETE target schema: the diff runs against the full
+ stored source, so any object omitted from the target (for example by a
+ truncated metadata fetch) is treated as dropped.
+ $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ title: DiffMetadataRequest
+ required:
+ - targetMetadata
+ additionalProperties: false
+ required: true
+ responses:
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.DiffMetadataResponse'
/v1/instances/{instance}/databases/{database}:diffSchema:
post:
tags:
@@ -13050,28 +13100,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.Role'
- /v1/schemaDesign:diffMetadata:
- post:
- tags:
- - SQLService
- summary: DiffMetadata
- description: |-
- Computes schema differences between two database metadata.
- Permissions required: None
- operationId: SQLService_DiffMetadata
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.DiffMetadataRequest'
- required: true
- responses:
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.DiffMetadataResponse'
/v1/serviceAccounts/{serviceAccount}:
get:
tags:
@@ -19425,21 +19453,24 @@ components:
bytebase.v1.DiffMetadataRequest:
type: object
properties:
- sourceMetadata:
- title: source_metadata
- description: The metadata of the source schema.
- $ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
+ name:
+ type: string
+ title: name
+ description: |-
+ The database whose current schema is the diff source.
+ Format: instances/{instance}/databases/{database}
targetMetadata:
title: target_metadata
- description: The metadata of the target schema.
+ description: |-
+ The metadata of the target schema. The source metadata and the engine are
+ read from the database, so only the target travels in the request.
+ Must describe the COMPLETE target schema: the diff runs against the full
+ stored source, so any object omitted from the target (for example by a
+ truncated metadata fetch) is treated as dropped.
$ref: '#/components/schemas/bytebase.v1.DatabaseMetadata'
- engine:
- title: engine
- description: The database engine of the schema.
- $ref: '#/components/schemas/bytebase.v1.Engine'
title: DiffMetadataRequest
required:
- - sourceMetadata
+ - name
- targetMetadata
additionalProperties: false
bytebase.v1.DiffMetadataResponse:
@@ -19448,7 +19479,7 @@ components:
diff:
type: string
title: diff
- description: The diff of the metadata.
+ description: The generated migration statements.
title: DiffMetadataResponse
additionalProperties: false
bytebase.v1.DiffSchemaRequest:
@@ -31110,12 +31141,6 @@ tags:
description: AccessGrantService manages temporary access grants within projects.
- name: RolloutService
description: RolloutService manages the execution of deployment plans.
- - name: InstanceRoleService
- description: InstanceRoleService manages database roles within instances.
- - name: InstanceService
- description: InstanceService manages database instances and their connections.
- - name: DatabaseService
- description: DatabaseService manages databases and their schemas.
- name: QueryHistoryService
description: QueryHistoryService manages query history records of SQL Editor queries and exports.
- name: SQLService
@@ -31144,6 +31169,12 @@ tags:
description: DatabaseCatalogService manages database schema metadata and classification.
- name: DatabaseGroupService
description: DatabaseGroupService manages database groups for organizing databases by criteria.
+ - name: InstanceRoleService
+ description: InstanceRoleService manages database roles within instances.
+ - name: InstanceService
+ description: InstanceService manages database instances and their connections.
+ - name: DatabaseService
+ description: DatabaseService manages databases and their schemas.
- name: GroupService
description: GroupService manages user groups for organizing users and permissions.
- name: IdentityProviderService
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index cb55e113ae..937248726b 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -96,128 +96,6 @@
- [RolloutService](#bytebase-v1-RolloutService)
-- [v1/instance_role_service.proto](#v1_instance_role_service-proto)
- - [InstanceRole](#bytebase-v1-InstanceRole)
- - [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest)
- - [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse)
-
- - [InstanceRoleService](#bytebase-v1-InstanceRoleService)
-
-- [v1/instance_service.proto](#v1_instance_service-proto)
- - [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest)
- - [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest)
- - [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse)
- - [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest)
- - [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse)
- - [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest)
- - [DataSource](#bytebase-v1-DataSource)
- - [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential)
- - [DataSource.Address](#bytebase-v1-DataSource-Address)
- - [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential)
- - [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry)
- - [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential)
- - [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret)
- - [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption)
- - [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest)
- - [GetInstanceRequest](#bytebase-v1-GetInstanceRequest)
- - [Instance](#bytebase-v1-Instance)
- - [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry)
- - [InstanceResource](#bytebase-v1-InstanceResource)
- - [KerberosConfig](#bytebase-v1-KerberosConfig)
- - [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest)
- - [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse)
- - [ListInstancesRequest](#bytebase-v1-ListInstancesRequest)
- - [ListInstancesResponse](#bytebase-v1-ListInstancesResponse)
- - [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest)
- - [SASLConfig](#bytebase-v1-SASLConfig)
- - [SyncDatabases](#bytebase-v1-SyncDatabases)
- - [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest)
- - [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse)
- - [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest)
- - [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest)
- - [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest)
-
- - [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType)
- - [DataSource.CloudSQLIPType](#bytebase-v1-DataSource-CloudSQLIPType)
- - [DataSource.RedisType](#bytebase-v1-DataSource-RedisType)
- - [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType)
- - [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType)
- - [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType)
- - [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType)
- - [DataSourceType](#bytebase-v1-DataSourceType)
-
- - [InstanceService](#bytebase-v1-InstanceService)
-
-- [v1/database_service.proto](#v1_database_service-proto)
- - [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest)
- - [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse)
- - [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest)
- - [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse)
- - [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest)
- - [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse)
- - [BoundingBox](#bytebase-v1-BoundingBox)
- - [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata)
- - [ColumnMetadata](#bytebase-v1-ColumnMetadata)
- - [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute)
- - [CompositeTypeMetadata](#bytebase-v1-CompositeTypeMetadata)
- - [Database](#bytebase-v1-Database)
- - [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry)
- - [DatabaseMetadata](#bytebase-v1-DatabaseMetadata)
- - [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema)
- - [DatabaseSchema](#bytebase-v1-DatabaseSchema)
- - [DependencyColumn](#bytebase-v1-DependencyColumn)
- - [DependencyTable](#bytebase-v1-DependencyTable)
- - [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest)
- - [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse)
- - [DimensionConstraint](#bytebase-v1-DimensionConstraint)
- - [DimensionalConfig](#bytebase-v1-DimensionalConfig)
- - [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata)
- - [EventMetadata](#bytebase-v1-EventMetadata)
- - [ExtensionMetadata](#bytebase-v1-ExtensionMetadata)
- - [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata)
- - [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata)
- - [FunctionMetadata](#bytebase-v1-FunctionMetadata)
- - [GenerationMetadata](#bytebase-v1-GenerationMetadata)
- - [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest)
- - [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)
- - [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest)
- - [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest)
- - [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest)
- - [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)
- - [GridLevel](#bytebase-v1-GridLevel)
- - [IndexMetadata](#bytebase-v1-IndexMetadata)
- - [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)
- - [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)
- - [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata)
- - [PackageMetadata](#bytebase-v1-PackageMetadata)
- - [ProcedureMetadata](#bytebase-v1-ProcedureMetadata)
- - [SchemaMetadata](#bytebase-v1-SchemaMetadata)
- - [SequenceMetadata](#bytebase-v1-SequenceMetadata)
- - [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig)
- - [StorageConfig](#bytebase-v1-StorageConfig)
- - [StreamMetadata](#bytebase-v1-StreamMetadata)
- - [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest)
- - [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse)
- - [TableMetadata](#bytebase-v1-TableMetadata)
- - [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata)
- - [TaskMetadata](#bytebase-v1-TaskMetadata)
- - [TessellationConfig](#bytebase-v1-TessellationConfig)
- - [TriggerMetadata](#bytebase-v1-TriggerMetadata)
- - [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest)
- - [ViewMetadata](#bytebase-v1-ViewMetadata)
-
- - [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration)
- - [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type)
- - [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat)
- - [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType)
- - [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode)
- - [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type)
- - [SyncStatus](#bytebase-v1-SyncStatus)
- - [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type)
- - [TaskMetadata.State](#bytebase-v1-TaskMetadata-State)
-
- - [DatabaseService](#bytebase-v1-DatabaseService)
-
- [v1/query_history_service.proto](#v1_query_history_service-proto)
- [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest)
- [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest)
@@ -240,8 +118,6 @@
- [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest)
- [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse)
- [Advice](#bytebase-v1-Advice)
- - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
- - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
- [ExportRequest](#bytebase-v1-ExportRequest)
- [ExportResponse](#bytebase-v1-ExportResponse)
- [MaskingReason](#bytebase-v1-MaskingReason)
@@ -519,6 +395,130 @@
- [DatabaseGroupService](#bytebase-v1-DatabaseGroupService)
+- [v1/instance_role_service.proto](#v1_instance_role_service-proto)
+ - [InstanceRole](#bytebase-v1-InstanceRole)
+ - [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest)
+ - [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse)
+
+ - [InstanceRoleService](#bytebase-v1-InstanceRoleService)
+
+- [v1/instance_service.proto](#v1_instance_service-proto)
+ - [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest)
+ - [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest)
+ - [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse)
+ - [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest)
+ - [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse)
+ - [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest)
+ - [DataSource](#bytebase-v1-DataSource)
+ - [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential)
+ - [DataSource.Address](#bytebase-v1-DataSource-Address)
+ - [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential)
+ - [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry)
+ - [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential)
+ - [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret)
+ - [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption)
+ - [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest)
+ - [GetInstanceRequest](#bytebase-v1-GetInstanceRequest)
+ - [Instance](#bytebase-v1-Instance)
+ - [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry)
+ - [InstanceResource](#bytebase-v1-InstanceResource)
+ - [KerberosConfig](#bytebase-v1-KerberosConfig)
+ - [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest)
+ - [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse)
+ - [ListInstancesRequest](#bytebase-v1-ListInstancesRequest)
+ - [ListInstancesResponse](#bytebase-v1-ListInstancesResponse)
+ - [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest)
+ - [SASLConfig](#bytebase-v1-SASLConfig)
+ - [SyncDatabases](#bytebase-v1-SyncDatabases)
+ - [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest)
+ - [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse)
+ - [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest)
+ - [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest)
+ - [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest)
+
+ - [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType)
+ - [DataSource.CloudSQLIPType](#bytebase-v1-DataSource-CloudSQLIPType)
+ - [DataSource.RedisType](#bytebase-v1-DataSource-RedisType)
+ - [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType)
+ - [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType)
+ - [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType)
+ - [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType)
+ - [DataSourceType](#bytebase-v1-DataSourceType)
+
+ - [InstanceService](#bytebase-v1-InstanceService)
+
+- [v1/database_service.proto](#v1_database_service-proto)
+ - [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest)
+ - [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse)
+ - [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest)
+ - [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse)
+ - [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest)
+ - [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse)
+ - [BoundingBox](#bytebase-v1-BoundingBox)
+ - [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata)
+ - [ColumnMetadata](#bytebase-v1-ColumnMetadata)
+ - [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute)
+ - [CompositeTypeMetadata](#bytebase-v1-CompositeTypeMetadata)
+ - [Database](#bytebase-v1-Database)
+ - [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry)
+ - [DatabaseMetadata](#bytebase-v1-DatabaseMetadata)
+ - [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema)
+ - [DatabaseSchema](#bytebase-v1-DatabaseSchema)
+ - [DependencyColumn](#bytebase-v1-DependencyColumn)
+ - [DependencyTable](#bytebase-v1-DependencyTable)
+ - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
+ - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
+ - [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest)
+ - [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse)
+ - [DimensionConstraint](#bytebase-v1-DimensionConstraint)
+ - [DimensionalConfig](#bytebase-v1-DimensionalConfig)
+ - [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata)
+ - [EventMetadata](#bytebase-v1-EventMetadata)
+ - [ExtensionMetadata](#bytebase-v1-ExtensionMetadata)
+ - [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata)
+ - [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata)
+ - [FunctionMetadata](#bytebase-v1-FunctionMetadata)
+ - [GenerationMetadata](#bytebase-v1-GenerationMetadata)
+ - [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest)
+ - [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)
+ - [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest)
+ - [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest)
+ - [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest)
+ - [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)
+ - [GridLevel](#bytebase-v1-GridLevel)
+ - [IndexMetadata](#bytebase-v1-IndexMetadata)
+ - [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)
+ - [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)
+ - [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata)
+ - [PackageMetadata](#bytebase-v1-PackageMetadata)
+ - [ProcedureMetadata](#bytebase-v1-ProcedureMetadata)
+ - [SchemaMetadata](#bytebase-v1-SchemaMetadata)
+ - [SequenceMetadata](#bytebase-v1-SequenceMetadata)
+ - [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig)
+ - [StorageConfig](#bytebase-v1-StorageConfig)
+ - [StreamMetadata](#bytebase-v1-StreamMetadata)
+ - [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest)
+ - [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse)
+ - [TableMetadata](#bytebase-v1-TableMetadata)
+ - [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata)
+ - [TaskMetadata](#bytebase-v1-TaskMetadata)
+ - [TessellationConfig](#bytebase-v1-TessellationConfig)
+ - [TriggerMetadata](#bytebase-v1-TriggerMetadata)
+ - [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest)
+ - [ViewMetadata](#bytebase-v1-ViewMetadata)
+
+ - [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration)
+ - [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type)
+ - [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat)
+ - [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType)
+ - [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode)
+ - [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type)
+ - [SyncStatus](#bytebase-v1-SyncStatus)
+ - [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type)
+ - [TaskMetadata.State](#bytebase-v1-TaskMetadata-State)
+
+ - [DatabaseService](#bytebase-v1-DatabaseService)
+
- [v1/group_service.proto](#v1_group_service-proto)
- [BatchGetGroupsRequest](#bytebase-v1-BatchGetGroupsRequest)
- [BatchGetGroupsResponse](#bytebase-v1-BatchGetGroupsResponse)
@@ -2183,1567 +2183,1495 @@ RolloutService manages the execution of deployment plans.
-<a name="v1_instance_role_service-proto"></a>
+<a name="v1_query_history_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/instance_role_service.proto
+## v1/query_history_service.proto
-<a name="bytebase-v1-InstanceRole"></a>
+<a name="bytebase-v1-GetQueryHistoryRequest"></a>
+
+### GetQueryHistoryRequest
-### InstanceRole
-InstanceRole is the API message for instance role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the role. Format: instances/{instance}/roles/{role} The role name is the unique name for the role. |
-| role_name | [string](#string) | | The role name. It&#39;s unique within the instance. |
-| password | [string](#string) | optional | The role password. |
-| connection_limit | [int32](#int32) | optional | The connection count limit for this role. |
-| valid_until | [string](#string) | optional | The expiration for the role&#39;s password. |
-| attribute | [string](#string) | optional | The role attribute. For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html For MySQL, it&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html |
+| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |
-<a name="bytebase-v1-ListInstanceRolesRequest"></a>
+<a name="bytebase-v1-ListQueryHistoriesRequest"></a>
-### ListInstanceRolesRequest
+### ListQueryHistoriesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of roles. Format: instances/{instance} |
-| page_size | [int32](#int32) | | Not used. The maximum number of roles to return. The service may return fewer than this value. If unspecified, at most 10 roles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | Not used. A page token, received from a previous `ListInstanceRoles` call. Provide this to retrieve the subsequent page.
+| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use &#34;projects/-&#34; to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |
+| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistories` call. Provide this to retrieve the subsequent page. |
+| filter | [string](#string) | | Filter is the filter to apply on the list query histories. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-When paginating, all other parameters provided to `ListInstanceRoles` must match the call that provided the page token. |
-| refresh | [bool](#bool) | | Refresh will refresh and return the latest data. |
+Supported filter: - creator: the user full name in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
+
+For example: creator == &#34;users/{email}&#34; |
-<a name="bytebase-v1-ListInstanceRolesResponse"></a>
+<a name="bytebase-v1-ListQueryHistoriesResponse"></a>
-### ListInstanceRolesResponse
+### ListQueryHistoriesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | The roles from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-
-
+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of query histories. |
+| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistories` method to retrieve the next page of history. |
-
-
-
-<a name="bytebase-v1-InstanceRoleService"></a>
+<a name="bytebase-v1-QueryHistory"></a>
-### InstanceRoleService
-InstanceRoleService manages database roles within instances.
+### QueryHistory
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| ListInstanceRoles | [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest) | [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse) | Lists all database roles in an instance. Permissions required: bb.instanceRoles.list |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |
+| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |
+| creator | [string](#string) | | |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| statement | [string](#string) | | |
+| error | [string](#string) | optional | |
+| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
+| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
-<a name="v1_instance_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/instance_service.proto
-<a name="bytebase-v1-AddDataSourceRequest"></a>
+<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
-### AddDataSourceRequest
+### SearchQueryHistoriesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to add a data source to. Format: instances/{instance} |
-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be added. |
-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
+| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard &#34;projects/-&#34; is not supported; use ListQueryHistories for cross-project reads. |
+| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
+| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.contains()&#34; operator.
+For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.contains(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) |
-<a name="bytebase-v1-BatchSyncInstancesRequest"></a>
-### BatchSyncInstancesRequest
+
+<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
+
+### SearchQueryHistoriesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| requests | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | repeated | The request message specifying the instances to sync. A maximum of 1000 instances can be synced in a batch. |
+| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |
+| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method to retrieve the next page of history. |
+
-<a name="bytebase-v1-BatchSyncInstancesResponse"></a>
-### BatchSyncInstancesResponse
+<a name="bytebase-v1-QueryHistory-Type"></a>
+### QueryHistory.Type
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
+| QUERY | 1 | Query execution for data retrieval. |
+| EXPORT | 2 | Data export operation to file. |
+
+
-<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>
-### BatchUpdateInstancesRequest
+<a name="bytebase-v1-QueryHistoryService"></a>
+
+### QueryHistoryService
+QueryHistoryService manages query history records of SQL Editor queries and exports.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
+| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | ListQueryHistories lists query histories of all users in a project. Permissions required: bb.queryHistories.list |
+| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | GetQueryHistory gets a single query history for the caller. Permissions required: None (only returns the caller&#39;s own query history) |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| requests | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |
+<a name="v1_sql_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/sql_service.proto
-<a name="bytebase-v1-BatchUpdateInstancesResponse"></a>
+<a name="bytebase-v1-AICompletionRequest"></a>
-### BatchUpdateInstancesResponse
+### AICompletionRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| instances | [Instance](#bytebase-v1-Instance) | repeated | |
+| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |
-<a name="bytebase-v1-CreateInstanceRequest"></a>
+<a name="bytebase-v1-AICompletionRequest-Message"></a>
-### CreateInstanceRequest
+### AICompletionRequest.Message
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| instance | [Instance](#bytebase-v1-Instance) | | The instance to create. |
-| instance_id | [string](#string) | | The ID to use for the instance, which will become the final component of the instance&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-| initial_database_project | [string](#string) | | The project to assign newly discovered databases to during initial sync. Format: projects/{project} |
+| role | [string](#string) | | |
+| content | [string](#string) | | |
-<a name="bytebase-v1-DataSource"></a>
+<a name="bytebase-v1-AICompletionResponse"></a>
-### DataSource
+### AICompletionResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | The unique identifier for this data source. |
-| type | [DataSourceType](#bytebase-v1-DataSourceType) | | The type of data source (ADMIN or READ_ONLY). |
-| username | [string](#string) | | The username for database authentication. |
-| password | [string](#string) | | The password for database authentication. |
-| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |
-| ssl_ca | [string](#string) | | The SSL certificate authority certificate. |
-| ssl_cert | [string](#string) | | The SSL client certificate. |
-| ssl_key | [string](#string) | | The SSL client private key. |
-| ssl_ca_path | [string](#string) | | The local filesystem path to the SSL certificate authority certificate. |
-| ssl_cert_path | [string](#string) | | The local filesystem path to the SSL client certificate. |
-| ssl_key_path | [string](#string) | | The local filesystem path to the SSL client private key. |
-| ssl_ca_set | [bool](#bool) | | Whether an SSL certificate authority certificate has been configured. |
-| ssl_cert_set | [bool](#bool) | | Whether an SSL client certificate has been configured. |
-| ssl_key_set | [bool](#bool) | | Whether an SSL client private key has been configured. |
-| ssl_ca_path_set | [bool](#bool) | | Whether an SSL certificate authority path has been configured. |
-| ssl_cert_path_set | [bool](#bool) | | Whether an SSL client certificate path has been configured. |
-| ssl_key_path_set | [bool](#bool) | | Whether an SSL client private key path has been configured. |
-| verify_tls_certificate | [bool](#bool) | | verify_tls_certificate enables TLS certificate verification for SSL connections. Default is false (no verification) for backward compatibility. Set to true for secure connections (recommended for production). Only set to false for development or when certificates cannot be properly validated (e.g., self-signed certs, VPN environments). |
-| host | [string](#string) | | The hostname or IP address of the database server. |
-| port | [string](#string) | | The port number of the database server. |
-| database | [string](#string) | | The name of the database to connect to. |
-| srv | [bool](#bool) | | srv, authentication_database and replica_set are used for MongoDB. srv is a boolean flag that indicates whether the host is a DNS SRV record. |
-| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |
-| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |
-| sid | [string](#string) | | sid and service_name are used for Oracle. |
-| service_name | [string](#string) | | |
-| ssh_host | [string](#string) | | Connection over SSH. The hostname of the SSH server agent. Required. |
-| ssh_port | [string](#string) | | The port of the SSH server agent. It&#39;s 22 typically. Required. |
-| ssh_user | [string](#string) | | The user to login the server. Required. |
-| ssh_password | [string](#string) | | The password to login the server. If it&#39;s empty string, no password is required. |
-| ssh_private_key | [string](#string) | | The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). |
-| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required. Used for authentication when connecting to the data source. |
-| authentication_private_key_passphrase | [string](#string) | | Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. |
-| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |
-| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |
-| cloud_sql_ip_type | [DataSource.CloudSQLIPType](#bytebase-v1-DataSource-CloudSQLIPType) | | cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections. CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility. |
-| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |
-| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |
-| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |
-| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |
-| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |
-| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |
-| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |
-| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |
-| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |
-| master_username | [string](#string) | | master_username and master_password are master credentials used by redis sentinel mode. |
-| master_password | [string](#string) | | |
-| redis_type | [DataSource.RedisType](#bytebase-v1-DataSource-RedisType) | | |
-| cluster | [string](#string) | | Cluster is the cluster name for the data source. Used by CockroachDB. |
-| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |
-| project_id | [string](#string) | | project_id and instance_id are the GCP resource identifiers. project_id is used by Spanner and BigQuery; instance_id is used by Spanner. For these engines, host and port optionally override the default Google API endpoint (e.g. a Private Service Connect endpoint like spanner-nonprod.p.googleapis.com). |
-| instance_id | [string](#string) | | |
+| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |
-<a name="bytebase-v1-DataSource-AWSCredential"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate"></a>
-### DataSource.AWSCredential
+### AICompletionResponse.Candidate
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| access_key_id | [string](#string) | | |
-| secret_access_key | [string](#string) | | |
-| session_token | [string](#string) | | |
-| role_arn | [string](#string) | | ARN of IAM role to assume for cross-account access. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html |
-| external_id | [string](#string) | | Optional external ID for additional security when assuming role. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html |
+| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |
-<a name="bytebase-v1-DataSource-Address"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>
-### DataSource.Address
+### AICompletionResponse.Candidate.Content
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| host | [string](#string) | | |
-| port | [string](#string) | | |
+| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |
-<a name="bytebase-v1-DataSource-AzureCredential"></a>
+<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>
-### DataSource.AzureCredential
+### AICompletionResponse.Candidate.Content.Part
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| tenant_id | [string](#string) | | |
-| client_id | [string](#string) | | |
-| client_secret | [string](#string) | | |
+| text | [string](#string) | | |
-<a name="bytebase-v1-DataSource-ExtraConnectionParametersEntry"></a>
+<a name="bytebase-v1-AdminExecuteRequest"></a>
-### DataSource.ExtraConnectionParametersEntry
+### AdminExecuteRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-DataSource-GCPCredential"></a>
+<a name="bytebase-v1-AdminExecuteResponse"></a>
-### DataSource.GCPCredential
+### AdminExecuteResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [string](#string) | | |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-<a name="bytebase-v1-DataSourceExternalSecret"></a>
+<a name="bytebase-v1-Advice"></a>
-### DataSourceExternalSecret
+### Advice
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType) | | The type of external secret store. |
-| url | [string](#string) | | The URL of the external secret store. |
-| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. |
-| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |
-| token | [string](#string) | | Token for direct authentication. Interpreted according to token_type: the literal token (PLAIN), an environment variable name (ENVIRONMENT), or a file path (FILE). |
-| token_type | [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType) | | How to interpret the token field when auth_type is TOKEN. |
-| engine_name | [string](#string) | | engine name is the name for secret engine. |
-| secret_name | [string](#string) | | the secret name in the engine to store the password. |
-| password_key_name | [string](#string) | | the key name for the password. |
-| skip_vault_tls_verification | [bool](#bool) | | TLS configuration for connecting to Vault server. These fields are separate from the database TLS configuration in DataSource. skip_vault_tls_verification disables TLS certificate verification for Vault connections. Default is false (verification enabled) for security. Only set to true for development or when certificates cannot be properly validated. |
-| vault_ssl_ca | [string](#string) | | CA certificate for Vault server verification. |
-| vault_ssl_cert | [string](#string) | | Client certificate for mutual TLS authentication with Vault. |
-| vault_ssl_key | [string](#string) | | Client private key for mutual TLS authentication with Vault. |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |
+| code | [int32](#int32) | | The advice code. |
+| title | [string](#string) | | The advice title. |
+| content | [string](#string) | | The advice content. |
+| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
+| end_position | [Position](#bytebase-v1-Position) | | |
+| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |
-<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption"></a>
+<a name="bytebase-v1-ExportRequest"></a>
-### DataSourceExternalSecret.AppRoleAuthOption
+### ExportRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role_id | [string](#string) | | The role ID for Vault AppRole authentication. |
-| secret_id | [string](#string) | | the secret id for the role without ttl. |
-| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | The type of secret for AppRole authentication. |
-| mount_path | [string](#string) | | The path where the approle auth method is mounted. |
+| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/plans/{plan}/rollout Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
+| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
+| password | [string](#string) | | The zip password provide by users. |
+| data_source_id | [string](#string) | | The id of data source. If omitted, Export resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to export from the admin data source or a specific read-only data source. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-<a name="bytebase-v1-DeleteInstanceRequest"></a>
+<a name="bytebase-v1-ExportResponse"></a>
-### DeleteInstanceRequest
+### ExportResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to delete. Format: instances/{instance} |
-| force | [bool](#bool) | | If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. |
-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted instance and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted instances. The instance must already be soft-deleted for this to work. |
+| content | [bytes](#bytes) | | The export file content. |
+| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this export, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |
-<a name="bytebase-v1-GetInstanceRequest"></a>
+<a name="bytebase-v1-MaskingReason"></a>
-### GetInstanceRequest
+### MaskingReason
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to retrieve. Format: instances/{instance} |
+| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
+| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
+| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
+| algorithm | [string](#string) | | The masking algorithm used. |
+| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
+| classification_level | [int32](#int32) | | The classification level that triggered masking. |
+| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-<a name="bytebase-v1-Instance"></a>
+<a name="bytebase-v1-QueryOption"></a>
-### Instance
+### QueryOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the instance. |
-| title | [string](#string) | | The display title of the instance. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
-| engine_version | [string](#string) | | The version of the database engine. |
-| external_link | [string](#string) | | External URL to the database instance console. |
-| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for connecting to the instance. |
-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-| activation | [bool](#bool) | | Whether the instance is activated for use. |
-| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | Database roles available in this instance. |
-| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |
-| sync_databases | [SyncDatabases](#bytebase-v1-SyncDatabases) | | Enable sync for following databases. Not set means sync all schemas &amp; databases. |
-| last_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the instance was synced. |
-| labels | [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the instance. For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } |
+| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
+| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |
-<a name="bytebase-v1-Instance-LabelsEntry"></a>
+<a name="bytebase-v1-QueryRequest"></a>
-### Instance.LabelsEntry
+### QueryRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
+| statement | [string](#string) | | The SQL statement to execute. |
+| limit | [int32](#int32) | | The maximum number of rows to return. |
+| data_source_id | [string](#string) | | The id of data source. If omitted, Query resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to query the admin data source or a specific read-only data source. |
+| explain | [bool](#bool) | | Explain the statement. |
+| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
+| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-<a name="bytebase-v1-InstanceResource"></a>
+<a name="bytebase-v1-QueryResponse"></a>
-### InstanceResource
+### QueryResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| title | [string](#string) | | The display title of the instance. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
-| engine_version | [string](#string) | | The version of the database engine. |
-| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for the instance. |
-| activation | [bool](#bool) | | Whether the instance is activated. |
-| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
+| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this query, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |
-<a name="bytebase-v1-KerberosConfig"></a>
+<a name="bytebase-v1-QueryResult"></a>
-### KerberosConfig
+### QueryResult
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| primary | [string](#string) | | The primary component of the Kerberos principal. |
-| instance | [string](#string) | | The instance component of the Kerberos principal. |
-| realm | [string](#string) | | The Kerberos realm. |
-| keytab | [bytes](#bytes) | | The keytab file contents for authentication. |
-| kdc_host | [string](#string) | | The hostname of the Key Distribution Center (KDC). |
-| kdc_port | [string](#string) | | The port of the Key Distribution Center (KDC). |
-| kdc_transport_protocol | [string](#string) | | The transport protocol for KDC communication (tcp or udp). |
-
+| column_names | [string](#string) | repeated | Column names of the query result. |
+| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
+| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
+| rows_count | [int64](#int64) | | |
+| error | [string](#string) | | The error message if the query failed. |
+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
+| statement | [string](#string) | | The query statement for the result. |
+| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
+| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |
+| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |
+| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |
+| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
+| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
-<a name="bytebase-v1-ListInstanceDatabaseRequest"></a>
-### ListInstanceDatabaseRequest
+<a name="bytebase-v1-QueryResult-CommandError"></a>
+### QueryResult.CommandError
+Permission denied with resource information or disallowed command_type.
+Either resources or command_type is available.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
-| instance | [Instance](#bytebase-v1-Instance) | optional | The target instance. We need to set this field if the target instance is not created yet. |
+| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |
-<a name="bytebase-v1-ListInstanceDatabaseResponse"></a>
+<a name="bytebase-v1-QueryResult-Message"></a>
-### ListInstanceDatabaseResponse
+### QueryResult.Message
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [string](#string) | repeated | All database name list in the instance. |
-
+| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
+| content | [string](#string) | | |
-<a name="bytebase-v1-ListInstancesRequest"></a>
-### ListInstancesRequest
+<a name="bytebase-v1-QueryResult-PostgresError"></a>
+### QueryResult.PostgresError
+refer https://www.postgresql.org/docs/11/protocol-error-fields.html
+for field description.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 10 instances will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListInstances` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListInstances` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted instances if specified. |
-| filter | [string](#string) | | Filter the instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters: - name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator. - resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator. - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - state: the instance state, check State enum for values, support &#34;==&#34; operator. - engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator. - port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example: name == &#34;sample instance&#34; name.contains(&#34;sample&#34;) resource_id == &#34;sample-instance&#34; resource_id.contains(&#34;sample&#34;) state == &#34;DELETED&#34; environment == &#34;environments/test&#34; environment == &#34;&#34; (find instances which environment is not set) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) host == &#34;127.0.0.1&#34; host.contains(&#34;127.0&#34;) port == &#34;54321&#34; port.contains(&#34;543&#34;) labels.org_group == &#34;infrastructure&#34; labels.environment in [&#34;prod&#34;, &#34;production&#34;] project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34; host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; |
-| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = &#34;title&#34; - order_by = &#34;title desc&#34; - order_by = &#34;title desc, environment asc&#34; |
-
+| severity | [string](#string) | | |
+| code | [string](#string) | | |
+| message | [string](#string) | | |
+| detail | [string](#string) | | |
+| hint | [string](#string) | | |
+| position | [int32](#int32) | | |
+| internal_position | [int32](#int32) | | |
+| internal_query | [string](#string) | | |
+| where | [string](#string) | | |
+| schema_name | [string](#string) | | |
+| table_name | [string](#string) | | |
+| column_name | [string](#string) | | |
+| data_type_name | [string](#string) | | |
+| constraint_name | [string](#string) | | |
+| file | [string](#string) | | |
+| line | [int32](#int32) | | |
+| routine | [string](#string) | | |
-<a name="bytebase-v1-ListInstancesResponse"></a>
-### ListInstancesResponse
+<a name="bytebase-v1-QueryResult-SyntaxError"></a>
+### QueryResult.SyntaxError
+Syntax error with position information for editor highlighting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| instances | [Instance](#bytebase-v1-Instance) | repeated | The instances from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |
-<a name="bytebase-v1-RemoveDataSourceRequest"></a>
+<a name="bytebase-v1-QueryRow"></a>
-### RemoveDataSourceRequest
+### QueryRow
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to remove a data source from. Format: instances/{instance} |
-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be removed. |
+| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
-<a name="bytebase-v1-SASLConfig"></a>
+<a name="bytebase-v1-RowValue"></a>
-### SASLConfig
+### RowValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| krb_config | [KerberosConfig](#bytebase-v1-KerberosConfig) | | Kerberos authentication configuration. |
+| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |
+| bool_value | [bool](#bool) | | |
+| bytes_value | [bytes](#bytes) | | |
+| double_value | [double](#double) | | |
+| float_value | [float](#float) | | |
+| int32_value | [int32](#int32) | | |
+| int64_value | [int64](#int64) | | |
+| string_value | [string](#string) | | |
+| uint32_value | [uint32](#uint32) | | |
+| uint64_value | [uint64](#uint64) | | |
+| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |
+| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |
+| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |
-<a name="bytebase-v1-SyncDatabases"></a>
+<a name="bytebase-v1-RowValue-Timestamp"></a>
-### SyncDatabases
+### RowValue.Timestamp
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [string](#string) | repeated | |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |
-<a name="bytebase-v1-SyncInstanceRequest"></a>
+<a name="bytebase-v1-RowValue-TimestampTZ"></a>
-### SyncInstanceRequest
+### RowValue.TimestampTZ
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of instance. Format: instances/{instance} |
-| enable_full_sync | [bool](#bool) | | When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only the instance metadata (such as the database list) and any newly discovered databases will be synced. |
+| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |
+| offset | [int32](#int32) | | The offset is in seconds east of UTC |
+| accuracy | [int32](#int32) | | |
+
-<a name="bytebase-v1-SyncInstanceResponse"></a>
-### SyncInstanceResponse
+<a name="bytebase-v1-Advice-Level"></a>
+### Advice.Level
+Level represents the severity level of the advice.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |
+| SUCCESS | 1 | Success status indicating the check passed without issues. |
+| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |
+| ERROR | 3 | Error status indicating critical issues that must be addressed. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| databases | [string](#string) | repeated | All database name list in the instance. |
+<a name="bytebase-v1-Advice-RuleType"></a>
+### Advice.RuleType
+RuleType indicates the source of the linting rule.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |
+| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |
+| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |
-<a name="bytebase-v1-UndeleteInstanceRequest"></a>
-### UndeleteInstanceRequest
+<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>
+### QueryOption.MSSQLExplainFormat
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted instance. Format: instances/{instance} |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |
+| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |
+| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |
+<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
+### QueryOption.RedisRunCommandsOn
-<a name="bytebase-v1-UpdateDataSourceRequest"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |
+| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |
+| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |
-### UpdateDataSourceRequest
+<a name="bytebase-v1-QueryResult-CommandError-Type"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the instance to update a data source. Format: instances/{instance} |
-| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-| allow_missing | [bool](#bool) | | If set to true, and the data source is not found, a new data source will be created. In this situation, `update_mask` is ignored. |
+### QueryResult.CommandError.Type
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| DDL | 1 | |
+| DML | 2 | |
+| NON_READ_ONLY | 3 | |
+<a name="bytebase-v1-QueryResult-Message-Level"></a>
-<a name="bytebase-v1-UpdateInstanceRequest"></a>
+### QueryResult.Message.Level
-### UpdateInstanceRequest
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |
+| INFO | 1 | Informational message. |
+| WARNING | 2 | Warning message indicating potential issues. |
+| DEBUG | 3 | Debug message for development and troubleshooting. |
+| LOG | 4 | General log message. |
+| NOTICE | 5 | Notice message for important information. |
+| EXCEPTION | 6 | Exception message indicating error conditions. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| instance | [Instance](#bytebase-v1-Instance) | | The instance to update.
+
-The instance&#39;s `name` field is used to identify the instance to update. Format: instances/{instance} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the instance is not found, a new instance will be created. In this situation, `update_mask` is ignored. |
+
+<a name="bytebase-v1-SQLService"></a>
+### SQLService
+SQLService executes SQL queries and manages query operations.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
+| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
+| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | Deprecated: use QueryHistoryService.SearchQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns caller&#39;s own query histories) |
+| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | Deprecated: use QueryHistoryService.ListQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: bb.queryHistories.list |
+| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | Deprecated: use QueryHistoryService.GetQueryHistory instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns the caller&#39;s own query history) |
+| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
+| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |
-<a name="bytebase-v1-DataSource-AuthenticationType"></a>
-
-### DataSource.AuthenticationType
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AUTHENTICATION_UNSPECIFIED | 0 | |
-| PASSWORD | 1 | |
-| GOOGLE_CLOUD_SQL_IAM | 2 | |
-| AWS_RDS_IAM | 3 | |
-| AZURE_IAM | 4 | |
+<a name="v1_plan_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/plan_service.proto
-<a name="bytebase-v1-DataSource-CloudSQLIPType"></a>
-### DataSource.CloudSQLIPType
-CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CLOUD_SQL_IP_TYPE_UNSPECIFIED | 0 | |
-| PUBLIC | 1 | |
-| PRIVATE | 2 | |
-| PSC | 3 | |
+<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>
+### CancelPlanCheckRunRequest
-<a name="bytebase-v1-DataSource-RedisType"></a>
-### DataSource.RedisType
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| REDIS_TYPE_UNSPECIFIED | 0 | |
-| STANDALONE | 1 | |
-| SENTINEL | 2 | |
-| CLUSTER | 3 | |
-<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>
-### DataSourceExternalSecret.AppRoleAuthOption.SecretType
+<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>
+### CancelPlanCheckRunResponse
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
-| PLAIN | 1 | Plain text secret. |
-| ENVIRONMENT | 2 | Secret from environment variable. |
-<a name="bytebase-v1-DataSourceExternalSecret-AuthType"></a>
-### DataSourceExternalSecret.AuthType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AUTH_TYPE_UNSPECIFIED | 0 | Unspecified authentication type. |
-| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |
-| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |
+<a name="bytebase-v1-CreatePlanRequest"></a>
+### CreatePlanRequest
-<a name="bytebase-v1-DataSourceExternalSecret-SecretType"></a>
-### DataSourceExternalSecret.SecretType
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
-| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |
-| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |
-| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |
-| AZURE_KEY_VAULT | 4 | ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets |
-<a name="bytebase-v1-DataSourceExternalSecret-TokenType"></a>
-### DataSourceExternalSecret.TokenType
+<a name="bytebase-v1-GetPlanCheckRunRequest"></a>
+### GetPlanCheckRunRequest
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TOKEN_TYPE_UNSPECIFIED | 0 | Unspecified token type, treated as PLAIN for backward compatibility. |
-| PLAIN | 1 | The token field holds the literal token value. |
-| ENVIRONMENT | 2 | The token field holds the name of an environment variable on the Bytebase server that holds the token value. |
-| FILE | 3 | The token field holds a path to a file on the Bytebase server that holds the token value. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |
-<a name="bytebase-v1-DataSourceType"></a>
-### DataSourceType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| DATA_SOURCE_UNSPECIFIED | 0 | Unspecified data source type. |
-| ADMIN | 1 | Admin data source with write permissions. |
-| READ_ONLY | 2 | Read-only data source for query operations. |
-
+<a name="bytebase-v1-GetPlanRequest"></a>
-
+### GetPlanRequest
-<a name="bytebase-v1-InstanceService"></a>
-### InstanceService
-InstanceService manages database instances and their connections.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetInstance | [GetInstanceRequest](#bytebase-v1-GetInstanceRequest) | [Instance](#bytebase-v1-Instance) | Gets a database instance by name. Permissions required: bb.instances.get |
-| ListInstances | [ListInstancesRequest](#bytebase-v1-ListInstancesRequest) | [ListInstancesResponse](#bytebase-v1-ListInstancesResponse) | Lists all database instances. Permissions required: bb.instances.list |
-| CreateInstance | [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Creates a new database instance. Permissions required: bb.instances.create |
-| UpdateInstance | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Updates a database instance. Permissions required: bb.instances.update |
-| DeleteInstance | [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes or soft-deletes a database instance. Permissions required: bb.instances.delete |
-| UndeleteInstance | [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest) | [Instance](#bytebase-v1-Instance) | Restores a soft-deleted database instance. Permissions required: bb.instances.undelete |
-| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync |
-| ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | Lists all databases within an instance without creating them. Permissions required: bb.instances.get |
-| BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | Syncs multiple instances in a single request. Permissions required: bb.instances.sync |
-| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | Updates multiple instances in a single request. Permissions required: bb.instances.update |
-| AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Adds a read-only data source to an instance. Permissions required: bb.instances.update |
-| RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Removes a read-only data source from an instance. Permissions required: bb.instances.update |
-| UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Updates a data source configuration. Permissions required: bb.instances.update |
-
-<a name="v1_database_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/database_service.proto
+<a name="bytebase-v1-ListPlansRequest"></a>
+### ListPlansRequest
-<a name="bytebase-v1-BatchGetDatabasesRequest"></a>
-### BatchGetDatabasesRequest
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filters: - creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource shared by all databases being retrieved. - projects/{project}: batch get databases in a project; - instances/{instances}: batch get databases in a instance; Use &#34;-&#34; as wildcard to batch get databases across parent. |
-| names | [string](#string) | repeated | The list of database names to retrieve. |
+For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; title == &#34;My Plan&#34; title.contains(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
-<a name="bytebase-v1-BatchGetDatabasesResponse"></a>
+<a name="bytebase-v1-ListPlansResponse"></a>
-### BatchGetDatabasesResponse
+### ListPlansResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |
+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-BatchSyncDatabasesRequest"></a>
+<a name="bytebase-v1-Plan"></a>
-### BatchSyncDatabasesRequest
+### Plan
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. |
-| names | [string](#string) | repeated | The list of database names to sync. |
+| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
+| state | [State](#bytebase-v1-State) | | The state of the plan. |
+| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
+| title | [string](#string) | | The title of the plan. |
+| description | [string](#string) | | The description of the plan. |
+| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
+| creator | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
+| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |
+| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists or the linked issue is a draft. |
+| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |
+| issue_status | [IssueStatus](#bytebase-v1-IssueStatus) | | The lifecycle status of the linked issue. Unspecified when no linked issue exists. |
-<a name="bytebase-v1-BatchSyncDatabasesResponse"></a>
+<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
+
+### Plan.ChangeDatabaseConfig
+
-### BatchSyncDatabasesResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
+| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
-<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>
+<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
-### BatchUpdateDatabasesRequest
+### Plan.CreateDatabaseConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the project of databases for now. |
-| requests | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |
+| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |
+| database | [string](#string) | | The name of the database to create. |
+| table | [string](#string) | | table is the name of the table, if it is not empty, Bytebase should create a table after creating the database. For example, in MongoDB, it only creates the database when we first store data in that database. |
+| character_set | [string](#string) | | character_set is the character set of the database. |
+| collation | [string](#string) | | collation is the collation of the database. |
+| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
+| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
+| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>
+<a name="bytebase-v1-Plan-ExportDataConfig"></a>
-### BatchUpdateDatabasesResponse
+### Plan.ExportDataConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |
+| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
+| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |
+| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |
-<a name="bytebase-v1-BoundingBox"></a>
+<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
+
+### Plan.PlanCheckRunStatusCountEntry
-### BoundingBox
-BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| xmin | [double](#double) | | Minimum X coordinate |
-| ymin | [double](#double) | | Minimum Y coordinate |
-| xmax | [double](#double) | | Maximum X coordinate |
-| ymax | [double](#double) | | Maximum Y coordinate |
+| key | [string](#string) | | |
+| value | [int32](#int32) | | |
-<a name="bytebase-v1-CheckConstraintMetadata"></a>
+<a name="bytebase-v1-Plan-RolloutStageSummary"></a>
+
+### Plan.RolloutStageSummary
-### CheckConstraintMetadata
-CheckConstraintMetadata is the metadata for check constraints.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a check constraint. |
-| expression | [string](#string) | | The expression is the expression of a check constraint. |
+| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
+| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |
-<a name="bytebase-v1-ColumnMetadata"></a>
+<a name="bytebase-v1-Plan-Spec"></a>
+
+### Plan.Spec
-### ColumnMetadata
-ColumnMetadata is the metadata for columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a column. |
-| position | [int32](#int32) | | The position is the position in columns. |
-| has_default | [bool](#bool) | | |
-| default | [string](#string) | | The default value of column. |
-| default_on_null | [bool](#bool) | | Oracle specific metadata. The default_on_null is the default on null of a column. |
-| on_update | [string](#string) | | The on_update is the on update action of a column. For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. |
-| nullable | [bool](#bool) | | The nullable is the nullable of a column. |
-| type | [string](#string) | | The type is the type of a column. |
-| character_set | [string](#string) | | The character_set is the character_set of a column. |
-| collation | [string](#string) | | The collation is the collation of a column. |
-| comment | [string](#string) | | The comment is the comment of a column. |
-| generation | [GenerationMetadata](#bytebase-v1-GenerationMetadata) | | The generation is the generation of a column. |
-| is_identity | [bool](#bool) | | |
-| identity_generation | [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration) | | The identity_generation is for identity columns, PG only. |
-| identity_seed | [int64](#int64) | | The identity_seed is for identity columns, MSSQL only. |
-| identity_increment | [int64](#int64) | | The identity_increment is for identity columns, MSSQL only. |
-| default_constraint_name | [string](#string) | | The default_constraint_name is the name of the default constraint, MSSQL only. In MSSQL, default values are implemented as named constraints. When modifying or dropping a column&#39;s default value, you must reference the constraint by name. This field stores the actual constraint name from the database.
-
-Example: A column definition like: CREATE TABLE employees ( status NVARCHAR(20) DEFAULT &#39;active&#39; )
-
-Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39; or a user-defined name if specified: ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; FOR status
-
-To modify the default, you must first drop the existing constraint by name: ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760 ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;inactive&#39; FOR status
-
-This field is populated when syncing from the database. When empty (e.g., when parsing from SQL files), the system cannot automatically drop the constraint. |
-| srid | [uint32](#uint32) | optional | The spatial reference system identifier of a spatial column, MySQL 8.0 only. Unset means the column declares no SRID; presence carries the explicit SRID, including the valid SRID 0. SRS_IDs are unsigned 32-bit (custom SRSs may exceed int32). |
-| is_invisible | [bool](#bool) | | Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. |
+| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
+| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
+| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
+| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |
-<a name="bytebase-v1-CompositeTypeAttribute"></a>
+<a name="bytebase-v1-Plan-TaskStatusCount"></a>
-### CompositeTypeAttribute
+### Plan.TaskStatusCount
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the attribute. |
-| type | [string](#string) | | The attribute type. User-defined types are always schema-qualified. |
-| collation | [string](#string) | | The non-default collation of the attribute as an emit-ready SQL identifier reference (quoted as needed, schema-qualified when outside pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. |
-| comment | [string](#string) | | The comment describing the attribute. |
+| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |
+| count | [int32](#int32) | | The number of tasks in the status. |
-<a name="bytebase-v1-CompositeTypeMetadata"></a>
+<a name="bytebase-v1-PlanCheckRun"></a>
-### CompositeTypeMetadata
+### PlanCheckRun
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the composite type. |
-| attributes | [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute) | repeated | The ordered attributes of the composite type. |
-| comment | [string](#string) | | The comment describing the composite type. |
+| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |
+| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
+| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
+| error | [string](#string) | | error is set if the Status is FAILED. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-<a name="bytebase-v1-Database"></a>
+<a name="bytebase-v1-PlanCheckRun-Result"></a>
-### Database
+### PlanCheckRun.Result
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance. |
-| state | [State](#bytebase-v1-State) | | The existence of a database. |
-| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |
-| project | [string](#string) | | The project for a database. Format: projects/{project} |
-| release | [string](#string) | | The release that was last applied to this database. Format: projects/{project}/releases/{release_id} Example: projects/my-project/releases/release_20260115-RC00 |
-| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-| effective_environment | [string](#string) | optional | The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview. |
-| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |
-| instance_resource | [InstanceResource](#bytebase-v1-InstanceResource) | | The instance resource. |
-| backup_available | [bool](#bool) | | The database is available for DML prior backup. |
-| sync_status | [SyncStatus](#bytebase-v1-SyncStatus) | | The sync status of the database. |
-| sync_error | [string](#string) | | The error message if sync failed. |
+| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
+| title | [string](#string) | | |
+| content | [string](#string) | | |
+| code | [int32](#int32) | | |
+| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} |
+| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |
+| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
+| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
-<a name="bytebase-v1-Database-LabelsEntry"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
-### Database.LabelsEntry
+### PlanCheckRun.Result.SqlReviewReport
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |
+| end_position | [Position](#bytebase-v1-Position) | | |
-<a name="bytebase-v1-DatabaseMetadata"></a>
+<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
+
+### PlanCheckRun.Result.SqlSummaryReport
-### DatabaseMetadata
-DatabaseMetadata is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The database metadata name.
+| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |
+| affected_rows | [int64](#int64) | | |
-Format: instances/{instance}/databases/{database}/metadata |
-| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |
-| character_set | [string](#string) | | The character_set is the character set of a database. |
-| collation | [string](#string) | | The collation is the collation of a database. |
-| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |
-| owner | [string](#string) | | The owner of the database. |
-| search_path | [string](#string) | | The search_path is the search path of a PostgreSQL database. |
+<a name="bytebase-v1-RunPlanChecksRequest"></a>
-<a name="bytebase-v1-DatabaseSDLSchema"></a>
+### RunPlanChecksRequest
-### DatabaseSDLSchema
-DatabaseSDLSchema contains the schema in SDL format.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| schema | [bytes](#bytes) | | The SDL schema content. - For SINGLE_FILE format: contains the complete SDL schema as a text string. - For MULTI_FILE format: contains the ZIP archive as binary data. |
-| content_type | [string](#string) | | The MIME type of the schema content. Indicates how the client should interpret the schema field. Examples: - &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format - &#34;application/zip&#34; for MULTI_FILE format |
+| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |
+| spec_id | [string](#string) | optional | The UUID of the specific spec to run plan checks for. This should match the spec.id field in Plan.Spec. If not set, all specs in the plan will be used. |
-<a name="bytebase-v1-DatabaseSchema"></a>
+<a name="bytebase-v1-RunPlanChecksResponse"></a>
-### DatabaseSchema
-DatabaseSchema is the metadata for databases.
+### RunPlanChecksResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema dump from database. |
+<a name="bytebase-v1-UpdatePlanRequest"></a>
-<a name="bytebase-v1-DependencyColumn"></a>
+### UpdatePlanRequest
-### DependencyColumn
-DependencyColumn is the metadata for dependency columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema is the schema of a reference column. |
-| table | [string](#string) | | The table is the table of a reference column. |
-| column | [string](#string) | | The column is the name of a reference column. |
-
-
-
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-DependencyTable"></a>
-### DependencyTable
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema is the schema of a reference table. |
-| table | [string](#string) | | The table is the name of a reference table. |
+<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>
+### PlanCheckRun.Result.Type
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| STATEMENT_ADVISE | 1 | |
+| STATEMENT_SUMMARY_REPORT | 2 | |
+| GHOST_SYNC | 3 | |
-<a name="bytebase-v1-DiffSchemaRequest"></a>
-### DiffSchemaRequest
+<a name="bytebase-v1-PlanCheckRun-Status"></a>
+### PlanCheckRun.Status
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database or changelog. Format: database: instances/{instance}/databases/{database} changelog: instances/{instance}/databases/{database}/changelogs/{changelog} |
-| schema | [string](#string) | | The target schema. |
-| changelog | [string](#string) | | The resource name of the changelog Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| RUNNING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
+| CANCELED | 4 | |
+
+
+<a name="bytebase-v1-PlanService"></a>
-<a name="bytebase-v1-DiffSchemaResponse"></a>
+### PlanService
+PlanService manages deployment plans for database changes.
-### DiffSchemaResponse
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
+| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
+| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |
+| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |
+| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
+| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | |
+<a name="v1_issue_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/issue_service.proto
+<a name="bytebase-v1-ApprovalFlow"></a>
-<a name="bytebase-v1-DimensionConstraint"></a>
+### ApprovalFlow
-### DimensionConstraint
-DimensionConstraint defines constraints for a spatial dimension.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| dimension | [string](#string) | | Dimension name/type (X, Y, Z, M, etc.) |
-| min_value | [double](#double) | | Minimum value for this dimension |
-| max_value | [double](#double) | | Maximum value for this dimension |
-| tolerance | [double](#double) | | Tolerance for this dimension |
+| roles | [string](#string) | repeated | The roles required for approval in order. |
-<a name="bytebase-v1-DimensionalConfig"></a>
+<a name="bytebase-v1-ApprovalTemplate"></a>
+
+### ApprovalTemplate
-### DimensionalConfig
-DimensionalConfig defines dimensional and constraint parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| dimensions | [int32](#int32) | | Number of dimensions (2-4, default 2) |
-| data_type | [string](#string) | | Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) |
-| srid | [int32](#int32) | | Spatial reference system identifier (SRID) |
-| constraints | [DimensionConstraint](#bytebase-v1-DimensionConstraint) | repeated | Coordinate system constraints |
+| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | The approval flow definition. |
+| title | [string](#string) | | The title of the approval template. |
+| description | [string](#string) | | The description of the approval template. |
-<a name="bytebase-v1-EnumTypeMetadata"></a>
+<a name="bytebase-v1-ApproveIssueRequest"></a>
-### EnumTypeMetadata
+### ApproveIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of a type. |
-| values | [string](#string) | repeated | The enum values of a type. |
-| comment | [string](#string) | | The comment describing the enum type. |
-| skip_dump | [bool](#bool) | | Whether to skip this enum type during schema dump operations. |
+| name | [string](#string) | | The name of the issue to add an approver. Format: projects/{project}/issues/{issue} |
+| comment | [string](#string) | | The comment explaining the approval decision. |
-<a name="bytebase-v1-EventMetadata"></a>
+<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>
-### EventMetadata
+### BatchUpdateIssuesStatusRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the event. |
-| definition | [string](#string) | | The schedule of the event. |
-| time_zone | [string](#string) | | The time zone of the event. |
-| sql_mode | [string](#string) | | The SQL mode setting for the event. |
-| character_set_client | [string](#string) | | The character set used by the client creating the event. |
-| collation_connection | [string](#string) | | The collation used for the connection when creating the event. |
-| comment | [string](#string) | | The comment is the comment of an event. |
+| parent | [string](#string) | | The parent resource shared by all issues being updated. Format: projects/{project} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the status of databases for now. |
+| issues | [string](#string) | repeated | The list of issues to update. Format: projects/{project}/issues/{issue} |
+| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The new status. |
+| reason | [string](#string) | | The reason for the status change. |
-<a name="bytebase-v1-ExtensionMetadata"></a>
+<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>
-### ExtensionMetadata
-ExtensionMetadata is the metadata for extensions.
+### BatchUpdateIssuesStatusResponse
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of an extension. |
-| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |
-| version | [string](#string) | | The version is the version of an extension. |
-| description | [string](#string) | | The description is the description of an extension. |
-
-<a name="bytebase-v1-ExternalTableMetadata"></a>
+<a name="bytebase-v1-CreateIssueCommentRequest"></a>
-### ExternalTableMetadata
+### CreateIssueCommentRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a external table. |
-| external_server_name | [string](#string) | | The external_server_name is the name of the external server. |
-| external_database_name | [string](#string) | | The external_database_name is the name of the external database. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a foreign table. |
+| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |
-<a name="bytebase-v1-ForeignKeyMetadata"></a>
+<a name="bytebase-v1-CreateIssueRequest"></a>
+
+### CreateIssueRequest
-### ForeignKeyMetadata
-ForeignKeyMetadata is the metadata for foreign keys.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a foreign key. |
-| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |
-| referenced_schema | [string](#string) | | The referenced_schema is the referenced schema name of a foreign key. It is an empty string for databases without such concept such as MySQL. |
-| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |
-| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |
-| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |
-| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |
-| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It&#39;s empty string for other databases. |
+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
+| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |
-<a name="bytebase-v1-FunctionMetadata"></a>
+<a name="bytebase-v1-GetIssueRequest"></a>
+
+### GetIssueRequest
-### FunctionMetadata
-FunctionMetadata is the metadata for functions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a function. |
-| definition | [string](#string) | | The definition is the definition of a function. |
-| signature | [string](#string) | | The signature is the name with the number and type of input arguments the function takes. |
-| character_set_client | [string](#string) | | MySQL specific metadata. |
-| collation_connection | [string](#string) | | |
-| database_collation | [string](#string) | | |
-| sql_mode | [string](#string) | | |
-| comment | [string](#string) | | |
-| dependency_tables | [DependencyTable](#bytebase-v1-DependencyTable) | repeated | The dependency_tables is the list of dependency tables of a function. For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. |
-| skip_dump | [bool](#bool) | | |
+| name | [string](#string) | | The name of the issue to retrieve. Format: projects/{project}/issues/{issue} |
+| force | [bool](#bool) | | If set to true, bypass cache and fetch the latest data. |
-<a name="bytebase-v1-GenerationMetadata"></a>
+<a name="bytebase-v1-Issue"></a>
-### GenerationMetadata
+### Issue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| type | [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type) | | |
-| expression | [string](#string) | | |
-
+| name | [string](#string) | | The name of the issue. Format: projects/{project}/issues/{issue} |
+| title | [string](#string) | | The title of the issue. |
+| description | [string](#string) | | The description of the issue. |
+| type | [Issue.Type](#bytebase-v1-Issue-Type) | | |
+| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The status of the issue. |
+| approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |
+| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | The approval template for the issue. |
+| creator | [string](#string) | | Format: users/[email protected] |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |
+| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. |
+| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. |
+| labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. |
+| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The overall approval status for the issue. |
+| access_grant | [string](#string) | | The access grant associated with this issue. Format: projects/{project}/accessGrants/{access_grant} |
+| draft | [bool](#bool) | | Whether this issue is a Draft Review Issue. |
-<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>
-### GetDatabaseMetadataRequest
+<a name="bytebase-v1-Issue-Approver"></a>
+### Issue.Approver
+Approvers and their approval status for the issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata |
-| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - schema: the schema name, support &#34;==&#34; operator. - table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-
-For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; table.contains(&#34;table-a&#34;) schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;) The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;. The column masking level will only be returned when a table filter is used. |
-| limit | [int32](#int32) | | Limit the response size of returned table metadata per schema. For example, if the database has 3 schemas, and each schema has 100 tables, if limit is 20, then only 20 tables will be returned for each schema, total 60 tables. Default 0, means no limit. |
-
+| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |
+| principal | [string](#string) | | Format: users/[email protected] |
-<a name="bytebase-v1-GetDatabaseRequest"></a>
-### GetDatabaseRequest
+<a name="bytebase-v1-IssueComment"></a>
+### IssueComment
+A comment on an issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve. Format: instances/{instance}/databases/{database} |
-
+| name | [string](#string) | | Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} |
+| comment | [string](#string) | | The text content of the comment. |
+| payload | [string](#string) | | TODO: use struct message instead. |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| creator | [string](#string) | | Format: users/{email} |
+| approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. |
+| issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. |
+| plan_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |
+| review_submission | [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission) | | Review submission event. |
-<a name="bytebase-v1-GetDatabaseSDLSchemaRequest"></a>
-### GetDatabaseSDLSchemaRequest
+<a name="bytebase-v1-IssueComment-Approval"></a>
+### IssueComment.Approval
+Approval event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve SDL schema. Format: instances/{instance}/databases/{database}/sdlSchema |
-| format | [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat) | | The format of the SDL schema output. |
-
+| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |
-<a name="bytebase-v1-GetDatabaseSchemaRequest"></a>
-### GetDatabaseSchemaRequest
+<a name="bytebase-v1-IssueComment-IssueUpdate"></a>
+### IssueComment.IssueUpdate
+Issue update event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to retrieve schema. Format: instances/{instance}/databases/{database}/schema |
-
+| from_title | [string](#string) | optional | |
+| to_title | [string](#string) | optional | |
+| from_description | [string](#string) | optional | |
+| to_description | [string](#string) | optional | |
+| from_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
+| to_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
+| from_labels | [string](#string) | repeated | |
+| to_labels | [string](#string) | repeated | |
-<a name="bytebase-v1-GetSchemaStringRequest"></a>
-### GetSchemaStringRequest
+<a name="bytebase-v1-IssueComment-PlanUpdate"></a>
+### IssueComment.PlanUpdate
+Plan update event information (snapshot of plan.config.specs before
+and after a PlanService.UpdatePlan call that mutated specs).
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} |
-| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |
-| schema | [string](#string) | | It&#39;s empty for DATABASE. |
-| object | [string](#string) | | It&#39;s empty for DATABASE and SCHEMA. |
-| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED. Also the schema and object are empty. |
-
-
+| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
+| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
-<a name="bytebase-v1-GetSchemaStringResponse"></a>
-### GetSchemaStringResponse
+<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>
+### IssueComment.ReviewSubmission
+Review submission event information.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema_string | [string](#string) | | |
+<a name="bytebase-v1-ListIssueCommentsRequest"></a>
-<a name="bytebase-v1-GridLevel"></a>
+### ListIssueCommentsRequest
-### GridLevel
-GridLevel defines a tessellation grid level with its density.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| level | [int32](#int32) | | Grid level number (1-4 for SQL Server) |
-| density | [string](#string) | | Grid density (LOW, MEDIUM, HIGH) |
+| parent | [string](#string) | | Format: projects/{projects}/issues/{issue} |
+| page_size | [int32](#int32) | | The maximum number of issue comments to return. The service may return fewer than this value. If unspecified, at most 10 issue comments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListIssueComments` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListIssueComments` must match the call that provided the page token. |
-<a name="bytebase-v1-IndexMetadata"></a>
-### IndexMetadata
-IndexMetadata is the metadata for indexes.
+<a name="bytebase-v1-ListIssueCommentsResponse"></a>
+
+### ListIssueCommentsResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of an index. |
-| expressions | [string](#string) | repeated | The expressions are the ordered columns or expressions of an index. This could refer to a column or an expression. |
-| key_length | [int64](#int64) | repeated | The key_lengths are the ordered key lengths of an index. If the key length is not specified, it&#39;s -1. |
-| descending | [bool](#bool) | repeated | The descending is the ordered descending of an index. |
-| type | [string](#string) | | The type is the type of an index. |
-| unique | [bool](#bool) | | The unique is whether the index is unique. |
-| primary | [bool](#bool) | | The primary is whether the index is a primary key index. |
-| visible | [bool](#bool) | | The visible is whether the index is visible. |
-| comment | [string](#string) | | The comment is the comment of an index. |
-| definition | [string](#string) | | The definition of an index. |
-| parent_index_schema | [string](#string) | | The schema name of the parent index. |
-| parent_index_name | [string](#string) | | The index name of the parent index. |
-| granularity | [int64](#int64) | | The number of granules in the block. It&#39;s a ClickHouse specific field. |
-| is_constraint | [bool](#bool) | | It&#39;s a PostgreSQL specific field. The unique constraint and unique index are not the same thing in PostgreSQL. |
-| spatial_config | [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig) | | Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. |
-| opclass_names | [string](#string) | repeated | https://www.postgresql.org/docs/current/catalog-pg-opclass.html Name of the operator class for each column. (PostgreSQL specific). |
-| opclass_defaults | [bool](#bool) | repeated | True if the operator class is the default. (PostgreSQL specific). |
+| issue_comments | [IssueComment](#bytebase-v1-IssueComment) | repeated | The issue comments from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-ListDatabasesRequest"></a>
+<a name="bytebase-v1-ListIssuesRequest"></a>
-### ListDatabasesRequest
+### ListIssuesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | - projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission. - workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission. - instances/{instances}: list databases in a instance, require &#34;bb.instances.get&#34; permission |
-| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 10 databases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListDatabases` call. Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
+| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListIssues` call. Provide this to retrieve the subsequent page.
-Supported filter: - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - name: the database name, support &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator. - table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator. - labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
+When paginating, all other parameters provided to `ListIssues` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter issues returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-For example: environment == &#34;environments/{environment resource id}&#34; environment == &#34;&#34; (find databases which environment is not set) project == &#34;projects/{project resource id}&#34; instance == &#34;instances/{instance resource id}&#34; name.contains(&#34;database name&#34;) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) exclude_unassigned == true table == &#34;sample&#34; table.contains(&#34;sam&#34;) labels.environment == &#34;production&#34; labels.region == &#34;asia&#34; labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+Supported filters: - creator: issue creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values. - create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator. - risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support &#34;==&#34; operator. - current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
-You can combine filter conditions like: environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) |
-| show_deleted | [bool](#bool) | | Show deleted database if specified. |
-| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = &#34;name&#34; - order by name ascending - order_by = &#34;name desc&#34; - order_by = &#34;name desc, project asc&#34; |
+For example: creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;] status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34; labels in [&#34;label1&#34;, &#34;label2&#34;] risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;] create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; |
+| query | [string](#string) | | Query is the query statement. |
+| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
-<a name="bytebase-v1-ListDatabasesResponse"></a>
+<a name="bytebase-v1-ListIssuesResponse"></a>
-### ListDatabasesResponse
+### ListIssuesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |
+| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
@@ -3751,1262 +3679,1126 @@ You can combine filter conditions like: environment == &#34;environments/prod&#3
-<a name="bytebase-v1-MaterializedViewMetadata"></a>
+<a name="bytebase-v1-RejectIssueRequest"></a>
+
+### RejectIssueRequest
-### MaterializedViewMetadata
-MaterializedViewMetadata is the metadata for materialized views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a materialized view. |
-| definition | [string](#string) | | The definition is the definition of a materialized view. |
-| comment | [string](#string) | | The comment is the comment of a materialized view. |
-| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a materialized view. |
-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
-| skip_dump | [bool](#bool) | | |
+| name | [string](#string) | | The name of the issue to add a rejection. Format: projects/{project}/issues/{issue} |
+| comment | [string](#string) | | The comment explaining the rejection decision. |
-<a name="bytebase-v1-PackageMetadata"></a>
+<a name="bytebase-v1-RequestIssueRequest"></a>
+
+### RequestIssueRequest
-### PackageMetadata
-PackageMetadata is the metadata for packages.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a package. |
-| definition | [string](#string) | | The definition is the definition of a package. |
+| name | [string](#string) | | The name of the issue to request a issue. Format: projects/{project}/issues/{issue} |
+| comment | [string](#string) | | The comment explaining the request. |
-<a name="bytebase-v1-ProcedureMetadata"></a>
+<a name="bytebase-v1-RetryIssueApprovalRequest"></a>
+
+### RetryIssueApprovalRequest
-### ProcedureMetadata
-ProcedureMetadata is the metadata for procedures.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a procedure. |
-| definition | [string](#string) | | The definition is the definition of a procedure. |
-| signature | [string](#string) | | The signature is the name with the number and type of input arguments the procedure takes. |
-| character_set_client | [string](#string) | | MySQL specific metadata. |
-| collation_connection | [string](#string) | | |
-| database_collation | [string](#string) | | |
-| sql_mode | [string](#string) | | |
-| comment | [string](#string) | | The comment is the comment of a procedure. |
-| skip_dump | [bool](#bool) | | |
+| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |
-<a name="bytebase-v1-SchemaMetadata"></a>
+<a name="bytebase-v1-RoleGrant"></a>
+
+### RoleGrant
-### SchemaMetadata
-SchemaMetadata is the metadata for schemas.
-This is the concept of schema in Postgres, but it&#39;s a no-op for MySQL.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the schema name. It is an empty string for databases without such concept such as MySQL. |
-| tables | [TableMetadata](#bytebase-v1-TableMetadata) | repeated | The tables is the list of tables in a schema. |
-| external_tables | [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata) | repeated | The external_tables is the list of external tables in a schema. |
-| views | [ViewMetadata](#bytebase-v1-ViewMetadata) | repeated | The views is the list of views in a schema. |
-| functions | [FunctionMetadata](#bytebase-v1-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |
-| procedures | [ProcedureMetadata](#bytebase-v1-ProcedureMetadata) | repeated | The procedures is the list of procedures in a schema. |
-| streams | [StreamMetadata](#bytebase-v1-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |
-| tasks | [TaskMetadata](#bytebase-v1-TaskMetadata) | repeated | The routines is the list of routines in a schema, currently, only used for Snowflake. |
-| materialized_views | [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata) | repeated | The materialized_views is the list of materialized views in a schema. |
-| packages | [PackageMetadata](#bytebase-v1-PackageMetadata) | repeated | The packages is the list of packages in a schema. |
-| owner | [string](#string) | | The owner of the schema. |
-| sequences | [SequenceMetadata](#bytebase-v1-SequenceMetadata) | repeated | The sequences is the list of sequences in a schema, sorted by name. |
-| events | [EventMetadata](#bytebase-v1-EventMetadata) | repeated | The events is the list of scheduled events in a schema. |
-| enum_types | [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata) | repeated | The enum_types is the list of user-defined enum types in a schema. |
-| skip_dump | [bool](#bool) | | Whether to skip this schema during schema dump operations. |
-| comment | [string](#string) | | The comment is the comment of a schema. |
-| composite_types | [CompositeTypeMetadata](#bytebase-v1-CompositeTypeMetadata) | repeated | The composite_types is the list of user-defined composite types in a schema (PostgreSQL family, CREATE TYPE ... AS). Excludes table/view row types and derived types. |
+| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |
+| user | [string](#string) | | The user to be granted. Format: users/{email}. |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |
+| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |
-<a name="bytebase-v1-SequenceMetadata"></a>
+<a name="bytebase-v1-SearchIssuesRequest"></a>
-### SequenceMetadata
+### SearchIssuesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of a sequence. |
-| data_type | [string](#string) | | The data type of a sequence. |
-| start | [string](#string) | | The start value of a sequence. |
-| min_value | [string](#string) | | The minimum value of a sequence. |
-| max_value | [string](#string) | | The maximum value of a sequence. |
-| increment | [string](#string) | | Increment value of a sequence. |
-| cycle | [bool](#bool) | | Cycle is whether the sequence cycles. |
-| cache_size | [string](#string) | | Cache size of a sequence. |
-| last_value | [string](#string) | | Last value of a sequence. |
-| owner_table | [string](#string) | | The owner table of the sequence. |
-| owner_column | [string](#string) | | The owner column of the sequence. |
-| comment | [string](#string) | | The comment describing the sequence. |
-| skip_dump | [bool](#bool) | | Whether to skip this sequence during schema dump operations. |
+| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use &#34;projects/-&#34; to list all issues from all projects. |
+| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `SearchIssues` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `SearchIssues` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter issues returned in the list. Check the filter field in the ListIssuesRequest message. |
+| query | [string](#string) | | Query is the query statement. |
+| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
-<a name="bytebase-v1-SpatialIndexConfig"></a>
-### SpatialIndexConfig
-SpatialIndexConfig defines the spatial index configuration for spatial databases.
+<a name="bytebase-v1-SearchIssuesResponse"></a>
+
+### SearchIssuesResponse
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| method | [string](#string) | | Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) |
-| tessellation | [TessellationConfig](#bytebase-v1-TessellationConfig) | | Tessellation configuration for grid-based spatial indexes |
-| storage | [StorageConfig](#bytebase-v1-StorageConfig) | | Storage and performance configuration |
-| dimensional | [DimensionalConfig](#bytebase-v1-DimensionalConfig) | | Dimensional configuration |
+| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-StorageConfig"></a>
+<a name="bytebase-v1-UpdateIssueCommentRequest"></a>
+
+### UpdateIssueCommentRequest
-### StorageConfig
-StorageConfig defines storage and performance parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| fillfactor | [int32](#int32) | | Fill factor percentage (1-100) |
-| buffering | [string](#string) | | Buffering mode for PostgreSQL (auto, on, off) |
-| tablespace | [string](#string) | | Tablespace configuration for Oracle |
-| work_tablespace | [string](#string) | | |
-| sdo_level | [int32](#int32) | | |
-| commit_interval | [int32](#int32) | | |
-| pad_index | [bool](#bool) | | SQL Server specific parameters |
-| sort_in_tempdb | [string](#string) | | ON, OFF |
-| drop_existing | [bool](#bool) | | |
-| online | [bool](#bool) | | |
-| allow_row_locks | [bool](#bool) | | |
-| allow_page_locks | [bool](#bool) | | |
-| maxdop | [int32](#int32) | | |
-| data_compression | [string](#string) | | NONE, ROW, PAGE |
+| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
+| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to update. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the issue comment is not found, a new issue comment will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-StreamMetadata"></a>
+<a name="bytebase-v1-UpdateIssueRequest"></a>
-### StreamMetadata
+### UpdateIssueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a stream. |
-| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |
-| owner | [string](#string) | | The owner of the stream. |
-| comment | [string](#string) | | The comment of the stream. |
-| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |
-| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |
-| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |
-| definition | [string](#string) | | The definition of the stream. |
+| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.
+
+The issue&#39;s `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |
+
-<a name="bytebase-v1-SyncDatabaseRequest"></a>
-### SyncDatabaseRequest
+<a name="bytebase-v1-Issue-Approver-Status"></a>
+
+### Issue.Approver.Status
+The approval status of an approver.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| PENDING | 1 | Awaiting approval. |
+| APPROVED | 2 | Approved. |
+| REJECTED | 3 | Rejected. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} |
+<a name="bytebase-v1-Issue-Type"></a>
+### Issue.Type
+The type of issue.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified issue type. |
+| DATABASE_CHANGE | 1 | Database schema or data change. |
+| ROLE_GRANT | 2 | Role grant request. |
+| DATABASE_EXPORT | 3 | Database data export request. |
+| ACCESS_GRANT | 4 | Temporary access grant request. |
+<a name="bytebase-v1-IssueComment-Approval-Status"></a>
-<a name="bytebase-v1-SyncDatabaseResponse"></a>
+### IssueComment.Approval.Status
+Approval status values.
-### SyncDatabaseResponse
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified status. |
+| PENDING | 1 | Approval pending. |
+| APPROVED | 2 | Approved. |
+| REJECTED | 3 | Rejected. |
+
+
+<a name="bytebase-v1-IssueService"></a>
+### IssueService
+IssueService manages issues for tracking database changes and tasks.
-<a name="bytebase-v1-TableMetadata"></a>
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetIssue | [GetIssueRequest](#bytebase-v1-GetIssueRequest) | [Issue](#bytebase-v1-Issue) | Retrieves an issue by name. Permissions required: bb.issues.get |
+| CreateIssue | [CreateIssueRequest](#bytebase-v1-CreateIssueRequest) | [Issue](#bytebase-v1-Issue) | Creates a new issue for database changes or tasks. Permissions required: bb.issues.create |
+| ListIssues | [ListIssuesRequest](#bytebase-v1-ListIssuesRequest) | [ListIssuesResponse](#bytebase-v1-ListIssuesResponse) | Lists issues in a project. Permissions required: bb.issues.list |
+| SearchIssues | [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest) | [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse) | Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.issues.get |
+| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue&#39;s properties such as title, description, or labels. Permissions required: bb.issues.update |
+| ListIssueComments | [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest) | [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse) | Lists comments on an issue. Permissions required: bb.issueComments.list |
+| CreateIssueComment | [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Adds a comment to an issue. Permissions required: bb.issueComments.create |
+| UpdateIssueComment | [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Updates an existing issue comment. Permissions required: bb.issueComments.update |
+| BatchUpdateIssuesStatus | [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest) | [BatchUpdateIssuesStatusResponse](#bytebase-v1-BatchUpdateIssuesStatusResponse) | Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update |
+| ApproveIssue | [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest) | [Issue](#bytebase-v1-Issue) | Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
+| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
+| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
+| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | Re-runs approval-template finding for an issue stuck in CHECKING. Useful when the synchronous post-create finding errored (e.g. against a malformed workspace approval rule) and the operator has since corrected it — without this, the issue would remain in CHECKING indefinitely because there is no other retry path for non-DATABASE_CHANGE issue types. Idempotent: returns the existing issue unchanged when approval-finding has already completed. Permissions required: None (caller must be the issue creator; mirrors RequestIssue&#39;s authorization model). |
-### TableMetadata
-TableMetadata is the metadata for tables.
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
-| engine | [string](#string) | | The engine is the engine of a table. |
-| collation | [string](#string) | | The collation is the collation of a table. |
-| charset | [string](#string) | | The character set of table. |
-| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |
-| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |
-| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |
-| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |
-| create_options | [string](#string) | | The create_options is the create option of a table. |
-| comment | [string](#string) | | The comment is the comment of a table. |
-| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |
-| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |
-| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | The check_constraints is the list of check constraints in a table. |
-| owner | [string](#string) | | The owner of the table. |
-| sorting_keys | [string](#string) | repeated | The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field. Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by |
-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers associated with the table. |
-| skip_dump | [bool](#bool) | | Whether to skip this table during schema dump operations. |
-| sharding_info | [string](#string) | | https://docs.pingcap.com/tidb/stable/information-schema-tables/ |
-| primary_key_type | [string](#string) | | https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes CLUSTERED or NONCLUSTERED. |
+<a name="v1_setting_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/setting_service.proto
+<a name="bytebase-v1-AISetting"></a>
-<a name="bytebase-v1-TablePartitionMetadata"></a>
+### AISetting
-### TablePartitionMetadata
-TablePartitionMetadata is the metadata for table partitions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a table partition. |
-| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |
-| expression | [string](#string) | | The expression is the expression of a table partition. For PostgreSQL, the expression is the text of {FOR VALUES partition_bound_spec}, see https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL, the expression is the `expr` or `column_list` of the following syntax. PARTITION BY { [LINEAR] HASH(expr) | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list) | RANGE{(expr) | COLUMNS(column_list)} | LIST{(expr) | COLUMNS(column_list)} }. |
-| value | [string](#string) | | The value is the value of a table partition. For MySQL, the value is for RANGE and LIST partition types, - For a RANGE partition, it contains the value set in the partition&#39;s VALUES LESS THAN clause, which can be either an integer or MAXVALUE. - For a LIST partition, this column contains the values defined in the partition&#39;s VALUES IN clause, which is a list of comma-separated integer values. - For others, it&#39;s an empty string. |
-| use_default | [string](#string) | | The use_default is whether the users use the default partition, it stores the different value for different database engines. For MySQL, it&#39;s [INT] type, 0 means not use default partition, otherwise, it&#39;s equals to number in syntax [SUB]PARTITION {number}. |
-| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |
-| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | |
-| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | |
+| enabled | [bool](#bool) | | |
+| provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | |
+| endpoint | [string](#string) | | |
+| api_key | [string](#string) | | |
+| model | [string](#string) | | |
+| version | [string](#string) | | |
-<a name="bytebase-v1-TaskMetadata"></a>
+<a name="bytebase-v1-Algorithm"></a>
-### TaskMetadata
+### Algorithm
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a task. |
-| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |
-| owner | [string](#string) | | The owner of the task. |
-| comment | [string](#string) | | The comment of the task. |
-| warehouse | [string](#string) | | The warehouse of the task. |
-| schedule | [string](#string) | | The schedule interval of the task. |
-| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |
-| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |
-| condition | [string](#string) | | The condition of the task. |
-| definition | [string](#string) | | The definition of the task. |
+| full_mask | [Algorithm.FullMask](#bytebase-v1-Algorithm-FullMask) | | |
+| range_mask | [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask) | | |
+| md5_mask | [Algorithm.MD5Mask](#bytebase-v1-Algorithm-MD5Mask) | | |
+| inner_outer_mask | [Algorithm.InnerOuterMask](#bytebase-v1-Algorithm-InnerOuterMask) | | |
-<a name="bytebase-v1-TessellationConfig"></a>
+<a name="bytebase-v1-Algorithm-FullMask"></a>
+
+### Algorithm.FullMask
-### TessellationConfig
-TessellationConfig defines tessellation parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| scheme | [string](#string) | | Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) |
-| grid_levels | [GridLevel](#bytebase-v1-GridLevel) | repeated | Grid levels and densities for multi-level tessellation |
-| cells_per_object | [int32](#int32) | | Number of cells per object (1-8192 for SQL Server) |
-| bounding_box | [BoundingBox](#bytebase-v1-BoundingBox) | | Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) |
+| substitution | [string](#string) | | substitution is the string used to replace the original value, the max length of the string is 16 bytes. |
-<a name="bytebase-v1-TriggerMetadata"></a>
+<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>
-### TriggerMetadata
+### Algorithm.InnerOuterMask
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of the trigger. |
-| event | [string](#string) | | The event is the event of the trigger, such as INSERT, UPDATE, DELETE, TRUNCATE. |
-| timing | [string](#string) | | The timing is the timing of the trigger, such as BEFORE, AFTER. |
-| body | [string](#string) | | The body is the body of the trigger. |
-| sql_mode | [string](#string) | | The SQL mode setting for the trigger. |
-| character_set_client | [string](#string) | | The character set used by the client creating the trigger. |
-| collation_connection | [string](#string) | | The collation used for the connection when creating the trigger. |
-| comment | [string](#string) | | The comment describing the trigger. |
-| skip_dump | [bool](#bool) | | Whether to skip this trigger during schema dump operations. |
+| prefix_len | [int32](#int32) | | |
+| suffix_len | [int32](#int32) | | |
+| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |
+| substitution | [string](#string) | | |
-<a name="bytebase-v1-UpdateDatabaseRequest"></a>
+<a name="bytebase-v1-Algorithm-MD5Mask"></a>
-### UpdateDatabaseRequest
+### Algorithm.MD5Mask
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database | [Database](#bytebase-v1-Database) | | The database to update.
+| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |
-The database&#39;s `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the database is not found, a new database will be created. In this situation, `update_mask` is ignored. |
+<a name="bytebase-v1-Algorithm-RangeMask"></a>
-<a name="bytebase-v1-ViewMetadata"></a>
+### Algorithm.RangeMask
-### ViewMetadata
-ViewMetadata is the metadata for views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the name of a view. |
-| definition | [string](#string) | | The definition is the definition of a view. |
-| comment | [string](#string) | | The comment is the comment of a view. |
-| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a view. |
-| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
-| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers in a view. |
-| skip_dump | [bool](#bool) | | |
-
-
-
-
+| slices | [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice) | repeated | We store it as a repeated field to face the fact that the original value may have multiple parts should be masked. But frontend can be started with a single rule easily. |
-
-<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>
-### ColumnMetadata.IdentityGeneration
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| IDENTITY_GENERATION_UNSPECIFIED | 0 | |
-| ALWAYS | 1 | |
-| BY_DEFAULT | 2 | |
+<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>
+### Algorithm.RangeMask.Slice
-<a name="bytebase-v1-GenerationMetadata-Type"></a>
-### GenerationMetadata.Type
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| start | [int32](#int32) | | start is the start character index (0-based) of the original value, should be less than end. Uses character indices (not byte offsets) for display-oriented masking. Example: For &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). |
+| end | [int32](#int32) | | end is the end character index (exclusive) of the original value. Uses character indices (not byte offsets) for display-oriented masking. |
+| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| VIRTUAL | 1 | |
-| STORED | 2 | |
-<a name="bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat"></a>
-### GetDatabaseSDLSchemaRequest.SDLFormat
-SDLFormat specifies the output format for SDL schema.
+<a name="bytebase-v1-Announcement"></a>
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SDL_FORMAT_UNSPECIFIED | 0 | Unspecified format. Defaults to SINGLE_FILE. |
-| SINGLE_FILE | 1 | Single file format: returns the complete SDL schema as a single file. |
-| MULTI_FILE | 2 | Multi-file format: returns the SDL schema as a ZIP archive containing multiple files organized by schema objects (tables, views, functions, etc.). |
+### Announcement
-<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| text | [string](#string) | | The text of announcement |
+| link | [string](#string) | | The optional link, user can follow the link to check extra details |
+| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |
-### GetSchemaStringRequest.ObjectType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| OBJECT_TYPE_UNSPECIFIED | 0 | |
-| DATABASE | 1 | |
-| SCHEMA | 2 | |
-| TABLE | 3 | |
-| VIEW | 4 | |
-| MATERIALIZED_VIEW | 5 | |
-| FUNCTION | 6 | |
-| PROCEDURE | 7 | |
-| SEQUENCE | 8 | |
-<a name="bytebase-v1-StreamMetadata-Mode"></a>
+<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>
-### StreamMetadata.Mode
+### Announcement.AnnouncementTheme
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MODE_UNSPECIFIED | 0 | |
-| DEFAULT | 1 | |
-| APPEND_ONLY | 2 | |
-| INSERT_ONLY | 3 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| background | [google.type.Color](#google-type-Color) | | |
+| text | [google.type.Color](#google-type-Color) | | |
-<a name="bytebase-v1-StreamMetadata-Type"></a>
-### StreamMetadata.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| DELTA | 1 | |
+<a name="bytebase-v1-AppIMSetting"></a>
+### AppIMSetting
-<a name="bytebase-v1-SyncStatus"></a>
-### SyncStatus
-SyncStatus is the status of the database sync operation.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SYNC_STATUS_UNSPECIFIED | 0 | |
-| OK | 1 | The database was synced successfully. |
-| FAILED | 2 | The database sync failed. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |
-<a name="bytebase-v1-TablePartitionMetadata-Type"></a>
-### TablePartitionMetadata.Type
-Type is the type of a table partition, some database engines may not
-support all types. Only avilable for the following database engines now:
-MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,
-LINEAR_KEY
-(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:
-RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,
-LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| RANGE | 1 | |
-| RANGE_COLUMNS | 2 | |
-| LIST | 3 | |
-| LIST_COLUMNS | 4 | |
-| HASH | 5 | |
-| LINEAR_HASH | 6 | |
-| KEY | 7 | |
-| LINEAR_KEY | 8 | |
+<a name="bytebase-v1-AppIMSetting-DingTalk"></a>
+### AppIMSetting.DingTalk
-<a name="bytebase-v1-TaskMetadata-State"></a>
-### TaskMetadata.State
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| client_id | [string](#string) | | |
+| client_secret | [string](#string) | | |
+| robot_code | [string](#string) | | |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATE_UNSPECIFIED | 0 | |
-| STARTED | 1 | |
-| SUSPENDED | 2 | |
-
-
-<a name="bytebase-v1-DatabaseService"></a>
+<a name="bytebase-v1-AppIMSetting-Feishu"></a>
-### DatabaseService
-DatabaseService manages databases and their schemas.
+### AppIMSetting.Feishu
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | Retrieves a database by name. Permissions required: bb.databases.get |
-| BatchGetDatabases | [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest) | [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse) | Retrieves multiple databases by their names. Permissions required: bb.databases.get |
-| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent) |
-| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | Updates database properties such as labels and project assignment. Permissions required: bb.databases.update |
-| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | Updates multiple databases in a single batch operation. Permissions required: bb.databases.update |
-| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | Synchronizes database schema from the instance. Permissions required: bb.databases.sync |
-| BatchSyncDatabases | [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest) | [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse) | Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync |
-| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema |
-| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |
-| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |
-| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |
-| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
-<a name="v1_query_history_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/query_history_service.proto
-<a name="bytebase-v1-GetQueryHistoryRequest"></a>
+<a name="bytebase-v1-AppIMSetting-IMSetting"></a>
-### GetQueryHistoryRequest
+### AppIMSetting.IMSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the query history to retrieve. Format: projects/{project}/queryHistories/{id} |
+| type | [WebhookType](#bytebase-v1-WebhookType) | | |
+| slack | [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack) | | |
+| feishu | [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu) | | |
+| wecom | [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom) | | |
+| lark | [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark) | | |
+| dingtalk | [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk) | | |
+| teams | [AppIMSetting.Teams](#bytebase-v1-AppIMSetting-Teams) | | |
-<a name="bytebase-v1-ListQueryHistoriesRequest"></a>
+<a name="bytebase-v1-AppIMSetting-Lark"></a>
-### ListQueryHistoriesRequest
+### AppIMSetting.Lark
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project whose query histories are listed. Format: projects/{project} Use &#34;projects/-&#34; to list query histories across all projects (https://google.aip.dev/159); this requires the bb.queryHistories.list permission on the workspace. |
-| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistories` call. Provide this to retrieve the subsequent page. |
-| filter | [string](#string) | | Filter is the filter to apply on the list query histories. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - creator: the user full name in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
-
-For example: creator == &#34;users/{email}&#34; |
+| app_id | [string](#string) | | |
+| app_secret | [string](#string) | | |
-<a name="bytebase-v1-ListQueryHistoriesResponse"></a>
+<a name="bytebase-v1-AppIMSetting-Slack"></a>
-### ListQueryHistoriesResponse
+### AppIMSetting.Slack
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of query histories. |
-| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistories` method to retrieve the next page of history. |
+| token | [string](#string) | | |
-<a name="bytebase-v1-QueryHistory"></a>
+<a name="bytebase-v1-AppIMSetting-Teams"></a>
-### QueryHistory
+### AppIMSetting.Teams
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name for the query history. Format: projects/{project}/queryHistories/{id} |
-| database | [string](#string) | | The database name to execute the query. Format: instances/{instance}/databases/{databaseName} |
-| creator | [string](#string) | | |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| statement | [string](#string) | | |
-| error | [string](#string) | optional | |
-| duration | [google.protobuf.Duration](#google-protobuf-Duration) | | |
-| type | [QueryHistory.Type](#bytebase-v1-QueryHistory-Type) | | |
+| tenant_id | [string](#string) | | Azure AD tenant ID (Directory ID). |
+| client_id | [string](#string) | | Azure AD application (client) ID. |
+| client_secret | [string](#string) | | Azure AD client secret. |
-<a name="bytebase-v1-SearchQueryHistoriesRequest"></a>
+<a name="bytebase-v1-AppIMSetting-Wecom"></a>
-### SearchQueryHistoriesRequest
+### AppIMSetting.Wecom
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project to search query histories in. Format: projects/{project} The AIP-159 wildcard &#34;projects/-&#34; is not supported; use ListQueryHistories for cross-project reads. |
-| page_size | [int32](#int32) | | The maximum number of histories to return. The service may return fewer than this value. If unspecified, at most 10 history entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListQueryHistory` call. Provide this to retrieve the subsequent page. |
-| filter | [string](#string) | | Filter is the filter to apply on the search query history The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator. - statement: the SQL statement, support &#34;.contains()&#34; operator.
-
-For example: project == &#34;projects/{project}&#34; database == &#34;instances/{instance}/databases/{database}&#34; instance == &#34;instances/{instance}&#34; type == &#34;QUERY&#34; type == &#34;EXPORT&#34; statement.contains(&#34;select&#34;) type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) |
+| corp_id | [string](#string) | | |
+| agent_id | [string](#string) | | |
+| secret | [string](#string) | | |
-<a name="bytebase-v1-SearchQueryHistoriesResponse"></a>
+<a name="bytebase-v1-DataClassificationSetting"></a>
-### SearchQueryHistoriesResponse
+### DataClassificationSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| query_histories | [QueryHistory](#bytebase-v1-QueryHistory) | repeated | The list of history. |
-| next_page_token | [string](#string) | | A token to retrieve next page of history. Pass this value in the page_token field in the subsequent call to `ListQueryHistory` method to retrieve the next page of history. |
+| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |
-
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>
-<a name="bytebase-v1-QueryHistory-Type"></a>
+### DataClassificationSetting.DataClassificationConfig
-### QueryHistory.Type
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified query history type. |
-| QUERY | 1 | Query execution for data retrieval. |
-| EXPORT | 2 | Data export operation to file. |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | id is the uuid for classification. Each project can chose one classification config. |
+| title | [string](#string) | | |
+| levels | [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level) | repeated | levels is user defined level list for classification. |
+| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-
-
-<a name="bytebase-v1-QueryHistoryService"></a>
-### QueryHistoryService
-QueryHistoryService manages query history records of SQL Editor queries and exports.
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>
+
+### DataClassificationSetting.DataClassificationConfig.ClassificationEntry
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. Permissions required: None (only returns caller&#39;s own query histories) |
-| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | ListQueryHistories lists query histories of all users in a project. Permissions required: bb.queryHistories.list |
-| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | GetQueryHistory gets a single query history for the caller. Permissions required: None (only returns the caller&#39;s own query history) |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |
-<a name="v1_sql_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/sql_service.proto
-<a name="bytebase-v1-AICompletionRequest"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>
-### AICompletionRequest
+### DataClassificationSetting.DataClassificationConfig.DataClassification
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| messages | [AICompletionRequest.Message](#bytebase-v1-AICompletionRequest-Message) | repeated | |
+| id | [string](#string) | | id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
+| title | [string](#string) | | |
+| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |
-<a name="bytebase-v1-AICompletionRequest-Message"></a>
+<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>
-### AICompletionRequest.Message
+### DataClassificationSetting.DataClassificationConfig.Level
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | |
-| content | [string](#string) | | |
+| title | [string](#string) | | |
+| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |
-<a name="bytebase-v1-AICompletionResponse"></a>
+<a name="bytebase-v1-EmailSetting"></a>
-### AICompletionResponse
+### EmailSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| candidates | [AICompletionResponse.Candidate](#bytebase-v1-AICompletionResponse-Candidate) | repeated | candidates is used for results with multiple choices and candidates. Used for OpenAI and Gemini. |
+| from | [string](#string) | | |
+| from_name | [string](#string) | | |
+| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |
+| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |
-<a name="bytebase-v1-AICompletionResponse-Candidate"></a>
+<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>
-### AICompletionResponse.Candidate
+### EmailSetting.SMTPConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [AICompletionResponse.Candidate.Content](#bytebase-v1-AICompletionResponse-Candidate-Content) | | |
+| host | [string](#string) | | |
+| port | [int32](#int32) | | |
+| username | [string](#string) | | |
+| password | [string](#string) | | |
+| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |
+| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |
-<a name="bytebase-v1-AICompletionResponse-Candidate-Content"></a>
+<a name="bytebase-v1-EnvironmentSetting"></a>
-### AICompletionResponse.Candidate.Content
+### EnvironmentSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parts | [AICompletionResponse.Candidate.Content.Part](#bytebase-v1-AICompletionResponse-Candidate-Content-Part) | repeated | parts is used for a result content with multiple parts. |
+| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |
-<a name="bytebase-v1-AICompletionResponse-Candidate-Content-Part"></a>
+<a name="bytebase-v1-EnvironmentSetting-Environment"></a>
-### AICompletionResponse.Candidate.Content.Part
+### EnvironmentSetting.Environment
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| text | [string](#string) | | |
+| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |
+| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| title | [string](#string) | | The display name of the environment. |
+| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |
+| color | [google.type.Color](#google-type-Color) | | |
-<a name="bytebase-v1-AdminExecuteRequest"></a>
+<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>
-### AdminExecuteRequest
+### EnvironmentSetting.Environment.TagsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| schema | [string](#string) | optional | The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres. |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
-
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-AdminExecuteResponse"></a>
-### AdminExecuteResponse
+<a name="bytebase-v1-GetSettingRequest"></a>
+### GetSettingRequest
+The request message for getting a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-
+| name | [string](#string) | | The resource name of the setting. |
-<a name="bytebase-v1-Advice"></a>
-### Advice
+<a name="bytebase-v1-GetSettingResponse"></a>
+### GetSettingResponse
+The response message for getting a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | The advice level. |
-| code | [int32](#int32) | | The advice code. |
-| title | [string](#string) | | The advice title. |
-| content | [string](#string) | | The advice content. |
-| start_position | [Position](#bytebase-v1-Position) | | The start_position is inclusive and the end_position is exclusive. TODO: use range instead |
-| end_position | [Position](#bytebase-v1-Position) | | |
-| rule_type | [Advice.RuleType](#bytebase-v1-Advice-RuleType) | | The type of linting rule that generated this advice. |
+| setting | [Setting](#bytebase-v1-Setting) | | |
-<a name="bytebase-v1-DiffMetadataRequest"></a>
+<a name="bytebase-v1-ListSettingsRequest"></a>
-### DiffMetadataRequest
+### ListSettingsRequest
+
+
+
+
+
+
+
+<a name="bytebase-v1-ListSettingsResponse"></a>
+
+### ListSettingsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
+| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |
-<a name="bytebase-v1-DiffMetadataResponse"></a>
+<a name="bytebase-v1-SQLEditorThemeSetting"></a>
-### DiffMetadataResponse
+### SQLEditorThemeSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | The diff of the metadata. |
+| id | [string](#string) | | |
+| name | [string](#string) | | |
+| monaco_base | [string](#string) | | |
+| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | CSS token colors. |
-<a name="bytebase-v1-ExportRequest"></a>
+<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>
-### ExportRequest
+### SQLEditorThemeSetting.TokensEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the resource name to execute the export against. Format: instances/{instance}/databases/{database} Format: instances/{instance} Format: projects/{project}/plans/{plan}/rollout Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
-| admin | [bool](#bool) | | The admin is used for workspace owner and DBA for exporting data from SQL Editor Admin mode. The exported data is not masked. |
-| password | [string](#string) | | The zip password provide by users. |
-| data_source_id | [string](#string) | | The id of data source. If omitted, Export resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to export from the admin data source or a specific read-only data source. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
+| key | [string](#string) | | |
+| value | [google.type.Color](#google-type-Color) | | |
-<a name="bytebase-v1-ExportResponse"></a>
+<a name="bytebase-v1-SemanticTypeSetting"></a>
-### ExportResponse
+### SemanticTypeSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [bytes](#bytes) | | The export file content. |
-| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this export, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |
+| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |
-<a name="bytebase-v1-MaskingReason"></a>
+<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>
-### MaskingReason
+### SemanticTypeSetting.SemanticType
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| semantic_type_id | [string](#string) | | The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). |
-| semantic_type_title | [string](#string) | | Human-readable semantic type title. |
-| masking_rule_id | [string](#string) | | The masking rule ID that matched (if applicable). |
-| algorithm | [string](#string) | | The masking algorithm used. |
-| context | [string](#string) | | Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). |
-| classification_level | [int32](#int32) | | The classification level that triggered masking. |
-| semantic_type_icon | [string](#string) | | Icon associated with the semantic type (if any). |
-
+| id | [string](#string) | | id is the uuid for semantic type. |
+| title | [string](#string) | | the title of the semantic type, it should not be empty. |
+| description | [string](#string) | | the description of the semantic type, it can be empty. |
+| algorithm | [Algorithm](#bytebase-v1-Algorithm) | | |
+| icon | [string](#string) | | icon is the icon for semantic type, it can be emoji or base64 encoded image. |
-<a name="bytebase-v1-QueryOption"></a>
-### QueryOption
+<a name="bytebase-v1-Setting"></a>
+### Setting
+The schema of setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| redis_run_commands_on | [QueryOption.RedisRunCommandsOn](#bytebase-v1-QueryOption-RedisRunCommandsOn) | | |
-| mssql_explain_format | [QueryOption.MSSQLExplainFormat](#bytebase-v1-QueryOption-MSSQLExplainFormat) | | |
-
+| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: &#34;settings/SEMANTIC_TYPES&#34; |
+| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |
-<a name="bytebase-v1-QueryRequest"></a>
-### QueryRequest
+<a name="bytebase-v1-SettingValue"></a>
+### SettingValue
+The data in setting value.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |
-| statement | [string](#string) | | The SQL statement to execute. |
-| limit | [int32](#int32) | | The maximum number of rows to return. |
-| data_source_id | [string](#string) | | The id of data source. If omitted, Query resolves the data source server-side by using the single read-only data source when exactly one exists, or the admin data source otherwise. It can also be set explicitly to query the admin data source or a specific read-only data source. |
-| explain | [bool](#bool) | | Explain the statement. |
-| schema | [string](#string) | optional | The default schema to search objects. Equals to the current schema in Oracle and search path in Postgres. |
-| query_option | [QueryOption](#bytebase-v1-QueryOption) | | |
-| container | [string](#string) | optional | Container is the container name to execute the query against, used for CosmosDB only. |
+| app_im | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
+| workspace_profile | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |
+| workspace_approval | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
+| data_classification | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |
+| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |
+| ai | [AISetting](#bytebase-v1-AISetting) | | |
+| environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |
+| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |
-<a name="bytebase-v1-QueryResponse"></a>
+<a name="bytebase-v1-TestEmailSettingRequest"></a>
-### QueryResponse
+### TestEmailSettingRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |
-| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this query, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |
+| parent | [string](#string) | | |
+| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |
+| to | [string](#string) | | |
-<a name="bytebase-v1-QueryResult"></a>
+<a name="bytebase-v1-TestEmailSettingResponse"></a>
-### QueryResult
+### TestEmailSettingResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| column_names | [string](#string) | repeated | Column names of the query result. |
-| column_type_names | [string](#string) | repeated | Column types of the query result. The types come from the Golang SQL driver. |
-| rows | [QueryRow](#bytebase-v1-QueryRow) | repeated | Rows of the query result. |
-| rows_count | [int64](#int64) | | |
-| error | [string](#string) | | The error message if the query failed. |
-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The time it takes to execute the query. |
-| statement | [string](#string) | | The query statement for the result. |
-| postgres_error | [QueryResult.PostgresError](#bytebase-v1-QueryResult-PostgresError) | | |
-| syntax_error | [QueryResult.SyntaxError](#bytebase-v1-QueryResult-SyntaxError) | | |
-| permission_denied | [PermissionDeniedDetail](#bytebase-v1-PermissionDeniedDetail) | | |
-| command_error | [QueryResult.CommandError](#bytebase-v1-QueryResult-CommandError) | | |
-| messages | [QueryResult.Message](#bytebase-v1-QueryResult-Message) | repeated | Informational or debug messages returned by the database engine during query execution. Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. |
-| masked | [MaskingReason](#bytebase-v1-MaskingReason) | repeated | Masking reasons for each column (empty for non-masked columns). |
+| success | [bool](#bool) | | |
+| error | [string](#string) | | |
-<a name="bytebase-v1-QueryResult-CommandError"></a>
+<a name="bytebase-v1-UpdateSettingRequest"></a>
-### QueryResult.CommandError
-Permission denied with resource information or disallowed command_type.
-Either resources or command_type is available.
+### UpdateSettingRequest
+The request message for updating or creating a setting.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| command_type | [QueryResult.CommandError.Type](#bytebase-v1-QueryResult-CommandError-Type) | | Disallowed command_type. |
+| setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |
+| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |
+| allow_missing | [bool](#bool) | | |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
-<a name="bytebase-v1-QueryResult-Message"></a>
+<a name="bytebase-v1-WorkspaceApprovalSetting"></a>
-### QueryResult.Message
+### WorkspaceApprovalSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| level | [QueryResult.Message.Level](#bytebase-v1-QueryResult-Message-Level) | | |
-| content | [string](#string) | | |
+| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
-<a name="bytebase-v1-QueryResult-PostgresError"></a>
+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>
+
+### WorkspaceApprovalSetting.Rule
-### QueryResult.PostgresError
-refer https://www.postgresql.org/docs/11/protocol-error-fields.html
-for field description.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| severity | [string](#string) | | |
-| code | [string](#string) | | |
-| message | [string](#string) | | |
-| detail | [string](#string) | | |
-| hint | [string](#string) | | |
-| position | [int32](#int32) | | |
-| internal_position | [int32](#int32) | | |
-| internal_query | [string](#string) | | |
-| where | [string](#string) | | |
-| schema_name | [string](#string) | | |
-| table_name | [string](#string) | | |
-| column_name | [string](#string) | | |
-| data_type_name | [string](#string) | | |
-| constraint_name | [string](#string) | | |
-| file | [string](#string) | | |
-| line | [int32](#int32) | | |
-| routine | [string](#string) | | |
-
-
-
-
-
+| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with the rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-<a name="bytebase-v1-QueryResult-SyntaxError"></a>
+The `source` field filters which rules apply. The `condition` field then evaluates with full context.
-### QueryResult.SyntaxError
-Syntax error with position information for editor highlighting
+All supported variables: statement.affected_rows: affected row count in the DDL/DML, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values. statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| start_position | [Position](#bytebase-v1-Position) | | Position information for highlighting in editor |
+For examples: resource.environment_id == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100 resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; |
+| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |
-<a name="bytebase-v1-QueryRow"></a>
+<a name="bytebase-v1-WorkspaceProfileSetting"></a>
-### QueryRow
+### WorkspaceProfileSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| values | [RowValue](#bytebase-v1-RowValue) | repeated | Row values of the query result. |
+| external_url | [string](#string) | | The external URL is used for sso authentication callback. |
+| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |
+| require_mfa | [bool](#bool) | | Require MFA for all users. |
+| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |
+| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
+| maximum_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for data access requests. |
+| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
+| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
+| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
+| disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) |
+| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |
+| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. |
+| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |
+| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |
+| directory_sync_token | [string](#string) | | The token for directory sync authentication. |
+| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |
+| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |
+| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |
+| sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. |
+| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |
+| allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email &#43; a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |
+| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme&#39;s uuid. Empty ⇒ default light. |
+| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme&#39;s full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |
+| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for request role. Deprecated: use just-in-time access request flows instead. |
+| mcp_capability | [WorkspaceProfileSetting.MCPCapability](#bytebase-v1-WorkspaceProfileSetting-MCPCapability) | | The maximum capability available to MCP (Model Context Protocol) sessions in this workspace, acting as an admin-set ceiling. Unset is treated as READ_WRITE for backward compatibility; DISABLED rejects all MCP connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected — omit the update mask path to leave the ceiling unset. |
-<a name="bytebase-v1-RowValue"></a>
+<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>
-### RowValue
+### WorkspaceProfileSetting.PasswordRestriction
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| null_value | [google.protobuf.NullValue](#google-protobuf-NullValue) | | |
-| bool_value | [bool](#bool) | | |
-| bytes_value | [bytes](#bytes) | | |
-| double_value | [double](#double) | | |
-| float_value | [float](#float) | | |
-| int32_value | [int32](#int32) | | |
-| int64_value | [int64](#int64) | | |
-| string_value | [string](#string) | | |
-| uint32_value | [uint32](#uint32) | | |
-| uint64_value | [uint64](#uint64) | | |
-| value_value | [google.protobuf.Value](#google-protobuf-Value) | | value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. |
-| timestamp_value | [RowValue.Timestamp](#bytebase-v1-RowValue-Timestamp) | | timestamp_value is used for the timestamp without time zone data type, meaning it only includes the timestamp without any time zone or location info. Although it may be expressed as a UTC value, it should be seen as a timestamp missing location context. |
-| timestamp_tz_value | [RowValue.TimestampTZ](#bytebase-v1-RowValue-TimestampTZ) | | timestamp_tz_value is used for the timestamptz data type, which accurately represents the timestamp with location information. |
-
+| min_length | [int32](#int32) | | min_length is the minimum length for password, should no less than 8. |
+| require_number | [bool](#bool) | | require_number requires the password must contains at least one number. |
+| require_letter | [bool](#bool) | | require_letter requires the password must contains at least one letter, regardless of upper case or lower case |
+| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. |
+| require_special_character | [bool](#bool) | | require_special_character requires the password must contains at least one special character. |
+| require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |
+| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |
-<a name="bytebase-v1-RowValue-Timestamp"></a>
+
-### RowValue.Timestamp
+<a name="bytebase-v1-AISetting-Provider"></a>
+### AISetting.Provider
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| accuracy | [int32](#int32) | | The accuracy is the number of digits after the decimal point. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| PROVIDER_UNSPECIFIED | 0 | |
+| OPEN_AI | 1 | |
+| CLAUDE | 2 | |
+| GEMINI | 3 | |
+| AZURE_OPENAI | 4 | |
+<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>
+### Algorithm.InnerOuterMask.MaskType
-<a name="bytebase-v1-RowValue-TimestampTZ"></a>
-### RowValue.TimestampTZ
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MASK_TYPE_UNSPECIFIED | 0 | |
+| INNER | 1 | |
+| OUTER | 2 | |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| google_timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| zone | [string](#string) | | Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;, &#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We retrieve the time zone information from the timestamptz field in the database. A timestamp is in UTC or epoch time, and with zone info, we can convert it to a local time string. Zone and offset are returned by time.Time.Zone() |
-| offset | [int32](#int32) | | The offset is in seconds east of UTC |
-| accuracy | [int32](#int32) | | |
+<a name="bytebase-v1-DatabaseChangeMode"></a>
+### DatabaseChangeMode
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATABASE_CHANGE_MODE_UNSPECIFIED | 0 | |
+| PIPELINE | 1 | A more advanced database change process, including custom approval workflows and other advanced features. Default to this mode. |
+| EDITOR | 2 | A simple database change process in SQL editor. Users can execute SQL directly. |
-
+<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>
-<a name="bytebase-v1-Advice-Level"></a>
+### EmailSetting.SMTPConfig.Authentication
-### Advice.Level
-Level represents the severity level of the advice.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| ADVICE_LEVEL_UNSPECIFIED | 0 | Unspecified advice level. |
-| SUCCESS | 1 | Success status indicating the check passed without issues. |
-| WARNING | 2 | Warning status indicating potential issues that should be reviewed. |
-| ERROR | 3 | Error status indicating critical issues that must be addressed. |
+| AUTHENTICATION_UNSPECIFIED | 0 | |
+| AUTHENTICATION_NONE | 1 | |
+| PLAIN | 2 | |
+| LOGIN | 3 | |
+| CRAM_MD5 | 4 | |
-<a name="bytebase-v1-Advice-RuleType"></a>
+<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>
+
+### EmailSetting.SMTPConfig.Encryption
-### Advice.RuleType
-RuleType indicates the source of the linting rule.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| RULE_TYPE_UNSPECIFIED | 0 | Unspecified rule type. |
-| PARSER_BASED | 1 | Parser-based rule enforced by the built-in SQL parser. These are non-configurable, mandatory checks for schema health. |
-| AI_POWERED | 2 | AI-powered rule defined by user in natural language. These are custom, flexible checks powered by AI models. |
+| ENCRYPTION_UNSPECIFIED | 0 | |
+| ENCRYPTION_NONE | 1 | |
+| STARTTLS | 2 | |
+| SSL_TLS | 3 | |
-<a name="bytebase-v1-QueryOption-MSSQLExplainFormat"></a>
+<a name="bytebase-v1-EmailSetting-Type"></a>
-### QueryOption.MSSQLExplainFormat
+### EmailSetting.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
-| MSSQL_EXPLAIN_FORMAT_UNSPECIFIED | 0 | defaults to SHOWPLAN_ALL |
-| MSSQL_EXPLAIN_FORMAT_ALL | 1 | SHOWPLAN_ALL |
-| MSSQL_EXPLAIN_FORMAT_XML | 2 | SHOWPLAN_XML |
+| TYPE_UNSPECIFIED | 0 | |
+| SMTP | 1 | |
-<a name="bytebase-v1-QueryOption-RedisRunCommandsOn"></a>
+<a name="bytebase-v1-Setting-SettingName"></a>
-### QueryOption.RedisRunCommandsOn
+### Setting.SettingName
| Name | Number | Description |
| ---- | ------ | ----------- |
-| REDIS_RUN_COMMANDS_ON_UNSPECIFIED | 0 | UNSPECIFIED defaults to SINGLE_NODE. |
-| SINGLE_NODE | 1 | Execute Redis commands on a single node in the cluster. |
-| ALL_NODES | 2 | Execute Redis commands on all nodes in the cluster for cluster-wide operations. |
+| SETTING_NAME_UNSPECIFIED | 0 | |
+| WORKSPACE_PROFILE | 1 | |
+| WORKSPACE_APPROVAL | 2 | |
+| APP_IM | 3 | |
+| AI | 4 | |
+| DATA_CLASSIFICATION | 5 | |
+| SEMANTIC_TYPES | 6 | |
+| ENVIRONMENT | 7 | |
+| EMAIL | 8 | |
-<a name="bytebase-v1-QueryResult-CommandError-Type"></a>
+<a name="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>
-### QueryResult.CommandError.Type
+### WorkspaceApprovalSetting.Rule.Source
| Name | Number | Description |
| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| DDL | 1 | |
-| DML | 2 | |
-| NON_READ_ONLY | 3 | |
-
+| SOURCE_UNSPECIFIED | 0 | |
+| CHANGE_DATABASE | 1 | |
+| CREATE_DATABASE | 2 | |
+| REQUEST_ROLE | 4 | |
+| REQUEST_ACCESS | 5 | |
-<a name="bytebase-v1-QueryResult-Message-Level"></a>
-### QueryResult.Message.Level
+<a name="bytebase-v1-WorkspaceProfileSetting-MCPCapability"></a>
+### WorkspaceProfileSetting.MCPCapability
+MCPCapability is the maximum capability an MCP (Model Context Protocol)
+session may have in the workspace. It is a ceiling: a session runs at this
+level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing
+workspaces are unaffected.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| LEVEL_UNSPECIFIED | 0 | Unspecified message level. |
-| INFO | 1 | Informational message. |
-| WARNING | 2 | Warning message indicating potential issues. |
-| DEBUG | 3 | Debug message for development and troubleshooting. |
-| LOG | 4 | General log message. |
-| NOTICE | 5 | Notice message for important information. |
-| EXCEPTION | 6 | Exception message indicating error conditions. |
+| MCP_CAPABILITY_UNSPECIFIED | 0 | |
+| DISABLED | 1 | MCP connections are rejected. |
+| READ_ONLY | 3 | MCP may inspect metadata and run read-only queries. Not enforceable yet: until per-tool enforcement ships, this fails closed and refuses all MCP connections, the same as DISABLED. |
+| READ_WRITE | 4 | MCP may perform mutations, still bounded by the user&#39;s RBAC. |
@@ -5014,2481 +4806,2438 @@ RuleType indicates the source of the linting rule.
-<a name="bytebase-v1-SQLService"></a>
+<a name="bytebase-v1-SettingService"></a>
-### SQLService
-SQLService executes SQL queries and manages query operations.
+### SettingService
+SettingService manages workspace-level settings and configurations.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | Executes a read-only SQL query against a database. Permissions required: bb.databases.get |
-| AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | Executes SQL with admin privileges via streaming connection. Permissions required: bb.sql.admin |
-| SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | Deprecated: use QueryHistoryService.SearchQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns caller&#39;s own query histories) |
-| ListQueryHistories | [ListQueryHistoriesRequest](#bytebase-v1-ListQueryHistoriesRequest) | [ListQueryHistoriesResponse](#bytebase-v1-ListQueryHistoriesResponse) | Deprecated: use QueryHistoryService.ListQueryHistories instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: bb.queryHistories.list |
-| GetQueryHistory | [GetQueryHistoryRequest](#bytebase-v1-GetQueryHistoryRequest) | [QueryHistory](#bytebase-v1-QueryHistory) | Deprecated: use QueryHistoryService.GetQueryHistory instead. Delegating alias kept for upgrade transition; will be removed in a future release. No HTTP binding: the REST route is served by QueryHistoryService. Permissions required: None (only returns the caller&#39;s own query history) |
-| Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | Exports query results to a file format. Permissions required: bb.databases.get |
-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Computes schema differences between two database metadata. Permissions required: None |
-| AICompletion | [AICompletionRequest](#bytebase-v1-AICompletionRequest) | [AICompletionResponse](#bytebase-v1-AICompletionResponse) | Provides AI-powered SQL completion and generation. Permissions required: None (authenticated users only, requires AI to be enabled) |
+| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list |
+| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get |
+| UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |
+| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |
-<a name="v1_plan_service-proto"></a>
+<a name="v1_actuator_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
-## v1/plan_service.proto
-
+## v1/actuator_service.proto
-<a name="bytebase-v1-CancelPlanCheckRunRequest"></a>
-### CancelPlanCheckRunRequest
+<a name="bytebase-v1-ActuatorInfo"></a>
+### ActuatorInfo
+System information and configuration for the Bytebase instance.
+Actuator concept is similar to the Spring Boot Actuator.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan check run to cancel. Format: projects/{project}/plans/{plan}/planCheckRun |
-
-
-
-
-
-
-<a name="bytebase-v1-CancelPlanCheckRunResponse"></a>
-
-### CancelPlanCheckRunResponse
+| version | [string](#string) | | The Bytebase server version. |
+| git_commit | [string](#string) | | The git commit hash of the build. |
+| readonly | [bool](#bool) | | Whether the Bytebase instance is running in read-only mode. |
+| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |
+| host | [string](#string) | | The host address of the Bytebase instance. |
+| port | [string](#string) | | The port number of the Bytebase instance. |
+| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |
+| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |
+| workspace | [string](#string) | | The unique identifier for the workspace. Format: workspaces/{id} |
+| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |
+| docker | [bool](#bool) | | Whether the Bytebase instance is running in Docker. |
+| activated_user_count | [int32](#int32) | | The number of activated users. |
+| activated_instance_count | [int32](#int32) | | The number of activated database instances. |
+| total_instance_count | [int32](#int32) | | The total number of database instances. |
+| enable_sample | [bool](#bool) | | Whether sample data setup is enabled. |
+| external_url_from_flag | [bool](#bool) | | Whether the external URL is set via command-line flag (and thus cannot be changed via UI). |
+| replica_count | [int32](#int32) | | The number of active replicas (servers sharing the same database). |
+| restriction | [Restriction](#bytebase-v1-Restriction) | | |
+| default_project | [string](#string) | | The default project for unassigned databases. Format: projects/{id} |
+| user_count_in_iam | [int32](#int32) | | The number of users in the workspace IAM (for seat limit display). |
+| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. |
+<a name="bytebase-v1-DeleteCacheRequest"></a>
-<a name="bytebase-v1-CreatePlanRequest"></a>
+### DeleteCacheRequest
+Request message for deleting cache.
-### CreatePlanRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
+<a name="bytebase-v1-GetActuatorInfoRequest"></a>
+### GetActuatorInfoRequest
+Request message for getting actuator information.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Optional. The workspace to scope the response to. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context (self-hosted) or no workspace-scoped fields are returned (SaaS). |
-<a name="bytebase-v1-GetPlanCheckRunRequest"></a>
-### GetPlanCheckRunRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan check run to retrieve. Format: projects/{project}/plans/{plan}/planCheckRun |
+<a name="bytebase-v1-Restriction"></a>
+### Restriction
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |
+| disallow_password_signin | [bool](#bool) | | Whether password-based signin is disabled (except for workspace admins). |
+| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password complexity and restriction requirements. |
+| allow_email_code_signin | [bool](#bool) | | Whether email &#43; 6-digit code signin is enabled for this workspace. |
+| password_reset_enabled | [bool](#bool) | | Whether password reset via email is available for this workspace. True when the workspace (or deployment) has an email setting configured. |
-<a name="bytebase-v1-GetPlanRequest"></a>
-### GetPlanRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
+<a name="bytebase-v1-SetupSampleRequest"></a>
+### SetupSampleRequest
+Request message for setting up sample data.
-<a name="bytebase-v1-ListPlansRequest"></a>
-### ListPlansRequest
+
+
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
-| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 10 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
-When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter plans returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+<a name="bytebase-v1-ActuatorService"></a>
-Supported filters: - creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;. - title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match. - spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;. - state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+### ActuatorService
+ActuatorService manages system health and operational information.
-For example: creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; title == &#34;My Plan&#34; title.contains(&#34;database migration&#34;) spec_type == &#34;change_database_config&#34; state == &#34;ACTIVE&#34; |
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. When `name` is provided (or the workspace-scoped binding is used), the response includes workspace-scoped fields for that workspace. Permissions required: None |
+| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |
+| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |
+
+
+<a name="v1_ai_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/ai_service.proto
-<a name="bytebase-v1-ListPlansResponse"></a>
-### ListPlansResponse
+<a name="bytebase-v1-AIChatMessage"></a>
+### AIChatMessage
+A single message in the conversation.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
+| role | [AIChatMessageRole](#bytebase-v1-AIChatMessageRole) | | The role of the message sender. |
+| content | [string](#string) | optional | The text content of the message. Optional for assistant messages that only contain tool calls. |
+| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls made by the assistant. Only present in assistant messages. |
+| tool_call_id | [string](#string) | optional | The ID of the tool call this message is responding to. Only present in tool messages. |
-<a name="bytebase-v1-Plan"></a>
-### Plan
+<a name="bytebase-v1-AIChatRequest"></a>
+### AIChatRequest
+Request message for AIService.Chat.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
-| state | [State](#bytebase-v1-State) | | The state of the plan. |
-| issue | [string](#string) | | The issue associated with the plan. Can be empty. Format: projects/{project}/issues/{issue} |
-| title | [string](#string) | | The title of the plan. |
-| description | [string](#string) | | The description of the plan. |
-| specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | The deployment specs for the plan. |
-| creator | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan_check_run_status_count | [Plan.PlanCheckRunStatusCountEntry](#bytebase-v1-Plan-PlanCheckRunStatusCountEntry) | repeated | The status count of the latest plan check runs. Keys are: - SUCCESS - WARNING - ERROR - RUNNING |
-| has_rollout | [bool](#bool) | | Whether the plan has started the rollout. |
-| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The approval status of the linked issue. Unspecified when no linked issue exists or the linked issue is a draft. |
-| rollout_stage_summaries | [Plan.RolloutStageSummary](#bytebase-v1-Plan-RolloutStageSummary) | repeated | Per-stage rollout status summary. Ordered by environment deployment order. Empty when no rollout exists. |
-| issue_status | [IssueStatus](#bytebase-v1-IssueStatus) | | The lifecycle status of the linked issue. Unspecified when no linked issue exists. |
-
+| messages | [AIChatMessage](#bytebase-v1-AIChatMessage) | repeated | The conversation messages. |
+| tool_definitions | [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition) | repeated | The tool definitions available to the AI. |
-<a name="bytebase-v1-Plan-ChangeDatabaseConfig"></a>
-### Plan.ChangeDatabaseConfig
+<a name="bytebase-v1-AIChatResponse"></a>
+### AIChatResponse
+Response message for AIService.Chat.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
-| release | [string](#string) | | The resource name of the release. Format: projects/{project}/releases/{release} |
-| enable_prior_backup | [bool](#bool) | | If set, a backup of the modified data will be created automatically before any changes are applied. |
-
+| content | [string](#string) | optional | The text content of the AI response. Optional when the response only contains tool calls. |
+| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls the AI wants to make. |
+| usage | [AIChatUsage](#bytebase-v1-AIChatUsage) | optional | Token usage for this provider call, when available. |
-<a name="bytebase-v1-Plan-CreateDatabaseConfig"></a>
-### Plan.CreateDatabaseConfig
+<a name="bytebase-v1-AIChatToolCall"></a>
+### AIChatToolCall
+A tool call made by the AI.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| target | [string](#string) | | The resource name of the instance on which the database is created. Format: instances/{instance} |
-| database | [string](#string) | | The name of the database to create. |
-| table | [string](#string) | | table is the name of the table, if it is not empty, Bytebase should create a table after creating the database. For example, in MongoDB, it only creates the database when we first store data in that database. |
-| character_set | [string](#string) | | character_set is the character set of the database. |
-| collation | [string](#string) | | collation is the collation of the database. |
-| cluster | [string](#string) | | cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. |
-| owner | [string](#string) | | owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. |
-| environment | [string](#string) | | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-
+| id | [string](#string) | | The unique ID of this tool call. |
+| name | [string](#string) | | The name of the tool to call. |
+| arguments | [string](#string) | | The JSON-encoded arguments to pass to the tool. |
+| metadata | [string](#string) | optional | Opaque provider-specific metadata (e.g., Gemini thought_signature). Frontend must echo this back unchanged when sending tool results. |
-<a name="bytebase-v1-Plan-ExportDataConfig"></a>
-### Plan.ExportDataConfig
+<a name="bytebase-v1-AIChatToolDefinition"></a>
+### AIChatToolDefinition
+A tool definition that the AI can invoke.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| targets | [string](#string) | repeated | The list of targets. Multi-database format: [instances/{instance-id}/databases/{database-name}]. Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. |
-| sheet | [string](#string) | | The resource name of the sheet. Format: projects/{project}/sheets/{sheet} |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The format of the exported file. |
-| password | [string](#string) | optional | The zip password provide by users. Leave it empty if no needs to encrypt the zip file. |
-
+| name | [string](#string) | | The name of the tool. |
+| description | [string](#string) | | A description of what the tool does. |
+| parameters_schema | [string](#string) | | The JSON Schema describing the tool&#39;s parameters. |
-<a name="bytebase-v1-Plan-PlanCheckRunStatusCountEntry"></a>
-### Plan.PlanCheckRunStatusCountEntry
+<a name="bytebase-v1-AIChatUsage"></a>
+### AIChatUsage
+Token usage for a single AI provider call.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [int32](#int32) | | |
-
-
-
+| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |
-<a name="bytebase-v1-Plan-RolloutStageSummary"></a>
-### Plan.RolloutStageSummary
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| stage | [string](#string) | | The stage resource name. Format: projects/{project}/plans/{plan}/rollout/stages/{stage} |
-| task_status_counts | [Plan.TaskStatusCount](#bytebase-v1-Plan-TaskStatusCount) | repeated | Task status counts for this stage. |
+<a name="bytebase-v1-AIChatMessageRole"></a>
+### AIChatMessageRole
+Role of a chat message.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| AI_CHAT_MESSAGE_ROLE_UNSPECIFIED | 0 | Unspecified role. |
+| AI_CHAT_MESSAGE_ROLE_SYSTEM | 1 | System message providing instructions. |
+| AI_CHAT_MESSAGE_ROLE_USER | 2 | User message. |
+| AI_CHAT_MESSAGE_ROLE_ASSISTANT | 3 | Assistant (AI) message. |
+| AI_CHAT_MESSAGE_ROLE_TOOL | 4 | Tool result message. |
+
+
-<a name="bytebase-v1-Plan-Spec"></a>
-### Plan.Spec
+<a name="bytebase-v1-AIService"></a>
+### AIService
+AIService provides AI chat capabilities for the page agent.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| Chat | [AIChatRequest](#bytebase-v1-AIChatRequest) | [AIChatResponse](#bytebase-v1-AIChatResponse) | Chat sends a conversation with tool definitions to the configured AI provider and returns the AI response. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | A UUID4 string that uniquely identifies the Spec. |
-| create_database_config | [Plan.CreateDatabaseConfig](#bytebase-v1-Plan-CreateDatabaseConfig) | | |
-| change_database_config | [Plan.ChangeDatabaseConfig](#bytebase-v1-Plan-ChangeDatabaseConfig) | | |
-| export_data_config | [Plan.ExportDataConfig](#bytebase-v1-Plan-ExportDataConfig) | | |
+
+<a name="v1_iam_policy-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/iam_policy.proto
-<a name="bytebase-v1-Plan-TaskStatusCount"></a>
-### Plan.TaskStatusCount
+<a name="bytebase-v1-Binding"></a>
+### Binding
+Binding associates members with a role and optional conditions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Task.Status](#bytebase-v1-Task-Status) | | The task status. |
-| count | [int32](#int32) | | The number of tasks in the status. |
+| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |
+| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Support variables: resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by any role with SQL Editor read (e.g. &#34;roles/sqlEditorUser&#34;, &#34;roles/sqlEditorReadUser&#34;) or write (bb.sql.ddl / bb.sql.dml) access, support &#34;==&#34; operator. resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator. resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator. resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support &#34;in&#34; operator. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
+
+Known limitations of table/schema-scoped DDL/DML grants: - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary. - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get). - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant). - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session&#39;s default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements. - A write target in a different project than the SQL-Editor session&#39;s database is denied: the per-target check evaluates the session project&#39;s IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project). - Enforcement is on the statement&#39;s literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object. - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is: - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index. - Modeled non-table object DDL (gated at the DATABASE level by the object&#39;s own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below). NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural &#34;write-target object database&#34; extraction layer to remove this allowlist dependence is tracked as a follow-up. - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated. Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.
+For example: resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;] resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;] resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.environment_id in [&#34;test&#34;] request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) |
+| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |
-<a name="bytebase-v1-PlanCheckRun"></a>
-### PlanCheckRun
+<a name="bytebase-v1-BindingDelta"></a>
+### BindingDelta
+A single change to a binding.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/plans/{plan}/planCheckRun |
-| status | [PlanCheckRun.Status](#bytebase-v1-PlanCheckRun-Status) | | |
-| results | [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result) | repeated | |
-| error | [string](#string) | | error is set if the Status is FAILED. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-
+| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |
+| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |
+| member | [string](#string) | | Follows the same format of Binding.members. |
+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |
-<a name="bytebase-v1-PlanCheckRun-Result"></a>
-### PlanCheckRun.Result
+<a name="bytebase-v1-GetIamPolicyRequest"></a>
+### GetIamPolicyRequest
+Request message for getting an IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Advice.Level](#bytebase-v1-Advice-Level) | | |
-| title | [string](#string) | | |
-| content | [string](#string) | | |
-| code | [int32](#int32) | | |
-| target | [string](#string) | | Target identification for consolidated results. Format: instances/{instance}/databases/{database} |
-| type | [PlanCheckRun.Result.Type](#bytebase-v1-PlanCheckRun-Result-Type) | | |
-| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
-| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
+| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlReviewReport"></a>
-
-### PlanCheckRun.Result.SqlReviewReport
+<a name="bytebase-v1-IamPolicy"></a>
+### IamPolicy
+IAM policy that binds members to roles.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start_position | [Position](#bytebase-v1-Position) | | Position of the SQL statement. |
-| end_position | [Position](#bytebase-v1-Position) | | |
-
+| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |
+| etag | [string](#string) | | The current etag of the policy. If an etag is provided and does not match the current etag of the policy, the call will be blocked and an ABORTED error will be returned. |
-<a name="bytebase-v1-PlanCheckRun-Result-SqlSummaryReport"></a>
-### PlanCheckRun.Result.SqlSummaryReport
+<a name="bytebase-v1-PolicyDelta"></a>
+### PolicyDelta
+Describes changes between two IAM policies.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| statement_types | [StatementType](#bytebase-v1-StatementType) | repeated | statement_types are the types of statements that are found in the sql. |
-| affected_rows | [int64](#int64) | | |
-
+| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |
-<a name="bytebase-v1-RunPlanChecksRequest"></a>
-### RunPlanChecksRequest
+<a name="bytebase-v1-SetIamPolicyRequest"></a>
+### SetIamPolicyRequest
+Request message for setting an IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The plan to run plan checks. Format: projects/{project}/plans/{plan} |
-| spec_id | [string](#string) | optional | The UUID of the specific spec to run plan checks for. This should match the spec.id field in Plan.Spec. If not set, all specs in the plan will be used. |
+| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |
+| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |
+| etag | [string](#string) | | The current etag of the policy. |
+
-<a name="bytebase-v1-RunPlanChecksResponse"></a>
-### RunPlanChecksResponse
+<a name="bytebase-v1-BindingDelta-Action"></a>
+
+### BindingDelta.Action
+Type of action performed on a binding.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ACTION_UNSPECIFIED | 0 | Unspecified action. |
+| ADD | 1 | Add a binding. |
+| REMOVE | 2 | Remove a binding. |
+
+
+
-<a name="bytebase-v1-UpdatePlanRequest"></a>
-### UpdatePlanRequest
+<a name="v1_audit_log_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/audit_log_service.proto
+
+<a name="bytebase-v1-AuditData"></a>
+
+### AuditData
+Additional audit data specific to certain operations.
+
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |
-The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the plan is not found, a new plan will be created. In this situation, `update_mask` is ignored. |
-
+<a name="bytebase-v1-AuditLog"></a>
+### AuditLog
+Audit log entry recording system activity or API call.
-<a name="bytebase-v1-PlanCheckRun-Result-Type"></a>
-### PlanCheckRun.Result.Type
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |
+| user | [string](#string) | | The user who performed the action. Format: users/{email} |
+| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |
+| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |
+| resource | [string](#string) | | The resource associated with this audit log. |
+| request | [string](#string) | | The request payload in JSON format. |
+| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |
+| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |
+| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |
+| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |
+| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| STATEMENT_ADVISE | 1 | |
-| STATEMENT_SUMMARY_REPORT | 2 | |
-| GHOST_SYNC | 3 | |
-<a name="bytebase-v1-PlanCheckRun-Status"></a>
-### PlanCheckRun.Status
+<a name="bytebase-v1-ExportAuditLogsRequest"></a>
+### ExportAuditLogsRequest
+Request message for exporting audit logs.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| RUNNING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
-| CANCELED | 4 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | |
+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. Check the filter field in the SearchAuditLogsRequest message. |
+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
+| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |
+| page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |
-
-
-<a name="bytebase-v1-PlanService"></a>
-### PlanService
-PlanService manages deployment plans for database changes.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | Retrieves a deployment plan by name. Permissions required: bb.plans.get |
-| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | Lists deployment plans in a project. Permissions required: bb.plans.list |
-| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | Creates a new deployment plan. Permissions required: bb.plans.create |
-| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | UpdatePlan updates the plan. The plan creator and the user with bb.plans.update permission on the project can update the plan. Permissions required: bb.plans.update (or creator) |
-| GetPlanCheckRun | [GetPlanCheckRunRequest](#bytebase-v1-GetPlanCheckRunRequest) | [PlanCheckRun](#bytebase-v1-PlanCheckRun) | Gets the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.get |
-| RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | Executes validation checks on a deployment plan. Permissions required: bb.planCheckRuns.run |
-| CancelPlanCheckRun | [CancelPlanCheckRunRequest](#bytebase-v1-CancelPlanCheckRunRequest) | [CancelPlanCheckRunResponse](#bytebase-v1-CancelPlanCheckRunResponse) | Cancels the plan check run for a deployment plan. Permissions required: bb.planCheckRuns.run |
+<a name="bytebase-v1-ExportAuditLogsResponse"></a>
-
+### ExportAuditLogsResponse
+Response message for exporting audit logs.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| content | [bytes](#bytes) | | The exported audit log content in the requested format. |
+| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |
-<a name="v1_issue_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/issue_service.proto
-<a name="bytebase-v1-ApprovalFlow"></a>
-### ApprovalFlow
+<a name="bytebase-v1-RequestMetadata"></a>
+### RequestMetadata
+Metadata about the incoming request.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| roles | [string](#string) | repeated | The roles required for approval in order. |
-
+| caller_ip | [string](#string) | | The IP address of the request originator. |
+| caller_supplied_user_agent | [string](#string) | | The user agent string provided by the caller. This is supplied by the client and is not authenticated. |
-<a name="bytebase-v1-ApprovalTemplate"></a>
-### ApprovalTemplate
+<a name="bytebase-v1-SearchAuditLogsRequest"></a>
+### SearchAuditLogsRequest
+Request message for searching audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | The approval flow definition. |
-| title | [string](#string) | | The title of the approval template. |
-| description | [string](#string) | | The description of the approval template. |
+| parent | [string](#string) | | |
+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filter: - method: the API name, can be found in the docs, should start with &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator. - severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values. - user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator. - create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
+
+For example: - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; |
+| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
+| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |
+| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |
-<a name="bytebase-v1-ApproveIssueRequest"></a>
-### ApproveIssueRequest
+<a name="bytebase-v1-SearchAuditLogsResponse"></a>
+### SearchAuditLogsResponse
+Response message for searching audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to add an approver. Format: projects/{project}/issues/{issue} |
-| comment | [string](#string) | | The comment explaining the approval decision. |
+| audit_logs | [AuditLog](#bytebase-v1-AuditLog) | repeated | |
+| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |
+
-<a name="bytebase-v1-BatchUpdateIssuesStatusRequest"></a>
-### BatchUpdateIssuesStatusRequest
+<a name="bytebase-v1-AuditLog-Severity"></a>
+### AuditLog.Severity
+Severity level for audit log entries.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SEVERITY_UNSPECIFIED | 0 | Unspecified severity level. |
+| DEBUG | 1 | Debug-level information. |
+| INFO | 2 | Informational messages. |
+| NOTICE | 3 | Notable events. |
+| WARNING | 4 | Warning conditions. |
+| ERROR | 5 | Error conditions. |
+| CRITICAL | 6 | Critical conditions. |
+| ALERT | 7 | Action must be taken immediately. |
+| EMERGENCY | 8 | System is unusable. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource shared by all issues being updated. Format: projects/{project} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the status of databases for now. |
-| issues | [string](#string) | repeated | The list of issues to update. Format: projects/{project}/issues/{issue} |
-| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The new status. |
-| reason | [string](#string) | | The reason for the status change. |
+
+
+<a name="bytebase-v1-AuditLogService"></a>
+### AuditLogService
+AuditLogService manages audit logs for system activities and API calls.
-<a name="bytebase-v1-BatchUpdateIssuesStatusResponse"></a>
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| SearchAuditLogs | [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest) | [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse) | Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search |
+| ExportAuditLogs | [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest) | [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse) | Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export |
-### BatchUpdateIssuesStatusResponse
+
+<a name="v1_user_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/user_service.proto
-<a name="bytebase-v1-CreateIssueCommentRequest"></a>
+<a name="bytebase-v1-BatchGetUsersRequest"></a>
-### CreateIssueCommentRequest
+### BatchGetUsersRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
-| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to create. |
+| names | [string](#string) | repeated | The user names to retrieve. Format: users/{email} |
-<a name="bytebase-v1-CreateIssueRequest"></a>
+<a name="bytebase-v1-BatchGetUsersResponse"></a>
-### CreateIssueRequest
+### BatchGetUsersResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
-| issue | [Issue](#bytebase-v1-Issue) | | The issue to create. |
+| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
-<a name="bytebase-v1-GetIssueRequest"></a>
+<a name="bytebase-v1-CreateUserRequest"></a>
-### GetIssueRequest
+### CreateUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to retrieve. Format: projects/{project}/issues/{issue} |
-| force | [bool](#bool) | | If set to true, bypass cache and fetch the latest data. |
+| user | [User](#bytebase-v1-User) | | The user to create. |
-<a name="bytebase-v1-Issue"></a>
+<a name="bytebase-v1-DeleteUserRequest"></a>
-### Issue
+### DeleteUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue. Format: projects/{project}/issues/{issue} |
-| title | [string](#string) | | The title of the issue. |
-| description | [string](#string) | | The description of the issue. |
-| type | [Issue.Type](#bytebase-v1-Issue-Type) | | |
-| status | [IssueStatus](#bytebase-v1-IssueStatus) | | The status of the issue. |
-| approvers | [Issue.Approver](#bytebase-v1-Issue-Approver) | repeated | |
-| approval_template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | The approval template for the issue. |
-| creator | [string](#string) | | Format: users/[email protected] |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |
-| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. |
-| risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. |
-| labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. |
-| approval_status | [ApprovalStatus](#bytebase-v1-ApprovalStatus) | | The overall approval status for the issue. |
-| access_grant | [string](#string) | | The access grant associated with this issue. Format: projects/{project}/accessGrants/{access_grant} |
-| draft | [bool](#bool) | | Whether this issue is a Draft Review Issue. |
+| name | [string](#string) | | The name of the user to delete. Format: users/{email} |
-<a name="bytebase-v1-Issue-Approver"></a>
+<a name="bytebase-v1-GetUserRequest"></a>
+
+### GetUserRequest
-### Issue.Approver
-Approvers and their approval status for the issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| status | [Issue.Approver.Status](#bytebase-v1-Issue-Approver-Status) | | The new status. |
-| principal | [string](#string) | | Format: users/[email protected] |
+| name | [string](#string) | | The name of the user to retrieve. Format: users/{email} |
-<a name="bytebase-v1-IssueComment"></a>
+<a name="bytebase-v1-ListUsersRequest"></a>
+
+### ListUsersRequest
-### IssueComment
-A comment on an issue.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} |
-| comment | [string](#string) | | The text content of the comment. |
-| payload | [string](#string) | | TODO: use struct message instead. |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| creator | [string](#string) | | Format: users/{email} |
-| approval | [IssueComment.Approval](#bytebase-v1-IssueComment-Approval) | | Approval event. |
-| issue_update | [IssueComment.IssueUpdate](#bytebase-v1-IssueComment-IssueUpdate) | | Issue update event. |
-| plan_update | [IssueComment.PlanUpdate](#bytebase-v1-IssueComment-PlanUpdate) | | Plan update event. |
-| review_submission | [IssueComment.ReviewSubmission](#bytebase-v1-IssueComment-ReviewSubmission) | | Review submission event. |
-
-
-
-
-
+| page_size | [int32](#int32) | | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 10 users will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page.
-<a name="bytebase-v1-IssueComment-Approval"></a>
+When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |
+| show_deleted | [bool](#bool) | | Show deleted users if specified. |
+| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-### IssueComment.Approval
-Approval event information.
+Supported filter: - name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| status | [IssueComment.Approval.Status](#bytebase-v1-IssueComment-Approval-Status) | | The approval status. |
+<a name="bytebase-v1-ListUsersResponse"></a>
-<a name="bytebase-v1-IssueComment-IssueUpdate"></a>
+### ListUsersResponse
-### IssueComment.IssueUpdate
-Issue update event information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| from_title | [string](#string) | optional | |
-| to_title | [string](#string) | optional | |
-| from_description | [string](#string) | optional | |
-| to_description | [string](#string) | optional | |
-| from_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
-| to_status | [IssueStatus](#bytebase-v1-IssueStatus) | optional | |
-| from_labels | [string](#string) | repeated | |
-| to_labels | [string](#string) | repeated | |
+| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-IssueComment-PlanUpdate"></a>
+<a name="bytebase-v1-UndeleteUserRequest"></a>
+
+### UndeleteUserRequest
-### IssueComment.PlanUpdate
-Plan update event information (snapshot of plan.config.specs before
-and after a PlanService.UpdatePlan call that mutated specs).
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| from_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
-| to_specs | [Plan.Spec](#bytebase-v1-Plan-Spec) | repeated | |
+| name | [string](#string) | | The name of the deleted user. Format: users/{email} |
-<a name="bytebase-v1-IssueComment-ReviewSubmission"></a>
+<a name="bytebase-v1-UpdateEmailRequest"></a>
+
+### UpdateEmailRequest
-### IssueComment.ReviewSubmission
-Review submission event information.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the user whose email to update. Format: users/{email} Note: This is the current (old) email address. The new email is specified in the &#39;email&#39; field. |
+| email | [string](#string) | | The new email address. |
-<a name="bytebase-v1-ListIssueCommentsRequest"></a>
-### ListIssueCommentsRequest
+
+<a name="bytebase-v1-UpdateUserRequest"></a>
+
+### UpdateUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | Format: projects/{projects}/issues/{issue} |
-| page_size | [int32](#int32) | | The maximum number of issue comments to return. The service may return fewer than this value. If unspecified, at most 10 issue comments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListIssueComments` call. Provide this to retrieve the subsequent page.
+| user | [User](#bytebase-v1-User) | | The user to update.
-When paginating, all other parameters provided to `ListIssueComments` must match the call that provided the page token. |
+The user&#39;s `name` field is used to identify the user to update. Format: users/{email} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
+| regenerate_temp_mfa_secret | [bool](#bool) | | The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. |
+| regenerate_recovery_codes | [bool](#bool) | | The regenerate_recovery_codes flag means to regenerate recovery codes for user. |
+| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-ListIssueCommentsResponse"></a>
+<a name="bytebase-v1-User"></a>
-### ListIssueCommentsResponse
+### User
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issue_comments | [IssueComment](#bytebase-v1-IssueComment) | repeated | The issue comments from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+| name | [string](#string) | | The name of the user. Format: users/{email} |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |
+| email | [string](#string) | | The email address of the user, used for login and notifications. |
+| title | [string](#string) | | The display title or full name of the user. |
+| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |
+| service_key | [string](#string) | | The service key for service account authentication. |
+| mfa_enabled | [bool](#bool) | | The mfa_enabled flag means if the user has enabled MFA. |
+| temp_otp_secret | [string](#string) | | Temporary OTP secret used during MFA setup and regeneration. |
+| temp_recovery_codes | [string](#string) | repeated | Temporary recovery codes used during MFA setup and regeneration. |
+| temp_otp_secret_created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. |
+| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |
+| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |
+| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |
+| workspace | [string](#string) | | The current workspace. Format: workspaces/{id} |
-<a name="bytebase-v1-ListIssuesRequest"></a>
+<a name="bytebase-v1-User-Profile"></a>
-### ListIssuesRequest
+### User.Profile
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} |
-| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListIssues` call. Provide this to retrieve the subsequent page.
+| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |
+| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |
+| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |
-When paginating, all other parameters provided to `ListIssues` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter issues returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filters: - creator: issue creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator. - status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values. - create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator. - type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values. - labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator. - risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values. - approval_status: issue approval status, support &#34;==&#34; operator. - current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
-For example: creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;] status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34; labels in [&#34;label1&#34;, &#34;label2&#34;] risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;] create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; |
-| query | [string](#string) | | Query is the query statement. |
-| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
+
+
+
-<a name="bytebase-v1-ListIssuesResponse"></a>
+<a name="bytebase-v1-UserService"></a>
-### ListIssuesResponse
+### UserService
+UserService manages user accounts and authentication.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |
+| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get |
+| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |
+| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |
+| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user in the caller&#39;s workspace (admin action, self-hosted only). In SaaS mode, admins should add users via workspace IAM policy instead. Permissions required: bb.users.create |
+| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self) |
+| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |
+| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |
+| UpdateEmail | [UpdateEmailRequest](#bytebase-v1-UpdateEmailRequest) | [User](#bytebase-v1-User) | Updates a user&#39;s email address. Permissions required: bb.users.updateEmail |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+<a name="v1_auth_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/auth_service.proto
-<a name="bytebase-v1-RejectIssueRequest"></a>
+<a name="bytebase-v1-ExchangeTokenRequest"></a>
-### RejectIssueRequest
+### ExchangeTokenRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to add a rejection. Format: projects/{project}/issues/{issue} |
-| comment | [string](#string) | | The comment explaining the rejection decision. |
+| token | [string](#string) | | External OIDC token (JWT) from CI/CD platform. |
+| email | [string](#string) | | Workload Identity email for identifying which identity to authenticate as. Format: {name}@workload.bytebase.com |
-<a name="bytebase-v1-RequestIssueRequest"></a>
+<a name="bytebase-v1-ExchangeTokenResponse"></a>
-### RequestIssueRequest
+### ExchangeTokenResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue to request a issue. Format: projects/{project}/issues/{issue} |
-| comment | [string](#string) | | The comment explaining the request. |
-
+| access_token | [string](#string) | | Bytebase access token. |
-<a name="bytebase-v1-RetryIssueApprovalRequest"></a>
-### RetryIssueApprovalRequest
+<a name="bytebase-v1-IdentityProviderContext"></a>
+### IdentityProviderContext
+Context for identity provider authentication.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the issue whose approval-finding should be retried. Format: projects/{project}/issues/{issue} |
+| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |
+| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |
-<a name="bytebase-v1-RoleGrant"></a>
+<a name="bytebase-v1-LoginRequest"></a>
-### RoleGrant
+### LoginRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |
-| user | [string](#string) | | The user to be granted. Format: users/{email}. |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |
-| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |
+| email | [string](#string) | | User&#39;s email address. |
+| password | [string](#string) | | User&#39;s password for authentication. |
+| web | [bool](#bool) | | If true, sets access token and refresh token as HTTP-only cookies instead of returning the token in the response body. Use for browser-based clients. |
+| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
+| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is used to get the user information from identity provider. |
+| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
+| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user&#39;s identity with MFA. |
+| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user&#39;s identity by MFA. |
+| email_code | [string](#string) | optional | 6-digit code from email for passwordless login/signup. Pairs with `email`. Mutually exclusive with `password` and `idp_name`. |
+| workspace | [string](#string) | optional | Preferred workspace to land in after login. If the user is a member of this workspace, the token is issued for it; otherwise falls back to the default resolution (last login workspace → first membership). Typically populated from the ?workspace= query parameter in invite links. Format: workspaces/{workspace} |
-<a name="bytebase-v1-SearchIssuesRequest"></a>
+<a name="bytebase-v1-LoginResponse"></a>
-### SearchIssuesRequest
+### LoginResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent, which owns this collection of issues. Format: projects/{project} Use &#34;projects/-&#34; to list all issues from all projects. |
-| page_size | [int32](#int32) | | The maximum number of issues to return. The service may return fewer than this value. If unspecified, at most 10 issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `SearchIssues` call. Provide this to retrieve the subsequent page.
+| token | [string](#string) | | Access token for authenticated requests. Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. |
+| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |
+| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |
+| user | [User](#bytebase-v1-User) | | The user from the successful login. |
+
-When paginating, all other parameters provided to `SearchIssues` must match the call that provided the page token. |
-| filter | [string](#string) | | Filter is used to filter issues returned in the list. Check the filter field in the ListIssuesRequest message. |
-| query | [string](#string) | | Query is the query statement. |
-| order_by | [string](#string) | | The order by of issues. Support: - create_time - update_time The default sorting order is ascending. For example: - order_by = &#34;create_time desc&#34; - order_by = &#34;update_time asc&#34; |
+<a name="bytebase-v1-LogoutRequest"></a>
+
+### LogoutRequest
+Request to logout current user session.
+
+
-<a name="bytebase-v1-SearchIssuesResponse"></a>
-### SearchIssuesResponse
+<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>
+
+### OAuth2IdentityProviderContext
+OAuth2 authentication context.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| issues | [Issue](#bytebase-v1-Issue) | repeated | The issues from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
+| code | [string](#string) | | Authorization code from OAuth2 provider. |
-<a name="bytebase-v1-UpdateIssueCommentRequest"></a>
-### UpdateIssueCommentRequest
+<a name="bytebase-v1-OIDCIdentityProviderContext"></a>
+### OIDCIdentityProviderContext
+OpenID Connect authentication context.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The issue name Format: projects/{project}/issues/{issue} |
-| issue_comment | [IssueComment](#bytebase-v1-IssueComment) | | The comment to update. |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the issue comment is not found, a new issue comment will be created. In this situation, `update_mask` is ignored. |
+| code | [string](#string) | | Authorization code from OIDC provider. |
-<a name="bytebase-v1-UpdateIssueRequest"></a>
+<a name="bytebase-v1-RefreshRequest"></a>
-### UpdateIssueRequest
+### RefreshRequest
+Request to refresh the access token.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| issue | [Issue](#bytebase-v1-Issue) | | The issue to update.
-The issue&#39;s `name` field is used to identify the issue to update. Format: projects/{project}/issues/{issue} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the issue is not found, a new issue will be created. In this situation, `update_mask` is ignored. |
+<a name="bytebase-v1-RefreshResponse"></a>
+### RefreshResponse
+Response from refreshing the access token.
-
-<a name="bytebase-v1-Issue-Approver-Status"></a>
-### Issue.Approver.Status
-The approval status of an approver.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
-| PENDING | 1 | Awaiting approval. |
-| APPROVED | 2 | Approved. |
-| REJECTED | 3 | Rejected. |
-
-
-
-<a name="bytebase-v1-Issue-Type"></a>
-
-### Issue.Type
-The type of issue.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified issue type. |
-| DATABASE_CHANGE | 1 | Database schema or data change. |
-| ROLE_GRANT | 2 | Role grant request. |
-| DATABASE_EXPORT | 3 | Database data export request. |
-| ACCESS_GRANT | 4 | Temporary access grant request. |
+<a name="bytebase-v1-RequestPasswordResetRequest"></a>
+### RequestPasswordResetRequest
-<a name="bytebase-v1-IssueComment-Approval-Status"></a>
-### IssueComment.Approval.Status
-Approval status values.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| email | [string](#string) | | The email address of the account to reset. |
+| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | Unspecified status. |
-| PENDING | 1 | Approval pending. |
-| APPROVED | 2 | Approved. |
-| REJECTED | 3 | Rejected. |
-
-
-<a name="bytebase-v1-IssueService"></a>
+<a name="bytebase-v1-ResetPasswordRequest"></a>
-### IssueService
-IssueService manages issues for tracking database changes and tasks.
+### ResetPasswordRequest
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetIssue | [GetIssueRequest](#bytebase-v1-GetIssueRequest) | [Issue](#bytebase-v1-Issue) | Retrieves an issue by name. Permissions required: bb.issues.get |
-| CreateIssue | [CreateIssueRequest](#bytebase-v1-CreateIssueRequest) | [Issue](#bytebase-v1-Issue) | Creates a new issue for database changes or tasks. Permissions required: bb.issues.create |
-| ListIssues | [ListIssuesRequest](#bytebase-v1-ListIssuesRequest) | [ListIssuesResponse](#bytebase-v1-ListIssuesResponse) | Lists issues in a project. Permissions required: bb.issues.list |
-| SearchIssues | [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest) | [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse) | Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query. Permissions required: bb.issues.get |
-| UpdateIssue | [UpdateIssueRequest](#bytebase-v1-UpdateIssueRequest) | [Issue](#bytebase-v1-Issue) | Updates an issue&#39;s properties such as title, description, or labels. Permissions required: bb.issues.update |
-| ListIssueComments | [ListIssueCommentsRequest](#bytebase-v1-ListIssueCommentsRequest) | [ListIssueCommentsResponse](#bytebase-v1-ListIssueCommentsResponse) | Lists comments on an issue. Permissions required: bb.issueComments.list |
-| CreateIssueComment | [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Adds a comment to an issue. Permissions required: bb.issueComments.create |
-| UpdateIssueComment | [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest) | [IssueComment](#bytebase-v1-IssueComment) | Updates an existing issue comment. Permissions required: bb.issueComments.update |
-| BatchUpdateIssuesStatus | [BatchUpdateIssuesStatusRequest](#bytebase-v1-BatchUpdateIssuesStatusRequest) | [BatchUpdateIssuesStatusResponse](#bytebase-v1-BatchUpdateIssuesStatusResponse) | Updates the status of multiple issues in a single operation. Permissions required: bb.issues.update |
-| ApproveIssue | [ApproveIssueRequest](#bytebase-v1-ApproveIssueRequest) | [Issue](#bytebase-v1-Issue) | Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
-| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
-| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
-| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | Re-runs approval-template finding for an issue stuck in CHECKING. Useful when the synchronous post-create finding errored (e.g. against a malformed workspace approval rule) and the operator has since corrected it — without this, the issue would remain in CHECKING indefinitely because there is no other retry path for non-DATABASE_CHANGE issue types. Idempotent: returns the existing issue unchanged when approval-finding has already completed. Permissions required: None (caller must be the issue creator; mirrors RequestIssue&#39;s authorization model). |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| email | [string](#string) | | The email address of the account. |
+| code | [string](#string) | | The 6-digit code from the reset email. |
+| new_password | [string](#string) | | The new password to set. |
-<a name="v1_setting_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/setting_service.proto
-<a name="bytebase-v1-AISetting"></a>
+<a name="bytebase-v1-SendEmailLoginCodeRequest"></a>
-### AISetting
+### SendEmailLoginCodeRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| enabled | [bool](#bool) | | |
-| provider | [AISetting.Provider](#bytebase-v1-AISetting-Provider) | | |
-| endpoint | [string](#string) | | |
-| api_key | [string](#string) | | |
-| model | [string](#string) | | |
-| version | [string](#string) | | |
+| email | [string](#string) | | The email address to send the code to. |
+| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |
-<a name="bytebase-v1-Algorithm"></a>
+<a name="bytebase-v1-SignupRequest"></a>
-### Algorithm
+### SignupRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| full_mask | [Algorithm.FullMask](#bytebase-v1-Algorithm-FullMask) | | |
-| range_mask | [Algorithm.RangeMask](#bytebase-v1-Algorithm-RangeMask) | | |
-| md5_mask | [Algorithm.MD5Mask](#bytebase-v1-Algorithm-MD5Mask) | | |
-| inner_outer_mask | [Algorithm.InnerOuterMask](#bytebase-v1-Algorithm-InnerOuterMask) | | |
+| email | [string](#string) | | The email for the new account. |
+| password | [string](#string) | | The password for the new account. |
+| title | [string](#string) | | The display name of the user. |
-<a name="bytebase-v1-Algorithm-FullMask"></a>
+<a name="bytebase-v1-SwitchWorkspaceRequest"></a>
-### Algorithm.FullMask
+### SwitchWorkspaceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| substitution | [string](#string) | | substitution is the string used to replace the original value, the max length of the string is 16 bytes. |
+| workspace | [string](#string) | | The target workspace to switch to. Format: workspaces/{workspace} |
+| web | [bool](#bool) | | If true, sets tokens as HTTP-only cookies (browser clients). |
+| otp_code | [string](#string) | optional | OTP code for MFA verification. Required if the target workspace enforces MFA. |
+| recovery_code | [string](#string) | optional | Recovery code for MFA verification (alternative to otp_code). |
+| mfa_temp_token | [string](#string) | optional | Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. |
+
-<a name="bytebase-v1-Algorithm-InnerOuterMask"></a>
+
-### Algorithm.InnerOuterMask
+
+<a name="bytebase-v1-AuthService"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| prefix_len | [int32](#int32) | | |
-| suffix_len | [int32](#int32) | | |
-| type | [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType) | | |
-| substitution | [string](#string) | | |
+### AuthService
+AuthService handles user authentication operations.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |
+| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |
+| ExchangeToken | [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest) | [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse) | Exchanges an external OIDC token for a Bytebase access token. Used by CI/CD pipelines with Workload Identity Federation. Permissions required: None (validates via OIDC token) |
+| Signup | [SignupRequest](#bytebase-v1-SignupRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Registers a new user account. Creates a principal and assigns a workspace: - If the user&#39;s email was pre-invited to a workspace, joins that workspace. - Otherwise, creates a new workspace with the user as admin. Returns access tokens so the user is logged in immediately after signup. |
+| Refresh | [RefreshRequest](#bytebase-v1-RefreshRequest) | [RefreshResponse](#bytebase-v1-RefreshResponse) | Refreshes the access token using the refresh token cookie. Permissions required: None (validates via refresh token cookie) |
+| SwitchWorkspace | [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Switches the current user&#39;s active workspace and issues new tokens. The user must be a member of the target workspace. |
+| RequestPasswordReset | [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Requests a password reset email for the given email address. Always returns success to avoid leaking whether the email exists. Permissions required: None |
+| ResetPassword | [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Resets the user&#39;s password using a password reset token from email. Permissions required: None (validates via token) |
+| SendEmailLoginCode | [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sends a 6-digit verification code to the email for login/signup. Always returns success (no email enumeration). Enforces 60-sec resend cooldown. Permissions required: None |
+
+<a name="v1_cel_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/cel_service.proto
-<a name="bytebase-v1-Algorithm-MD5Mask"></a>
-### Algorithm.MD5Mask
+<a name="bytebase-v1-BatchDeparseRequest"></a>
+
+### BatchDeparseRequest
+Request message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| salt | [string](#string) | | salt is the salt value to generate a different hash that with the word alone. |
-
+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |
-<a name="bytebase-v1-Algorithm-RangeMask"></a>
-### Algorithm.RangeMask
+<a name="bytebase-v1-BatchDeparseResponse"></a>
+### BatchDeparseResponse
+Response message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| slices | [Algorithm.RangeMask.Slice](#bytebase-v1-Algorithm-RangeMask-Slice) | repeated | We store it as a repeated field to face the fact that the original value may have multiple parts should be masked. But frontend can be started with a single rule easily. |
-
+| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |
-<a name="bytebase-v1-Algorithm-RangeMask-Slice"></a>
-### Algorithm.RangeMask.Slice
+<a name="bytebase-v1-BatchParseRequest"></a>
+### BatchParseRequest
+Request message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| start | [int32](#int32) | | start is the start character index (0-based) of the original value, should be less than end. Uses character indices (not byte offsets) for display-oriented masking. Example: For &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). |
-| end | [int32](#int32) | | end is the end character index (exclusive) of the original value. Uses character indices (not byte offsets) for display-oriented masking. |
-| substitution | [string](#string) | | substitution is the string used to replace the OriginalValue[start:end). |
-
+| expressions | [string](#string) | repeated | The CEL expression strings to parse. |
-<a name="bytebase-v1-Announcement"></a>
-### Announcement
+<a name="bytebase-v1-BatchParseResponse"></a>
+### BatchParseResponse
+Response message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| text | [string](#string) | | The text of announcement |
-| link | [string](#string) | | The optional link, user can follow the link to check extra details |
-| theme | [Announcement.AnnouncementTheme](#bytebase-v1-Announcement-AnnouncementTheme) | | Banner colors. Built-in presets (info/warning/critical) are a frontend-only concept that seeds these colors; the store only holds them. |
+| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |
+
-<a name="bytebase-v1-Announcement-AnnouncementTheme"></a>
+
+
+
-### Announcement.AnnouncementTheme
+<a name="bytebase-v1-CelService"></a>
+### CelService
+CelService manages CEL (Common Expression Language) parsing and formatting operations.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| background | [google.type.Color](#google-type-Color) | | |
-| text | [google.type.Color](#google-type-Color) | | |
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |
+| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |
+
+<a name="v1_changelog_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/changelog_service.proto
-<a name="bytebase-v1-AppIMSetting"></a>
-### AppIMSetting
+
+<a name="bytebase-v1-Changelog"></a>
+
+### Changelog
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| settings | [AppIMSetting.IMSetting](#bytebase-v1-AppIMSetting-IMSetting) | repeated | |
+| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |
+| schema | [string](#string) | | |
+| schema_size | [int64](#int64) | | |
+| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
+| plan_title | [string](#string) | | The title of the plan associated with this changelog&#39;s task run. This field is populated by deriving the plan from task_run for display purposes. |
-<a name="bytebase-v1-AppIMSetting-DingTalk"></a>
+<a name="bytebase-v1-GetChangelogRequest"></a>
-### AppIMSetting.DingTalk
+### GetChangelogRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| client_id | [string](#string) | | |
-| client_secret | [string](#string) | | |
-| robot_code | [string](#string) | | |
+| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-<a name="bytebase-v1-AppIMSetting-Feishu"></a>
+<a name="bytebase-v1-ListChangelogsRequest"></a>
-### AppIMSetting.Feishu
+### ListChangelogsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| app_id | [string](#string) | | |
-| app_secret | [string](#string) | | |
+| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} |
+| page_size | [int32](#int32) | | The maximum number of changelogs to return. The service may return fewer than this value. If unspecified, at most 10 changelogs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from the previous call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided must match the call that provided the page token. |
+| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
+| filter | [string](#string) | | Filter is used to filter changelogs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filter: - status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values. - create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34; create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; |
-<a name="bytebase-v1-AppIMSetting-IMSetting"></a>
-### AppIMSetting.IMSetting
+<a name="bytebase-v1-ListChangelogsResponse"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| type | [WebhookType](#bytebase-v1-WebhookType) | | |
-| slack | [AppIMSetting.Slack](#bytebase-v1-AppIMSetting-Slack) | | |
-| feishu | [AppIMSetting.Feishu](#bytebase-v1-AppIMSetting-Feishu) | | |
-| wecom | [AppIMSetting.Wecom](#bytebase-v1-AppIMSetting-Wecom) | | |
-| lark | [AppIMSetting.Lark](#bytebase-v1-AppIMSetting-Lark) | | |
-| dingtalk | [AppIMSetting.DingTalk](#bytebase-v1-AppIMSetting-DingTalk) | | |
-| teams | [AppIMSetting.Teams](#bytebase-v1-AppIMSetting-Teams) | | |
+### ListChangelogsResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-AppIMSetting-Lark"></a>
-### AppIMSetting.Lark
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| app_id | [string](#string) | | |
-| app_secret | [string](#string) | | |
+<a name="bytebase-v1-Changelog-Status"></a>
+### Changelog.Status
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | |
+| PENDING | 1 | |
+| DONE | 2 | |
+| FAILED | 3 | |
-<a name="bytebase-v1-AppIMSetting-Slack"></a>
+<a name="bytebase-v1-ChangelogView"></a>
-### AppIMSetting.Slack
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | |
+### ChangelogView
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| CHANGELOG_VIEW_BASIC | 1 | |
+| CHANGELOG_VIEW_FULL | 2 | |
+
+
-<a name="bytebase-v1-AppIMSetting-Teams"></a>
-### AppIMSetting.Teams
+<a name="bytebase-v1-ChangelogService"></a>
+### ChangelogService
+ChangelogService manages database migration history.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |
+| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| tenant_id | [string](#string) | | Azure AD tenant ID (Directory ID). |
-| client_id | [string](#string) | | Azure AD application (client) ID. |
-| client_secret | [string](#string) | | Azure AD client secret. |
+
+<a name="v1_database_catalog_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_catalog_service.proto
-<a name="bytebase-v1-AppIMSetting-Wecom"></a>
-### AppIMSetting.Wecom
+<a name="bytebase-v1-ColumnCatalog"></a>
+### ColumnCatalog
+Column metadata within a table.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| corp_id | [string](#string) | | |
-| agent_id | [string](#string) | | |
-| secret | [string](#string) | | |
+| name | [string](#string) | | The column name. |
+| semantic_type | [string](#string) | | The semantic type describing the data purpose. |
+| labels | [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry) | repeated | User-defined labels for this column. |
+| classification | [string](#string) | | The data classification level for this column. |
+| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | optional | Object schema for complex column types like JSON. |
-<a name="bytebase-v1-DataClassificationSetting"></a>
+<a name="bytebase-v1-ColumnCatalog-LabelsEntry"></a>
-### DataClassificationSetting
+### ColumnCatalog.LabelsEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| configs | [DataClassificationSetting.DataClassificationConfig](#bytebase-v1-DataClassificationSetting-DataClassificationConfig) | repeated | |
-
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig"></a>
-### DataClassificationSetting.DataClassificationConfig
+<a name="bytebase-v1-DatabaseCatalog"></a>
+### DatabaseCatalog
+Catalog metadata for a database including schemas, tables, and columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the uuid for classification. Each project can chose one classification config. |
-| title | [string](#string) | | |
-| levels | [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level) | repeated | levels is user defined level list for classification. |
-| classification | [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry) | repeated | classification is the id - DataClassification map. The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-
+| name | [string](#string) | | The name of the database catalog. Format: instances/{instance}/databases/{database}/catalog |
+| schemas | [SchemaCatalog](#bytebase-v1-SchemaCatalog) | repeated | The schemas in the database. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry"></a>
-### DataClassificationSetting.DataClassificationConfig.ClassificationEntry
+<a name="bytebase-v1-GetDatabaseCatalogRequest"></a>
+### GetDatabaseCatalogRequest
+Request message for getting a database catalog.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification) | | |
-
+| name | [string](#string) | | The name of the database catalog to retrieve. Format: instances/{instance}/databases/{database}/catalog |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification"></a>
-### DataClassificationSetting.DataClassificationConfig.DataClassification
+<a name="bytebase-v1-ObjectSchema"></a>
+### ObjectSchema
+Schema definition for object-type columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. |
-| title | [string](#string) | | |
-| level | [int32](#int32) | optional | The sensitivity level. Maps to Level.level. |
-
+| type | [ObjectSchema.Type](#bytebase-v1-ObjectSchema-Type) | | The data type of this object. |
+| struct_kind | [ObjectSchema.StructKind](#bytebase-v1-ObjectSchema-StructKind) | | Struct schema. |
+| array_kind | [ObjectSchema.ArrayKind](#bytebase-v1-ObjectSchema-ArrayKind) | | Array schema. |
+| semantic_type | [string](#string) | | The semantic type of this object. |
-<a name="bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level"></a>
-### DataClassificationSetting.DataClassificationConfig.Level
+<a name="bytebase-v1-ObjectSchema-ArrayKind"></a>
+### ObjectSchema.ArrayKind
+Array type with element schema.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| title | [string](#string) | | |
-| level | [int32](#int32) | | The numeric level for ordering. Higher = more sensitive. |
-
+| kind | [ObjectSchema](#bytebase-v1-ObjectSchema) | | The schema of array elements. |
-<a name="bytebase-v1-EmailSetting"></a>
-### EmailSetting
+<a name="bytebase-v1-ObjectSchema-StructKind"></a>
+### ObjectSchema.StructKind
+Structure type with named properties.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| from | [string](#string) | | |
-| from_name | [string](#string) | | |
-| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |
-| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |
+| properties | [ObjectSchema.StructKind.PropertiesEntry](#bytebase-v1-ObjectSchema-StructKind-PropertiesEntry) | repeated | Properties of the struct. |
-<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>
+<a name="bytebase-v1-ObjectSchema-StructKind-PropertiesEntry"></a>
-### EmailSetting.SMTPConfig
+### ObjectSchema.StructKind.PropertiesEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| host | [string](#string) | | |
-| port | [int32](#int32) | | |
-| username | [string](#string) | | |
-| password | [string](#string) | | |
-| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |
-| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |
-
+| key | [string](#string) | | |
+| value | [ObjectSchema](#bytebase-v1-ObjectSchema) | | |
-<a name="bytebase-v1-EnvironmentSetting"></a>
-### EnvironmentSetting
+<a name="bytebase-v1-SchemaCatalog"></a>
+### SchemaCatalog
+Schema metadata within a database.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| environments | [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment) | repeated | |
-
+| name | [string](#string) | | The schema name. |
+| tables | [TableCatalog](#bytebase-v1-TableCatalog) | repeated | The tables in the schema. |
-<a name="bytebase-v1-EnvironmentSetting-Environment"></a>
-### EnvironmentSetting.Environment
+<a name="bytebase-v1-TableCatalog"></a>
+### TableCatalog
+Table metadata within a schema.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the environment. Format: environments/{environment}. Output only. |
-| id | [string](#string) | | The resource id of the environment. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| title | [string](#string) | | The display name of the environment. |
-| tags | [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry) | repeated | |
-| color | [google.type.Color](#google-type-Color) | | |
-
+| name | [string](#string) | | The table name. |
+| columns | [TableCatalog.Columns](#bytebase-v1-TableCatalog-Columns) | | Regular table columns. |
+| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | | Object schema for JSON/XML columns. |
+| classification | [string](#string) | | The data classification level for this table. |
-<a name="bytebase-v1-EnvironmentSetting-Environment-TagsEntry"></a>
-### EnvironmentSetting.Environment.TagsEntry
+<a name="bytebase-v1-TableCatalog-Columns"></a>
+### TableCatalog.Columns
+Column list for regular tables.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| columns | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | repeated | The columns in the table. |
-<a name="bytebase-v1-GetSettingRequest"></a>
+<a name="bytebase-v1-UpdateDatabaseCatalogRequest"></a>
-### GetSettingRequest
-The request message for getting a setting.
+### UpdateDatabaseCatalogRequest
+Request message for updating a database catalog.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the setting. |
+| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | The database catalog to update.
+
+The catalog&#39;s `name` field is used to identify the database catalog to update. Format: instances/{instance}/databases/{database}/catalog |
+| allow_missing | [bool](#bool) | | If set to true, and the database catalog is not found, a new database catalog will be created. In this situation, `update_mask` is ignored. |
+
-<a name="bytebase-v1-GetSettingResponse"></a>
-### GetSettingResponse
-The response message for getting a setting.
+<a name="bytebase-v1-ObjectSchema-Type"></a>
+### ObjectSchema.Type
+Object schema data types.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| setting | [Setting](#bytebase-v1-Setting) | | |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | Unspecified type. |
+| STRING | 1 | String type. |
+| NUMBER | 2 | Number type. |
+| BOOLEAN | 3 | Boolean type. |
+| OBJECT | 4 | Object/struct type. |
+| ARRAY | 5 | Array type. |
+
+
+<a name="bytebase-v1-DatabaseCatalogService"></a>
-<a name="bytebase-v1-ListSettingsRequest"></a>
+### DatabaseCatalogService
+DatabaseCatalogService manages database schema metadata and classification.
-### ListSettingsRequest
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetDatabaseCatalog | [GetDatabaseCatalogRequest](#bytebase-v1-GetDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get |
+| UpdateDatabaseCatalog | [UpdateDatabaseCatalogRequest](#bytebase-v1-UpdateDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update |
+
+<a name="v1_database_group_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_group_service.proto
-<a name="bytebase-v1-ListSettingsResponse"></a>
-### ListSettingsResponse
+<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>
+### CreateDatabaseGroupRequest
+Request message for creating a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| settings | [Setting](#bytebase-v1-Setting) | repeated | The settings from the specified request. |
+| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |
+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |
+| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group&#39;s resource name.
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |
-<a name="bytebase-v1-SQLEditorThemeSetting"></a>
-### SQLEditorThemeSetting
+<a name="bytebase-v1-DatabaseGroup"></a>
+### DatabaseGroup
+A group of databases matched by expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | |
-| name | [string](#string) | | |
-| monaco_base | [string](#string) | | |
-| tokens | [SQLEditorThemeSetting.TokensEntry](#bytebase-v1-SQLEditorThemeSetting-TokensEntry) | repeated | CSS token colors. |
+| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| title | [string](#string) | | The short name used in actual databases specified by users. |
+| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Support variables: resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations. resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_labels: the database labels. Support map access operations. All variables should join with &#34;&amp;&amp;&#34; condition.
+For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;) resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; |
+| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
-<a name="bytebase-v1-SQLEditorThemeSetting-TokensEntry"></a>
-### SQLEditorThemeSetting.TokensEntry
+<a name="bytebase-v1-DatabaseGroup-Database"></a>
+### DatabaseGroup.Database
+A database within a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [google.type.Color](#google-type-Color) | | |
-
+| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |
-<a name="bytebase-v1-SemanticTypeSetting"></a>
-### SemanticTypeSetting
+<a name="bytebase-v1-DeleteDatabaseGroupRequest"></a>
+### DeleteDatabaseGroupRequest
+Request message for deleting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| types | [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType) | repeated | |
-
+| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |
-<a name="bytebase-v1-SemanticTypeSetting-SemanticType"></a>
-### SemanticTypeSetting.SemanticType
+<a name="bytebase-v1-GetDatabaseGroupRequest"></a>
+### GetDatabaseGroupRequest
+Request message for getting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | id is the uuid for semantic type. |
-| title | [string](#string) | | the title of the semantic type, it should not be empty. |
-| description | [string](#string) | | the description of the semantic type, it can be empty. |
-| algorithm | [Algorithm](#bytebase-v1-Algorithm) | | |
-| icon | [string](#string) | | icon is the icon for semantic type, it can be emoji or base64 encoded image. |
+| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-<a name="bytebase-v1-Setting"></a>
+<a name="bytebase-v1-ListDatabaseGroupsRequest"></a>
-### Setting
-The schema of setting.
+### ListDatabaseGroupsRequest
+Request message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the setting. Format: settings/{setting} Example: &#34;settings/SEMANTIC_TYPES&#34; |
-| value | [SettingValue](#bytebase-v1-SettingValue) | | The configuration value of the setting. |
+| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |
+| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
-<a name="bytebase-v1-SettingValue"></a>
+<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>
-### SettingValue
-The data in setting value.
+### ListDatabaseGroupsResponse
+Response message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| app_im | [AppIMSetting](#bytebase-v1-AppIMSetting) | | |
-| workspace_profile | [WorkspaceProfileSetting](#bytebase-v1-WorkspaceProfileSetting) | | |
-| workspace_approval | [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting) | | |
-| data_classification | [DataClassificationSetting](#bytebase-v1-DataClassificationSetting) | | |
-| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | |
-| ai | [AISetting](#bytebase-v1-AISetting) | | |
-| environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |
-| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |
-
+| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |
-<a name="bytebase-v1-TestEmailSettingRequest"></a>
-### TestEmailSettingRequest
+<a name="bytebase-v1-UpdateDatabaseGroupRequest"></a>
+### UpdateDatabaseGroupRequest
+Request message for updating a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | |
-| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |
-| to | [string](#string) | | |
-
+| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.
+The database group&#39;s `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the database group is not found, a new database group will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-TestEmailSettingResponse"></a>
-### TestEmailSettingResponse
+
+<a name="bytebase-v1-DatabaseGroupView"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| success | [bool](#bool) | | |
-| error | [string](#string) | | |
+### DatabaseGroupView
+View options for database group responses.
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
+| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |
+| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |
+
+
-<a name="bytebase-v1-UpdateSettingRequest"></a>
+<a name="bytebase-v1-DatabaseGroupService"></a>
-### UpdateSettingRequest
-The request message for updating or creating a setting.
+### DatabaseGroupService
+DatabaseGroupService manages database groups for organizing databases by criteria.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.databaseGroups.list |
+| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.databaseGroups.get |
+| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.databaseGroups.create |
+| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create |
+| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.databaseGroups.delete |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |
-| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |
-| allow_missing | [bool](#bool) | | |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
+
+<a name="v1_instance_role_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/instance_role_service.proto
-<a name="bytebase-v1-WorkspaceApprovalSetting"></a>
-### WorkspaceApprovalSetting
+<a name="bytebase-v1-InstanceRole"></a>
+### InstanceRole
+InstanceRole is the API message for instance role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| rules | [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule) | repeated | |
+| name | [string](#string) | | The name of the role. Format: instances/{instance}/roles/{role} The role name is the unique name for the role. |
+| role_name | [string](#string) | | The role name. It&#39;s unique within the instance. |
+| password | [string](#string) | optional | The role password. |
+| connection_limit | [int32](#int32) | optional | The connection count limit for this role. |
+| valid_until | [string](#string) | optional | The expiration for the role&#39;s password. |
+| attribute | [string](#string) | optional | The role attribute. For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html For MySQL, it&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html |
-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule"></a>
+<a name="bytebase-v1-ListInstanceRolesRequest"></a>
-### WorkspaceApprovalSetting.Rule
+### ListInstanceRolesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| template | [ApprovalTemplate](#bytebase-v1-ApprovalTemplate) | | |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with the rule. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+| parent | [string](#string) | | The parent, which owns this collection of roles. Format: instances/{instance} |
+| page_size | [int32](#int32) | | Not used. The maximum number of roles to return. The service may return fewer than this value. If unspecified, at most 10 roles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | Not used. A page token, received from a previous `ListInstanceRoles` call. Provide this to retrieve the subsequent page.
-The `source` field filters which rules apply. The `condition` field then evaluates with full context.
+When paginating, all other parameters provided to `ListInstanceRoles` must match the call that provided the page token. |
+| refresh | [bool](#bool) | | Refresh will refresh and return the latest data. |
-All supported variables: statement.affected_rows: affected row count in the DDL/DML, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values. statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations. request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations. request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export
-For examples: resource.environment_id == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100 resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; |
-| source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |
+<a name="bytebase-v1-ListInstanceRolesResponse"></a>
+### ListInstanceRolesResponse
-<a name="bytebase-v1-WorkspaceProfileSetting"></a>
-### WorkspaceProfileSetting
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | The roles from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| external_url | [string](#string) | | The external URL is used for sso authentication callback. |
-| disallow_signup | [bool](#bool) | | Disallow self-service signup, users can only be invited by the owner. |
-| require_mfa | [bool](#bool) | | Require MFA for all users. |
-| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |
-| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
-| maximum_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for data access requests. |
-| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
-| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
-| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
-| disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) |
-| enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |
-| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. |
-| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |
-| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |
-| directory_sync_token | [string](#string) | | The token for directory sync authentication. |
-| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |
-| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |
-| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |
-| sql_result_size | [int64](#int64) | | The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center. The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. |
-| query_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The query timeout duration for query and export, works for the SQL Editor and Export Center. |
-| allow_email_code_signin | [bool](#bool) | | Allow signin/signup using email &#43; a 6-digit one-time verification code. Requires the EMAIL setting to be configured on the workspace. |
-| sql_editor_theme_id | [string](#string) | | Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id OR a custom theme&#39;s uuid. Empty ⇒ default light. |
-| sql_editor_custom_theme | [SQLEditorThemeSetting](#bytebase-v1-SQLEditorThemeSetting) | | The enforced CUSTOM theme&#39;s full definition — present ONLY when sql_editor_theme_id is a custom uuid. tokens is always complete. |
-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for request role. Deprecated: use just-in-time access request flows instead. |
-| mcp_capability | [WorkspaceProfileSetting.MCPCapability](#bytebase-v1-WorkspaceProfileSetting-MCPCapability) | | The maximum capability available to MCP (Model Context Protocol) sessions in this workspace, acting as an admin-set ceiling. Unset is treated as READ_WRITE for backward compatibility; DISABLED rejects all MCP connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected — omit the update mask path to leave the ceiling unset. |
+
+
+
-<a name="bytebase-v1-WorkspaceProfileSetting-PasswordRestriction"></a>
+<a name="bytebase-v1-InstanceRoleService"></a>
-### WorkspaceProfileSetting.PasswordRestriction
+### InstanceRoleService
+InstanceRoleService manages database roles within instances.
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| ListInstanceRoles | [ListInstanceRolesRequest](#bytebase-v1-ListInstanceRolesRequest) | [ListInstanceRolesResponse](#bytebase-v1-ListInstanceRolesResponse) | Lists all database roles in an instance. Permissions required: bb.instanceRoles.list |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| min_length | [int32](#int32) | | min_length is the minimum length for password, should no less than 8. |
-| require_number | [bool](#bool) | | require_number requires the password must contains at least one number. |
-| require_letter | [bool](#bool) | | require_letter requires the password must contains at least one letter, regardless of upper case or lower case |
-| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. |
-| require_special_character | [bool](#bool) | | require_special_character requires the password must contains at least one special character. |
-| require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |
-| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |
+<a name="v1_instance_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/instance_service.proto
-
+<a name="bytebase-v1-AddDataSourceRequest"></a>
-<a name="bytebase-v1-AISetting-Provider"></a>
+### AddDataSourceRequest
-### AISetting.Provider
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| PROVIDER_UNSPECIFIED | 0 | |
-| OPEN_AI | 1 | |
-| CLAUDE | 2 | |
-| GEMINI | 3 | |
-| AZURE_OPENAI | 4 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the instance to add a data source to. Format: instances/{instance} |
+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be added. |
+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
-<a name="bytebase-v1-Algorithm-InnerOuterMask-MaskType"></a>
-### Algorithm.InnerOuterMask.MaskType
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MASK_TYPE_UNSPECIFIED | 0 | |
-| INNER | 1 | |
-| OUTER | 2 | |
+<a name="bytebase-v1-BatchSyncInstancesRequest"></a>
+### BatchSyncInstancesRequest
-<a name="bytebase-v1-DatabaseChangeMode"></a>
-### DatabaseChangeMode
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| requests | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | repeated | The request message specifying the instances to sync. A maximum of 1000 instances can be synced in a batch. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| DATABASE_CHANGE_MODE_UNSPECIFIED | 0 | |
-| PIPELINE | 1 | A more advanced database change process, including custom approval workflows and other advanced features. Default to this mode. |
-| EDITOR | 2 | A simple database change process in SQL editor. Users can execute SQL directly. |
-<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>
-### EmailSetting.SMTPConfig.Authentication
+<a name="bytebase-v1-BatchSyncInstancesResponse"></a>
+### BatchSyncInstancesResponse
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AUTHENTICATION_UNSPECIFIED | 0 | |
-| AUTHENTICATION_NONE | 1 | |
-| PLAIN | 2 | |
-| LOGIN | 3 | |
-| CRAM_MD5 | 4 | |
-<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>
-### EmailSetting.SMTPConfig.Encryption
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ENCRYPTION_UNSPECIFIED | 0 | |
-| ENCRYPTION_NONE | 1 | |
-| STARTTLS | 2 | |
-| SSL_TLS | 3 | |
+<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>
+### BatchUpdateInstancesRequest
-<a name="bytebase-v1-EmailSetting-Type"></a>
-### EmailSetting.Type
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| requests | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | |
-| SMTP | 1 | |
-<a name="bytebase-v1-Setting-SettingName"></a>
-### Setting.SettingName
+<a name="bytebase-v1-BatchUpdateInstancesResponse"></a>
+### BatchUpdateInstancesResponse
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SETTING_NAME_UNSPECIFIED | 0 | |
-| WORKSPACE_PROFILE | 1 | |
-| WORKSPACE_APPROVAL | 2 | |
-| APP_IM | 3 | |
-| AI | 4 | |
-| DATA_CLASSIFICATION | 5 | |
-| SEMANTIC_TYPES | 6 | |
-| ENVIRONMENT | 7 | |
-| EMAIL | 8 | |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| instances | [Instance](#bytebase-v1-Instance) | repeated | |
-<a name="bytebase-v1-WorkspaceApprovalSetting-Rule-Source"></a>
-### WorkspaceApprovalSetting.Rule.Source
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| SOURCE_UNSPECIFIED | 0 | |
-| CHANGE_DATABASE | 1 | |
-| CREATE_DATABASE | 2 | |
-| REQUEST_ROLE | 4 | |
-| REQUEST_ACCESS | 5 | |
+<a name="bytebase-v1-CreateInstanceRequest"></a>
-<a name="bytebase-v1-WorkspaceProfileSetting-MCPCapability"></a>
+### CreateInstanceRequest
-### WorkspaceProfileSetting.MCPCapability
-MCPCapability is the maximum capability an MCP (Model Context Protocol)
-session may have in the workspace. It is a ceiling: a session runs at this
-level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing
-workspaces are unaffected.
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MCP_CAPABILITY_UNSPECIFIED | 0 | |
-| DISABLED | 1 | MCP connections are rejected. |
-| READ_ONLY | 3 | MCP may inspect metadata and run read-only queries. Not enforceable yet: until per-tool enforcement ships, this fails closed and refuses all MCP connections, the same as DISABLED. |
-| READ_WRITE | 4 | MCP may perform mutations, still bounded by the user&#39;s RBAC. |
-
-
-
-
-
-
-
-<a name="bytebase-v1-SettingService"></a>
-### SettingService
-SettingService manages workspace-level settings and configurations.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list |
-| GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get |
-| UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |
-| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| instance | [Instance](#bytebase-v1-Instance) | | The instance to create. |
+| instance_id | [string](#string) | | The ID to use for the instance, which will become the final component of the instance&#39;s resource name.
-
+This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
+| initial_database_project | [string](#string) | | The project to assign newly discovered databases to during initial sync. Format: projects/{project} |
-<a name="v1_actuator_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/actuator_service.proto
+<a name="bytebase-v1-DataSource"></a>
-<a name="bytebase-v1-ActuatorInfo"></a>
+### DataSource
-### ActuatorInfo
-System information and configuration for the Bytebase instance.
-Actuator concept is similar to the Spring Boot Actuator.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| version | [string](#string) | | The Bytebase server version. |
-| git_commit | [string](#string) | | The git commit hash of the build. |
-| readonly | [bool](#bool) | | Whether the Bytebase instance is running in read-only mode. |
-| saas | [bool](#bool) | | Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. |
-| host | [string](#string) | | The host address of the Bytebase instance. |
-| port | [string](#string) | | The port number of the Bytebase instance. |
-| external_url | [string](#string) | | The external URL where users or webhook callbacks access Bytebase. |
-| last_active_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time any API call was made, refreshed on each request. |
-| workspace | [string](#string) | | The unique identifier for the workspace. Format: workspaces/{id} |
-| unlicensed_features | [string](#string) | repeated | List of features that are not licensed. |
-| docker | [bool](#bool) | | Whether the Bytebase instance is running in Docker. |
-| activated_user_count | [int32](#int32) | | The number of activated users. |
-| activated_instance_count | [int32](#int32) | | The number of activated database instances. |
-| total_instance_count | [int32](#int32) | | The total number of database instances. |
-| enable_sample | [bool](#bool) | | Whether sample data setup is enabled. |
-| external_url_from_flag | [bool](#bool) | | Whether the external URL is set via command-line flag (and thus cannot be changed via UI). |
-| replica_count | [int32](#int32) | | The number of active replicas (servers sharing the same database). |
-| restriction | [Restriction](#bytebase-v1-Restriction) | | |
-| default_project | [string](#string) | | The default project for unassigned databases. Format: projects/{id} |
-| user_count_in_iam | [int32](#int32) | | The number of users in the workspace IAM (for seat limit display). |
-| active_vcs_user_count | [int32](#int32) | | The number of active VCS users seen in the active window. |
-
-
-
-
-
-
-<a name="bytebase-v1-DeleteCacheRequest"></a>
+| id | [string](#string) | | The unique identifier for this data source. |
+| type | [DataSourceType](#bytebase-v1-DataSourceType) | | The type of data source (ADMIN or READ_ONLY). |
+| username | [string](#string) | | The username for database authentication. |
+| password | [string](#string) | | The password for database authentication. |
+| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |
+| ssl_ca | [string](#string) | | The SSL certificate authority certificate. |
+| ssl_cert | [string](#string) | | The SSL client certificate. |
+| ssl_key | [string](#string) | | The SSL client private key. |
+| ssl_ca_path | [string](#string) | | The local filesystem path to the SSL certificate authority certificate. |
+| ssl_cert_path | [string](#string) | | The local filesystem path to the SSL client certificate. |
+| ssl_key_path | [string](#string) | | The local filesystem path to the SSL client private key. |
+| ssl_ca_set | [bool](#bool) | | Whether an SSL certificate authority certificate has been configured. |
+| ssl_cert_set | [bool](#bool) | | Whether an SSL client certificate has been configured. |
+| ssl_key_set | [bool](#bool) | | Whether an SSL client private key has been configured. |
+| ssl_ca_path_set | [bool](#bool) | | Whether an SSL certificate authority path has been configured. |
+| ssl_cert_path_set | [bool](#bool) | | Whether an SSL client certificate path has been configured. |
+| ssl_key_path_set | [bool](#bool) | | Whether an SSL client private key path has been configured. |
+| verify_tls_certificate | [bool](#bool) | | verify_tls_certificate enables TLS certificate verification for SSL connections. Default is false (no verification) for backward compatibility. Set to true for secure connections (recommended for production). Only set to false for development or when certificates cannot be properly validated (e.g., self-signed certs, VPN environments). |
+| host | [string](#string) | | The hostname or IP address of the database server. |
+| port | [string](#string) | | The port number of the database server. |
+| database | [string](#string) | | The name of the database to connect to. |
+| srv | [bool](#bool) | | srv, authentication_database and replica_set are used for MongoDB. srv is a boolean flag that indicates whether the host is a DNS SRV record. |
+| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |
+| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |
+| sid | [string](#string) | | sid and service_name are used for Oracle. |
+| service_name | [string](#string) | | |
+| ssh_host | [string](#string) | | Connection over SSH. The hostname of the SSH server agent. Required. |
+| ssh_port | [string](#string) | | The port of the SSH server agent. It&#39;s 22 typically. Required. |
+| ssh_user | [string](#string) | | The user to login the server. Required. |
+| ssh_password | [string](#string) | | The password to login the server. If it&#39;s empty string, no password is required. |
+| ssh_private_key | [string](#string) | | The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). |
+| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required. Used for authentication when connecting to the data source. |
+| authentication_private_key_passphrase | [string](#string) | | Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. |
+| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |
+| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |
+| cloud_sql_ip_type | [DataSource.CloudSQLIPType](#bytebase-v1-DataSource-CloudSQLIPType) | | cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections. CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility. |
+| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |
+| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |
+| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |
+| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |
+| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |
+| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |
+| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |
+| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |
+| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |
+| master_username | [string](#string) | | master_username and master_password are master credentials used by redis sentinel mode. |
+| master_password | [string](#string) | | |
+| redis_type | [DataSource.RedisType](#bytebase-v1-DataSource-RedisType) | | |
+| cluster | [string](#string) | | Cluster is the cluster name for the data source. Used by CockroachDB. |
+| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |
+| project_id | [string](#string) | | project_id and instance_id are the GCP resource identifiers. project_id is used by Spanner and BigQuery; instance_id is used by Spanner. For these engines, host and port optionally override the default Google API endpoint (e.g. a Private Service Connect endpoint like spanner-nonprod.p.googleapis.com). |
+| instance_id | [string](#string) | | |
-### DeleteCacheRequest
-Request message for deleting cache.
+<a name="bytebase-v1-DataSource-AWSCredential"></a>
-<a name="bytebase-v1-GetActuatorInfoRequest"></a>
+### DataSource.AWSCredential
-### GetActuatorInfoRequest
-Request message for getting actuator information.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Optional. The workspace to scope the response to. Format: workspaces/{workspace} When unset, the workspace is resolved from the request context (self-hosted) or no workspace-scoped fields are returned (SaaS). |
+| access_key_id | [string](#string) | | |
+| secret_access_key | [string](#string) | | |
+| session_token | [string](#string) | | |
+| role_arn | [string](#string) | | ARN of IAM role to assume for cross-account access. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html |
+| external_id | [string](#string) | | Optional external ID for additional security when assuming role. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html |
-<a name="bytebase-v1-Restriction"></a>
+<a name="bytebase-v1-DataSource-Address"></a>
-### Restriction
+### DataSource.Address
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| disallow_signup | [bool](#bool) | | Whether self-service user signup is disabled. |
-| disallow_password_signin | [bool](#bool) | | Whether password-based signin is disabled (except for workspace admins). |
-| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password complexity and restriction requirements. |
-| allow_email_code_signin | [bool](#bool) | | Whether email &#43; 6-digit code signin is enabled for this workspace. |
-| password_reset_enabled | [bool](#bool) | | Whether password reset via email is available for this workspace. True when the workspace (or deployment) has an email setting configured. |
+| host | [string](#string) | | |
+| port | [string](#string) | | |
-<a name="bytebase-v1-SetupSampleRequest"></a>
+<a name="bytebase-v1-DataSource-AzureCredential"></a>
-### SetupSampleRequest
-Request message for setting up sample data.
+### DataSource.AzureCredential
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| tenant_id | [string](#string) | | |
+| client_id | [string](#string) | | |
+| client_secret | [string](#string) | | |
-
-
-
-<a name="bytebase-v1-ActuatorService"></a>
+<a name="bytebase-v1-DataSource-ExtraConnectionParametersEntry"></a>
-### ActuatorService
-ActuatorService manages system health and operational information.
+### DataSource.ExtraConnectionParametersEntry
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. When `name` is provided (or the workspace-scoped binding is used), the response includes workspace-scoped fields for that workspace. Permissions required: None |
-| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |
-| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |
-
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="v1_ai_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/ai_service.proto
+<a name="bytebase-v1-DataSource-GCPCredential"></a>
-<a name="bytebase-v1-AIChatMessage"></a>
+### DataSource.GCPCredential
-### AIChatMessage
-A single message in the conversation.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [AIChatMessageRole](#bytebase-v1-AIChatMessageRole) | | The role of the message sender. |
-| content | [string](#string) | optional | The text content of the message. Optional for assistant messages that only contain tool calls. |
-| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls made by the assistant. Only present in assistant messages. |
-| tool_call_id | [string](#string) | optional | The ID of the tool call this message is responding to. Only present in tool messages. |
+| content | [string](#string) | | |
-<a name="bytebase-v1-AIChatRequest"></a>
+<a name="bytebase-v1-DataSourceExternalSecret"></a>
+
+### DataSourceExternalSecret
-### AIChatRequest
-Request message for AIService.Chat.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| messages | [AIChatMessage](#bytebase-v1-AIChatMessage) | repeated | The conversation messages. |
-| tool_definitions | [AIChatToolDefinition](#bytebase-v1-AIChatToolDefinition) | repeated | The tool definitions available to the AI. |
+| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType) | | The type of external secret store. |
+| url | [string](#string) | | The URL of the external secret store. |
+| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. |
+| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |
+| token | [string](#string) | | Token for direct authentication. Interpreted according to token_type: the literal token (PLAIN), an environment variable name (ENVIRONMENT), or a file path (FILE). |
+| token_type | [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType) | | How to interpret the token field when auth_type is TOKEN. |
+| engine_name | [string](#string) | | engine name is the name for secret engine. |
+| secret_name | [string](#string) | | the secret name in the engine to store the password. |
+| password_key_name | [string](#string) | | the key name for the password. |
+| skip_vault_tls_verification | [bool](#bool) | | TLS configuration for connecting to Vault server. These fields are separate from the database TLS configuration in DataSource. skip_vault_tls_verification disables TLS certificate verification for Vault connections. Default is false (verification enabled) for security. Only set to true for development or when certificates cannot be properly validated. |
+| vault_ssl_ca | [string](#string) | | CA certificate for Vault server verification. |
+| vault_ssl_cert | [string](#string) | | Client certificate for mutual TLS authentication with Vault. |
+| vault_ssl_key | [string](#string) | | Client private key for mutual TLS authentication with Vault. |
-<a name="bytebase-v1-AIChatResponse"></a>
+<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption"></a>
+
+### DataSourceExternalSecret.AppRoleAuthOption
-### AIChatResponse
-Response message for AIService.Chat.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [string](#string) | optional | The text content of the AI response. Optional when the response only contains tool calls. |
-| tool_calls | [AIChatToolCall](#bytebase-v1-AIChatToolCall) | repeated | Tool calls the AI wants to make. |
-| usage | [AIChatUsage](#bytebase-v1-AIChatUsage) | optional | Token usage for this provider call, when available. |
+| role_id | [string](#string) | | The role ID for Vault AppRole authentication. |
+| secret_id | [string](#string) | | the secret id for the role without ttl. |
+| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | The type of secret for AppRole authentication. |
+| mount_path | [string](#string) | | The path where the approle auth method is mounted. |
-<a name="bytebase-v1-AIChatToolCall"></a>
+<a name="bytebase-v1-DeleteInstanceRequest"></a>
+
+### DeleteInstanceRequest
-### AIChatToolCall
-A tool call made by the AI.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | The unique ID of this tool call. |
-| name | [string](#string) | | The name of the tool to call. |
-| arguments | [string](#string) | | The JSON-encoded arguments to pass to the tool. |
-| metadata | [string](#string) | optional | Opaque provider-specific metadata (e.g., Gemini thought_signature). Frontend must echo this back unchanged when sending tool results. |
+| name | [string](#string) | | The name of the instance to delete. Format: instances/{instance} |
+| force | [bool](#bool) | | If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. |
+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted instance and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted instances. The instance must already be soft-deleted for this to work. |
-<a name="bytebase-v1-AIChatToolDefinition"></a>
+<a name="bytebase-v1-GetInstanceRequest"></a>
+
+### GetInstanceRequest
-### AIChatToolDefinition
-A tool definition that the AI can invoke.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the tool. |
-| description | [string](#string) | | A description of what the tool does. |
-| parameters_schema | [string](#string) | | The JSON Schema describing the tool&#39;s parameters. |
+| name | [string](#string) | | The name of the instance to retrieve. Format: instances/{instance} |
-<a name="bytebase-v1-AIChatUsage"></a>
+<a name="bytebase-v1-Instance"></a>
+
+### Instance
-### AIChatUsage
-Token usage for a single AI provider call.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| total_tokens | [int32](#int32) | | Total tokens used by the provider call. |
-
-
-
-
-
-
-
-
-<a name="bytebase-v1-AIChatMessageRole"></a>
+| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
+| state | [State](#bytebase-v1-State) | | The lifecycle state of the instance. |
+| title | [string](#string) | | The display title of the instance. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
+| engine_version | [string](#string) | | The version of the database engine. |
+| external_link | [string](#string) | | External URL to the database instance console. |
+| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for connecting to the instance. |
+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| activation | [bool](#bool) | | Whether the instance is activated for use. |
+| roles | [InstanceRole](#bytebase-v1-InstanceRole) | repeated | Database roles available in this instance. |
+| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |
+| sync_databases | [SyncDatabases](#bytebase-v1-SyncDatabases) | | Enable sync for following databases. Not set means sync all schemas &amp; databases. |
+| last_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the instance was synced. |
+| labels | [Instance.LabelsEntry](#bytebase-v1-Instance-LabelsEntry) | repeated | Labels are key-value pairs that can be attached to the instance. For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } |
-### AIChatMessageRole
-Role of a chat message.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| AI_CHAT_MESSAGE_ROLE_UNSPECIFIED | 0 | Unspecified role. |
-| AI_CHAT_MESSAGE_ROLE_SYSTEM | 1 | System message providing instructions. |
-| AI_CHAT_MESSAGE_ROLE_USER | 2 | User message. |
-| AI_CHAT_MESSAGE_ROLE_ASSISTANT | 3 | Assistant (AI) message. |
-| AI_CHAT_MESSAGE_ROLE_TOOL | 4 | Tool result message. |
-
-
+<a name="bytebase-v1-Instance-LabelsEntry"></a>
-<a name="bytebase-v1-AIService"></a>
+### Instance.LabelsEntry
-### AIService
-AIService provides AI chat capabilities for the page agent.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| Chat | [AIChatRequest](#bytebase-v1-AIChatRequest) | [AIChatResponse](#bytebase-v1-AIChatResponse) | Chat sends a conversation with tool definitions to the configured AI provider and returns the AI response. |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="v1_iam_policy-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/iam_policy.proto
+<a name="bytebase-v1-InstanceResource"></a>
-<a name="bytebase-v1-Binding"></a>
+### InstanceResource
-### Binding
-Binding associates members with a role and optional conditions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |
-| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} For service accounts, the member should be: serviceAccount:{email} For workload identities, the member should be: workloadIdentity:{email} |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Support variables: resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by any role with SQL Editor read (e.g. &#34;roles/sqlEditorUser&#34;, &#34;roles/sqlEditorReadUser&#34;) or write (bb.sql.ddl / bb.sql.dml) access, support &#34;==&#34; operator. resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator. resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator. resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support &#34;in&#34; operator. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
-
-Known limitations of table/schema-scoped DDL/DML grants: - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary. - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get). - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant). - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session&#39;s default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements. - A write target in a different project than the SQL-Editor session&#39;s database is denied: the per-target check evaluates the session project&#39;s IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project). - Enforcement is on the statement&#39;s literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object. - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is: - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index. - Modeled non-table object DDL (gated at the DATABASE level by the object&#39;s own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below). NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural &#34;write-target object database&#34; extraction layer to remove this allowlist dependence is tracked as a follow-up. - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated. Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.
+| title | [string](#string) | | The display title of the instance. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine type. |
+| engine_version | [string](#string) | | The version of the database engine. |
+| data_sources | [DataSource](#bytebase-v1-DataSource) | repeated | Data source configurations for the instance. |
+| activation | [bool](#bool) | | Whether the instance is activated. |
+| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
-For example: resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;] resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;] resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.environment_id in [&#34;test&#34;] request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) |
-| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |
+<a name="bytebase-v1-KerberosConfig"></a>
-<a name="bytebase-v1-BindingDelta"></a>
+### KerberosConfig
-### BindingDelta
-A single change to a binding.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |
-| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |
-| member | [string](#string) | | Follows the same format of Binding.members. |
-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |
+| primary | [string](#string) | | The primary component of the Kerberos principal. |
+| instance | [string](#string) | | The instance component of the Kerberos principal. |
+| realm | [string](#string) | | The Kerberos realm. |
+| keytab | [bytes](#bytes) | | The keytab file contents for authentication. |
+| kdc_host | [string](#string) | | The hostname of the Key Distribution Center (KDC). |
+| kdc_port | [string](#string) | | The port of the Key Distribution Center (KDC). |
+| kdc_transport_protocol | [string](#string) | | The transport protocol for KDC communication (tcp or udp). |
-<a name="bytebase-v1-GetIamPolicyRequest"></a>
+<a name="bytebase-v1-ListInstanceDatabaseRequest"></a>
+
+### ListInstanceDatabaseRequest
-### GetIamPolicyRequest
-Request message for getting an IAM policy.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |
+| name | [string](#string) | | The name of the instance. Format: instances/{instance} |
+| instance | [Instance](#bytebase-v1-Instance) | optional | The target instance. We need to set this field if the target instance is not created yet. |
-<a name="bytebase-v1-IamPolicy"></a>
+<a name="bytebase-v1-ListInstanceDatabaseResponse"></a>
+
+### ListInstanceDatabaseResponse
-### IamPolicy
-IAM policy that binds members to roles.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |
-| etag | [string](#string) | | The current etag of the policy. If an etag is provided and does not match the current etag of the policy, the call will be blocked and an ABORTED error will be returned. |
+| databases | [string](#string) | repeated | All database name list in the instance. |
-<a name="bytebase-v1-PolicyDelta"></a>
+<a name="bytebase-v1-ListInstancesRequest"></a>
+
+### ListInstancesRequest
-### PolicyDelta
-Describes changes between two IAM policies.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |
+| page_size | [int32](#int32) | | The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 10 instances will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListInstances` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListInstances` must match the call that provided the page token. |
+| show_deleted | [bool](#bool) | | Show deleted instances if specified. |
+| filter | [string](#string) | | Filter the instance. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filters: - name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator. - resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator. - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - state: the instance state, check State enum for values, support &#34;==&#34; operator. - engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator. - port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
+For example: name == &#34;sample instance&#34; name.contains(&#34;sample&#34;) resource_id == &#34;sample-instance&#34; resource_id.contains(&#34;sample&#34;) state == &#34;DELETED&#34; environment == &#34;environments/test&#34; environment == &#34;&#34; (find instances which environment is not set) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) host == &#34;127.0.0.1&#34; host.contains(&#34;127.0&#34;) port == &#34;54321&#34; port.contains(&#34;543&#34;) labels.org_group == &#34;infrastructure&#34; labels.environment in [&#34;prod&#34;, &#34;production&#34;] project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34; host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; |
+| order_by | [string](#string) | | The order by of instances. Support title, environment. The default sorting order is ascending. For example: - order_by = &#34;title&#34; - order_by = &#34;title desc&#34; - order_by = &#34;title desc, environment asc&#34; |
-<a name="bytebase-v1-SetIamPolicyRequest"></a>
-### SetIamPolicyRequest
-Request message for setting an IAM policy.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |
-| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |
-| etag | [string](#string) | | The current etag of the policy. |
+<a name="bytebase-v1-ListInstancesResponse"></a>
+### ListInstancesResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| instances | [Instance](#bytebase-v1-Instance) | repeated | The instances from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-<a name="bytebase-v1-BindingDelta-Action"></a>
-### BindingDelta.Action
-Type of action performed on a binding.
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ACTION_UNSPECIFIED | 0 | Unspecified action. |
-| ADD | 1 | Add a binding. |
-| REMOVE | 2 | Remove a binding. |
+<a name="bytebase-v1-RemoveDataSourceRequest"></a>
-
+### RemoveDataSourceRequest
-
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the instance to remove a data source from. Format: instances/{instance} |
+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. Only READ_ONLY data source can be removed. |
-<a name="v1_audit_log_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/audit_log_service.proto
-<a name="bytebase-v1-AuditData"></a>
+<a name="bytebase-v1-SASLConfig"></a>
+
+### SASLConfig
-### AuditData
-Additional audit data specific to certain operations.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | Changes to IAM policies. |
+| krb_config | [KerberosConfig](#bytebase-v1-KerberosConfig) | | Kerberos authentication configuration. |
-<a name="bytebase-v1-AuditLog"></a>
+<a name="bytebase-v1-SyncDatabases"></a>
+
+### SyncDatabases
-### AuditLog
-Audit log entry recording system activity or API call.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the audit log was created. |
-| user | [string](#string) | | The user who performed the action. Format: users/{email} |
-| method | [string](#string) | | The method or action being audited. For example: /bytebase.v1.SQLService/Query or bb.project.repository.push |
-| severity | [AuditLog.Severity](#bytebase-v1-AuditLog-Severity) | | The severity level of this audit log entry. |
-| resource | [string](#string) | | The resource associated with this audit log. |
-| request | [string](#string) | | The request payload in JSON format. |
-| response | [string](#string) | | The response payload in JSON format. Some fields may be omitted if they are too large or contain sensitive information. |
-| status | [google.rpc.Status](#google-rpc-Status) | | The status of the operation. |
-| latency | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration of the operation. |
-| service_data | [google.protobuf.Any](#google-protobuf-Any) | | Service-specific metadata about the request, response, and activities. |
-| request_metadata | [RequestMetadata](#bytebase-v1-RequestMetadata) | | Metadata about the request context. |
+| databases | [string](#string) | repeated | |
-<a name="bytebase-v1-ExportAuditLogsRequest"></a>
+<a name="bytebase-v1-SyncInstanceRequest"></a>
+
+### SyncInstanceRequest
-### ExportAuditLogsRequest
-Request message for exporting audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | |
-| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. Check the filter field in the SearchAuditLogsRequest message. |
-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
-| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |
-| page_token | [string](#string) | | A page token, received from a previous `ExportAuditLogs` call. Provide this to retrieve the subsequent page. |
+| name | [string](#string) | | The name of instance. Format: instances/{instance} |
+| enable_full_sync | [bool](#bool) | | When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only the instance metadata (such as the database list) and any newly discovered databases will be synced. |
-<a name="bytebase-v1-ExportAuditLogsResponse"></a>
+<a name="bytebase-v1-SyncInstanceResponse"></a>
+
+### SyncInstanceResponse
-### ExportAuditLogsResponse
-Response message for exporting audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| content | [bytes](#bytes) | | The exported audit log content in the requested format. |
-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |
+| databases | [string](#string) | repeated | All database name list in the instance. |
-<a name="bytebase-v1-RequestMetadata"></a>
+<a name="bytebase-v1-UndeleteInstanceRequest"></a>
+
+### UndeleteInstanceRequest
-### RequestMetadata
-Metadata about the incoming request.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| caller_ip | [string](#string) | | The IP address of the request originator. |
-| caller_supplied_user_agent | [string](#string) | | The user agent string provided by the caller. This is supplied by the client and is not authenticated. |
+| name | [string](#string) | | The name of the deleted instance. Format: instances/{instance} |
-<a name="bytebase-v1-SearchAuditLogsRequest"></a>
+<a name="bytebase-v1-UpdateDataSourceRequest"></a>
+
+### UpdateDataSourceRequest
-### SearchAuditLogsRequest
-Request message for searching audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | |
-| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter: - method: the API name, can be found in the docs, should start with &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator. - severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values. - user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator. - create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
+| name | [string](#string) | | The name of the instance to update a data source. Format: instances/{instance} |
+| data_source | [DataSource](#bytebase-v1-DataSource) | | Identified by data source ID. |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| validate_only | [bool](#bool) | | Validate only also tests the data source connection. |
+| allow_missing | [bool](#bool) | | If set to true, and the data source is not found, a new data source will be created. In this situation, `update_mask` is ignored. |
-For example: - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; |
-| order_by | [string](#string) | | The order by of the log. Only support order by create_time. The default sorting order is ascending. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
-| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 10 log entries will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. |
-| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |
+<a name="bytebase-v1-UpdateInstanceRequest"></a>
-<a name="bytebase-v1-SearchAuditLogsResponse"></a>
+### UpdateInstanceRequest
-### SearchAuditLogsResponse
-Response message for searching audit logs.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| audit_logs | [AuditLog](#bytebase-v1-AuditLog) | repeated | |
-| next_page_token | [string](#string) | | A token to retrieve next page of log entities. Pass this value in the page_token field in the subsequent call to retrieve the next page of log entities. |
+| instance | [Instance](#bytebase-v1-Instance) | | The instance to update.
+
+The instance&#39;s `name` field is used to identify the instance to update. Format: instances/{instance} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the instance is not found, a new instance will be created. In this situation, `update_mask` is ignored. |
@@ -7497,1156 +7246,1276 @@ Response message for searching audit logs.
-<a name="bytebase-v1-AuditLog-Severity"></a>
+<a name="bytebase-v1-DataSource-AuthenticationType"></a>
+
+### DataSource.AuthenticationType
-### AuditLog.Severity
-Severity level for audit log entries.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| SEVERITY_UNSPECIFIED | 0 | Unspecified severity level. |
-| DEBUG | 1 | Debug-level information. |
-| INFO | 2 | Informational messages. |
-| NOTICE | 3 | Notable events. |
-| WARNING | 4 | Warning conditions. |
-| ERROR | 5 | Error conditions. |
-| CRITICAL | 6 | Critical conditions. |
-| ALERT | 7 | Action must be taken immediately. |
-| EMERGENCY | 8 | System is unusable. |
+| AUTHENTICATION_UNSPECIFIED | 0 | |
+| PASSWORD | 1 | |
+| GOOGLE_CLOUD_SQL_IAM | 2 | |
+| AWS_RDS_IAM | 3 | |
+| AZURE_IAM | 4 | |
-
-
+<a name="bytebase-v1-DataSource-CloudSQLIPType"></a>
+### DataSource.CloudSQLIPType
+CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.
-<a name="bytebase-v1-AuditLogService"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CLOUD_SQL_IP_TYPE_UNSPECIFIED | 0 | |
+| PUBLIC | 1 | |
+| PRIVATE | 2 | |
+| PSC | 3 | |
-### AuditLogService
-AuditLogService manages audit logs for system activities and API calls.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| SearchAuditLogs | [SearchAuditLogsRequest](#bytebase-v1-SearchAuditLogsRequest) | [SearchAuditLogsResponse](#bytebase-v1-SearchAuditLogsResponse) | Searches audit logs with optional filtering and pagination. Permissions required: bb.auditLogs.search |
-| ExportAuditLogs | [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest) | [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse) | Exports audit logs in a specified format for external analysis. Permissions required: bb.auditLogs.export |
-
+<a name="bytebase-v1-DataSource-RedisType"></a>
+### DataSource.RedisType
-<a name="v1_user_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| REDIS_TYPE_UNSPECIFIED | 0 | |
+| STANDALONE | 1 | |
+| SENTINEL | 2 | |
+| CLUSTER | 3 | |
-## v1/user_service.proto
+<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>
-<a name="bytebase-v1-BatchGetUsersRequest"></a>
+### DataSourceExternalSecret.AppRoleAuthOption.SecretType
-### BatchGetUsersRequest
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
+| PLAIN | 1 | Plain text secret. |
+| ENVIRONMENT | 2 | Secret from environment variable. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| names | [string](#string) | repeated | The user names to retrieve. Format: users/{email} |
+<a name="bytebase-v1-DataSourceExternalSecret-AuthType"></a>
+### DataSourceExternalSecret.AuthType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| AUTH_TYPE_UNSPECIFIED | 0 | Unspecified authentication type. |
+| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |
+| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |
-<a name="bytebase-v1-BatchGetUsersResponse"></a>
-### BatchGetUsersResponse
+<a name="bytebase-v1-DataSourceExternalSecret-SecretType"></a>
+### DataSourceExternalSecret.SecretType
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SECRET_TYPE_UNSPECIFIED | 0 | Unspecified secret type. |
+| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |
+| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |
+| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |
+| AZURE_KEY_VAULT | 4 | ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets |
+<a name="bytebase-v1-DataSourceExternalSecret-TokenType"></a>
+### DataSourceExternalSecret.TokenType
-<a name="bytebase-v1-CreateUserRequest"></a>
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TOKEN_TYPE_UNSPECIFIED | 0 | Unspecified token type, treated as PLAIN for backward compatibility. |
+| PLAIN | 1 | The token field holds the literal token value. |
+| ENVIRONMENT | 2 | The token field holds the name of an environment variable on the Bytebase server that holds the token value. |
+| FILE | 3 | The token field holds a path to a file on the Bytebase server that holds the token value. |
-### CreateUserRequest
+<a name="bytebase-v1-DataSourceType"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| user | [User](#bytebase-v1-User) | | The user to create. |
+### DataSourceType
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| DATA_SOURCE_UNSPECIFIED | 0 | Unspecified data source type. |
+| ADMIN | 1 | Admin data source with write permissions. |
+| READ_ONLY | 2 | Read-only data source for query operations. |
+
+
-<a name="bytebase-v1-DeleteUserRequest"></a>
-### DeleteUserRequest
+<a name="bytebase-v1-InstanceService"></a>
+### InstanceService
+InstanceService manages database instances and their connections.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetInstance | [GetInstanceRequest](#bytebase-v1-GetInstanceRequest) | [Instance](#bytebase-v1-Instance) | Gets a database instance by name. Permissions required: bb.instances.get |
+| ListInstances | [ListInstancesRequest](#bytebase-v1-ListInstancesRequest) | [ListInstancesResponse](#bytebase-v1-ListInstancesResponse) | Lists all database instances. Permissions required: bb.instances.list |
+| CreateInstance | [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Creates a new database instance. Permissions required: bb.instances.create |
+| UpdateInstance | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | [Instance](#bytebase-v1-Instance) | Updates a database instance. Permissions required: bb.instances.update |
+| DeleteInstance | [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes or soft-deletes a database instance. Permissions required: bb.instances.delete |
+| UndeleteInstance | [UndeleteInstanceRequest](#bytebase-v1-UndeleteInstanceRequest) | [Instance](#bytebase-v1-Instance) | Restores a soft-deleted database instance. Permissions required: bb.instances.undelete |
+| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | Syncs database schemas and metadata from an instance. Permissions required: bb.instances.sync |
+| ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | Lists all databases within an instance without creating them. Permissions required: bb.instances.get |
+| BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | Syncs multiple instances in a single request. Permissions required: bb.instances.sync |
+| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | Updates multiple instances in a single request. Permissions required: bb.instances.update |
+| AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Adds a read-only data source to an instance. Permissions required: bb.instances.update |
+| RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Removes a read-only data source from an instance. Permissions required: bb.instances.update |
+| UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | Updates a data source configuration. Permissions required: bb.instances.update |
+
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user to delete. Format: users/{email} |
+<a name="v1_database_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+## v1/database_service.proto
-<a name="bytebase-v1-GetUserRequest"></a>
+<a name="bytebase-v1-BatchGetDatabasesRequest"></a>
-### GetUserRequest
+### BatchGetDatabasesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user to retrieve. Format: users/{email} |
+| parent | [string](#string) | | The parent resource shared by all databases being retrieved. - projects/{project}: batch get databases in a project; - instances/{instances}: batch get databases in a instance; Use &#34;-&#34; as wildcard to batch get databases across parent. |
+| names | [string](#string) | repeated | The list of database names to retrieve. |
-<a name="bytebase-v1-ListUsersRequest"></a>
+<a name="bytebase-v1-BatchGetDatabasesResponse"></a>
-### ListUsersRequest
+### BatchGetDatabasesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| page_size | [int32](#int32) | | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 10 users will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page.
+| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |
-When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. |
-| show_deleted | [bool](#bool) | | Show deleted users if specified. |
-| filter | [string](#string) | | Filter is used to filter users returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator. - email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator. - state: check State enum for values, support &#34;==&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-For example: name == &#34;ed&#34; name.contains(&#34;ed&#34;) email == &#34;[email protected]&#34; email.contains(&#34;ed&#34;) state == &#34;DELETED&#34; project == &#34;projects/sample-project&#34; You can combine filter conditions like: name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; (name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; |
+<a name="bytebase-v1-BatchSyncDatabasesRequest"></a>
+### BatchSyncDatabasesRequest
-<a name="bytebase-v1-ListUsersResponse"></a>
-### ListUsersResponse
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. |
+| names | [string](#string) | repeated | The list of database names to sync. |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| users | [User](#bytebase-v1-User) | repeated | The users from the specified request. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+<a name="bytebase-v1-BatchSyncDatabasesResponse"></a>
+### BatchSyncDatabasesResponse
-<a name="bytebase-v1-UndeleteUserRequest"></a>
-### UndeleteUserRequest
+
+
+
+
+<a name="bytebase-v1-BatchUpdateDatabasesRequest"></a>
+
+### BatchUpdateDatabasesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the deleted user. Format: users/{email} |
+| parent | [string](#string) | | The parent resource shared by all databases being updated. Format: instances/{instance} If the operation spans parents, a dash (-) may be accepted as a wildcard. We only support updating the project of databases for now. |
+| requests | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | repeated | The request message specifying the resources to update. A maximum of 1000 databases can be modified in a batch. |
-<a name="bytebase-v1-UpdateEmailRequest"></a>
+<a name="bytebase-v1-BatchUpdateDatabasesResponse"></a>
-### UpdateEmailRequest
+### BatchUpdateDatabasesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user whose email to update. Format: users/{email} Note: This is the current (old) email address. The new email is specified in the &#39;email&#39; field. |
-| email | [string](#string) | | The new email address. |
-
+| databases | [Database](#bytebase-v1-Database) | repeated | Databases updated. |
-<a name="bytebase-v1-UpdateUserRequest"></a>
-### UpdateUserRequest
+<a name="bytebase-v1-BoundingBox"></a>
+### BoundingBox
+BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| user | [User](#bytebase-v1-User) | | The user to update.
-
-The user&#39;s `name` field is used to identify the user to update. Format: users/{email} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
-| regenerate_temp_mfa_secret | [bool](#bool) | | The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user. This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. |
-| regenerate_recovery_codes | [bool](#bool) | | The regenerate_recovery_codes flag means to regenerate recovery codes for user. |
-| allow_missing | [bool](#bool) | | If set to true, and the user is not found, a new user will be created. In this situation, `update_mask` is ignored. |
-
+| xmin | [double](#double) | | Minimum X coordinate |
+| ymin | [double](#double) | | Minimum Y coordinate |
+| xmax | [double](#double) | | Maximum X coordinate |
+| ymax | [double](#double) | | Maximum Y coordinate |
-<a name="bytebase-v1-User"></a>
-### User
+<a name="bytebase-v1-CheckConstraintMetadata"></a>
+### CheckConstraintMetadata
+CheckConstraintMetadata is the metadata for check constraints.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the user. Format: users/{email} |
-| state | [State](#bytebase-v1-State) | | The lifecycle state of the user account. |
-| email | [string](#string) | | The email address of the user, used for login and notifications. |
-| title | [string](#string) | | The display title or full name of the user. |
-| password | [string](#string) | | The password for authentication. Only used during user creation or password updates. |
-| service_key | [string](#string) | | The service key for service account authentication. |
-| mfa_enabled | [bool](#bool) | | The mfa_enabled flag means if the user has enabled MFA. |
-| temp_otp_secret | [string](#string) | | Temporary OTP secret used during MFA setup and regeneration. |
-| temp_recovery_codes | [string](#string) | repeated | Temporary recovery codes used during MFA setup and regeneration. |
-| temp_otp_secret_created_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. |
-| phone | [string](#string) | | Should be a valid E.164 compliant phone number. Could be empty. |
-| profile | [User.Profile](#bytebase-v1-User-Profile) | | User profile metadata. |
-| groups | [string](#string) | repeated | The groups for the user. Format: groups/{email} |
-| workspace | [string](#string) | | The current workspace. Format: workspaces/{id} |
-
+| name | [string](#string) | | The name is the name of a check constraint. |
+| expression | [string](#string) | | The expression is the expression of a check constraint. |
-<a name="bytebase-v1-User-Profile"></a>
-### User.Profile
+<a name="bytebase-v1-ColumnMetadata"></a>
+### ColumnMetadata
+ColumnMetadata is the metadata for columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| last_login_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user successfully logged in. |
-| last_change_password_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The last time the user changed their password. |
-| source | [string](#string) | | source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. |
+| name | [string](#string) | | The name is the name of a column. |
+| position | [int32](#int32) | | The position is the position in columns. |
+| has_default | [bool](#bool) | | |
+| default | [string](#string) | | The default value of column. |
+| default_on_null | [bool](#bool) | | Oracle specific metadata. The default_on_null is the default on null of a column. |
+| on_update | [string](#string) | | The on_update is the on update action of a column. For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. |
+| nullable | [bool](#bool) | | The nullable is the nullable of a column. |
+| type | [string](#string) | | The type is the type of a column. |
+| character_set | [string](#string) | | The character_set is the character_set of a column. |
+| collation | [string](#string) | | The collation is the collation of a column. |
+| comment | [string](#string) | | The comment is the comment of a column. |
+| generation | [GenerationMetadata](#bytebase-v1-GenerationMetadata) | | The generation is the generation of a column. |
+| is_identity | [bool](#bool) | | |
+| identity_generation | [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration) | | The identity_generation is for identity columns, PG only. |
+| identity_seed | [int64](#int64) | | The identity_seed is for identity columns, MSSQL only. |
+| identity_increment | [int64](#int64) | | The identity_increment is for identity columns, MSSQL only. |
+| default_constraint_name | [string](#string) | | The default_constraint_name is the name of the default constraint, MSSQL only. In MSSQL, default values are implemented as named constraints. When modifying or dropping a column&#39;s default value, you must reference the constraint by name. This field stores the actual constraint name from the database.
+Example: A column definition like: CREATE TABLE employees ( status NVARCHAR(20) DEFAULT &#39;active&#39; )
+Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39; or a user-defined name if specified: ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; FOR status
+To modify the default, you must first drop the existing constraint by name: ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760 ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;inactive&#39; FOR status
+This field is populated when syncing from the database. When empty (e.g., when parsing from SQL files), the system cannot automatically drop the constraint. |
+| srid | [uint32](#uint32) | optional | The spatial reference system identifier of a spatial column, MySQL 8.0 only. Unset means the column declares no SRID; presence carries the explicit SRID, including the valid SRID 0. SRS_IDs are unsigned 32-bit (custom SRSs may exceed int32). |
+| is_invisible | [bool](#bool) | | Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. |
-
-
-
-<a name="bytebase-v1-UserService"></a>
-### UserService
-UserService manages user accounts and authentication.
+<a name="bytebase-v1-CompositeTypeAttribute"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetUser | [GetUserRequest](#bytebase-v1-GetUserRequest) | [User](#bytebase-v1-User) | Get the user. Any authenticated user can get the user. Permissions required: bb.users.get |
-| BatchGetUsers | [BatchGetUsersRequest](#bytebase-v1-BatchGetUsersRequest) | [BatchGetUsersResponse](#bytebase-v1-BatchGetUsersResponse) | Get the users in batch. Any authenticated user can batch get users. Permissions required: bb.users.get |
-| GetCurrentUser | [.google.protobuf.Empty](#google-protobuf-Empty) | [User](#bytebase-v1-User) | Get the current authenticated user. Permissions required: None |
-| ListUsers | [ListUsersRequest](#bytebase-v1-ListUsersRequest) | [ListUsersResponse](#bytebase-v1-ListUsersResponse) | List all users. Any authenticated user can list users. Permissions required: bb.users.list |
-| CreateUser | [CreateUserRequest](#bytebase-v1-CreateUserRequest) | [User](#bytebase-v1-User) | Creates a user in the caller&#39;s workspace (admin action, self-hosted only). In SaaS mode, admins should add users via workspace IAM policy instead. Permissions required: bb.users.create |
-| UpdateUser | [UpdateUserRequest](#bytebase-v1-UpdateUserRequest) | [User](#bytebase-v1-User) | Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self) |
-| DeleteUser | [DeleteUserRequest](#bytebase-v1-DeleteUserRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted. Permissions required: bb.users.delete |
-| UndeleteUser | [UndeleteUserRequest](#bytebase-v1-UndeleteUserRequest) | [User](#bytebase-v1-User) | Restores a deleted user. Permissions required: bb.users.undelete |
-| UpdateEmail | [UpdateEmailRequest](#bytebase-v1-UpdateEmailRequest) | [User](#bytebase-v1-User) | Updates a user&#39;s email address. Permissions required: bb.users.updateEmail |
+### CompositeTypeAttribute
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the attribute. |
+| type | [string](#string) | | The attribute type. User-defined types are always schema-qualified. |
+| collation | [string](#string) | | The non-default collation of the attribute as an emit-ready SQL identifier reference (quoted as needed, schema-qualified when outside pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. |
+| comment | [string](#string) | | The comment describing the attribute. |
-<a name="v1_auth_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/auth_service.proto
-<a name="bytebase-v1-ExchangeTokenRequest"></a>
-### ExchangeTokenRequest
+<a name="bytebase-v1-CompositeTypeMetadata"></a>
+
+### CompositeTypeMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | External OIDC token (JWT) from CI/CD platform. |
-| email | [string](#string) | | Workload Identity email for identifying which identity to authenticate as. Format: {name}@workload.bytebase.com |
+| name | [string](#string) | | The name of the composite type. |
+| attributes | [CompositeTypeAttribute](#bytebase-v1-CompositeTypeAttribute) | repeated | The ordered attributes of the composite type. |
+| comment | [string](#string) | | The comment describing the composite type. |
-<a name="bytebase-v1-ExchangeTokenResponse"></a>
+<a name="bytebase-v1-Database"></a>
-### ExchangeTokenResponse
+### Database
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| access_token | [string](#string) | | Bytebase access token. |
+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} {database} is the database name in the instance. |
+| state | [State](#bytebase-v1-State) | | The existence of a database. |
+| successful_sync_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest synchronization time. |
+| project | [string](#string) | | The project for a database. Format: projects/{project} |
+| release | [string](#string) | | The release that was last applied to this database. Format: projects/{project}/releases/{release_id} Example: projects/my-project/releases/release_20260115-RC00 |
+| environment | [string](#string) | optional | The environment resource. Format: environments/prod where prod is the environment resource ID. |
+| effective_environment | [string](#string) | optional | The effective environment based on environment tag above and environment tag on the instance. Inheritance follows https://cloud.google.com/resource-manager/docs/tags/tags-overview. |
+| labels | [Database.LabelsEntry](#bytebase-v1-Database-LabelsEntry) | repeated | Labels will be used for deployment and policy control. |
+| instance_resource | [InstanceResource](#bytebase-v1-InstanceResource) | | The instance resource. |
+| backup_available | [bool](#bool) | | The database is available for DML prior backup. |
+| sync_status | [SyncStatus](#bytebase-v1-SyncStatus) | | The sync status of the database. |
+| sync_error | [string](#string) | | The error message if sync failed. |
-<a name="bytebase-v1-IdentityProviderContext"></a>
+<a name="bytebase-v1-Database-LabelsEntry"></a>
+
+### Database.LabelsEntry
-### IdentityProviderContext
-Context for identity provider authentication.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| oauth2_context | [OAuth2IdentityProviderContext](#bytebase-v1-OAuth2IdentityProviderContext) | | OAuth2 authentication context. |
-| oidc_context | [OIDCIdentityProviderContext](#bytebase-v1-OIDCIdentityProviderContext) | | OpenID Connect authentication context. |
-
+| key | [string](#string) | | |
+| value | [string](#string) | | |
-<a name="bytebase-v1-LoginRequest"></a>
-### LoginRequest
+<a name="bytebase-v1-DatabaseMetadata"></a>
+### DatabaseMetadata
+DatabaseMetadata is the metadata for databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | User&#39;s email address. |
-| password | [string](#string) | | User&#39;s password for authentication. |
-| web | [bool](#bool) | | If true, sets access token and refresh token as HTTP-only cookies instead of returning the token in the response body. Use for browser-based clients. |
-| idp_name | [string](#string) | | The name of the identity provider. Format: idps/{idp} |
-| idp_context | [IdentityProviderContext](#bytebase-v1-IdentityProviderContext) | | The idp_context is used to get the user information from identity provider. |
-| otp_code | [string](#string) | optional | The otp_code is used to verify the user&#39;s identity by MFA. |
-| recovery_code | [string](#string) | optional | The recovery_code is used to recovery the user&#39;s identity with MFA. |
-| mfa_temp_token | [string](#string) | optional | The mfa_temp_token is used to verify the user&#39;s identity by MFA. |
-| email_code | [string](#string) | optional | 6-digit code from email for passwordless login/signup. Pairs with `email`. Mutually exclusive with `password` and `idp_name`. |
-| workspace | [string](#string) | optional | Preferred workspace to land in after login. If the user is a member of this workspace, the token is issued for it; otherwise falls back to the default resolution (last login workspace → first membership). Typically populated from the ?workspace= query parameter in invite links. Format: workspaces/{workspace} |
+| name | [string](#string) | | The database metadata name.
+Format: instances/{instance}/databases/{database}/metadata |
+| schemas | [SchemaMetadata](#bytebase-v1-SchemaMetadata) | repeated | The schemas is the list of schemas in a database. |
+| character_set | [string](#string) | | The character_set is the character set of a database. |
+| collation | [string](#string) | | The collation is the collation of a database. |
+| extensions | [ExtensionMetadata](#bytebase-v1-ExtensionMetadata) | repeated | The extensions is the list of extensions in a database. |
+| owner | [string](#string) | | The owner of the database. |
+| search_path | [string](#string) | | The search_path is the search path of a PostgreSQL database. |
-<a name="bytebase-v1-LoginResponse"></a>
-### LoginResponse
+<a name="bytebase-v1-DatabaseSDLSchema"></a>
+### DatabaseSDLSchema
+DatabaseSDLSchema contains the schema in SDL format.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| token | [string](#string) | | Access token for authenticated requests. Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. |
-| mfa_temp_token | [string](#string) | optional | Temporary token for MFA verification. |
-| require_reset_password | [bool](#bool) | | Whether user must reset password before continuing. |
-| user | [User](#bytebase-v1-User) | | The user from the successful login. |
+| schema | [bytes](#bytes) | | The SDL schema content. - For SINGLE_FILE format: contains the complete SDL schema as a text string. - For MULTI_FILE format: contains the ZIP archive as binary data. |
+| content_type | [string](#string) | | The MIME type of the schema content. Indicates how the client should interpret the schema field. Examples: - &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format - &#34;application/zip&#34; for MULTI_FILE format |
-<a name="bytebase-v1-LogoutRequest"></a>
+<a name="bytebase-v1-DatabaseSchema"></a>
-### LogoutRequest
-Request to logout current user session.
+### DatabaseSchema
+DatabaseSchema is the metadata for databases.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| schema | [string](#string) | | The schema dump from database. |
-<a name="bytebase-v1-OAuth2IdentityProviderContext"></a>
-### OAuth2IdentityProviderContext
-OAuth2 authentication context.
+
+<a name="bytebase-v1-DependencyColumn"></a>
+
+### DependencyColumn
+DependencyColumn is the metadata for dependency columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorization code from OAuth2 provider. |
+| schema | [string](#string) | | The schema is the schema of a reference column. |
+| table | [string](#string) | | The table is the table of a reference column. |
+| column | [string](#string) | | The column is the name of a reference column. |
-<a name="bytebase-v1-OIDCIdentityProviderContext"></a>
+<a name="bytebase-v1-DependencyTable"></a>
+
+### DependencyTable
-### OIDCIdentityProviderContext
-OpenID Connect authentication context.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [string](#string) | | Authorization code from OIDC provider. |
-
-
-
-
+| schema | [string](#string) | | The schema is the schema of a reference table. |
+| table | [string](#string) | | The table is the name of a reference table. |
-<a name="bytebase-v1-RefreshRequest"></a>
-### RefreshRequest
-Request to refresh the access token.
+<a name="bytebase-v1-DiffMetadataRequest"></a>
+### DiffMetadataRequest
-<a name="bytebase-v1-RefreshResponse"></a>
-### RefreshResponse
-Response from refreshing the access token.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The database whose current schema is the diff source. Format: instances/{instance}/databases/{database} |
+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. The source metadata and the engine are read from the database, so only the target travels in the request. Must describe the COMPLETE target schema: the diff runs against the full stored source, so any object omitted from the target (for example by a truncated metadata fetch) is treated as dropped. |
-<a name="bytebase-v1-RequestPasswordResetRequest"></a>
+<a name="bytebase-v1-DiffMetadataResponse"></a>
-### RequestPasswordResetRequest
+### DiffMetadataResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | The email address of the account to reset. |
-| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |
+| diff | [string](#string) | | The generated migration statements. |
-<a name="bytebase-v1-ResetPasswordRequest"></a>
+<a name="bytebase-v1-DiffSchemaRequest"></a>
-### ResetPasswordRequest
+### DiffSchemaRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | The email address of the account. |
-| code | [string](#string) | | The 6-digit code from the reset email. |
-| new_password | [string](#string) | | The new password to set. |
+| name | [string](#string) | | The name of the database or changelog. Format: database: instances/{instance}/databases/{database} changelog: instances/{instance}/databases/{database}/changelogs/{changelog} |
+| schema | [string](#string) | | The target schema. |
+| changelog | [string](#string) | | The resource name of the changelog Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
-<a name="bytebase-v1-SendEmailLoginCodeRequest"></a>
+<a name="bytebase-v1-DiffSchemaResponse"></a>
-### SendEmailLoginCodeRequest
+### DiffSchemaResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | The email address to send the code to. |
-| workspace | [string](#string) | optional | Optional workspace context captured at send time, used to locate the EMAIL setting, and later (at verify time) for signup gate checks and workspace assignment. Unset for SaaS brand-new signup (no workspace exists yet). Format: workspaces/{workspace} |
-
+| diff | [string](#string) | | |
-<a name="bytebase-v1-SignupRequest"></a>
-### SignupRequest
+<a name="bytebase-v1-DimensionConstraint"></a>
+### DimensionConstraint
+DimensionConstraint defines constraints for a spatial dimension.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| email | [string](#string) | | The email for the new account. |
-| password | [string](#string) | | The password for the new account. |
-| title | [string](#string) | | The display name of the user. |
-
+| dimension | [string](#string) | | Dimension name/type (X, Y, Z, M, etc.) |
+| min_value | [double](#double) | | Minimum value for this dimension |
+| max_value | [double](#double) | | Maximum value for this dimension |
+| tolerance | [double](#double) | | Tolerance for this dimension |
-<a name="bytebase-v1-SwitchWorkspaceRequest"></a>
-### SwitchWorkspaceRequest
+<a name="bytebase-v1-DimensionalConfig"></a>
+### DimensionalConfig
+DimensionalConfig defines dimensional and constraint parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| workspace | [string](#string) | | The target workspace to switch to. Format: workspaces/{workspace} |
-| web | [bool](#bool) | | If true, sets tokens as HTTP-only cookies (browser clients). |
-| otp_code | [string](#string) | optional | OTP code for MFA verification. Required if the target workspace enforces MFA. |
-| recovery_code | [string](#string) | optional | Recovery code for MFA verification (alternative to otp_code). |
-| mfa_temp_token | [string](#string) | optional | Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. |
-
-
+| dimensions | [int32](#int32) | | Number of dimensions (2-4, default 2) |
+| data_type | [string](#string) | | Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) |
+| srid | [int32](#int32) | | Spatial reference system identifier (SRID) |
+| constraints | [DimensionConstraint](#bytebase-v1-DimensionConstraint) | repeated | Coordinate system constraints |
-
-
-
+<a name="bytebase-v1-EnumTypeMetadata"></a>
-<a name="bytebase-v1-AuthService"></a>
+### EnumTypeMetadata
-### AuthService
-AuthService handles user authentication operations.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| Login | [LoginRequest](#bytebase-v1-LoginRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Authenticates a user and returns access tokens. Permissions required: None |
-| Logout | [LogoutRequest](#bytebase-v1-LogoutRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Logs out the current user session. Permissions required: None |
-| ExchangeToken | [ExchangeTokenRequest](#bytebase-v1-ExchangeTokenRequest) | [ExchangeTokenResponse](#bytebase-v1-ExchangeTokenResponse) | Exchanges an external OIDC token for a Bytebase access token. Used by CI/CD pipelines with Workload Identity Federation. Permissions required: None (validates via OIDC token) |
-| Signup | [SignupRequest](#bytebase-v1-SignupRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Registers a new user account. Creates a principal and assigns a workspace: - If the user&#39;s email was pre-invited to a workspace, joins that workspace. - Otherwise, creates a new workspace with the user as admin. Returns access tokens so the user is logged in immediately after signup. |
-| Refresh | [RefreshRequest](#bytebase-v1-RefreshRequest) | [RefreshResponse](#bytebase-v1-RefreshResponse) | Refreshes the access token using the refresh token cookie. Permissions required: None (validates via refresh token cookie) |
-| SwitchWorkspace | [SwitchWorkspaceRequest](#bytebase-v1-SwitchWorkspaceRequest) | [LoginResponse](#bytebase-v1-LoginResponse) | Switches the current user&#39;s active workspace and issues new tokens. The user must be a member of the target workspace. |
-| RequestPasswordReset | [RequestPasswordResetRequest](#bytebase-v1-RequestPasswordResetRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Requests a password reset email for the given email address. Always returns success to avoid leaking whether the email exists. Permissions required: None |
-| ResetPassword | [ResetPasswordRequest](#bytebase-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Resets the user&#39;s password using a password reset token from email. Permissions required: None (validates via token) |
-| SendEmailLoginCode | [SendEmailLoginCodeRequest](#bytebase-v1-SendEmailLoginCodeRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sends a 6-digit verification code to the email for login/signup. Always returns success (no email enumeration). Enforces 60-sec resend cooldown. Permissions required: None |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of a type. |
+| values | [string](#string) | repeated | The enum values of a type. |
+| comment | [string](#string) | | The comment describing the enum type. |
+| skip_dump | [bool](#bool) | | Whether to skip this enum type during schema dump operations. |
-<a name="v1_cel_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/cel_service.proto
+<a name="bytebase-v1-EventMetadata"></a>
-<a name="bytebase-v1-BatchDeparseRequest"></a>
+### EventMetadata
-### BatchDeparseRequest
-Request message for batch deparsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The CEL expression ASTs to deparse. |
+| name | [string](#string) | | The name of the event. |
+| definition | [string](#string) | | The schedule of the event. |
+| time_zone | [string](#string) | | The time zone of the event. |
+| sql_mode | [string](#string) | | The SQL mode setting for the event. |
+| character_set_client | [string](#string) | | The character set used by the client creating the event. |
+| collation_connection | [string](#string) | | The collation used for the connection when creating the event. |
+| comment | [string](#string) | | The comment is the comment of an event. |
-<a name="bytebase-v1-BatchDeparseResponse"></a>
+<a name="bytebase-v1-ExtensionMetadata"></a>
-### BatchDeparseResponse
-Response message for batch deparsing CEL expressions.
+### ExtensionMetadata
+ExtensionMetadata is the metadata for extensions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | The deparsed CEL expressions as strings. |
+| name | [string](#string) | | The name is the name of an extension. |
+| schema | [string](#string) | | The schema is the extension that is installed to. But the extension usage is not limited to the schema. |
+| version | [string](#string) | | The version is the version of an extension. |
+| description | [string](#string) | | The description is the description of an extension. |
-<a name="bytebase-v1-BatchParseRequest"></a>
+<a name="bytebase-v1-ExternalTableMetadata"></a>
+
+### ExternalTableMetadata
-### BatchParseRequest
-Request message for batch parsing CEL expressions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [string](#string) | repeated | The CEL expression strings to parse. |
-
+| name | [string](#string) | | The name is the name of a external table. |
+| external_server_name | [string](#string) | | The external_server_name is the name of the external server. |
+| external_database_name | [string](#string) | | The external_database_name is the name of the external database. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a foreign table. |
-<a name="bytebase-v1-BatchParseResponse"></a>
-### BatchParseResponse
-Response message for batch parsing CEL expressions.
+<a name="bytebase-v1-ForeignKeyMetadata"></a>
+
+### ForeignKeyMetadata
+ForeignKeyMetadata is the metadata for foreign keys.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| expressions | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | repeated | The parsed CEL expressions as AST. |
-
-
-
-
+| name | [string](#string) | | The name is the name of a foreign key. |
+| columns | [string](#string) | repeated | The columns are the ordered referencing columns of a foreign key. |
+| referenced_schema | [string](#string) | | The referenced_schema is the referenced schema name of a foreign key. It is an empty string for databases without such concept such as MySQL. |
+| referenced_table | [string](#string) | | The referenced_table is the referenced table name of a foreign key. |
+| referenced_columns | [string](#string) | repeated | The referenced_columns are the ordered referenced columns of a foreign key. |
+| on_delete | [string](#string) | | The on_delete is the on delete action of a foreign key. |
+| on_update | [string](#string) | | The on_update is the on update action of a foreign key. |
+| match_type | [string](#string) | | The match_type is the match type of a foreign key. The match_type is the PostgreSQL specific field. It&#39;s empty string for other databases. |
-
-
-
-<a name="bytebase-v1-CelService"></a>
-### CelService
-CelService manages CEL (Common Expression Language) parsing and formatting operations.
+<a name="bytebase-v1-FunctionMetadata"></a>
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| BatchParse | [BatchParseRequest](#bytebase-v1-BatchParseRequest) | [BatchParseResponse](#bytebase-v1-BatchParseResponse) | Parses multiple CEL expression strings into AST representations. Permissions required: None |
-| BatchDeparse | [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest) | [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse) | Converts multiple CEL AST representations back into expression strings. Permissions required: None |
+### FunctionMetadata
+FunctionMetadata is the metadata for functions.
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a function. |
+| definition | [string](#string) | | The definition is the definition of a function. |
+| signature | [string](#string) | | The signature is the name with the number and type of input arguments the function takes. |
+| character_set_client | [string](#string) | | MySQL specific metadata. |
+| collation_connection | [string](#string) | | |
+| database_collation | [string](#string) | | |
+| sql_mode | [string](#string) | | |
+| comment | [string](#string) | | |
+| dependency_tables | [DependencyTable](#bytebase-v1-DependencyTable) | repeated | The dependency_tables is the list of dependency tables of a function. For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. |
+| skip_dump | [bool](#bool) | | |
-<a name="v1_changelog_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/changelog_service.proto
-<a name="bytebase-v1-Changelog"></a>
+<a name="bytebase-v1-GenerationMetadata"></a>
-### Changelog
+### GenerationMetadata
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
-| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
-| status | [Changelog.Status](#bytebase-v1-Changelog-Status) | | |
-| schema | [string](#string) | | |
-| schema_size | [int64](#int64) | | |
-| task_run | [string](#string) | | Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} |
-| plan_title | [string](#string) | | The title of the plan associated with this changelog&#39;s task run. This field is populated by deriving the plan from task_run for display purposes. |
+| type | [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type) | | |
+| expression | [string](#string) | | |
-<a name="bytebase-v1-GetChangelogRequest"></a>
+<a name="bytebase-v1-GetDatabaseMetadataRequest"></a>
-### GetChangelogRequest
+### GetDatabaseMetadataRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the changelog to retrieve. Format: instances/{instance}/databases/{database}/changelogs/{changelog} |
-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-
+| name | [string](#string) | | The name of the database to retrieve metadata. Format: instances/{instance}/databases/{database}/metadata |
+| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+Supported filter: - schema: the schema name, support &#34;==&#34; operator. - table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+For example: schema == &#34;schema-a&#34; table == &#34;table-a&#34; table.contains(&#34;table-a&#34;) schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;) The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;. The column masking level will only be returned when a table filter is used. |
+| limit | [int32](#int32) | | Limit the response size of returned table metadata per schema. For example, if the database has 3 schemas, and each schema has 100 tables, if limit is 20, then only 20 tables will be returned for each schema, total 60 tables. Default 0, means no limit. |
-<a name="bytebase-v1-ListChangelogsRequest"></a>
-### ListChangelogsRequest
+<a name="bytebase-v1-GetDatabaseRequest"></a>
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent of the changelogs. Format: instances/{instance}/databases/{database} |
-| page_size | [int32](#int32) | | The maximum number of changelogs to return. The service may return fewer than this value. If unspecified, at most 10 changelogs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
-| page_token | [string](#string) | | A page token, received from the previous call. Provide this to retrieve the subsequent page.
+### GetDatabaseRequest
-When paginating, all other parameters provided must match the call that provided the page token. |
-| view | [ChangelogView](#bytebase-v1-ChangelogView) | | |
-| filter | [string](#string) | | Filter is used to filter changelogs returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Supported filter: - status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values. - create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-Example: status == &#34;DONE&#34; status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34; create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; |
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the database to retrieve. Format: instances/{instance}/databases/{database} |
-<a name="bytebase-v1-ListChangelogsResponse"></a>
+<a name="bytebase-v1-GetDatabaseSDLSchemaRequest"></a>
-### ListChangelogsResponse
+### GetDatabaseSDLSchemaRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| changelogs | [Changelog](#bytebase-v1-Changelog) | repeated | The list of changelogs. |
-| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-
-
-
-
+| name | [string](#string) | | The name of the database to retrieve SDL schema. Format: instances/{instance}/databases/{database}/sdlSchema |
+| format | [GetDatabaseSDLSchemaRequest.SDLFormat](#bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat) | | The format of the SDL schema output. |
-
-<a name="bytebase-v1-Changelog-Status"></a>
-### Changelog.Status
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| STATUS_UNSPECIFIED | 0 | |
-| PENDING | 1 | |
-| DONE | 2 | |
-| FAILED | 3 | |
+<a name="bytebase-v1-GetDatabaseSchemaRequest"></a>
+### GetDatabaseSchemaRequest
-<a name="bytebase-v1-ChangelogView"></a>
-### ChangelogView
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the database to retrieve schema. Format: instances/{instance}/databases/{database}/schema |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| CHANGELOG_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| CHANGELOG_VIEW_BASIC | 1 | |
-| CHANGELOG_VIEW_FULL | 2 | |
-
-
+<a name="bytebase-v1-GetSchemaStringRequest"></a>
-<a name="bytebase-v1-ChangelogService"></a>
+### GetSchemaStringRequest
-### ChangelogService
-ChangelogService manages database migration history.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | Lists migration history for a database. Permissions required: bb.changelogs.list |
-| GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | Retrieves a specific changelog entry. Permissions required: bb.changelogs.get |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} |
+| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |
+| schema | [string](#string) | | It&#39;s empty for DATABASE. |
+| object | [string](#string) | | It&#39;s empty for DATABASE and SCHEMA. |
+| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED. Also the schema and object are empty. |
-<a name="v1_database_catalog_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/database_catalog_service.proto
+<a name="bytebase-v1-GetSchemaStringResponse"></a>
-<a name="bytebase-v1-ColumnCatalog"></a>
+### GetSchemaStringResponse
-### ColumnCatalog
-Column metadata within a table.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The column name. |
-| semantic_type | [string](#string) | | The semantic type describing the data purpose. |
-| labels | [ColumnCatalog.LabelsEntry](#bytebase-v1-ColumnCatalog-LabelsEntry) | repeated | User-defined labels for this column. |
-| classification | [string](#string) | | The data classification level for this column. |
-| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | optional | Object schema for complex column types like JSON. |
-
+| schema_string | [string](#string) | | |
-<a name="bytebase-v1-ColumnCatalog-LabelsEntry"></a>
-### ColumnCatalog.LabelsEntry
+<a name="bytebase-v1-GridLevel"></a>
+### GridLevel
+GridLevel defines a tessellation grid level with its density.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [string](#string) | | |
+| level | [int32](#int32) | | Grid level number (1-4 for SQL Server) |
+| density | [string](#string) | | Grid density (LOW, MEDIUM, HIGH) |
-<a name="bytebase-v1-DatabaseCatalog"></a>
+<a name="bytebase-v1-IndexMetadata"></a>
-### DatabaseCatalog
-Catalog metadata for a database including schemas, tables, and columns.
+### IndexMetadata
+IndexMetadata is the metadata for indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database catalog. Format: instances/{instance}/databases/{database}/catalog |
-| schemas | [SchemaCatalog](#bytebase-v1-SchemaCatalog) | repeated | The schemas in the database. |
+| name | [string](#string) | | The name is the name of an index. |
+| expressions | [string](#string) | repeated | The expressions are the ordered columns or expressions of an index. This could refer to a column or an expression. |
+| key_length | [int64](#int64) | repeated | The key_lengths are the ordered key lengths of an index. If the key length is not specified, it&#39;s -1. |
+| descending | [bool](#bool) | repeated | The descending is the ordered descending of an index. |
+| type | [string](#string) | | The type is the type of an index. |
+| unique | [bool](#bool) | | The unique is whether the index is unique. |
+| primary | [bool](#bool) | | The primary is whether the index is a primary key index. |
+| visible | [bool](#bool) | | The visible is whether the index is visible. |
+| comment | [string](#string) | | The comment is the comment of an index. |
+| definition | [string](#string) | | The definition of an index. |
+| parent_index_schema | [string](#string) | | The schema name of the parent index. |
+| parent_index_name | [string](#string) | | The index name of the parent index. |
+| granularity | [int64](#int64) | | The number of granules in the block. It&#39;s a ClickHouse specific field. |
+| is_constraint | [bool](#bool) | | It&#39;s a PostgreSQL specific field. The unique constraint and unique index are not the same thing in PostgreSQL. |
+| spatial_config | [SpatialIndexConfig](#bytebase-v1-SpatialIndexConfig) | | Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. |
+| opclass_names | [string](#string) | repeated | https://www.postgresql.org/docs/current/catalog-pg-opclass.html Name of the operator class for each column. (PostgreSQL specific). |
+| opclass_defaults | [bool](#bool) | repeated | True if the operator class is the default. (PostgreSQL specific). |
-<a name="bytebase-v1-GetDatabaseCatalogRequest"></a>
+<a name="bytebase-v1-ListDatabasesRequest"></a>
+
+### ListDatabasesRequest
-### GetDatabaseCatalogRequest
-Request message for getting a database catalog.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database catalog to retrieve. Format: instances/{instance}/databases/{database}/catalog |
-
-
-
-
+| parent | [string](#string) | | - projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission. - workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission. - instances/{instances}: list databases in a instance, require &#34;bb.instances.get&#34; permission |
+| page_size | [int32](#int32) | | The maximum number of databases to return. The service may return fewer than this value. If unspecified, at most 10 databases will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListDatabases` call. Provide this to retrieve the subsequent page.
+When paginating, all other parameters provided to `ListDatabases` must match the call that provided the page token. |
+| filter | [string](#string) | | Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-<a name="bytebase-v1-ObjectSchema"></a>
+Supported filter: - environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator. - name: the database name, support &#34;.contains()&#34; operator. - project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator. - instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator. - engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator. - exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator. - table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator. - labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
-### ObjectSchema
-Schema definition for object-type columns.
+For example: environment == &#34;environments/{environment resource id}&#34; environment == &#34;&#34; (find databases which environment is not set) project == &#34;projects/{project resource id}&#34; instance == &#34;instances/{instance resource id}&#34; name.contains(&#34;database name&#34;) engine == &#34;MYSQL&#34; engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;] !(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]) exclude_unassigned == true table == &#34;sample&#34; table.contains(&#34;sam&#34;) labels.environment == &#34;production&#34; labels.region == &#34;asia&#34; labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+You can combine filter conditions like: environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) |
+| show_deleted | [bool](#bool) | | Show deleted database if specified. |
+| order_by | [string](#string) | | The order by of databases. Support name, project, instance. The default sorting order is ascending. For example: - order_by = &#34;name&#34; - order by name ascending - order_by = &#34;name desc&#34; - order_by = &#34;name desc, project asc&#34; |
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| type | [ObjectSchema.Type](#bytebase-v1-ObjectSchema-Type) | | The data type of this object. |
-| struct_kind | [ObjectSchema.StructKind](#bytebase-v1-ObjectSchema-StructKind) | | Struct schema. |
-| array_kind | [ObjectSchema.ArrayKind](#bytebase-v1-ObjectSchema-ArrayKind) | | Array schema. |
-| semantic_type | [string](#string) | | The semantic type of this object. |
+<a name="bytebase-v1-ListDatabasesResponse"></a>
-<a name="bytebase-v1-ObjectSchema-ArrayKind"></a>
+### ListDatabasesResponse
-### ObjectSchema.ArrayKind
-Array type with element schema.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| kind | [ObjectSchema](#bytebase-v1-ObjectSchema) | | The schema of array elements. |
+| databases | [Database](#bytebase-v1-Database) | repeated | The databases from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
-<a name="bytebase-v1-ObjectSchema-StructKind"></a>
+<a name="bytebase-v1-MaterializedViewMetadata"></a>
-### ObjectSchema.StructKind
-Structure type with named properties.
+### MaterializedViewMetadata
+MaterializedViewMetadata is the metadata for materialized views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| properties | [ObjectSchema.StructKind.PropertiesEntry](#bytebase-v1-ObjectSchema-StructKind-PropertiesEntry) | repeated | Properties of the struct. |
-
+| name | [string](#string) | | The name is the name of a materialized view. |
+| definition | [string](#string) | | The definition is the definition of a materialized view. |
+| comment | [string](#string) | | The comment is the comment of a materialized view. |
+| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a materialized view. |
+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
+| skip_dump | [bool](#bool) | | |
-<a name="bytebase-v1-ObjectSchema-StructKind-PropertiesEntry"></a>
-### ObjectSchema.StructKind.PropertiesEntry
+<a name="bytebase-v1-PackageMetadata"></a>
+### PackageMetadata
+PackageMetadata is the metadata for packages.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| key | [string](#string) | | |
-| value | [ObjectSchema](#bytebase-v1-ObjectSchema) | | |
+| name | [string](#string) | | The name is the name of a package. |
+| definition | [string](#string) | | The definition is the definition of a package. |
-<a name="bytebase-v1-SchemaCatalog"></a>
+<a name="bytebase-v1-ProcedureMetadata"></a>
-### SchemaCatalog
-Schema metadata within a database.
+### ProcedureMetadata
+ProcedureMetadata is the metadata for procedures.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The schema name. |
-| tables | [TableCatalog](#bytebase-v1-TableCatalog) | repeated | The tables in the schema. |
+| name | [string](#string) | | The name is the name of a procedure. |
+| definition | [string](#string) | | The definition is the definition of a procedure. |
+| signature | [string](#string) | | The signature is the name with the number and type of input arguments the procedure takes. |
+| character_set_client | [string](#string) | | MySQL specific metadata. |
+| collation_connection | [string](#string) | | |
+| database_collation | [string](#string) | | |
+| sql_mode | [string](#string) | | |
+| comment | [string](#string) | | The comment is the comment of a procedure. |
+| skip_dump | [bool](#bool) | | |
-<a name="bytebase-v1-TableCatalog"></a>
+<a name="bytebase-v1-SchemaMetadata"></a>
-### TableCatalog
-Table metadata within a schema.
+### SchemaMetadata
+SchemaMetadata is the metadata for schemas.
+This is the concept of schema in Postgres, but it&#39;s a no-op for MySQL.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The table name. |
-| columns | [TableCatalog.Columns](#bytebase-v1-TableCatalog-Columns) | | Regular table columns. |
-| object_schema | [ObjectSchema](#bytebase-v1-ObjectSchema) | | Object schema for JSON/XML columns. |
-| classification | [string](#string) | | The data classification level for this table. |
+| name | [string](#string) | | The name is the schema name. It is an empty string for databases without such concept such as MySQL. |
+| tables | [TableMetadata](#bytebase-v1-TableMetadata) | repeated | The tables is the list of tables in a schema. |
+| external_tables | [ExternalTableMetadata](#bytebase-v1-ExternalTableMetadata) | repeated | The external_tables is the list of external tables in a schema. |
+| views | [ViewMetadata](#bytebase-v1-ViewMetadata) | repeated | The views is the list of views in a schema. |
+| functions | [FunctionMetadata](#bytebase-v1-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |
+| procedures | [ProcedureMetadata](#bytebase-v1-ProcedureMetadata) | repeated | The procedures is the list of procedures in a schema. |
+| streams | [StreamMetadata](#bytebase-v1-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |
+| tasks | [TaskMetadata](#bytebase-v1-TaskMetadata) | repeated | The routines is the list of routines in a schema, currently, only used for Snowflake. |
+| materialized_views | [MaterializedViewMetadata](#bytebase-v1-MaterializedViewMetadata) | repeated | The materialized_views is the list of materialized views in a schema. |
+| packages | [PackageMetadata](#bytebase-v1-PackageMetadata) | repeated | The packages is the list of packages in a schema. |
+| owner | [string](#string) | | The owner of the schema. |
+| sequences | [SequenceMetadata](#bytebase-v1-SequenceMetadata) | repeated | The sequences is the list of sequences in a schema, sorted by name. |
+| events | [EventMetadata](#bytebase-v1-EventMetadata) | repeated | The events is the list of scheduled events in a schema. |
+| enum_types | [EnumTypeMetadata](#bytebase-v1-EnumTypeMetadata) | repeated | The enum_types is the list of user-defined enum types in a schema. |
+| skip_dump | [bool](#bool) | | Whether to skip this schema during schema dump operations. |
+| comment | [string](#string) | | The comment is the comment of a schema. |
+| composite_types | [CompositeTypeMetadata](#bytebase-v1-CompositeTypeMetadata) | repeated | The composite_types is the list of user-defined composite types in a schema (PostgreSQL family, CREATE TYPE ... AS). Excludes table/view row types and derived types. |
-<a name="bytebase-v1-TableCatalog-Columns"></a>
+<a name="bytebase-v1-SequenceMetadata"></a>
+
+### SequenceMetadata
-### TableCatalog.Columns
-Column list for regular tables.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| columns | [ColumnCatalog](#bytebase-v1-ColumnCatalog) | repeated | The columns in the table. |
+| name | [string](#string) | | The name of a sequence. |
+| data_type | [string](#string) | | The data type of a sequence. |
+| start | [string](#string) | | The start value of a sequence. |
+| min_value | [string](#string) | | The minimum value of a sequence. |
+| max_value | [string](#string) | | The maximum value of a sequence. |
+| increment | [string](#string) | | Increment value of a sequence. |
+| cycle | [bool](#bool) | | Cycle is whether the sequence cycles. |
+| cache_size | [string](#string) | | Cache size of a sequence. |
+| last_value | [string](#string) | | Last value of a sequence. |
+| owner_table | [string](#string) | | The owner table of the sequence. |
+| owner_column | [string](#string) | | The owner column of the sequence. |
+| comment | [string](#string) | | The comment describing the sequence. |
+| skip_dump | [bool](#bool) | | Whether to skip this sequence during schema dump operations. |
-<a name="bytebase-v1-UpdateDatabaseCatalogRequest"></a>
+<a name="bytebase-v1-SpatialIndexConfig"></a>
-### UpdateDatabaseCatalogRequest
-Request message for updating a database catalog.
+### SpatialIndexConfig
+SpatialIndexConfig defines the spatial index configuration for spatial databases.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | The database catalog to update.
+| method | [string](#string) | | Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) |
+| tessellation | [TessellationConfig](#bytebase-v1-TessellationConfig) | | Tessellation configuration for grid-based spatial indexes |
+| storage | [StorageConfig](#bytebase-v1-StorageConfig) | | Storage and performance configuration |
+| dimensional | [DimensionalConfig](#bytebase-v1-DimensionalConfig) | | Dimensional configuration |
-The catalog&#39;s `name` field is used to identify the database catalog to update. Format: instances/{instance}/databases/{database}/catalog |
-| allow_missing | [bool](#bool) | | If set to true, and the database catalog is not found, a new database catalog will be created. In this situation, `update_mask` is ignored. |
-
+<a name="bytebase-v1-StorageConfig"></a>
+### StorageConfig
+StorageConfig defines storage and performance parameters for spatial indexes.
-<a name="bytebase-v1-ObjectSchema-Type"></a>
-### ObjectSchema.Type
-Object schema data types.
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| fillfactor | [int32](#int32) | | Fill factor percentage (1-100) |
+| buffering | [string](#string) | | Buffering mode for PostgreSQL (auto, on, off) |
+| tablespace | [string](#string) | | Tablespace configuration for Oracle |
+| work_tablespace | [string](#string) | | |
+| sdo_level | [int32](#int32) | | |
+| commit_interval | [int32](#int32) | | |
+| pad_index | [bool](#bool) | | SQL Server specific parameters |
+| sort_in_tempdb | [string](#string) | | ON, OFF |
+| drop_existing | [bool](#bool) | | |
+| online | [bool](#bool) | | |
+| allow_row_locks | [bool](#bool) | | |
+| allow_page_locks | [bool](#bool) | | |
+| maxdop | [int32](#int32) | | |
+| data_compression | [string](#string) | | NONE, ROW, PAGE |
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| TYPE_UNSPECIFIED | 0 | Unspecified type. |
-| STRING | 1 | String type. |
-| NUMBER | 2 | Number type. |
-| BOOLEAN | 3 | Boolean type. |
-| OBJECT | 4 | Object/struct type. |
-| ARRAY | 5 | Array type. |
-
-
-<a name="bytebase-v1-DatabaseCatalogService"></a>
+<a name="bytebase-v1-StreamMetadata"></a>
-### DatabaseCatalogService
-DatabaseCatalogService manages database schema metadata and classification.
+### StreamMetadata
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| GetDatabaseCatalog | [GetDatabaseCatalogRequest](#bytebase-v1-GetDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Gets the catalog metadata for a database. Permissions required: bb.databaseCatalogs.get |
-| UpdateDatabaseCatalog | [UpdateDatabaseCatalogRequest](#bytebase-v1-UpdateDatabaseCatalogRequest) | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | Updates catalog metadata such as classifications and labels. Permissions required: bb.databaseCatalogs.update |
-
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a stream. |
+| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |
+| owner | [string](#string) | | The owner of the stream. |
+| comment | [string](#string) | | The comment of the stream. |
+| type | [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type) | | The type of the stream. |
+| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |
+| mode | [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode) | | The mode of the stream. |
+| definition | [string](#string) | | The definition of the stream. |
-<a name="v1_database_group_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-## v1/database_group_service.proto
-<a name="bytebase-v1-CreateDatabaseGroupRequest"></a>
+<a name="bytebase-v1-SyncDatabaseRequest"></a>
+
+### SyncDatabaseRequest
-### CreateDatabaseGroupRequest
-Request message for creating a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource where this database group will be created. Format: projects/{project} |
-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to create. |
-| database_group_id | [string](#string) | | The ID to use for the database group, which will become the final component of the database group&#39;s resource name.
+| name | [string](#string) | | The name of the database to sync. Format: instances/{instance}/databases/{database} |
-This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-| validate_only | [bool](#bool) | | If set, validate the create request and preview the full database group response, but do not actually create it. |
+<a name="bytebase-v1-SyncDatabaseResponse"></a>
-<a name="bytebase-v1-DatabaseGroup"></a>
+### SyncDatabaseResponse
-### DatabaseGroup
-A group of databases matched by expressions.
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| title | [string](#string) | | The short name used in actual databases specified by users. |
-| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Support variables: resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations. resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations. resource.database_labels: the database labels. Support map access operations. All variables should join with &#34;&amp;&amp;&#34; condition.
-For example: resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;) resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; |
-| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
+
+
+<a name="bytebase-v1-TableMetadata"></a>
+
+### TableMetadata
+TableMetadata is the metadata for tables.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name is the name of a table. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | The indexes is the list of indexes in a table. |
+| engine | [string](#string) | | The engine is the engine of a table. |
+| collation | [string](#string) | | The collation is the collation of a table. |
+| charset | [string](#string) | | The character set of table. |
+| row_count | [int64](#int64) | | The row_count is the estimated number of rows of a table. |
+| data_size | [int64](#int64) | | The data_size is the estimated data size of a table. |
+| index_size | [int64](#int64) | | The index_size is the estimated index size of a table. |
+| data_free | [int64](#int64) | | The data_free is the estimated free data size of a table. |
+| create_options | [string](#string) | | The create_options is the create option of a table. |
+| comment | [string](#string) | | The comment is the comment of a table. |
+| foreign_keys | [ForeignKeyMetadata](#bytebase-v1-ForeignKeyMetadata) | repeated | The foreign_keys is the list of foreign keys in a table. |
+| partitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The partitions is the list of partitions in a table. |
+| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | The check_constraints is the list of check constraints in a table. |
+| owner | [string](#string) | | The owner of the table. |
+| sorting_keys | [string](#string) | repeated | The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field. Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by |
+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers associated with the table. |
+| skip_dump | [bool](#bool) | | Whether to skip this table during schema dump operations. |
+| sharding_info | [string](#string) | | https://docs.pingcap.com/tidb/stable/information-schema-tables/ |
+| primary_key_type | [string](#string) | | https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes CLUSTERED or NONCLUSTERED. |
-<a name="bytebase-v1-DatabaseGroup-Database"></a>
+<a name="bytebase-v1-TablePartitionMetadata"></a>
-### DatabaseGroup.Database
-A database within a database group.
+### TablePartitionMetadata
+TablePartitionMetadata is the metadata for table partitions.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The resource name of the database. Format: instances/{instance}/databases/{database} |
+| name | [string](#string) | | The name is the name of a table partition. |
+| type | [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type) | | The type of a table partition. |
+| expression | [string](#string) | | The expression is the expression of a table partition. For PostgreSQL, the expression is the text of {FOR VALUES partition_bound_spec}, see https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL, the expression is the `expr` or `column_list` of the following syntax. PARTITION BY { [LINEAR] HASH(expr) | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list) | RANGE{(expr) | COLUMNS(column_list)} | LIST{(expr) | COLUMNS(column_list)} }. |
+| value | [string](#string) | | The value is the value of a table partition. For MySQL, the value is for RANGE and LIST partition types, - For a RANGE partition, it contains the value set in the partition&#39;s VALUES LESS THAN clause, which can be either an integer or MAXVALUE. - For a LIST partition, this column contains the values defined in the partition&#39;s VALUES IN clause, which is a list of comma-separated integer values. - For others, it&#39;s an empty string. |
+| use_default | [string](#string) | | The use_default is whether the users use the default partition, it stores the different value for different database engines. For MySQL, it&#39;s [INT] type, 0 means not use default partition, otherwise, it&#39;s equals to number in syntax [SUB]PARTITION {number}. |
+| subpartitions | [TablePartitionMetadata](#bytebase-v1-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. |
+| indexes | [IndexMetadata](#bytebase-v1-IndexMetadata) | repeated | |
+| check_constraints | [CheckConstraintMetadata](#bytebase-v1-CheckConstraintMetadata) | repeated | |
-<a name="bytebase-v1-DeleteDatabaseGroupRequest"></a>
+<a name="bytebase-v1-TaskMetadata"></a>
+
+### TaskMetadata
-### DeleteDatabaseGroupRequest
-Request message for deleting a database group.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group to delete. Format: projects/{project}/databaseGroups/{databaseGroup} |
+| name | [string](#string) | | The name is the name of a task. |
+| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |
+| owner | [string](#string) | | The owner of the task. |
+| comment | [string](#string) | | The comment of the task. |
+| warehouse | [string](#string) | | The warehouse of the task. |
+| schedule | [string](#string) | | The schedule interval of the task. |
+| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |
+| state | [TaskMetadata.State](#bytebase-v1-TaskMetadata-State) | | The state of the task. |
+| condition | [string](#string) | | The condition of the task. |
+| definition | [string](#string) | | The definition of the task. |
-<a name="bytebase-v1-GetDatabaseGroupRequest"></a>
+<a name="bytebase-v1-TessellationConfig"></a>
-### GetDatabaseGroupRequest
-Request message for getting a database group.
+### TessellationConfig
+TessellationConfig defines tessellation parameters for spatial indexes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database group to retrieve. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
+| scheme | [string](#string) | | Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) |
+| grid_levels | [GridLevel](#bytebase-v1-GridLevel) | repeated | Grid levels and densities for multi-level tessellation |
+| cells_per_object | [int32](#int32) | | Number of cells per object (1-8192 for SQL Server) |
+| bounding_box | [BoundingBox](#bytebase-v1-BoundingBox) | | Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) |
-<a name="bytebase-v1-ListDatabaseGroupsRequest"></a>
+<a name="bytebase-v1-TriggerMetadata"></a>
+
+### TriggerMetadata
-### ListDatabaseGroupsRequest
-Request message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| parent | [string](#string) | | The parent resource whose database groups are to be listed. Format: projects/{project} |
-| view | [DatabaseGroupView](#bytebase-v1-DatabaseGroupView) | | The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. |
+| name | [string](#string) | | The name is the name of the trigger. |
+| event | [string](#string) | | The event is the event of the trigger, such as INSERT, UPDATE, DELETE, TRUNCATE. |
+| timing | [string](#string) | | The timing is the timing of the trigger, such as BEFORE, AFTER. |
+| body | [string](#string) | | The body is the body of the trigger. |
+| sql_mode | [string](#string) | | The SQL mode setting for the trigger. |
+| character_set_client | [string](#string) | | The character set used by the client creating the trigger. |
+| collation_connection | [string](#string) | | The collation used for the connection when creating the trigger. |
+| comment | [string](#string) | | The comment describing the trigger. |
+| skip_dump | [bool](#bool) | | Whether to skip this trigger during schema dump operations. |
-<a name="bytebase-v1-ListDatabaseGroupsResponse"></a>
+<a name="bytebase-v1-UpdateDatabaseRequest"></a>
+
+### UpdateDatabaseRequest
-### ListDatabaseGroupsResponse
-Response message for listing database groups.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_groups | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | repeated | The database groups from the specified request. |
+| database | [Database](#bytebase-v1-Database) | | The database to update.
+The database&#39;s `name` field is used to identify the database to update. Format: instances/{instance}/databases/{database} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+| allow_missing | [bool](#bool) | | If set to true, and the database is not found, a new database will be created. In this situation, `update_mask` is ignored. |
-<a name="bytebase-v1-UpdateDatabaseGroupRequest"></a>
-### UpdateDatabaseGroupRequest
-Request message for updating a database group.
+<a name="bytebase-v1-ViewMetadata"></a>
+
+### ViewMetadata
+ViewMetadata is the metadata for views.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| database_group | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | | The database group to update.
-
-The database group&#39;s `name` field is used to identify the database group to update. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
-| allow_missing | [bool](#bool) | | If set to true, and the database group is not found, a new database group will be created. In this situation, `update_mask` is ignored. |
+| name | [string](#string) | | The name is the name of a view. |
+| definition | [string](#string) | | The definition is the definition of a view. |
+| comment | [string](#string) | | The comment is the comment of a view. |
+| dependency_columns | [DependencyColumn](#bytebase-v1-DependencyColumn) | repeated | The dependency_columns is the list of dependency columns of a view. |
+| columns | [ColumnMetadata](#bytebase-v1-ColumnMetadata) | repeated | The columns is the ordered list of columns in a table. |
+| triggers | [TriggerMetadata](#bytebase-v1-TriggerMetadata) | repeated | The triggers is the list of triggers in a view. |
+| skip_dump | [bool](#bool) | | |
@@ -8655,16 +8524,138 @@ The database group&#39;s `name` field is used to identify the database group to
-<a name="bytebase-v1-DatabaseGroupView"></a>
+<a name="bytebase-v1-ColumnMetadata-IdentityGeneration"></a>
+
+### ColumnMetadata.IdentityGeneration
-### DatabaseGroupView
-View options for database group responses.
| Name | Number | Description |
| ---- | ------ | ----------- |
-| DATABASE_GROUP_VIEW_UNSPECIFIED | 0 | The default / unset value. The API will default to the BASIC view. |
-| DATABASE_GROUP_VIEW_BASIC | 1 | Include basic information about the database group, but exclude the list of matched databases and unmatched databases. |
-| DATABASE_GROUP_VIEW_FULL | 2 | Include everything. |
+| IDENTITY_GENERATION_UNSPECIFIED | 0 | |
+| ALWAYS | 1 | |
+| BY_DEFAULT | 2 | |
+
+
+
+<a name="bytebase-v1-GenerationMetadata-Type"></a>
+
+### GenerationMetadata.Type
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| VIRTUAL | 1 | |
+| STORED | 2 | |
+
+
+
+<a name="bytebase-v1-GetDatabaseSDLSchemaRequest-SDLFormat"></a>
+
+### GetDatabaseSDLSchemaRequest.SDLFormat
+SDLFormat specifies the output format for SDL schema.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SDL_FORMAT_UNSPECIFIED | 0 | Unspecified format. Defaults to SINGLE_FILE. |
+| SINGLE_FILE | 1 | Single file format: returns the complete SDL schema as a single file. |
+| MULTI_FILE | 2 | Multi-file format: returns the SDL schema as a ZIP archive containing multiple files organized by schema objects (tables, views, functions, etc.). |
+
+
+
+<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>
+
+### GetSchemaStringRequest.ObjectType
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| OBJECT_TYPE_UNSPECIFIED | 0 | |
+| DATABASE | 1 | |
+| SCHEMA | 2 | |
+| TABLE | 3 | |
+| VIEW | 4 | |
+| MATERIALIZED_VIEW | 5 | |
+| FUNCTION | 6 | |
+| PROCEDURE | 7 | |
+| SEQUENCE | 8 | |
+
+
+
+<a name="bytebase-v1-StreamMetadata-Mode"></a>
+
+### StreamMetadata.Mode
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MODE_UNSPECIFIED | 0 | |
+| DEFAULT | 1 | |
+| APPEND_ONLY | 2 | |
+| INSERT_ONLY | 3 | |
+
+
+
+<a name="bytebase-v1-StreamMetadata-Type"></a>
+
+### StreamMetadata.Type
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| DELTA | 1 | |
+
+
+
+<a name="bytebase-v1-SyncStatus"></a>
+
+### SyncStatus
+SyncStatus is the status of the database sync operation.
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SYNC_STATUS_UNSPECIFIED | 0 | |
+| OK | 1 | The database was synced successfully. |
+| FAILED | 2 | The database sync failed. |
+
+
+
+<a name="bytebase-v1-TablePartitionMetadata-Type"></a>
+
+### TablePartitionMetadata.Type
+Type is the type of a table partition, some database engines may not
+support all types. Only avilable for the following database engines now:
+MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,
+LINEAR_KEY
+(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:
+RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,
+LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| RANGE | 1 | |
+| RANGE_COLUMNS | 2 | |
+| LIST | 3 | |
+| LIST_COLUMNS | 4 | |
+| HASH | 5 | |
+| LINEAR_HASH | 6 | |
+| KEY | 7 | |
+| LINEAR_KEY | 8 | |
+
+
+
+<a name="bytebase-v1-TaskMetadata-State"></a>
+
+### TaskMetadata.State
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATE_UNSPECIFIED | 0 | |
+| STARTED | 1 | |
+| SUSPENDED | 2 | |
@@ -8672,18 +8663,26 @@ View options for database group responses.
-<a name="bytebase-v1-DatabaseGroupService"></a>
+<a name="bytebase-v1-DatabaseService"></a>
-### DatabaseGroupService
-DatabaseGroupService manages database groups for organizing databases by criteria.
+### DatabaseService
+DatabaseService manages databases and their schemas.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
-| ListDatabaseGroups | [ListDatabaseGroupsRequest](#bytebase-v1-ListDatabaseGroupsRequest) | [ListDatabaseGroupsResponse](#bytebase-v1-ListDatabaseGroupsResponse) | Lists database groups in a project. Permissions required: bb.databaseGroups.list |
-| GetDatabaseGroup | [GetDatabaseGroupRequest](#bytebase-v1-GetDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Gets a database group by name. Permissions required: bb.databaseGroups.get |
-| CreateDatabaseGroup | [CreateDatabaseGroupRequest](#bytebase-v1-CreateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Creates a new database group. Permissions required: bb.databaseGroups.create |
-| UpdateDatabaseGroup | [UpdateDatabaseGroupRequest](#bytebase-v1-UpdateDatabaseGroupRequest) | [DatabaseGroup](#bytebase-v1-DatabaseGroup) | Updates a database group. Permissions required: bb.databaseGroups.update When allow_missing=true, also requires: bb.databaseGroups.create |
-| DeleteDatabaseGroup | [DeleteDatabaseGroupRequest](#bytebase-v1-DeleteDatabaseGroupRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a database group. Permissions required: bb.databaseGroups.delete |
+| GetDatabase | [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest) | [Database](#bytebase-v1-Database) | Retrieves a database by name. Permissions required: bb.databases.get |
+| BatchGetDatabases | [BatchGetDatabasesRequest](#bytebase-v1-BatchGetDatabasesRequest) | [BatchGetDatabasesResponse](#bytebase-v1-BatchGetDatabasesResponse) | Retrieves multiple databases by their names. Permissions required: bb.databases.get |
+| ListDatabases | [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest) | [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse) | Lists databases in a project, instance, or workspace. Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent) |
+| UpdateDatabase | [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest) | [Database](#bytebase-v1-Database) | Updates database properties such as labels and project assignment. Permissions required: bb.databases.update |
+| BatchUpdateDatabases | [BatchUpdateDatabasesRequest](#bytebase-v1-BatchUpdateDatabasesRequest) | [BatchUpdateDatabasesResponse](#bytebase-v1-BatchUpdateDatabasesResponse) | Updates multiple databases in a single batch operation. Permissions required: bb.databases.update |
+| SyncDatabase | [SyncDatabaseRequest](#bytebase-v1-SyncDatabaseRequest) | [SyncDatabaseResponse](#bytebase-v1-SyncDatabaseResponse) | Synchronizes database schema from the instance. Permissions required: bb.databases.sync |
+| BatchSyncDatabases | [BatchSyncDatabasesRequest](#bytebase-v1-BatchSyncDatabasesRequest) | [BatchSyncDatabasesResponse](#bytebase-v1-BatchSyncDatabasesResponse) | Synchronizes multiple databases in a single batch operation. Permissions required: bb.databases.sync |
+| GetDatabaseMetadata | [GetDatabaseMetadataRequest](#bytebase-v1-GetDatabaseMetadataRequest) | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema |
+| GetDatabaseSchema | [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest) | [DatabaseSchema](#bytebase-v1-DatabaseSchema) | Retrieves database schema as DDL statements. Permissions required: bb.databases.getSchema |
+| GetDatabaseSDLSchema | [GetDatabaseSDLSchemaRequest](#bytebase-v1-GetDatabaseSDLSchemaRequest) | [DatabaseSDLSchema](#bytebase-v1-DatabaseSDLSchema) | Retrieves database schema in SDL (Schema Definition Language) format. Permissions required: bb.databases.getSchema |
+| DiffSchema | [DiffSchemaRequest](#bytebase-v1-DiffSchemaRequest) | [DiffSchemaResponse](#bytebase-v1-DiffSchemaResponse) | Compares and generates migration statements between two schemas. Permissions required: bb.databases.get |
+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | Generates migration statements from the database&#39;s current schema to the given target metadata. Permissions required: bb.databases.diffMetadata |
+| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | Generates schema DDL for a database object. Permissions required: bb.databases.getSchema |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index e2622bd5ed..bc7b15ac1f 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -535,201 +535,177 @@
<li>
- <a href="#v1%2finstance_role_service.proto">v1/instance_role_service.proto</a>
+ <a href="#v1%2fquery_history_service.proto">v1/query_history_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.InstanceRole"><span class="badge">M</span>InstanceRole</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.ListInstanceRolesRequest"><span class="badge">M</span>ListInstanceRolesRequest</a>
+ <a href="#bytebase.v1.GetQueryHistoryRequest"><span class="badge">M</span>GetQueryHistoryRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ListInstanceRolesResponse"><span class="badge">M</span>ListInstanceRolesResponse</a>
+ <a href="#bytebase.v1.ListQueryHistoriesRequest"><span class="badge">M</span>ListQueryHistoriesRequest</a>
</li>
-
-
-
<li>
- <a href="#bytebase.v1.InstanceRoleService"><span class="badge">S</span>InstanceRoleService</a>
+ <a href="#bytebase.v1.ListQueryHistoriesResponse"><span class="badge">M</span>ListQueryHistoriesResponse</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2finstance_service.proto">v1/instance_service.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.AddDataSourceRequest"><span class="badge">M</span>AddDataSourceRequest</a>
+ <a href="#bytebase.v1.QueryHistory"><span class="badge">M</span>QueryHistory</a>
</li>
<li>
- <a href="#bytebase.v1.BatchSyncInstancesRequest"><span class="badge">M</span>BatchSyncInstancesRequest</a>
+ <a href="#bytebase.v1.SearchQueryHistoriesRequest"><span class="badge">M</span>SearchQueryHistoriesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchSyncInstancesResponse"><span class="badge">M</span>BatchSyncInstancesResponse</a>
+ <a href="#bytebase.v1.SearchQueryHistoriesResponse"><span class="badge">M</span>SearchQueryHistoriesResponse</a>
</li>
- <li>
- <a href="#bytebase.v1.BatchUpdateInstancesRequest"><span class="badge">M</span>BatchUpdateInstancesRequest</a>
- </li>
<li>
- <a href="#bytebase.v1.BatchUpdateInstancesResponse"><span class="badge">M</span>BatchUpdateInstancesResponse</a>
+ <a href="#bytebase.v1.QueryHistory.Type"><span class="badge">E</span>QueryHistory.Type</a>
</li>
- <li>
- <a href="#bytebase.v1.CreateInstanceRequest"><span class="badge">M</span>CreateInstanceRequest</a>
- </li>
- <li>
- <a href="#bytebase.v1.DataSource"><span class="badge">M</span>DataSource</a>
- </li>
<li>
- <a href="#bytebase.v1.DataSource.AWSCredential"><span class="badge">M</span>DataSource.AWSCredential</a>
+ <a href="#bytebase.v1.QueryHistoryService"><span class="badge">S</span>QueryHistoryService</a>
</li>
- <li>
- <a href="#bytebase.v1.DataSource.Address"><span class="badge">M</span>DataSource.Address</a>
- </li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fsql_service.proto">v1/sql_service.proto</a>
+ <ul>
<li>
- <a href="#bytebase.v1.DataSource.AzureCredential"><span class="badge">M</span>DataSource.AzureCredential</a>
+ <a href="#bytebase.v1.AICompletionRequest"><span class="badge">M</span>AICompletionRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a>
+ <a href="#bytebase.v1.AICompletionRequest.Message"><span class="badge">M</span>AICompletionRequest.Message</a>
</li>
<li>
- <a href="#bytebase.v1.DataSource.GCPCredential"><span class="badge">M</span>DataSource.GCPCredential</a>
+ <a href="#bytebase.v1.AICompletionResponse"><span class="badge">M</span>AICompletionResponse</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>
+ <a href="#bytebase.v1.AICompletionResponse.Candidate"><span class="badge">M</span>AICompletionResponse.Candidate</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption"><span class="badge">M</span>DataSourceExternalSecret.AppRoleAuthOption</a>
+ <a href="#bytebase.v1.AICompletionResponse.Candidate.Content"><span class="badge">M</span>AICompletionResponse.Candidate.Content</a>
</li>
<li>
- <a href="#bytebase.v1.DeleteInstanceRequest"><span class="badge">M</span>DeleteInstanceRequest</a>
+ <a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part"><span class="badge">M</span>AICompletionResponse.Candidate.Content.Part</a>
</li>
<li>
- <a href="#bytebase.v1.GetInstanceRequest"><span class="badge">M</span>GetInstanceRequest</a>
+ <a href="#bytebase.v1.AdminExecuteRequest"><span class="badge">M</span>AdminExecuteRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Instance"><span class="badge">M</span>Instance</a>
+ <a href="#bytebase.v1.AdminExecuteResponse"><span class="badge">M</span>AdminExecuteResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Instance.LabelsEntry"><span class="badge">M</span>Instance.LabelsEntry</a>
+ <a href="#bytebase.v1.Advice"><span class="badge">M</span>Advice</a>
</li>
<li>
- <a href="#bytebase.v1.InstanceResource"><span class="badge">M</span>InstanceResource</a>
+ <a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a>
</li>
<li>
- <a href="#bytebase.v1.KerberosConfig"><span class="badge">M</span>KerberosConfig</a>
+ <a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a>
</li>
<li>
- <a href="#bytebase.v1.ListInstanceDatabaseRequest"><span class="badge">M</span>ListInstanceDatabaseRequest</a>
+ <a href="#bytebase.v1.MaskingReason"><span class="badge">M</span>MaskingReason</a>
</li>
<li>
- <a href="#bytebase.v1.ListInstanceDatabaseResponse"><span class="badge">M</span>ListInstanceDatabaseResponse</a>
+ <a href="#bytebase.v1.QueryOption"><span class="badge">M</span>QueryOption</a>
</li>
<li>
- <a href="#bytebase.v1.ListInstancesRequest"><span class="badge">M</span>ListInstancesRequest</a>
+ <a href="#bytebase.v1.QueryRequest"><span class="badge">M</span>QueryRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ListInstancesResponse"><span class="badge">M</span>ListInstancesResponse</a>
+ <a href="#bytebase.v1.QueryResponse"><span class="badge">M</span>QueryResponse</a>
</li>
<li>
- <a href="#bytebase.v1.RemoveDataSourceRequest"><span class="badge">M</span>RemoveDataSourceRequest</a>
+ <a href="#bytebase.v1.QueryResult"><span class="badge">M</span>QueryResult</a>
</li>
<li>
- <a href="#bytebase.v1.SASLConfig"><span class="badge">M</span>SASLConfig</a>
+ <a href="#bytebase.v1.QueryResult.CommandError"><span class="badge">M</span>QueryResult.CommandError</a>
</li>
<li>
- <a href="#bytebase.v1.SyncDatabases"><span class="badge">M</span>SyncDatabases</a>
+ <a href="#bytebase.v1.QueryResult.Message"><span class="badge">M</span>QueryResult.Message</a>
</li>
<li>
- <a href="#bytebase.v1.SyncInstanceRequest"><span class="badge">M</span>SyncInstanceRequest</a>
+ <a href="#bytebase.v1.QueryResult.PostgresError"><span class="badge">M</span>QueryResult.PostgresError</a>
</li>
<li>
- <a href="#bytebase.v1.SyncInstanceResponse"><span class="badge">M</span>SyncInstanceResponse</a>
+ <a href="#bytebase.v1.QueryResult.SyntaxError"><span class="badge">M</span>QueryResult.SyntaxError</a>
</li>
<li>
- <a href="#bytebase.v1.UndeleteInstanceRequest"><span class="badge">M</span>UndeleteInstanceRequest</a>
+ <a href="#bytebase.v1.QueryRow"><span class="badge">M</span>QueryRow</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateDataSourceRequest"><span class="badge">M</span>UpdateDataSourceRequest</a>
+ <a href="#bytebase.v1.RowValue"><span class="badge">M</span>RowValue</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateInstanceRequest"><span class="badge">M</span>UpdateInstanceRequest</a>
+ <a href="#bytebase.v1.RowValue.Timestamp"><span class="badge">M</span>RowValue.Timestamp</a>
</li>
-
<li>
- <a href="#bytebase.v1.DataSource.AuthenticationType"><span class="badge">E</span>DataSource.AuthenticationType</a>
+ <a href="#bytebase.v1.RowValue.TimestampTZ"><span class="badge">M</span>RowValue.TimestampTZ</a>
</li>
- <li>
- <a href="#bytebase.v1.DataSource.CloudSQLIPType"><span class="badge">E</span>DataSource.CloudSQLIPType</a>
- </li>
<li>
- <a href="#bytebase.v1.DataSource.RedisType"><span class="badge">E</span>DataSource.RedisType</a>
+ <a href="#bytebase.v1.Advice.Level"><span class="badge">E</span>Advice.Level</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a>
+ <a href="#bytebase.v1.Advice.RuleType"><span class="badge">E</span>Advice.RuleType</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceExternalSecret.AuthType"><span class="badge">E</span>DataSourceExternalSecret.AuthType</a>
+ <a href="#bytebase.v1.QueryOption.MSSQLExplainFormat"><span class="badge">E</span>QueryOption.MSSQLExplainFormat</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a>
+ <a href="#bytebase.v1.QueryOption.RedisRunCommandsOn"><span class="badge">E</span>QueryOption.RedisRunCommandsOn</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceExternalSecret.TokenType"><span class="badge">E</span>DataSourceExternalSecret.TokenType</a>
+ <a href="#bytebase.v1.QueryResult.CommandError.Type"><span class="badge">E</span>QueryResult.CommandError.Type</a>
</li>
<li>
- <a href="#bytebase.v1.DataSourceType"><span class="badge">E</span>DataSourceType</a>
+ <a href="#bytebase.v1.QueryResult.Message.Level"><span class="badge">E</span>QueryResult.Message.Level</a>
</li>
<li>
- <a href="#bytebase.v1.InstanceService"><span class="badge">S</span>InstanceService</a>
+ <a href="#bytebase.v1.SQLService"><span class="badge">S</span>SQLService</a>
</li>
</ul>
@@ -737,571 +713,550 @@
<li>
- <a href="#v1%2fdatabase_service.proto">v1/database_service.proto</a>
+ <a href="#v1%2fplan_service.proto">v1/plan_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.BatchGetDatabasesRequest"><span class="badge">M</span>BatchGetDatabasesRequest</a>
+ <a href="#bytebase.v1.CancelPlanCheckRunRequest"><span class="badge">M</span>CancelPlanCheckRunRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetDatabasesResponse"><span class="badge">M</span>BatchGetDatabasesResponse</a>
+ <a href="#bytebase.v1.CancelPlanCheckRunResponse"><span class="badge">M</span>CancelPlanCheckRunResponse</a>
</li>
<li>
- <a href="#bytebase.v1.BatchSyncDatabasesRequest"><span class="badge">M</span>BatchSyncDatabasesRequest</a>
+ <a href="#bytebase.v1.CreatePlanRequest"><span class="badge">M</span>CreatePlanRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchSyncDatabasesResponse"><span class="badge">M</span>BatchSyncDatabasesResponse</a>
+ <a href="#bytebase.v1.GetPlanCheckRunRequest"><span class="badge">M</span>GetPlanCheckRunRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchUpdateDatabasesRequest"><span class="badge">M</span>BatchUpdateDatabasesRequest</a>
+ <a href="#bytebase.v1.GetPlanRequest"><span class="badge">M</span>GetPlanRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchUpdateDatabasesResponse"><span class="badge">M</span>BatchUpdateDatabasesResponse</a>
+ <a href="#bytebase.v1.ListPlansRequest"><span class="badge">M</span>ListPlansRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BoundingBox"><span class="badge">M</span>BoundingBox</a>
+ <a href="#bytebase.v1.ListPlansResponse"><span class="badge">M</span>ListPlansResponse</a>
</li>
<li>
- <a href="#bytebase.v1.CheckConstraintMetadata"><span class="badge">M</span>CheckConstraintMetadata</a>
+ <a href="#bytebase.v1.Plan"><span class="badge">M</span>Plan</a>
</li>
<li>
- <a href="#bytebase.v1.ColumnMetadata"><span class="badge">M</span>ColumnMetadata</a>
+ <a href="#bytebase.v1.Plan.ChangeDatabaseConfig"><span class="badge">M</span>Plan.ChangeDatabaseConfig</a>
</li>
<li>
- <a href="#bytebase.v1.CompositeTypeAttribute"><span class="badge">M</span>CompositeTypeAttribute</a>
+ <a href="#bytebase.v1.Plan.CreateDatabaseConfig"><span class="badge">M</span>Plan.CreateDatabaseConfig</a>
</li>
<li>
- <a href="#bytebase.v1.CompositeTypeMetadata"><span class="badge">M</span>CompositeTypeMetadata</a>
+ <a href="#bytebase.v1.Plan.ExportDataConfig"><span class="badge">M</span>Plan.ExportDataConfig</a>
</li>
<li>
- <a href="#bytebase.v1.Database"><span class="badge">M</span>Database</a>
+ <a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a>
</li>
<li>
- <a href="#bytebase.v1.Database.LabelsEntry"><span class="badge">M</span>Database.LabelsEntry</a>
+ <a href="#bytebase.v1.Plan.RolloutStageSummary"><span class="badge">M</span>Plan.RolloutStageSummary</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseMetadata"><span class="badge">M</span>DatabaseMetadata</a>
+ <a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseSDLSchema"><span class="badge">M</span>DatabaseSDLSchema</a>
+ <a href="#bytebase.v1.Plan.TaskStatusCount"><span class="badge">M</span>Plan.TaskStatusCount</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseSchema"><span class="badge">M</span>DatabaseSchema</a>
+ <a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a>
</li>
<li>
- <a href="#bytebase.v1.DependencyColumn"><span class="badge">M</span>DependencyColumn</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result"><span class="badge">M</span>PlanCheckRun.Result</a>
</li>
<li>
- <a href="#bytebase.v1.DependencyTable"><span class="badge">M</span>DependencyTable</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRun.Result.SqlReviewReport</a>
</li>
<li>
- <a href="#bytebase.v1.DiffSchemaRequest"><span class="badge">M</span>DiffSchemaRequest</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a>
</li>
<li>
- <a href="#bytebase.v1.DiffSchemaResponse"><span class="badge">M</span>DiffSchemaResponse</a>
+ <a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DimensionConstraint"><span class="badge">M</span>DimensionConstraint</a>
+ <a href="#bytebase.v1.RunPlanChecksResponse"><span class="badge">M</span>RunPlanChecksResponse</a>
</li>
<li>
- <a href="#bytebase.v1.DimensionalConfig"><span class="badge">M</span>DimensionalConfig</a>
+ <a href="#bytebase.v1.UpdatePlanRequest"><span class="badge">M</span>UpdatePlanRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.EnumTypeMetadata"><span class="badge">M</span>EnumTypeMetadata</a>
- </li>
<li>
- <a href="#bytebase.v1.EventMetadata"><span class="badge">M</span>EventMetadata</a>
+ <a href="#bytebase.v1.PlanCheckRun.Result.Type"><span class="badge">E</span>PlanCheckRun.Result.Type</a>
</li>
<li>
- <a href="#bytebase.v1.ExtensionMetadata"><span class="badge">M</span>ExtensionMetadata</a>
+ <a href="#bytebase.v1.PlanCheckRun.Status"><span class="badge">E</span>PlanCheckRun.Status</a>
</li>
- <li>
- <a href="#bytebase.v1.ExternalTableMetadata"><span class="badge">M</span>ExternalTableMetadata</a>
- </li>
- <li>
- <a href="#bytebase.v1.ForeignKeyMetadata"><span class="badge">M</span>ForeignKeyMetadata</a>
- </li>
<li>
- <a href="#bytebase.v1.FunctionMetadata"><span class="badge">M</span>FunctionMetadata</a>
+ <a href="#bytebase.v1.PlanService"><span class="badge">S</span>PlanService</a>
</li>
- <li>
- <a href="#bytebase.v1.GenerationMetadata"><span class="badge">M</span>GenerationMetadata</a>
- </li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fissue_service.proto">v1/issue_service.proto</a>
+ <ul>
<li>
- <a href="#bytebase.v1.GetDatabaseMetadataRequest"><span class="badge">M</span>GetDatabaseMetadataRequest</a>
+ <a href="#bytebase.v1.ApprovalFlow"><span class="badge">M</span>ApprovalFlow</a>
</li>
<li>
- <a href="#bytebase.v1.GetDatabaseRequest"><span class="badge">M</span>GetDatabaseRequest</a>
+ <a href="#bytebase.v1.ApprovalTemplate"><span class="badge">M</span>ApprovalTemplate</a>
</li>
<li>
- <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest"><span class="badge">M</span>GetDatabaseSDLSchemaRequest</a>
+ <a href="#bytebase.v1.ApproveIssueRequest"><span class="badge">M</span>ApproveIssueRequest</a>
</li>
<li>
- <a href="#bytebase.v1.GetDatabaseSchemaRequest"><span class="badge">M</span>GetDatabaseSchemaRequest</a>
+ <a href="#bytebase.v1.BatchUpdateIssuesStatusRequest"><span class="badge">M</span>BatchUpdateIssuesStatusRequest</a>
</li>
<li>
- <a href="#bytebase.v1.GetSchemaStringRequest"><span class="badge">M</span>GetSchemaStringRequest</a>
+ <a href="#bytebase.v1.BatchUpdateIssuesStatusResponse"><span class="badge">M</span>BatchUpdateIssuesStatusResponse</a>
</li>
<li>
- <a href="#bytebase.v1.GetSchemaStringResponse"><span class="badge">M</span>GetSchemaStringResponse</a>
+ <a href="#bytebase.v1.CreateIssueCommentRequest"><span class="badge">M</span>CreateIssueCommentRequest</a>
</li>
<li>
- <a href="#bytebase.v1.GridLevel"><span class="badge">M</span>GridLevel</a>
+ <a href="#bytebase.v1.CreateIssueRequest"><span class="badge">M</span>CreateIssueRequest</a>
</li>
<li>
- <a href="#bytebase.v1.IndexMetadata"><span class="badge">M</span>IndexMetadata</a>
+ <a href="#bytebase.v1.GetIssueRequest"><span class="badge">M</span>GetIssueRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ListDatabasesRequest"><span class="badge">M</span>ListDatabasesRequest</a>
+ <a href="#bytebase.v1.Issue"><span class="badge">M</span>Issue</a>
</li>
<li>
- <a href="#bytebase.v1.ListDatabasesResponse"><span class="badge">M</span>ListDatabasesResponse</a>
+ <a href="#bytebase.v1.Issue.Approver"><span class="badge">M</span>Issue.Approver</a>
</li>
<li>
- <a href="#bytebase.v1.MaterializedViewMetadata"><span class="badge">M</span>MaterializedViewMetadata</a>
+ <a href="#bytebase.v1.IssueComment"><span class="badge">M</span>IssueComment</a>
</li>
<li>
- <a href="#bytebase.v1.PackageMetadata"><span class="badge">M</span>PackageMetadata</a>
+ <a href="#bytebase.v1.IssueComment.Approval"><span class="badge">M</span>IssueComment.Approval</a>
</li>
<li>
- <a href="#bytebase.v1.ProcedureMetadata"><span class="badge">M</span>ProcedureMetadata</a>
+ <a href="#bytebase.v1.IssueComment.IssueUpdate"><span class="badge">M</span>IssueComment.IssueUpdate</a>
</li>
<li>
- <a href="#bytebase.v1.SchemaMetadata"><span class="badge">M</span>SchemaMetadata</a>
+ <a href="#bytebase.v1.IssueComment.PlanUpdate"><span class="badge">M</span>IssueComment.PlanUpdate</a>
</li>
<li>
- <a href="#bytebase.v1.SequenceMetadata"><span class="badge">M</span>SequenceMetadata</a>
+ <a href="#bytebase.v1.IssueComment.ReviewSubmission"><span class="badge">M</span>IssueComment.ReviewSubmission</a>
</li>
<li>
- <a href="#bytebase.v1.SpatialIndexConfig"><span class="badge">M</span>SpatialIndexConfig</a>
+ <a href="#bytebase.v1.ListIssueCommentsRequest"><span class="badge">M</span>ListIssueCommentsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.StorageConfig"><span class="badge">M</span>StorageConfig</a>
+ <a href="#bytebase.v1.ListIssueCommentsResponse"><span class="badge">M</span>ListIssueCommentsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.StreamMetadata"><span class="badge">M</span>StreamMetadata</a>
+ <a href="#bytebase.v1.ListIssuesRequest"><span class="badge">M</span>ListIssuesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SyncDatabaseRequest"><span class="badge">M</span>SyncDatabaseRequest</a>
+ <a href="#bytebase.v1.ListIssuesResponse"><span class="badge">M</span>ListIssuesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.SyncDatabaseResponse"><span class="badge">M</span>SyncDatabaseResponse</a>
+ <a href="#bytebase.v1.RejectIssueRequest"><span class="badge">M</span>RejectIssueRequest</a>
</li>
<li>
- <a href="#bytebase.v1.TableMetadata"><span class="badge">M</span>TableMetadata</a>
+ <a href="#bytebase.v1.RequestIssueRequest"><span class="badge">M</span>RequestIssueRequest</a>
</li>
<li>
- <a href="#bytebase.v1.TablePartitionMetadata"><span class="badge">M</span>TablePartitionMetadata</a>
+ <a href="#bytebase.v1.RetryIssueApprovalRequest"><span class="badge">M</span>RetryIssueApprovalRequest</a>
</li>
<li>
- <a href="#bytebase.v1.TaskMetadata"><span class="badge">M</span>TaskMetadata</a>
+ <a href="#bytebase.v1.RoleGrant"><span class="badge">M</span>RoleGrant</a>
</li>
<li>
- <a href="#bytebase.v1.TessellationConfig"><span class="badge">M</span>TessellationConfig</a>
+ <a href="#bytebase.v1.SearchIssuesRequest"><span class="badge">M</span>SearchIssuesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.TriggerMetadata"><span class="badge">M</span>TriggerMetadata</a>
+ <a href="#bytebase.v1.SearchIssuesResponse"><span class="badge">M</span>SearchIssuesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateDatabaseRequest"><span class="badge">M</span>UpdateDatabaseRequest</a>
+ <a href="#bytebase.v1.UpdateIssueCommentRequest"><span class="badge">M</span>UpdateIssueCommentRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ViewMetadata"><span class="badge">M</span>ViewMetadata</a>
+ <a href="#bytebase.v1.UpdateIssueRequest"><span class="badge">M</span>UpdateIssueRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ColumnMetadata.IdentityGeneration"><span class="badge">E</span>ColumnMetadata.IdentityGeneration</a>
+ <a href="#bytebase.v1.Issue.Approver.Status"><span class="badge">E</span>Issue.Approver.Status</a>
</li>
<li>
- <a href="#bytebase.v1.GenerationMetadata.Type"><span class="badge">E</span>GenerationMetadata.Type</a>
+ <a href="#bytebase.v1.Issue.Type"><span class="badge">E</span>Issue.Type</a>
</li>
<li>
- <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat"><span class="badge">E</span>GetDatabaseSDLSchemaRequest.SDLFormat</a>
+ <a href="#bytebase.v1.IssueComment.Approval.Status"><span class="badge">E</span>IssueComment.Approval.Status</a>
</li>
- <li>
- <a href="#bytebase.v1.GetSchemaStringRequest.ObjectType"><span class="badge">E</span>GetSchemaStringRequest.ObjectType</a>
- </li>
+
<li>
- <a href="#bytebase.v1.StreamMetadata.Mode"><span class="badge">E</span>StreamMetadata.Mode</a>
+ <a href="#bytebase.v1.IssueService"><span class="badge">S</span>IssueService</a>
</li>
- <li>
- <a href="#bytebase.v1.StreamMetadata.Type"><span class="badge">E</span>StreamMetadata.Type</a>
- </li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fsetting_service.proto">v1/setting_service.proto</a>
+ <ul>
<li>
- <a href="#bytebase.v1.SyncStatus"><span class="badge">E</span>SyncStatus</a>
+ <a href="#bytebase.v1.AISetting"><span class="badge">M</span>AISetting</a>
</li>
<li>
- <a href="#bytebase.v1.TablePartitionMetadata.Type"><span class="badge">E</span>TablePartitionMetadata.Type</a>
+ <a href="#bytebase.v1.Algorithm"><span class="badge">M</span>Algorithm</a>
</li>
<li>
- <a href="#bytebase.v1.TaskMetadata.State"><span class="badge">E</span>TaskMetadata.State</a>
+ <a href="#bytebase.v1.Algorithm.FullMask"><span class="badge">M</span>Algorithm.FullMask</a>
</li>
-
-
<li>
- <a href="#bytebase.v1.DatabaseService"><span class="badge">S</span>DatabaseService</a>
+ <a href="#bytebase.v1.Algorithm.InnerOuterMask"><span class="badge">M</span>Algorithm.InnerOuterMask</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fquery_history_service.proto">v1/query_history_service.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.GetQueryHistoryRequest"><span class="badge">M</span>GetQueryHistoryRequest</a>
+ <a href="#bytebase.v1.Algorithm.MD5Mask"><span class="badge">M</span>Algorithm.MD5Mask</a>
</li>
<li>
- <a href="#bytebase.v1.ListQueryHistoriesRequest"><span class="badge">M</span>ListQueryHistoriesRequest</a>
+ <a href="#bytebase.v1.Algorithm.RangeMask"><span class="badge">M</span>Algorithm.RangeMask</a>
</li>
<li>
- <a href="#bytebase.v1.ListQueryHistoriesResponse"><span class="badge">M</span>ListQueryHistoriesResponse</a>
+ <a href="#bytebase.v1.Algorithm.RangeMask.Slice"><span class="badge">M</span>Algorithm.RangeMask.Slice</a>
</li>
<li>
- <a href="#bytebase.v1.QueryHistory"><span class="badge">M</span>QueryHistory</a>
+ <a href="#bytebase.v1.Announcement"><span class="badge">M</span>Announcement</a>
</li>
<li>
- <a href="#bytebase.v1.SearchQueryHistoriesRequest"><span class="badge">M</span>SearchQueryHistoriesRequest</a>
+ <a href="#bytebase.v1.Announcement.AnnouncementTheme"><span class="badge">M</span>Announcement.AnnouncementTheme</a>
</li>
<li>
- <a href="#bytebase.v1.SearchQueryHistoriesResponse"><span class="badge">M</span>SearchQueryHistoriesResponse</a>
+ <a href="#bytebase.v1.AppIMSetting"><span class="badge">M</span>AppIMSetting</a>
</li>
-
<li>
- <a href="#bytebase.v1.QueryHistory.Type"><span class="badge">E</span>QueryHistory.Type</a>
+ <a href="#bytebase.v1.AppIMSetting.DingTalk"><span class="badge">M</span>AppIMSetting.DingTalk</a>
</li>
-
-
<li>
- <a href="#bytebase.v1.QueryHistoryService"><span class="badge">S</span>QueryHistoryService</a>
+ <a href="#bytebase.v1.AppIMSetting.Feishu"><span class="badge">M</span>AppIMSetting.Feishu</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fsql_service.proto">v1/sql_service.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.AICompletionRequest"><span class="badge">M</span>AICompletionRequest</a>
+ <a href="#bytebase.v1.AppIMSetting.IMSetting"><span class="badge">M</span>AppIMSetting.IMSetting</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionRequest.Message"><span class="badge">M</span>AICompletionRequest.Message</a>
+ <a href="#bytebase.v1.AppIMSetting.Lark"><span class="badge">M</span>AppIMSetting.Lark</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse"><span class="badge">M</span>AICompletionResponse</a>
+ <a href="#bytebase.v1.AppIMSetting.Slack"><span class="badge">M</span>AppIMSetting.Slack</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse.Candidate"><span class="badge">M</span>AICompletionResponse.Candidate</a>
+ <a href="#bytebase.v1.AppIMSetting.Teams"><span class="badge">M</span>AppIMSetting.Teams</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse.Candidate.Content"><span class="badge">M</span>AICompletionResponse.Candidate.Content</a>
+ <a href="#bytebase.v1.AppIMSetting.Wecom"><span class="badge">M</span>AppIMSetting.Wecom</a>
</li>
<li>
- <a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part"><span class="badge">M</span>AICompletionResponse.Candidate.Content.Part</a>
+ <a href="#bytebase.v1.DataClassificationSetting"><span class="badge">M</span>DataClassificationSetting</a>
</li>
<li>
- <a href="#bytebase.v1.AdminExecuteRequest"><span class="badge">M</span>AdminExecuteRequest</a>
+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig</a>
</li>
<li>
- <a href="#bytebase.v1.AdminExecuteResponse"><span class="badge">M</span>AdminExecuteResponse</a>
+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a>
</li>
<li>
- <a href="#bytebase.v1.Advice"><span class="badge">M</span>Advice</a>
+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.DataClassification</a>
</li>
<li>
- <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>
+ <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.Level</a>
</li>
<li>
- <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>
+ <a href="#bytebase.v1.EmailSetting"><span class="badge">M</span>EmailSetting</a>
</li>
<li>
- <a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a>
+ <a href="#bytebase.v1.EmailSetting.SMTPConfig"><span class="badge">M</span>EmailSetting.SMTPConfig</a>
</li>
<li>
- <a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a>
+ <a href="#bytebase.v1.EnvironmentSetting"><span class="badge">M</span>EnvironmentSetting</a>
</li>
<li>
- <a href="#bytebase.v1.MaskingReason"><span class="badge">M</span>MaskingReason</a>
+ <a href="#bytebase.v1.EnvironmentSetting.Environment"><span class="badge">M</span>EnvironmentSetting.Environment</a>
</li>
<li>
- <a href="#bytebase.v1.QueryOption"><span class="badge">M</span>QueryOption</a>
+ <a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry"><span class="badge">M</span>EnvironmentSetting.Environment.TagsEntry</a>
</li>
<li>
- <a href="#bytebase.v1.QueryRequest"><span class="badge">M</span>QueryRequest</a>
+ <a href="#bytebase.v1.GetSettingRequest"><span class="badge">M</span>GetSettingRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResponse"><span class="badge">M</span>QueryResponse</a>
+ <a href="#bytebase.v1.GetSettingResponse"><span class="badge">M</span>GetSettingResponse</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult"><span class="badge">M</span>QueryResult</a>
+ <a href="#bytebase.v1.ListSettingsRequest"><span class="badge">M</span>ListSettingsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.CommandError"><span class="badge">M</span>QueryResult.CommandError</a>
+ <a href="#bytebase.v1.ListSettingsResponse"><span class="badge">M</span>ListSettingsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.Message"><span class="badge">M</span>QueryResult.Message</a>
+ <a href="#bytebase.v1.SQLEditorThemeSetting"><span class="badge">M</span>SQLEditorThemeSetting</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.PostgresError"><span class="badge">M</span>QueryResult.PostgresError</a>
+ <a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry"><span class="badge">M</span>SQLEditorThemeSetting.TokensEntry</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.SyntaxError"><span class="badge">M</span>QueryResult.SyntaxError</a>
+ <a href="#bytebase.v1.SemanticTypeSetting"><span class="badge">M</span>SemanticTypeSetting</a>
</li>
<li>
- <a href="#bytebase.v1.QueryRow"><span class="badge">M</span>QueryRow</a>
+ <a href="#bytebase.v1.SemanticTypeSetting.SemanticType"><span class="badge">M</span>SemanticTypeSetting.SemanticType</a>
</li>
<li>
- <a href="#bytebase.v1.RowValue"><span class="badge">M</span>RowValue</a>
+ <a href="#bytebase.v1.Setting"><span class="badge">M</span>Setting</a>
</li>
<li>
- <a href="#bytebase.v1.RowValue.Timestamp"><span class="badge">M</span>RowValue.Timestamp</a>
+ <a href="#bytebase.v1.SettingValue"><span class="badge">M</span>SettingValue</a>
</li>
<li>
- <a href="#bytebase.v1.RowValue.TimestampTZ"><span class="badge">M</span>RowValue.TimestampTZ</a>
+ <a href="#bytebase.v1.TestEmailSettingRequest"><span class="badge">M</span>TestEmailSettingRequest</a>
</li>
-
<li>
- <a href="#bytebase.v1.Advice.Level"><span class="badge">E</span>Advice.Level</a>
+ <a href="#bytebase.v1.TestEmailSettingResponse"><span class="badge">M</span>TestEmailSettingResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Advice.RuleType"><span class="badge">E</span>Advice.RuleType</a>
+ <a href="#bytebase.v1.UpdateSettingRequest"><span class="badge">M</span>UpdateSettingRequest</a>
</li>
<li>
- <a href="#bytebase.v1.QueryOption.MSSQLExplainFormat"><span class="badge">E</span>QueryOption.MSSQLExplainFormat</a>
+ <a href="#bytebase.v1.WorkspaceApprovalSetting"><span class="badge">M</span>WorkspaceApprovalSetting</a>
</li>
<li>
- <a href="#bytebase.v1.QueryOption.RedisRunCommandsOn"><span class="badge">E</span>QueryOption.RedisRunCommandsOn</a>
+ <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule"><span class="badge">M</span>WorkspaceApprovalSetting.Rule</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.CommandError.Type"><span class="badge">E</span>QueryResult.CommandError.Type</a>
+ <a href="#bytebase.v1.WorkspaceProfileSetting"><span class="badge">M</span>WorkspaceProfileSetting</a>
</li>
<li>
- <a href="#bytebase.v1.QueryResult.Message.Level"><span class="badge">E</span>QueryResult.Message.Level</a>
+ <a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction"><span class="badge">M</span>WorkspaceProfileSetting.PasswordRestriction</a>
</li>
-
<li>
- <a href="#bytebase.v1.SQLService"><span class="badge">S</span>SQLService</a>
+ <a href="#bytebase.v1.AISetting.Provider"><span class="badge">E</span>AISetting.Provider</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fplan_service.proto">v1/plan_service.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.CancelPlanCheckRunRequest"><span class="badge">M</span>CancelPlanCheckRunRequest</a>
+ <a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType"><span class="badge">E</span>Algorithm.InnerOuterMask.MaskType</a>
</li>
<li>
- <a href="#bytebase.v1.CancelPlanCheckRunResponse"><span class="badge">M</span>CancelPlanCheckRunResponse</a>
+ <a href="#bytebase.v1.DatabaseChangeMode"><span class="badge">E</span>DatabaseChangeMode</a>
</li>
<li>
- <a href="#bytebase.v1.CreatePlanRequest"><span class="badge">M</span>CreatePlanRequest</a>
+ <a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication"><span class="badge">E</span>EmailSetting.SMTPConfig.Authentication</a>
</li>
<li>
- <a href="#bytebase.v1.GetPlanCheckRunRequest"><span class="badge">M</span>GetPlanCheckRunRequest</a>
+ <a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption"><span class="badge">E</span>EmailSetting.SMTPConfig.Encryption</a>
</li>
<li>
- <a href="#bytebase.v1.GetPlanRequest"><span class="badge">M</span>GetPlanRequest</a>
+ <a href="#bytebase.v1.EmailSetting.Type"><span class="badge">E</span>EmailSetting.Type</a>
</li>
<li>
- <a href="#bytebase.v1.ListPlansRequest"><span class="badge">M</span>ListPlansRequest</a>
+ <a href="#bytebase.v1.Setting.SettingName"><span class="badge">E</span>Setting.SettingName</a>
</li>
<li>
- <a href="#bytebase.v1.ListPlansResponse"><span class="badge">M</span>ListPlansResponse</a>
+ <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source"><span class="badge">E</span>WorkspaceApprovalSetting.Rule.Source</a>
</li>
<li>
- <a href="#bytebase.v1.Plan"><span class="badge">M</span>Plan</a>
+ <a href="#bytebase.v1.WorkspaceProfileSetting.MCPCapability"><span class="badge">E</span>WorkspaceProfileSetting.MCPCapability</a>
</li>
- <li>
- <a href="#bytebase.v1.Plan.ChangeDatabaseConfig"><span class="badge">M</span>Plan.ChangeDatabaseConfig</a>
- </li>
- <li>
- <a href="#bytebase.v1.Plan.CreateDatabaseConfig"><span class="badge">M</span>Plan.CreateDatabaseConfig</a>
- </li>
<li>
- <a href="#bytebase.v1.Plan.ExportDataConfig"><span class="badge">M</span>Plan.ExportDataConfig</a>
+ <a href="#bytebase.v1.SettingService"><span class="badge">S</span>SettingService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2factuator_service.proto">v1/actuator_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry"><span class="badge">M</span>Plan.PlanCheckRunStatusCountEntry</a>
+ <a href="#bytebase.v1.ActuatorInfo"><span class="badge">M</span>ActuatorInfo</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.RolloutStageSummary"><span class="badge">M</span>Plan.RolloutStageSummary</a>
+ <a href="#bytebase.v1.DeleteCacheRequest"><span class="badge">M</span>DeleteCacheRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.Spec"><span class="badge">M</span>Plan.Spec</a>
+ <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Plan.TaskStatusCount"><span class="badge">M</span>Plan.TaskStatusCount</a>
+ <a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun"><span class="badge">M</span>PlanCheckRun</a>
+ <a href="#bytebase.v1.SetupSampleRequest"><span class="badge">M</span>SetupSampleRequest</a>
</li>
+
+
+
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result"><span class="badge">M</span>PlanCheckRun.Result</a>
+ <a href="#bytebase.v1.ActuatorService"><span class="badge">S</span>ActuatorService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fai_service.proto">v1/ai_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport"><span class="badge">M</span>PlanCheckRun.Result.SqlReviewReport</a>
+ <a href="#bytebase.v1.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>
</li>
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a>
+ <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a>
+ <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>
</li>
<li>
- <a href="#bytebase.v1.RunPlanChecksResponse"><span class="badge">M</span>RunPlanChecksResponse</a>
+ <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>
</li>
<li>
- <a href="#bytebase.v1.UpdatePlanRequest"><span class="badge">M</span>UpdatePlanRequest</a>
+ <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>
</li>
-
<li>
- <a href="#bytebase.v1.PlanCheckRun.Result.Type"><span class="badge">E</span>PlanCheckRun.Result.Type</a>
+ <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>
</li>
+
<li>
- <a href="#bytebase.v1.PlanCheckRun.Status"><span class="badge">E</span>PlanCheckRun.Status</a>
+ <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>
</li>
<li>
- <a href="#bytebase.v1.PlanService"><span class="badge">S</span>PlanService</a>
+ <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a>
</li>
</ul>
@@ -1309,134 +1264,148 @@
<li>
- <a href="#v1%2fissue_service.proto">v1/issue_service.proto</a>
+ <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.ApprovalFlow"><span class="badge">M</span>ApprovalFlow</a>
+ <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>
</li>
<li>
- <a href="#bytebase.v1.ApprovalTemplate"><span class="badge">M</span>ApprovalTemplate</a>
+ <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>
</li>
<li>
- <a href="#bytebase.v1.ApproveIssueRequest"><span class="badge">M</span>ApproveIssueRequest</a>
+ <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchUpdateIssuesStatusRequest"><span class="badge">M</span>BatchUpdateIssuesStatusRequest</a>
+ <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>
</li>
<li>
- <a href="#bytebase.v1.BatchUpdateIssuesStatusResponse"><span class="badge">M</span>BatchUpdateIssuesStatusResponse</a>
+ <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>
</li>
<li>
- <a href="#bytebase.v1.CreateIssueCommentRequest"><span class="badge">M</span>CreateIssueCommentRequest</a>
+ <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.CreateIssueRequest"><span class="badge">M</span>CreateIssueRequest</a>
- </li>
<li>
- <a href="#bytebase.v1.GetIssueRequest"><span class="badge">M</span>GetIssueRequest</a>
+ <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a>
</li>
- <li>
- <a href="#bytebase.v1.Issue"><span class="badge">M</span>Issue</a>
- </li>
+
+
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a>
+ <ul>
<li>
- <a href="#bytebase.v1.Issue.Approver"><span class="badge">M</span>Issue.Approver</a>
+ <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a>
</li>
<li>
- <a href="#bytebase.v1.IssueComment"><span class="badge">M</span>IssueComment</a>
+ <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>
</li>
<li>
- <a href="#bytebase.v1.IssueComment.Approval"><span class="badge">M</span>IssueComment.Approval</a>
+ <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.IssueComment.IssueUpdate"><span class="badge">M</span>IssueComment.IssueUpdate</a>
+ <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.IssueComment.PlanUpdate"><span class="badge">M</span>IssueComment.PlanUpdate</a>
+ <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.IssueComment.ReviewSubmission"><span class="badge">M</span>IssueComment.ReviewSubmission</a>
+ <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ListIssueCommentsRequest"><span class="badge">M</span>ListIssueCommentsRequest</a>
+ <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>
</li>
+
<li>
- <a href="#bytebase.v1.ListIssueCommentsResponse"><span class="badge">M</span>ListIssueCommentsResponse</a>
+ <a href="#bytebase.v1.AuditLog.Severity"><span class="badge">E</span>AuditLog.Severity</a>
</li>
+
+
<li>
- <a href="#bytebase.v1.ListIssuesRequest"><span class="badge">M</span>ListIssuesRequest</a>
+ <a href="#bytebase.v1.AuditLogService"><span class="badge">S</span>AuditLogService</a>
</li>
- <li>
- <a href="#bytebase.v1.ListIssuesResponse"><span class="badge">M</span>ListIssuesResponse</a>
- </li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fuser_service.proto">v1/user_service.proto</a>
+ <ul>
<li>
- <a href="#bytebase.v1.RejectIssueRequest"><span class="badge">M</span>RejectIssueRequest</a>
+ <a href="#bytebase.v1.BatchGetUsersRequest"><span class="badge">M</span>BatchGetUsersRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RequestIssueRequest"><span class="badge">M</span>RequestIssueRequest</a>
+ <a href="#bytebase.v1.BatchGetUsersResponse"><span class="badge">M</span>BatchGetUsersResponse</a>
</li>
<li>
- <a href="#bytebase.v1.RetryIssueApprovalRequest"><span class="badge">M</span>RetryIssueApprovalRequest</a>
+ <a href="#bytebase.v1.CreateUserRequest"><span class="badge">M</span>CreateUserRequest</a>
</li>
<li>
- <a href="#bytebase.v1.RoleGrant"><span class="badge">M</span>RoleGrant</a>
+ <a href="#bytebase.v1.DeleteUserRequest"><span class="badge">M</span>DeleteUserRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SearchIssuesRequest"><span class="badge">M</span>SearchIssuesRequest</a>
+ <a href="#bytebase.v1.GetUserRequest"><span class="badge">M</span>GetUserRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SearchIssuesResponse"><span class="badge">M</span>SearchIssuesResponse</a>
+ <a href="#bytebase.v1.ListUsersRequest"><span class="badge">M</span>ListUsersRequest</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateIssueCommentRequest"><span class="badge">M</span>UpdateIssueCommentRequest</a>
+ <a href="#bytebase.v1.ListUsersResponse"><span class="badge">M</span>ListUsersResponse</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateIssueRequest"><span class="badge">M</span>UpdateIssueRequest</a>
+ <a href="#bytebase.v1.UndeleteUserRequest"><span class="badge">M</span>UndeleteUserRequest</a>
</li>
+ <li>
+ <a href="#bytebase.v1.UpdateEmailRequest"><span class="badge">M</span>UpdateEmailRequest</a>
+ </li>
<li>
- <a href="#bytebase.v1.Issue.Approver.Status"><span class="badge">E</span>Issue.Approver.Status</a>
+ <a href="#bytebase.v1.UpdateUserRequest"><span class="badge">M</span>UpdateUserRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Issue.Type"><span class="badge">E</span>Issue.Type</a>
+ <a href="#bytebase.v1.User"><span class="badge">M</span>User</a>
</li>
<li>
- <a href="#bytebase.v1.IssueComment.Approval.Status"><span class="badge">E</span>IssueComment.Approval.Status</a>
+ <a href="#bytebase.v1.User.Profile"><span class="badge">M</span>User.Profile</a>
</li>
+
<li>
- <a href="#bytebase.v1.IssueService"><span class="badge">S</span>IssueService</a>
+ <a href="#bytebase.v1.UserService"><span class="badge">S</span>UserService</a>
</li>
</ul>
@@ -1444,226 +1413,262 @@
<li>
- <a href="#v1%2fsetting_service.proto">v1/setting_service.proto</a>
+ <a href="#v1%2fauth_service.proto">v1/auth_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.AISetting"><span class="badge">M</span>AISetting</a>
+ <a href="#bytebase.v1.ExchangeTokenRequest"><span class="badge">M</span>ExchangeTokenRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm"><span class="badge">M</span>Algorithm</a>
+ <a href="#bytebase.v1.ExchangeTokenResponse"><span class="badge">M</span>ExchangeTokenResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm.FullMask"><span class="badge">M</span>Algorithm.FullMask</a>
+ <a href="#bytebase.v1.IdentityProviderContext"><span class="badge">M</span>IdentityProviderContext</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm.InnerOuterMask"><span class="badge">M</span>Algorithm.InnerOuterMask</a>
+ <a href="#bytebase.v1.LoginRequest"><span class="badge">M</span>LoginRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm.MD5Mask"><span class="badge">M</span>Algorithm.MD5Mask</a>
+ <a href="#bytebase.v1.LoginResponse"><span class="badge">M</span>LoginResponse</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm.RangeMask"><span class="badge">M</span>Algorithm.RangeMask</a>
+ <a href="#bytebase.v1.LogoutRequest"><span class="badge">M</span>LogoutRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm.RangeMask.Slice"><span class="badge">M</span>Algorithm.RangeMask.Slice</a>
+ <a href="#bytebase.v1.OAuth2IdentityProviderContext"><span class="badge">M</span>OAuth2IdentityProviderContext</a>
</li>
<li>
- <a href="#bytebase.v1.Announcement"><span class="badge">M</span>Announcement</a>
+ <a href="#bytebase.v1.OIDCIdentityProviderContext"><span class="badge">M</span>OIDCIdentityProviderContext</a>
</li>
<li>
- <a href="#bytebase.v1.Announcement.AnnouncementTheme"><span class="badge">M</span>Announcement.AnnouncementTheme</a>
+ <a href="#bytebase.v1.RefreshRequest"><span class="badge">M</span>RefreshRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AppIMSetting"><span class="badge">M</span>AppIMSetting</a>
+ <a href="#bytebase.v1.RefreshResponse"><span class="badge">M</span>RefreshResponse</a>
</li>
<li>
- <a href="#bytebase.v1.AppIMSetting.DingTalk"><span class="badge">M</span>AppIMSetting.DingTalk</a>
+ <a href="#bytebase.v1.RequestPasswordResetRequest"><span class="badge">M</span>RequestPasswordResetRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AppIMSetting.Feishu"><span class="badge">M</span>AppIMSetting.Feishu</a>
+ <a href="#bytebase.v1.ResetPasswordRequest"><span class="badge">M</span>ResetPasswordRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AppIMSetting.IMSetting"><span class="badge">M</span>AppIMSetting.IMSetting</a>
+ <a href="#bytebase.v1.SendEmailLoginCodeRequest"><span class="badge">M</span>SendEmailLoginCodeRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AppIMSetting.Lark"><span class="badge">M</span>AppIMSetting.Lark</a>
+ <a href="#bytebase.v1.SignupRequest"><span class="badge">M</span>SignupRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AppIMSetting.Slack"><span class="badge">M</span>AppIMSetting.Slack</a>
+ <a href="#bytebase.v1.SwitchWorkspaceRequest"><span class="badge">M</span>SwitchWorkspaceRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.AppIMSetting.Teams"><span class="badge">M</span>AppIMSetting.Teams</a>
- </li>
- <li>
- <a href="#bytebase.v1.AppIMSetting.Wecom"><span class="badge">M</span>AppIMSetting.Wecom</a>
- </li>
+
<li>
- <a href="#bytebase.v1.DataClassificationSetting"><span class="badge">M</span>DataClassificationSetting</a>
+ <a href="#bytebase.v1.AuthService"><span class="badge">S</span>AuthService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fcel_service.proto">v1/cel_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig</a>
+ <a href="#bytebase.v1.BatchDeparseRequest"><span class="badge">M</span>BatchDeparseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a>
+ <a href="#bytebase.v1.BatchDeparseResponse"><span class="badge">M</span>BatchDeparseResponse</a>
</li>
<li>
- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.DataClassification</a>
+ <a href="#bytebase.v1.BatchParseRequest"><span class="badge">M</span>BatchParseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.Level</a>
+ <a href="#bytebase.v1.BatchParseResponse"><span class="badge">M</span>BatchParseResponse</a>
</li>
+
+
+
<li>
- <a href="#bytebase.v1.EmailSetting"><span class="badge">M</span>EmailSetting</a>
+ <a href="#bytebase.v1.CelService"><span class="badge">S</span>CelService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fchangelog_service.proto">v1/changelog_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.EmailSetting.SMTPConfig"><span class="badge">M</span>EmailSetting.SMTPConfig</a>
+ <a href="#bytebase.v1.Changelog"><span class="badge">M</span>Changelog</a>
</li>
<li>
- <a href="#bytebase.v1.EnvironmentSetting"><span class="badge">M</span>EnvironmentSetting</a>
+ <a href="#bytebase.v1.GetChangelogRequest"><span class="badge">M</span>GetChangelogRequest</a>
</li>
<li>
- <a href="#bytebase.v1.EnvironmentSetting.Environment"><span class="badge">M</span>EnvironmentSetting.Environment</a>
+ <a href="#bytebase.v1.ListChangelogsRequest"><span class="badge">M</span>ListChangelogsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry"><span class="badge">M</span>EnvironmentSetting.Environment.TagsEntry</a>
+ <a href="#bytebase.v1.ListChangelogsResponse"><span class="badge">M</span>ListChangelogsResponse</a>
</li>
+
<li>
- <a href="#bytebase.v1.GetSettingRequest"><span class="badge">M</span>GetSettingRequest</a>
+ <a href="#bytebase.v1.Changelog.Status"><span class="badge">E</span>Changelog.Status</a>
</li>
<li>
- <a href="#bytebase.v1.GetSettingResponse"><span class="badge">M</span>GetSettingResponse</a>
+ <a href="#bytebase.v1.ChangelogView"><span class="badge">E</span>ChangelogView</a>
</li>
+
+
<li>
- <a href="#bytebase.v1.ListSettingsRequest"><span class="badge">M</span>ListSettingsRequest</a>
+ <a href="#bytebase.v1.ChangelogService"><span class="badge">S</span>ChangelogService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fdatabase_catalog_service.proto">v1/database_catalog_service.proto</a>
+ <ul>
+
<li>
- <a href="#bytebase.v1.ListSettingsResponse"><span class="badge">M</span>ListSettingsResponse</a>
+ <a href="#bytebase.v1.ColumnCatalog"><span class="badge">M</span>ColumnCatalog</a>
</li>
<li>
- <a href="#bytebase.v1.SQLEditorThemeSetting"><span class="badge">M</span>SQLEditorThemeSetting</a>
+ <a href="#bytebase.v1.ColumnCatalog.LabelsEntry"><span class="badge">M</span>ColumnCatalog.LabelsEntry</a>
</li>
<li>
- <a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry"><span class="badge">M</span>SQLEditorThemeSetting.TokensEntry</a>
+ <a href="#bytebase.v1.DatabaseCatalog"><span class="badge">M</span>DatabaseCatalog</a>
</li>
<li>
- <a href="#bytebase.v1.SemanticTypeSetting"><span class="badge">M</span>SemanticTypeSetting</a>
+ <a href="#bytebase.v1.GetDatabaseCatalogRequest"><span class="badge">M</span>GetDatabaseCatalogRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SemanticTypeSetting.SemanticType"><span class="badge">M</span>SemanticTypeSetting.SemanticType</a>
+ <a href="#bytebase.v1.ObjectSchema"><span class="badge">M</span>ObjectSchema</a>
</li>
<li>
- <a href="#bytebase.v1.Setting"><span class="badge">M</span>Setting</a>
+ <a href="#bytebase.v1.ObjectSchema.ArrayKind"><span class="badge">M</span>ObjectSchema.ArrayKind</a>
</li>
<li>
- <a href="#bytebase.v1.SettingValue"><span class="badge">M</span>SettingValue</a>
+ <a href="#bytebase.v1.ObjectSchema.StructKind"><span class="badge">M</span>ObjectSchema.StructKind</a>
</li>
<li>
- <a href="#bytebase.v1.TestEmailSettingRequest"><span class="badge">M</span>TestEmailSettingRequest</a>
+ <a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry"><span class="badge">M</span>ObjectSchema.StructKind.PropertiesEntry</a>
</li>
<li>
- <a href="#bytebase.v1.TestEmailSettingResponse"><span class="badge">M</span>TestEmailSettingResponse</a>
+ <a href="#bytebase.v1.SchemaCatalog"><span class="badge">M</span>SchemaCatalog</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateSettingRequest"><span class="badge">M</span>UpdateSettingRequest</a>
+ <a href="#bytebase.v1.TableCatalog"><span class="badge">M</span>TableCatalog</a>
</li>
<li>
- <a href="#bytebase.v1.WorkspaceApprovalSetting"><span class="badge">M</span>WorkspaceApprovalSetting</a>
+ <a href="#bytebase.v1.TableCatalog.Columns"><span class="badge">M</span>TableCatalog.Columns</a>
</li>
<li>
- <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule"><span class="badge">M</span>WorkspaceApprovalSetting.Rule</a>
+ <a href="#bytebase.v1.UpdateDatabaseCatalogRequest"><span class="badge">M</span>UpdateDatabaseCatalogRequest</a>
</li>
+
<li>
- <a href="#bytebase.v1.WorkspaceProfileSetting"><span class="badge">M</span>WorkspaceProfileSetting</a>
+ <a href="#bytebase.v1.ObjectSchema.Type"><span class="badge">E</span>ObjectSchema.Type</a>
</li>
+
+
<li>
- <a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction"><span class="badge">M</span>WorkspaceProfileSetting.PasswordRestriction</a>
+ <a href="#bytebase.v1.DatabaseCatalogService"><span class="badge">S</span>DatabaseCatalogService</a>
</li>
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#v1%2fdatabase_group_service.proto">v1/database_group_service.proto</a>
+ <ul>
<li>
- <a href="#bytebase.v1.AISetting.Provider"><span class="badge">E</span>AISetting.Provider</a>
+ <a href="#bytebase.v1.CreateDatabaseGroupRequest"><span class="badge">M</span>CreateDatabaseGroupRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType"><span class="badge">E</span>Algorithm.InnerOuterMask.MaskType</a>
+ <a href="#bytebase.v1.DatabaseGroup"><span class="badge">M</span>DatabaseGroup</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseChangeMode"><span class="badge">E</span>DatabaseChangeMode</a>
+ <a href="#bytebase.v1.DatabaseGroup.Database"><span class="badge">M</span>DatabaseGroup.Database</a>
</li>
<li>
- <a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication"><span class="badge">E</span>EmailSetting.SMTPConfig.Authentication</a>
+ <a href="#bytebase.v1.DeleteDatabaseGroupRequest"><span class="badge">M</span>DeleteDatabaseGroupRequest</a>
</li>
<li>
- <a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption"><span class="badge">E</span>EmailSetting.SMTPConfig.Encryption</a>
+ <a href="#bytebase.v1.GetDatabaseGroupRequest"><span class="badge">M</span>GetDatabaseGroupRequest</a>
</li>
<li>
- <a href="#bytebase.v1.EmailSetting.Type"><span class="badge">E</span>EmailSetting.Type</a>
+ <a href="#bytebase.v1.ListDatabaseGroupsRequest"><span class="badge">M</span>ListDatabaseGroupsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.Setting.SettingName"><span class="badge">E</span>Setting.SettingName</a>
+ <a href="#bytebase.v1.ListDatabaseGroupsResponse"><span class="badge">M</span>ListDatabaseGroupsResponse</a>
</li>
<li>
- <a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source"><span class="badge">E</span>WorkspaceApprovalSetting.Rule.Source</a>
+ <a href="#bytebase.v1.UpdateDatabaseGroupRequest"><span class="badge">M</span>UpdateDatabaseGroupRequest</a>
</li>
+
<li>
- <a href="#bytebase.v1.WorkspaceProfileSetting.MCPCapability"><span class="badge">E</span>WorkspaceProfileSetting.MCPCapability</a>
+ <a href="#bytebase.v1.DatabaseGroupView"><span class="badge">E</span>DatabaseGroupView</a>
</li>
<li>
- <a href="#bytebase.v1.SettingService"><span class="badge">S</span>SettingService</a>
+ <a href="#bytebase.v1.DatabaseGroupService"><span class="badge">S</span>DatabaseGroupService</a>
</li>
</ul>
@@ -1671,34 +1676,26 @@
<li>
- <a href="#v1%2factuator_service.proto">v1/actuator_service.proto</a>
+ <a href="#v1%2finstance_role_service.proto">v1/instance_role_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.ActuatorInfo"><span class="badge">M</span>ActuatorInfo</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.DeleteCacheRequest"><span class="badge">M</span>DeleteCacheRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>
+ <a href="#bytebase.v1.InstanceRole"><span class="badge">M</span>InstanceRole</a>
</li>
<li>
- <a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a>
+ <a href="#bytebase.v1.ListInstanceRolesRequest"><span class="badge">M</span>ListInstanceRolesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SetupSampleRequest"><span class="badge">M</span>SetupSampleRequest</a>
+ <a href="#bytebase.v1.ListInstanceRolesResponse"><span class="badge">M</span>ListInstanceRolesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.ActuatorService"><span class="badge">S</span>ActuatorService</a>
+ <a href="#bytebase.v1.InstanceRoleService"><span class="badge">S</span>InstanceRoleService</a>
</li>
</ul>
@@ -1706,191 +1703,174 @@
<li>
- <a href="#v1%2fai_service.proto">v1/ai_service.proto</a>
+ <a href="#v1%2finstance_service.proto">v1/instance_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.AIChatMessage"><span class="badge">M</span>AIChatMessage</a>
+ <a href="#bytebase.v1.AddDataSourceRequest"><span class="badge">M</span>AddDataSourceRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AIChatRequest"><span class="badge">M</span>AIChatRequest</a>
+ <a href="#bytebase.v1.BatchSyncInstancesRequest"><span class="badge">M</span>BatchSyncInstancesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AIChatResponse"><span class="badge">M</span>AIChatResponse</a>
+ <a href="#bytebase.v1.BatchSyncInstancesResponse"><span class="badge">M</span>BatchSyncInstancesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.AIChatToolCall"><span class="badge">M</span>AIChatToolCall</a>
+ <a href="#bytebase.v1.BatchUpdateInstancesRequest"><span class="badge">M</span>BatchUpdateInstancesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.AIChatToolDefinition"><span class="badge">M</span>AIChatToolDefinition</a>
+ <a href="#bytebase.v1.BatchUpdateInstancesResponse"><span class="badge">M</span>BatchUpdateInstancesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.AIChatUsage"><span class="badge">M</span>AIChatUsage</a>
+ <a href="#bytebase.v1.CreateInstanceRequest"><span class="badge">M</span>CreateInstanceRequest</a>
</li>
-
<li>
- <a href="#bytebase.v1.AIChatMessageRole"><span class="badge">E</span>AIChatMessageRole</a>
+ <a href="#bytebase.v1.DataSource"><span class="badge">M</span>DataSource</a>
</li>
-
-
<li>
- <a href="#bytebase.v1.AIService"><span class="badge">S</span>AIService</a>
+ <a href="#bytebase.v1.DataSource.AWSCredential"><span class="badge">M</span>DataSource.AWSCredential</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>
- <ul>
-
<li>
- <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>
+ <a href="#bytebase.v1.DataSource.Address"><span class="badge">M</span>DataSource.Address</a>
</li>
<li>
- <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>
+ <a href="#bytebase.v1.DataSource.AzureCredential"><span class="badge">M</span>DataSource.AzureCredential</a>
</li>
<li>
- <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>
+ <a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a>
</li>
<li>
- <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>
+ <a href="#bytebase.v1.DataSource.GCPCredential"><span class="badge">M</span>DataSource.GCPCredential</a>
</li>
<li>
- <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>
+ <a href="#bytebase.v1.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>
</li>
<li>
- <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>
+ <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption"><span class="badge">M</span>DataSourceExternalSecret.AppRoleAuthOption</a>
</li>
-
<li>
- <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a>
+ <a href="#bytebase.v1.DeleteInstanceRequest"><span class="badge">M</span>DeleteInstanceRequest</a>
</li>
-
-
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a>
- <ul>
+ <li>
+ <a href="#bytebase.v1.GetInstanceRequest"><span class="badge">M</span>GetInstanceRequest</a>
+ </li>
<li>
- <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a>
+ <a href="#bytebase.v1.Instance"><span class="badge">M</span>Instance</a>
</li>
<li>
- <a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a>
+ <a href="#bytebase.v1.Instance.LabelsEntry"><span class="badge">M</span>Instance.LabelsEntry</a>
</li>
<li>
- <a href="#bytebase.v1.ExportAuditLogsRequest"><span class="badge">M</span>ExportAuditLogsRequest</a>
+ <a href="#bytebase.v1.InstanceResource"><span class="badge">M</span>InstanceResource</a>
</li>
<li>
- <a href="#bytebase.v1.ExportAuditLogsResponse"><span class="badge">M</span>ExportAuditLogsResponse</a>
+ <a href="#bytebase.v1.KerberosConfig"><span class="badge">M</span>KerberosConfig</a>
</li>
<li>
- <a href="#bytebase.v1.RequestMetadata"><span class="badge">M</span>RequestMetadata</a>
+ <a href="#bytebase.v1.ListInstanceDatabaseRequest"><span class="badge">M</span>ListInstanceDatabaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.SearchAuditLogsRequest"><span class="badge">M</span>SearchAuditLogsRequest</a>
+ <a href="#bytebase.v1.ListInstanceDatabaseResponse"><span class="badge">M</span>ListInstanceDatabaseResponse</a>
</li>
<li>
- <a href="#bytebase.v1.SearchAuditLogsResponse"><span class="badge">M</span>SearchAuditLogsResponse</a>
+ <a href="#bytebase.v1.ListInstancesRequest"><span class="badge">M</span>ListInstancesRequest</a>
</li>
-
<li>
- <a href="#bytebase.v1.AuditLog.Severity"><span class="badge">E</span>AuditLog.Severity</a>
+ <a href="#bytebase.v1.ListInstancesResponse"><span class="badge">M</span>ListInstancesResponse</a>
</li>
-
+ <li>
+ <a href="#bytebase.v1.RemoveDataSourceRequest"><span class="badge">M</span>RemoveDataSourceRequest</a>
+ </li>
<li>
- <a href="#bytebase.v1.AuditLogService"><span class="badge">S</span>AuditLogService</a>
+ <a href="#bytebase.v1.SASLConfig"><span class="badge">M</span>SASLConfig</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fuser_service.proto">v1/user_service.proto</a>
- <ul>
+ <li>
+ <a href="#bytebase.v1.SyncDatabases"><span class="badge">M</span>SyncDatabases</a>
+ </li>
<li>
- <a href="#bytebase.v1.BatchGetUsersRequest"><span class="badge">M</span>BatchGetUsersRequest</a>
+ <a href="#bytebase.v1.SyncInstanceRequest"><span class="badge">M</span>SyncInstanceRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchGetUsersResponse"><span class="badge">M</span>BatchGetUsersResponse</a>
+ <a href="#bytebase.v1.SyncInstanceResponse"><span class="badge">M</span>SyncInstanceResponse</a>
</li>
<li>
- <a href="#bytebase.v1.CreateUserRequest"><span class="badge">M</span>CreateUserRequest</a>
+ <a href="#bytebase.v1.UndeleteInstanceRequest"><span class="badge">M</span>UndeleteInstanceRequest</a>
</li>
<li>
- <a href="#bytebase.v1.DeleteUserRequest"><span class="badge">M</span>DeleteUserRequest</a>
+ <a href="#bytebase.v1.UpdateDataSourceRequest"><span class="badge">M</span>UpdateDataSourceRequest</a>
</li>
<li>
- <a href="#bytebase.v1.GetUserRequest"><span class="badge">M</span>GetUserRequest</a>
+ <a href="#bytebase.v1.UpdateInstanceRequest"><span class="badge">M</span>UpdateInstanceRequest</a>
</li>
+
<li>
- <a href="#bytebase.v1.ListUsersRequest"><span class="badge">M</span>ListUsersRequest</a>
+ <a href="#bytebase.v1.DataSource.AuthenticationType"><span class="badge">E</span>DataSource.AuthenticationType</a>
</li>
<li>
- <a href="#bytebase.v1.ListUsersResponse"><span class="badge">M</span>ListUsersResponse</a>
+ <a href="#bytebase.v1.DataSource.CloudSQLIPType"><span class="badge">E</span>DataSource.CloudSQLIPType</a>
</li>
<li>
- <a href="#bytebase.v1.UndeleteUserRequest"><span class="badge">M</span>UndeleteUserRequest</a>
+ <a href="#bytebase.v1.DataSource.RedisType"><span class="badge">E</span>DataSource.RedisType</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateEmailRequest"><span class="badge">M</span>UpdateEmailRequest</a>
+ <a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateUserRequest"><span class="badge">M</span>UpdateUserRequest</a>
+ <a href="#bytebase.v1.DataSourceExternalSecret.AuthType"><span class="badge">E</span>DataSourceExternalSecret.AuthType</a>
</li>
<li>
- <a href="#bytebase.v1.User"><span class="badge">M</span>User</a>
+ <a href="#bytebase.v1.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a>
</li>
<li>
- <a href="#bytebase.v1.User.Profile"><span class="badge">M</span>User.Profile</a>
+ <a href="#bytebase.v1.DataSourceExternalSecret.TokenType"><span class="badge">E</span>DataSourceExternalSecret.TokenType</a>
</li>
+ <li>
+ <a href="#bytebase.v1.DataSourceType"><span class="badge">E</span>DataSourceType</a>
+ </li>
<li>
- <a href="#bytebase.v1.UserService"><span class="badge">S</span>UserService</a>
+ <a href="#bytebase.v1.InstanceService"><span class="badge">S</span>InstanceService</a>
</li>
</ul>
@@ -1898,262 +1878,282 @@
<li>
- <a href="#v1%2fauth_service.proto">v1/auth_service.proto</a>
+ <a href="#v1%2fdatabase_service.proto">v1/database_service.proto</a>
<ul>
<li>
- <a href="#bytebase.v1.ExchangeTokenRequest"><span class="badge">M</span>ExchangeTokenRequest</a>
+ <a href="#bytebase.v1.BatchGetDatabasesRequest"><span class="badge">M</span>BatchGetDatabasesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ExchangeTokenResponse"><span class="badge">M</span>ExchangeTokenResponse</a>
+ <a href="#bytebase.v1.BatchGetDatabasesResponse"><span class="badge">M</span>BatchGetDatabasesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.IdentityProviderContext"><span class="badge">M</span>IdentityProviderContext</a>
+ <a href="#bytebase.v1.BatchSyncDatabasesRequest"><span class="badge">M</span>BatchSyncDatabasesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.LoginRequest"><span class="badge">M</span>LoginRequest</a>
+ <a href="#bytebase.v1.BatchSyncDatabasesResponse"><span class="badge">M</span>BatchSyncDatabasesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.LoginResponse"><span class="badge">M</span>LoginResponse</a>
+ <a href="#bytebase.v1.BatchUpdateDatabasesRequest"><span class="badge">M</span>BatchUpdateDatabasesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.LogoutRequest"><span class="badge">M</span>LogoutRequest</a>
+ <a href="#bytebase.v1.BatchUpdateDatabasesResponse"><span class="badge">M</span>BatchUpdateDatabasesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.OAuth2IdentityProviderContext"><span class="badge">M</span>OAuth2IdentityProviderContext</a>
+ <a href="#bytebase.v1.BoundingBox"><span class="badge">M</span>BoundingBox</a>
</li>
<li>
- <a href="#bytebase.v1.OIDCIdentityProviderContext"><span class="badge">M</span>OIDCIdentityProviderContext</a>
+ <a href="#bytebase.v1.CheckConstraintMetadata"><span class="badge">M</span>CheckConstraintMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.RefreshRequest"><span class="badge">M</span>RefreshRequest</a>
+ <a href="#bytebase.v1.ColumnMetadata"><span class="badge">M</span>ColumnMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.RefreshResponse"><span class="badge">M</span>RefreshResponse</a>
+ <a href="#bytebase.v1.CompositeTypeAttribute"><span class="badge">M</span>CompositeTypeAttribute</a>
</li>
<li>
- <a href="#bytebase.v1.RequestPasswordResetRequest"><span class="badge">M</span>RequestPasswordResetRequest</a>
+ <a href="#bytebase.v1.CompositeTypeMetadata"><span class="badge">M</span>CompositeTypeMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ResetPasswordRequest"><span class="badge">M</span>ResetPasswordRequest</a>
+ <a href="#bytebase.v1.Database"><span class="badge">M</span>Database</a>
</li>
<li>
- <a href="#bytebase.v1.SendEmailLoginCodeRequest"><span class="badge">M</span>SendEmailLoginCodeRequest</a>
+ <a href="#bytebase.v1.Database.LabelsEntry"><span class="badge">M</span>Database.LabelsEntry</a>
</li>
<li>
- <a href="#bytebase.v1.SignupRequest"><span class="badge">M</span>SignupRequest</a>
+ <a href="#bytebase.v1.DatabaseMetadata"><span class="badge">M</span>DatabaseMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.SwitchWorkspaceRequest"><span class="badge">M</span>SwitchWorkspaceRequest</a>
+ <a href="#bytebase.v1.DatabaseSDLSchema"><span class="badge">M</span>DatabaseSDLSchema</a>
</li>
+ <li>
+ <a href="#bytebase.v1.DatabaseSchema"><span class="badge">M</span>DatabaseSchema</a>
+ </li>
-
+ <li>
+ <a href="#bytebase.v1.DependencyColumn"><span class="badge">M</span>DependencyColumn</a>
+ </li>
<li>
- <a href="#bytebase.v1.AuthService"><span class="badge">S</span>AuthService</a>
+ <a href="#bytebase.v1.DependencyTable"><span class="badge">M</span>DependencyTable</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fcel_service.proto">v1/cel_service.proto</a>
- <ul>
+ <li>
+ <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>
+ </li>
<li>
- <a href="#bytebase.v1.BatchDeparseRequest"><span class="badge">M</span>BatchDeparseRequest</a>
+ <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>
</li>
<li>
- <a href="#bytebase.v1.BatchDeparseResponse"><span class="badge">M</span>BatchDeparseResponse</a>
+ <a href="#bytebase.v1.DiffSchemaRequest"><span class="badge">M</span>DiffSchemaRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchParseRequest"><span class="badge">M</span>BatchParseRequest</a>
+ <a href="#bytebase.v1.DiffSchemaResponse"><span class="badge">M</span>DiffSchemaResponse</a>
</li>
<li>
- <a href="#bytebase.v1.BatchParseResponse"><span class="badge">M</span>BatchParseResponse</a>
+ <a href="#bytebase.v1.DimensionConstraint"><span class="badge">M</span>DimensionConstraint</a>
</li>
+ <li>
+ <a href="#bytebase.v1.DimensionalConfig"><span class="badge">M</span>DimensionalConfig</a>
+ </li>
+ <li>
+ <a href="#bytebase.v1.EnumTypeMetadata"><span class="badge">M</span>EnumTypeMetadata</a>
+ </li>
+ <li>
+ <a href="#bytebase.v1.EventMetadata"><span class="badge">M</span>EventMetadata</a>
+ </li>
<li>
- <a href="#bytebase.v1.CelService"><span class="badge">S</span>CelService</a>
+ <a href="#bytebase.v1.ExtensionMetadata"><span class="badge">M</span>ExtensionMetadata</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fchangelog_service.proto">v1/changelog_service.proto</a>
- <ul>
+ <li>
+ <a href="#bytebase.v1.ExternalTableMetadata"><span class="badge">M</span>ExternalTableMetadata</a>
+ </li>
<li>
- <a href="#bytebase.v1.Changelog"><span class="badge">M</span>Changelog</a>
+ <a href="#bytebase.v1.ForeignKeyMetadata"><span class="badge">M</span>ForeignKeyMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.GetChangelogRequest"><span class="badge">M</span>GetChangelogRequest</a>
+ <a href="#bytebase.v1.FunctionMetadata"><span class="badge">M</span>FunctionMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ListChangelogsRequest"><span class="badge">M</span>ListChangelogsRequest</a>
+ <a href="#bytebase.v1.GenerationMetadata"><span class="badge">M</span>GenerationMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ListChangelogsResponse"><span class="badge">M</span>ListChangelogsResponse</a>
+ <a href="#bytebase.v1.GetDatabaseMetadataRequest"><span class="badge">M</span>GetDatabaseMetadataRequest</a>
</li>
+ <li>
+ <a href="#bytebase.v1.GetDatabaseRequest"><span class="badge">M</span>GetDatabaseRequest</a>
+ </li>
<li>
- <a href="#bytebase.v1.Changelog.Status"><span class="badge">E</span>Changelog.Status</a>
+ <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest"><span class="badge">M</span>GetDatabaseSDLSchemaRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ChangelogView"><span class="badge">E</span>ChangelogView</a>
+ <a href="#bytebase.v1.GetDatabaseSchemaRequest"><span class="badge">M</span>GetDatabaseSchemaRequest</a>
</li>
+ <li>
+ <a href="#bytebase.v1.GetSchemaStringRequest"><span class="badge">M</span>GetSchemaStringRequest</a>
+ </li>
+ <li>
+ <a href="#bytebase.v1.GetSchemaStringResponse"><span class="badge">M</span>GetSchemaStringResponse</a>
+ </li>
<li>
- <a href="#bytebase.v1.ChangelogService"><span class="badge">S</span>ChangelogService</a>
+ <a href="#bytebase.v1.GridLevel"><span class="badge">M</span>GridLevel</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fdatabase_catalog_service.proto">v1/database_catalog_service.proto</a>
- <ul>
+ <li>
+ <a href="#bytebase.v1.IndexMetadata"><span class="badge">M</span>IndexMetadata</a>
+ </li>
<li>
- <a href="#bytebase.v1.ColumnCatalog"><span class="badge">M</span>ColumnCatalog</a>
+ <a href="#bytebase.v1.ListDatabasesRequest"><span class="badge">M</span>ListDatabasesRequest</a>
</li>
<li>
- <a href="#bytebase.v1.ColumnCatalog.LabelsEntry"><span class="badge">M</span>ColumnCatalog.LabelsEntry</a>
+ <a href="#bytebase.v1.ListDatabasesResponse"><span class="badge">M</span>ListDatabasesResponse</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseCatalog"><span class="badge">M</span>DatabaseCatalog</a>
+ <a href="#bytebase.v1.MaterializedViewMetadata"><span class="badge">M</span>MaterializedViewMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.GetDatabaseCatalogRequest"><span class="badge">M</span>GetDatabaseCatalogRequest</a>
+ <a href="#bytebase.v1.PackageMetadata"><span class="badge">M</span>PackageMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ObjectSchema"><span class="badge">M</span>ObjectSchema</a>
+ <a href="#bytebase.v1.ProcedureMetadata"><span class="badge">M</span>ProcedureMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ObjectSchema.ArrayKind"><span class="badge">M</span>ObjectSchema.ArrayKind</a>
+ <a href="#bytebase.v1.SchemaMetadata"><span class="badge">M</span>SchemaMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ObjectSchema.StructKind"><span class="badge">M</span>ObjectSchema.StructKind</a>
+ <a href="#bytebase.v1.SequenceMetadata"><span class="badge">M</span>SequenceMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry"><span class="badge">M</span>ObjectSchema.StructKind.PropertiesEntry</a>
+ <a href="#bytebase.v1.SpatialIndexConfig"><span class="badge">M</span>SpatialIndexConfig</a>
</li>
<li>
- <a href="#bytebase.v1.SchemaCatalog"><span class="badge">M</span>SchemaCatalog</a>
+ <a href="#bytebase.v1.StorageConfig"><span class="badge">M</span>StorageConfig</a>
</li>
<li>
- <a href="#bytebase.v1.TableCatalog"><span class="badge">M</span>TableCatalog</a>
+ <a href="#bytebase.v1.StreamMetadata"><span class="badge">M</span>StreamMetadata</a>
</li>
<li>
- <a href="#bytebase.v1.TableCatalog.Columns"><span class="badge">M</span>TableCatalog.Columns</a>
+ <a href="#bytebase.v1.SyncDatabaseRequest"><span class="badge">M</span>SyncDatabaseRequest</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateDatabaseCatalogRequest"><span class="badge">M</span>UpdateDatabaseCatalogRequest</a>
+ <a href="#bytebase.v1.SyncDatabaseResponse"><span class="badge">M</span>SyncDatabaseResponse</a>
</li>
+ <li>
+ <a href="#bytebase.v1.TableMetadata"><span class="badge">M</span>TableMetadata</a>
+ </li>
<li>
- <a href="#bytebase.v1.ObjectSchema.Type"><span class="badge">E</span>ObjectSchema.Type</a>
+ <a href="#bytebase.v1.TablePartitionMetadata"><span class="badge">M</span>TablePartitionMetadata</a>
</li>
+ <li>
+ <a href="#bytebase.v1.TaskMetadata"><span class="badge">M</span>TaskMetadata</a>
+ </li>
+ <li>
+ <a href="#bytebase.v1.TessellationConfig"><span class="badge">M</span>TessellationConfig</a>
+ </li>
<li>
- <a href="#bytebase.v1.DatabaseCatalogService"><span class="badge">S</span>DatabaseCatalogService</a>
+ <a href="#bytebase.v1.TriggerMetadata"><span class="badge">M</span>TriggerMetadata</a>
</li>
- </ul>
- </li>
-
-
- <li>
- <a href="#v1%2fdatabase_group_service.proto">v1/database_group_service.proto</a>
- <ul>
+ <li>
+ <a href="#bytebase.v1.UpdateDatabaseRequest"><span class="badge">M</span>UpdateDatabaseRequest</a>
+ </li>
<li>
- <a href="#bytebase.v1.CreateDatabaseGroupRequest"><span class="badge">M</span>CreateDatabaseGroupRequest</a>
+ <a href="#bytebase.v1.ViewMetadata"><span class="badge">M</span>ViewMetadata</a>
</li>
+
<li>
- <a href="#bytebase.v1.DatabaseGroup"><span class="badge">M</span>DatabaseGroup</a>
+ <a href="#bytebase.v1.ColumnMetadata.IdentityGeneration"><span class="badge">E</span>ColumnMetadata.IdentityGeneration</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseGroup.Database"><span class="badge">M</span>DatabaseGroup.Database</a>
+ <a href="#bytebase.v1.GenerationMetadata.Type"><span class="badge">E</span>GenerationMetadata.Type</a>
</li>
<li>
- <a href="#bytebase.v1.DeleteDatabaseGroupRequest"><span class="badge">M</span>DeleteDatabaseGroupRequest</a>
+ <a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat"><span class="badge">E</span>GetDatabaseSDLSchemaRequest.SDLFormat</a>
</li>
<li>
- <a href="#bytebase.v1.GetDatabaseGroupRequest"><span class="badge">M</span>GetDatabaseGroupRequest</a>
+ <a href="#bytebase.v1.GetSchemaStringRequest.ObjectType"><span class="badge">E</span>GetSchemaStringRequest.ObjectType</a>
</li>
<li>
- <a href="#bytebase.v1.ListDatabaseGroupsRequest"><span class="badge">M</span>ListDatabaseGroupsRequest</a>
+ <a href="#bytebase.v1.StreamMetadata.Mode"><span class="badge">E</span>StreamMetadata.Mode</a>
</li>
<li>
- <a href="#bytebase.v1.ListDatabaseGroupsResponse"><span class="badge">M</span>ListDatabaseGroupsResponse</a>
+ <a href="#bytebase.v1.StreamMetadata.Type"><span class="badge">E</span>StreamMetadata.Type</a>
</li>
<li>
- <a href="#bytebase.v1.UpdateDatabaseGroupRequest"><span class="badge">M</span>UpdateDatabaseGroupRequest</a>
+ <a href="#bytebase.v1.SyncStatus"><span class="badge">E</span>SyncStatus</a>
</li>
+ <li>
+ <a href="#bytebase.v1.TablePartitionMetadata.Type"><span class="badge">E</span>TablePartitionMetadata.Type</a>
+ </li>
<li>
- <a href="#bytebase.v1.DatabaseGroupView"><span class="badge">E</span>DatabaseGroupView</a>
+ <a href="#bytebase.v1.TaskMetadata.State"><span class="badge">E</span>TaskMetadata.State</a>
</li>
<li>
- <a href="#bytebase.v1.DatabaseGroupService"><span class="badge">S</span>DatabaseGroupService</a>
+ <a href="#bytebase.v1.DatabaseService"><span class="badge">S</span>DatabaseService</a>
</li>
</ul>
@@ -6919,13 +6919,13 @@ Permissions required: bb.taskRuns.list</p></td>
<div class="file-heading">
- <h2 id="v1/instance_role_service.proto">v1/instance_role_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.InstanceRole">InstanceRole</h3>
- <p>InstanceRole is the API message for instance role.</p>
+ <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3>
+ <p></p>
<table class="field-table">
@@ -6938,46 +6938,8 @@ Permissions required: bb.taskRuns.list</p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the role.
-Format: instances/{instance}/roles/{role}
-The role name is the unique name for the role. </p></td>
- </tr>
-
- <tr>
- <td>role_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The role name. It&#39;s unique within the instance. </p></td>
- </tr>
-
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The role password. </p></td>
- </tr>
-
- <tr>
- <td>connection_limit</td>
- <td><a href="#int32">int32</a></td>
- <td>optional</td>
- <td><p>The connection count limit for this role. </p></td>
- </tr>
-
- <tr>
- <td>valid_until</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The expiration for the role&#39;s password. </p></td>
- </tr>
-
- <tr>
- <td>attribute</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The role attribute.
-For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
-For MySQL, it&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td>
+ <td><p>The name of the query history to retrieve.
+Format: projects/{project}/queryHistories/{id} </p></td>
</tr>
</tbody>
@@ -6987,7 +6949,7 @@ For MySQL, it&#39;s the global privileges as GRANT statements, which means it on
- <h3 id="bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</h3>
+ <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3>
<p></p>
@@ -7001,18 +6963,20 @@ For MySQL, it&#39;s the global privileges as GRANT statements, which means it on
<td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of roles.
-Format: instances/{instance} </p></td>
+ <td><p>The parent project whose query histories are listed.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list query histories across all projects
+(https://google.aip.dev/159); this requires the bb.queryHistories.list
+permission on the workspace. </p></td>
</tr>
<tr>
<td>page_size</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Not used.
-The maximum number of roles to return. The service may return fewer than
-this value.
-If unspecified, at most 10 roles will be returned.
+ <td><p>The maximum number of histories to return.
+The service may return fewer than this value.
+If unspecified, at most 10 history entries will be returned.
The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
@@ -7020,19 +6984,22 @@ The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
<td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Not used.
-A page token, received from a previous `ListInstanceRoles` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListInstanceRoles` must match
-the call that provided the page token. </p></td>
+ <td><p>A page token, received from a previous `ListQueryHistories` call.
+Provide this to retrieve the subsequent page. </p></td>
</tr>
<tr>
- <td>refresh</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Refresh will refresh and return the latest data. </p></td>
+ <td><p>Filter is the filter to apply on the list query histories.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- creator: the user full name in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
+
+For example:
+creator == &#34;users/{email}&#34; </p></td>
</tr>
</tbody>
@@ -7042,7 +7009,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</h3>
+ <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3>
<p></p>
@@ -7053,18 +7020,19 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>roles</td>
- <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
+ <td>query_histories</td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
<td>repeated</td>
- <td><p>The roles from the specified request. </p></td>
+ <td><p>The list of query histories. </p></td>
</tr>
<tr>
<td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>A token to retrieve next page of history.
+Pass this value in the page_token field in the subsequent call to
+`ListQueryHistories` method to retrieve the next page of history. </p></td>
</tr>
</tbody>
@@ -7074,69 +7042,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
-
-
-
-
-
-
- <h3 id="bytebase.v1.InstanceRoleService">InstanceRoleService</h3>
- <p>InstanceRoleService manages database roles within instances.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ListInstanceRoles</td>
- <td><a href="#bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</a></td>
- <td><a href="#bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</a></td>
- <td><p>Lists all database roles in an instance.
-Permissions required: bb.instanceRoles.list</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>ListInstanceRoles</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/roles</td>
- <td></td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/instance_service.proto">v1/instance_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</h3>
+ <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
<p></p>
@@ -7150,48 +7056,58 @@ Permissions required: bb.instanceRoles.list</p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the instance to add a data source to.
-Format: instances/{instance} </p></td>
+ <td><p>The name for the query history.
+Format: projects/{project}/queryHistories/{id} </p></td>
</tr>
<tr>
- <td>data_source</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>database</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Identified by data source ID.
-Only READ_ONLY data source can be added. </p></td>
+ <td><p>The database name to execute the query.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Validate only also tests the data source connection. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>requests</td>
- <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
- <td>repeated</td>
- <td><p>The request message specifying the instances to sync.
-A maximum of 1000 instances can be synced in a batch. </p></td>
+ <td>statement</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>error</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -7201,14 +7117,7 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
- <h3 id="bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
<p></p>
@@ -7219,20 +7128,65 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
<tbody>
<tr>
- <td>requests</td>
- <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
- <td>repeated</td>
- <td><p>The request message specifying the resources to update. </p></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent project to search query histories in.
+Format: projects/{project}
+The AIP-159 wildcard &#34;projects/-&#34; is not supported; use
+ListQueryHistories for cross-project reads. </p></td>
</tr>
- </tbody>
- </table>
-
-
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of histories to return.
+The service may return fewer than this value.
+If unspecified, at most 10 history entries will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListQueryHistory` call.
+Provide this to retrieve the subsequent page. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter is the filter to apply on the search query history
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
+- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
+- statement: the SQL statement, support &#34;.contains()&#34; operator.
+
+For example:
+project == &#34;projects/{project}&#34;
+database == &#34;instances/{instance}/databases/{database}&#34;
+instance == &#34;instances/{instance}&#34;
+type == &#34;QUERY&#34;
+type == &#34;EXPORT&#34;
+statement.contains(&#34;select&#34;)
+type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
- <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3>
+ <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
<p></p>
@@ -7243,10 +7197,19 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
<tbody>
<tr>
- <td>instances</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>query_histories</td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The list of history. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token to retrieve next page of history.
+Pass this value in the page_token field in the subsequent call to
+`ListQueryHistory` method to retrieve the next page of history. </p></td>
</tr>
</tbody>
@@ -7256,7 +7219,134 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
- <h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3>
+
+
+ <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified query history type.</p></td>
+ </tr>
+
+ <tr>
+ <td>QUERY</td>
+ <td>1</td>
+ <td><p>Query execution for data retrieval.</p></td>
+ </tr>
+
+ <tr>
+ <td>EXPORT</td>
+ <td>2</td>
+ <td><p>Data export operation to file.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.QueryHistoryService">QueryHistoryService</h3>
+ <p>QueryHistoryService manages query history records of SQL Editor queries and exports.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>SearchQueryHistories searches query histories for the caller.
+Permissions required: None (only returns caller&#39;s own query histories)</p></td>
+ </tr>
+
+ <tr>
+ <td>ListQueryHistories</td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
+ <td><p>ListQueryHistories lists query histories of all users in a project.
+Permissions required: bb.queryHistories.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetQueryHistory</td>
+ <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td><p>GetQueryHistory gets a single query history for the caller.
+Permissions required: None (only returns the caller&#39;s own query history)</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>SearchQueryHistories</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/queryHistories:search</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListQueryHistories</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/queryHistories</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetQueryHistory</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/queryHistories/*}</td>
+ <td></td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>
<p></p>
@@ -7267,36 +7357,41 @@ A maximum of 1000 instances can be synced in a batch. </p></td>
<tbody>
<tr>
- <td>instance</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td></td>
- <td><p>The instance to create. </p></td>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>instance_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The ID to use for the instance, which will become the final component of
-the instance&#39;s resource name.
+ </tbody>
+ </table>
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
- </tr>
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>role</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Validate only also tests the data source connection. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>initial_database_project</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The project to assign newly discovered databases to during initial sync.
-Format: projects/{project} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -7306,7 +7401,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.DataSource">DataSource</h3>
+ <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>
<p></p>
@@ -7317,383 +7412,555 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The unique identifier for this data source. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.DataSourceType">DataSourceType</a></td>
- <td></td>
- <td><p>The type of data source (ADMIN or READ_ONLY). </p></td>
+ <td>candidates</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>
+ <td>repeated</td>
+ <td><p>candidates is used for results with multiple choices and candidates. Used
+for OpenAI and Gemini. </p></td>
</tr>
- <tr>
- <td>username</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The username for database authentication. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
+ <td>content</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>
<td></td>
- <td><p>The password for database authentication. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>use_ssl</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>
+ <td>parts</td>
+ <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>
+ <td>repeated</td>
+ <td><p>parts is used for a result content with multiple parts. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>ssl_ca</td>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SSL certificate authority certificate. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>ssl_cert</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SSL client certificate. </p></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>ssl_key</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SSL client private key. </p></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
<tr>
- <td>ssl_ca_path</td>
- <td><a href="#string">string</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The local filesystem path to the SSL certificate authority certificate. </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
</tr>
<tr>
- <td>ssl_cert_path</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The local filesystem path to the SSL client certificate. </p></td>
+ <td>optional</td>
+ <td><p>The default schema to execute the statement. Equals to the current schema
+in Oracle and search path in Postgres. </p></td>
</tr>
<tr>
- <td>ssl_key_path</td>
+ <td>container</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The local filesystem path to the SSL client private key. </p></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>ssl_ca_set</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether an SSL certificate authority certificate has been configured. </p></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>repeated</td>
+ <td><p>The query results. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Advice">Advice</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>ssl_cert_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
<td></td>
- <td><p>Whether an SSL client certificate has been configured. </p></td>
+ <td><p>The advice level. </p></td>
</tr>
<tr>
- <td>ssl_key_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Whether an SSL client private key has been configured. </p></td>
+ <td><p>The advice code. </p></td>
</tr>
<tr>
- <td>ssl_ca_path_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether an SSL certificate authority path has been configured. </p></td>
+ <td><p>The advice title. </p></td>
</tr>
<tr>
- <td>ssl_cert_path_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether an SSL client certificate path has been configured. </p></td>
+ <td><p>The advice content. </p></td>
</tr>
<tr>
- <td>ssl_key_path_set</td>
- <td><a href="#bool">bool</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>Whether an SSL client private key path has been configured. </p></td>
+ <td><p>The start_position is inclusive and the end_position is exclusive.
+TODO: use range instead </p></td>
</tr>
<tr>
- <td>verify_tls_certificate</td>
- <td><a href="#bool">bool</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>verify_tls_certificate enables TLS certificate verification for SSL connections.
-Default is false (no verification) for backward compatibility.
-Set to true for secure connections (recommended for production).
-Only set to false for development or when certificates cannot be properly
-validated (e.g., self-signed certs, VPN environments). </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>host</td>
- <td><a href="#string">string</a></td>
+ <td>rule_type</td>
+ <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td>
<td></td>
- <td><p>The hostname or IP address of the database server. </p></td>
+ <td><p>The type of linting rule that generated this advice. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>port</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The port number of the database server. </p></td>
+ <td><p>The name is the resource name to execute the export against.
+Format: instances/{instance}/databases/{database}
+Format: instances/{instance}
+Format: projects/{project}/plans/{plan}/rollout
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
</tr>
<tr>
- <td>database</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database to connect to. </p></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
<tr>
- <td>srv</td>
- <td><a href="#bool">bool</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>srv, authentication_database and replica_set are used for MongoDB.
-srv is a boolean flag that indicates whether the host is a DNS SRV record. </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
</tr>
<tr>
- <td>authentication_database</td>
- <td><a href="#string">string</a></td>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
<td></td>
- <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>
+ <td><p>The export format. </p></td>
</tr>
<tr>
- <td>replica_set</td>
- <td><a href="#string">string</a></td>
+ <td>admin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>replica_set is used for MongoDB replica set. </p></td>
+ <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
+Editor Admin mode. The exported data is not masked. </p></td>
</tr>
<tr>
- <td>sid</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>sid and service_name are used for Oracle. </p></td>
+ <td><p>The zip password provide by users. </p></td>
</tr>
<tr>
- <td>service_name</td>
+ <td>data_source_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The id of data source.
+If omitted, Export resolves the data source server-side by using the
+single read-only data source when exactly one exists, or the admin data
+source otherwise. It can also be set explicitly to export from the admin
+data source or a specific read-only data source. </p></td>
</tr>
<tr>
- <td>ssh_host</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Connection over SSH.
-The hostname of the SSH server agent.
-Required. </p></td>
+ <td>optional</td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
</tr>
- <tr>
- <td>ssh_port</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The port of the SSH server agent. It&#39;s 22 typically.
-Required. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>ssh_user</td>
- <td><a href="#string">string</a></td>
+ <td>content</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
- <td><p>The user to login the server.
-Required. </p></td>
+ <td><p>The export file content. </p></td>
</tr>
<tr>
- <td>ssh_password</td>
+ <td>applied_access_grant</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The password to login the server. If it&#39;s empty string, no password is required. </p></td>
+ <td><p>The just-in-time access grant applied to this export, if any.
+Format: projects/{project}/accessGrants/{accessGrant}.
+Empty when the user was authorized through normal ACL rather than a grant. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>ssh_private_key</td>
+ <td>semantic_type_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). </p></td>
+ <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
</tr>
<tr>
- <td>authentication_private_key</td>
+ <td>semantic_type_title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required.
-Used for authentication when connecting to the data source. </p></td>
+ <td><p>Human-readable semantic type title. </p></td>
</tr>
<tr>
- <td>authentication_private_key_passphrase</td>
+ <td>masking_rule_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. </p></td>
+ <td><p>The masking rule ID that matched (if applicable). </p></td>
</tr>
<tr>
- <td>external_secret</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</a></td>
+ <td>algorithm</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The masking algorithm used. </p></td>
</tr>
<tr>
- <td>authentication_type</td>
- <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>
+ <td>context</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
</tr>
<tr>
- <td>cloud_sql_ip_type</td>
- <td><a href="#bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</a></td>
+ <td>classification_level</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.
-CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility. </p></td>
+ <td><p>The classification level that triggered masking. </p></td>
</tr>
<tr>
- <td>azure_credential</td>
- <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td>
+ <td>semantic_type_icon</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Icon associated with the semantic type (if any). </p></td>
</tr>
- <tr>
- <td>aws_credential</td>
- <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>gcp_credential</td>
- <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td>
+ <td>redis_run_commands_on</td>
+ <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>sasl_config</td>
- <td><a href="#bytebase.v1.SASLConfig">SASLConfig</a></td>
+ <td>mssql_explain_format</td>
+ <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>
<td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>additional_addresses</td>
- <td><a href="#bytebase.v1.DataSource.Address">DataSource.Address</a></td>
- <td>repeated</td>
- <td><p>additional_addresses is used for MongoDB replica set. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>direct_connection</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>
+ <td><p>The name is the instance name to execute the query against.
+Format: instances/{instance}/databases/{databaseName} </p></td>
</tr>
<tr>
- <td>region</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>
+ <td><p>The SQL statement to execute. </p></td>
</tr>
<tr>
- <td>warehouse_id</td>
- <td><a href="#string">string</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>warehouse_id is used by Databricks. </p></td>
+ <td><p>The maximum number of rows to return. </p></td>
</tr>
<tr>
- <td>master_name</td>
+ <td>data_source_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td>
+ <td><p>The id of data source.
+If omitted, Query resolves the data source server-side by using the single
+read-only data source when exactly one exists, or the admin data source
+otherwise. It can also be set explicitly to query the admin data source or
+a specific read-only data source. </p></td>
</tr>
<tr>
- <td>master_username</td>
- <td><a href="#string">string</a></td>
+ <td>explain</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>master_username and master_password are master credentials used by redis sentinel mode. </p></td>
+ <td><p>Explain the statement. </p></td>
</tr>
<tr>
- <td>master_password</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The default schema to search objects. Equals to the current schema in
+Oracle and search path in Postgres. </p></td>
</tr>
<tr>
- <td>redis_type</td>
- <td><a href="#bytebase.v1.DataSource.RedisType">DataSource.RedisType</a></td>
+ <td>query_option</td>
+ <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>cluster</td>
+ <td>container</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Cluster is the cluster name for the data source. Used by CockroachDB. </p></td>
+ <td>optional</td>
+ <td><p>Container is the container name to execute the query against, used for
+CosmosDB only. </p></td>
</tr>
- <tr>
- <td>extra_connection_parameters</td>
- <td><a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>
- <td>repeated</td>
- <td><p>Extra connection parameters for the database connection.
-For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>project_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>project_id and instance_id are the GCP resource identifiers.
-project_id is used by Spanner and BigQuery; instance_id is used by Spanner.
-For these engines, host and port optionally override the default Google API
-endpoint (e.g. a Private Service Connect endpoint like
-spanner-nonprod.p.googleapis.com). </p></td>
+ <td>results</td>
+ <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
+ <td>repeated</td>
+ <td><p>The query results. </p></td>
</tr>
<tr>
- <td>instance_id</td>
+ <td>applied_access_grant</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The just-in-time access grant applied to this query, if any.
+Format: projects/{project}/accessGrants/{accessGrant}.
+Empty when the user was authorized through normal ACL rather than a grant. </p></td>
</tr>
</tbody>
@@ -7703,7 +7970,7 @@ spanner-nonprod.p.googleapis.com). </p></td>
- <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</h3>
+ <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
<p></p>
@@ -7714,111 +7981,98 @@ spanner-nonprod.p.googleapis.com). </p></td>
<tbody>
<tr>
- <td>access_key_id</td>
+ <td>column_names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>Column names of the query result. </p></td>
</tr>
<tr>
- <td>secret_access_key</td>
+ <td>column_type_names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>Column types of the query result.
+The types come from the Golang SQL driver. </p></td>
</tr>
<tr>
- <td>session_token</td>
- <td><a href="#string">string</a></td>
+ <td>rows</td>
+ <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
+ <td>repeated</td>
+ <td><p>Rows of the query result. </p></td>
+ </tr>
+
+ <tr>
+ <td>rows_count</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>role_arn</td>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>ARN of IAM role to assume for cross-account access.
-See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html </p></td>
+ <td><p>The error message if the query failed. </p></td>
</tr>
<tr>
- <td>external_id</td>
- <td><a href="#string">string</a></td>
+ <td>latency</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>Optional external ID for additional security when assuming role.
-See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html </p></td>
+ <td><p>The time it takes to execute the query. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>host</td>
+ <td>statement</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The query statement for the result. </p></td>
</tr>
<tr>
- <td>port</td>
- <td><a href="#string">string</a></td>
+ <td>postgres_error</td>
+ <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>tenant_id</td>
- <td><a href="#string">string</a></td>
+ <td>syntax_error</td>
+ <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
+ <td>permission_denied</td>
+ <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>command_error</td>
+ <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
+ <td>repeated</td>
+ <td><p>Informational or debug messages returned by the database engine during query execution.
+Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ </tr>
+
+ <tr>
+ <td>masked</td>
+ <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
+ <td>repeated</td>
+ <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
+ </tr>
+
</tbody>
</table>
@@ -7826,8 +8080,8 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>
+ <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>
<table class="field-table">
@@ -7837,17 +8091,10 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>command_type</td>
+ <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Disallowed command_type. </p></td>
</tr>
</tbody>
@@ -7857,7 +8104,7 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</h3>
+ <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
<p></p>
@@ -7867,6 +8114,13 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
</thead>
<tbody>
+ <tr>
+ <td>level</td>
+ <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
<tr>
<td>content</td>
<td><a href="#string">string</a></td>
@@ -7881,8 +8135,8 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
- <h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
+ <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
<table class="field-table">
@@ -7892,145 +8146,122 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e
<tbody>
<tr>
- <td>secret_type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>
+ <td>severity</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The type of external secret store. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>url</td>
+ <td>code</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The URL of the external secret store. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>auth_type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>
+ <td>message</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The authentication method for accessing the secret store. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>app_role</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>
+ <td>detail</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>AppRole authentication configuration. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>token</td>
+ <td>hint</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Token for direct authentication. Interpreted according to token_type:
-the literal token (PLAIN), an environment variable name (ENVIRONMENT),
-or a file path (FILE). </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>token_type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</a></td>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>How to interpret the token field when auth_type is TOKEN. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>engine_name</td>
- <td><a href="#string">string</a></td>
+ <td>internal_position</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>engine name is the name for secret engine. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>secret_name</td>
+ <td>internal_query</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>the secret name in the engine to store the password. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>password_key_name</td>
+ <td>where</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>the key name for the password. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>skip_vault_tls_verification</td>
- <td><a href="#bool">bool</a></td>
+ <td>schema_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>TLS configuration for connecting to Vault server.
-These fields are separate from the database TLS configuration in DataSource.
-skip_vault_tls_verification disables TLS certificate verification for Vault connections.
-Default is false (verification enabled) for security.
-Only set to true for development or when certificates cannot be properly validated. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>vault_ssl_ca</td>
+ <td>table_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>CA certificate for Vault server verification. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>vault_ssl_cert</td>
+ <td>column_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Client certificate for mutual TLS authentication with Vault. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>vault_ssl_key</td>
+ <td>data_type_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Client private key for mutual TLS authentication with Vault. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>role_id</td>
+ <td>constraint_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The role ID for Vault AppRole authentication. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>secret_id</td>
+ <td>file</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>the secret id for the role without ttl. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td>
+ <td>line</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The type of secret for AppRole authentication. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>mount_path</td>
+ <td>routine</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The path where the approle auth method is mounted. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8040,8 +8271,8 @@ Only set to true for development or when certificates cannot be properly validat
- <h3 id="bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>
+ <p>Syntax error with position information for editor highlighting</p>
<table class="field-table">
@@ -8051,28 +8282,10 @@ Only set to true for development or when certificates cannot be properly validat
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>The name of the instance to delete.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. </p></td>
- </tr>
-
- <tr>
- <td>purge</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, permanently purge the soft-deleted instance and all related resources.
-This operation is irreversible. Following AIP-165, this should only be used for
-administrative cleanup of old soft-deleted instances.
-The instance must already be soft-deleted for this to work. </p></td>
+ <td><p>Position information for highlighting in editor </p></td>
</tr>
</tbody>
@@ -8082,7 +8295,7 @@ The instance must already be soft-deleted for this to work. </p></td>
- <h3 id="bytebase.v1.GetInstanceRequest">GetInstanceRequest</h3>
+ <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
<p></p>
@@ -8093,11 +8306,10 @@ The instance must already be soft-deleted for this to work. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the instance to retrieve.
-Format: instances/{instance} </p></td>
+ <td>values</td>
+ <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
+ <td>repeated</td>
+ <td><p>Row values of the query result. </p></td>
</tr>
</tbody>
@@ -8107,7 +8319,7 @@ Format: instances/{instance} </p></td>
- <h3 id="bytebase.v1.Instance">Instance</h3>
+ <h3 id="bytebase.v1.RowValue">RowValue</h3>
<p></p>
@@ -8118,136 +8330,98 @@ Format: instances/{instance} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>null_value</td>
+ <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
<td></td>
- <td><p>The name of the instance.
-Format: instances/{instance} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
+ <td>bool_value</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The lifecycle state of the instance. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>bytes_value</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
- <td><p>The display title of the instance. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td>double_value</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>The database engine type. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>engine_version</td>
- <td><a href="#string">string</a></td>
+ <td>float_value</td>
+ <td><a href="#float">float</a></td>
<td></td>
- <td><p>The version of the database engine. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>external_link</td>
- <td><a href="#string">string</a></td>
+ <td>int32_value</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>External URL to the database instance console. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>data_sources</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
- <td>repeated</td>
- <td><p>Data source configurations for connecting to the instance. </p></td>
+ <td>int64_value</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>environment</td>
+ <td>string_value</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
- </tr>
-
- <tr>
- <td>activation</td>
- <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether the instance is activated for use. </p></td>
- </tr>
-
- <tr>
- <td>roles</td>
- <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
- <td>repeated</td>
- <td><p>Database roles available in this instance. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sync_interval</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>uint32_value</td>
+ <td><a href="#uint32">uint32</a></td>
<td></td>
- <td><p>How often the instance is synced. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sync_databases</td>
- <td><a href="#bytebase.v1.SyncDatabases">SyncDatabases</a></td>
+ <td>uint64_value</td>
+ <td><a href="#uint64">uint64</a></td>
<td></td>
- <td><p>Enable sync for following databases.
-Not set means sync all schemas &amp; databases. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>last_sync_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>value_value</td>
+ <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
<td></td>
- <td><p>The last time the instance was synced. </p></td>
- </tr>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>Labels are key-value pairs that can be attached to the instance.
-For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } </p></td>
+ <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
+ <td>timestamp_value</td>
+ <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>timestamp_value is used for the timestamp without time zone data type,
+meaning it only includes the timestamp without any time zone or location
+info. Although it may be expressed as a UTC value, it should be seen as a
+timestamp missing location context. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>timestamp_tz_value</td>
+ <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>timestamp_tz_value is used for the timestamptz data type, which
+accurately represents the timestamp with location information. </p></td>
</tr>
</tbody>
@@ -8257,7 +8431,7 @@ For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#
- <h3 id="bytebase.v1.InstanceResource">InstanceResource</h3>
+ <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
<p></p>
@@ -8268,54 +8442,17 @@ For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#
<tbody>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The display title of the instance. </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p>The database engine type. </p></td>
- </tr>
-
- <tr>
- <td>engine_version</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The version of the database engine. </p></td>
- </tr>
-
- <tr>
- <td>data_sources</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
- <td>repeated</td>
- <td><p>Data source configurations for the instance. </p></td>
- </tr>
-
- <tr>
- <td>activation</td>
- <td><a href="#bool">bool</a></td>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Whether the instance is activated. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The name of the instance.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>environment</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td><p>The accuracy is the number of digits after the decimal point. </p></td>
</tr>
</tbody>
@@ -8325,7 +8462,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.KerberosConfig">KerberosConfig</h3>
+ <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
<p></p>
@@ -8336,52 +8473,36 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>primary</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The primary component of the Kerberos principal. </p></td>
- </tr>
-
- <tr>
- <td>instance</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The instance component of the Kerberos principal. </p></td>
- </tr>
-
- <tr>
- <td>realm</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The Kerberos realm. </p></td>
- </tr>
-
- <tr>
- <td>keytab</td>
- <td><a href="#bytes">bytes</a></td>
+ <td>google_timestamp</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The keytab file contents for authentication. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>kdc_host</td>
+ <td>zone</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The hostname of the Key Distribution Center (KDC). </p></td>
+ <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
+&#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
+retrieve the time zone information from the timestamptz field in the
+database. A timestamp is in UTC or epoch time, and with zone info, we can
+convert it to a local time string. Zone and offset are returned by
+time.Time.Zone() </p></td>
</tr>
<tr>
- <td>kdc_port</td>
- <td><a href="#string">string</a></td>
+ <td>offset</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The port of the Key Distribution Center (KDC). </p></td>
+ <td><p>The offset is in seconds east of UTC </p></td>
</tr>
<tr>
- <td>kdc_transport_protocol</td>
- <td><a href="#string">string</a></td>
+ <td>accuracy</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The transport protocol for KDC communication (tcp or udp). </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -8391,531 +8512,10 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</h3>
- <p></p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the instance.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>instance</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td>optional</td>
- <td><p>The target instance. We need to set this field if the target instance is not created yet. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>databases</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>All database name list in the instance. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstancesRequest">ListInstancesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of instances to return. The service may return fewer than
-this value.
-If unspecified, at most 10 instances will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListInstances` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListInstances` must match
-the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Show deleted instances if specified. </p></td>
- </tr>
-
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter the instance.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters:
-- name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
-- state: the instance state, check State enum for values, support &#34;==&#34; operator.
-- engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
-
-For example:
-name == &#34;sample instance&#34;
-name.contains(&#34;sample&#34;)
-resource_id == &#34;sample-instance&#34;
-resource_id.contains(&#34;sample&#34;)
-state == &#34;DELETED&#34;
-environment == &#34;environments/test&#34;
-environment == &#34;&#34; (find instances which environment is not set)
-engine == &#34;MYSQL&#34;
-engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
-!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
-host == &#34;127.0.0.1&#34;
-host.contains(&#34;127.0&#34;)
-port == &#34;54321&#34;
-port.contains(&#34;543&#34;)
-labels.org_group == &#34;infrastructure&#34;
-labels.environment in [&#34;prod&#34;, &#34;production&#34;]
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34;
-host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; </p></td>
- </tr>
-
- <tr>
- <td>order_by</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The order by of instances.
-Support title, environment. The default sorting order is ascending.
-For example:
-- order_by = &#34;title&#34;
-- order_by = &#34;title desc&#34;
-- order_by = &#34;title desc, environment asc&#34; </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListInstancesResponse">ListInstancesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>instances</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td>repeated</td>
- <td><p>The instances from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the instance to remove a data source from.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>data_source</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
- <td></td>
- <td><p>Identified by data source ID.
-Only READ_ONLY data source can be removed. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SASLConfig">SASLConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>krb_config</td>
- <td><a href="#bytebase.v1.KerberosConfig">KerberosConfig</a></td>
- <td></td>
- <td><p>Kerberos authentication configuration. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SyncDatabases">SyncDatabases</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>databases</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of instance.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>enable_full_sync</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only
-the instance metadata (such as the database list) and any newly discovered databases will be synced. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>databases</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>All database name list in the instance. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the deleted instance.
-Format: instances/{instance} </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the instance to update a data source.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>data_source</td>
- <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
- <td></td>
- <td><p>Identified by data source ID. </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Validate only also tests the data source connection. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, and the data source is not found, a new data source will be created.
-In this situation, `update_mask` is ignored. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>instance</td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td></td>
- <td><p>The instance to update.
-
-The instance&#39;s `name` field is used to identify the instance to update.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, and the instance is not found, a new instance will be created.
-In this situation, `update_mask` is ignored. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>AUTHENTICATION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PASSWORD</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GOOGLE_CLOUD_SQL_IAM</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AWS_RDS_IAM</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AZURE_IAM</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</h3>
- <p>CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CLOUD_SQL_IP_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PUBLIC</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PRIVATE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PSC</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
- <h3 id="bytebase.v1.DataSource.RedisType">DataSource.RedisType</h3>
- <p></p>
+ <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>
+ <p>Level represents the severity level of the advice.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -8923,34 +8523,34 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>REDIS_TYPE_UNSPECIFIED</td>
+ <td>ADVICE_LEVEL_UNSPECIFIED</td>
<td>0</td>
- <td><p></p></td>
+ <td><p>Unspecified advice level.</p></td>
</tr>
<tr>
- <td>STANDALONE</td>
+ <td>SUCCESS</td>
<td>1</td>
- <td><p></p></td>
+ <td><p>Success status indicating the check passed without issues.</p></td>
</tr>
<tr>
- <td>SENTINEL</td>
+ <td>WARNING</td>
<td>2</td>
- <td><p></p></td>
+ <td><p>Warning status indicating potential issues that should be reviewed.</p></td>
</tr>
<tr>
- <td>CLUSTER</td>
+ <td>ERROR</td>
<td>3</td>
- <td><p></p></td>
+ <td><p>Error status indicating critical issues that must be addressed.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>
- <p></p>
+ <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>
+ <p>RuleType indicates the source of the linting rule.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -8958,27 +8558,29 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>SECRET_TYPE_UNSPECIFIED</td>
+ <td>RULE_TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified secret type.</p></td>
+ <td><p>Unspecified rule type.</p></td>
</tr>
<tr>
- <td>PLAIN</td>
+ <td>PARSER_BASED</td>
<td>1</td>
- <td><p>Plain text secret.</p></td>
+ <td><p>Parser-based rule enforced by the built-in SQL parser.
+These are non-configurable, mandatory checks for schema health.</p></td>
</tr>
<tr>
- <td>ENVIRONMENT</td>
+ <td>AI_POWERED</td>
<td>2</td>
- <td><p>Secret from environment variable.</p></td>
+ <td><p>AI-powered rule defined by user in natural language.
+These are custom, flexible checks powered by AI models.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>
+ <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -8987,27 +8589,27 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>AUTH_TYPE_UNSPECIFIED</td>
+ <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified authentication type.</p></td>
+ <td><p>defaults to SHOWPLAN_ALL</p></td>
</tr>
<tr>
- <td>TOKEN</td>
+ <td>MSSQL_EXPLAIN_FORMAT_ALL</td>
<td>1</td>
- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>
+ <td><p>SHOWPLAN_ALL</p></td>
</tr>
<tr>
- <td>VAULT_APP_ROLE</td>
+ <td>MSSQL_EXPLAIN_FORMAT_XML</td>
<td>2</td>
- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>
+ <td><p>SHOWPLAN_XML</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>
+ <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -9016,39 +8618,27 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>SECRET_TYPE_UNSPECIFIED</td>
+ <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified secret type.</p></td>
+ <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
</tr>
<tr>
- <td>VAULT_KV_V2</td>
+ <td>SINGLE_NODE</td>
<td>1</td>
- <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>
+ <td><p>Execute Redis commands on a single node in the cluster.</p></td>
</tr>
<tr>
- <td>AWS_SECRETS_MANAGER</td>
+ <td>ALL_NODES</td>
<td>2</td>
- <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>
- </tr>
-
- <tr>
- <td>GCP_SECRET_MANAGER</td>
- <td>3</td>
- <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>
- </tr>
-
- <tr>
- <td>AZURE_KEY_VAULT</td>
- <td>4</td>
- <td><p>ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets</p></td>
+ <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</h3>
+ <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -9057,35 +8647,33 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>TOKEN_TYPE_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified token type, treated as PLAIN for backward compatibility.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>PLAIN</td>
+ <td>DDL</td>
<td>1</td>
- <td><p>The token field holds the literal token value.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>ENVIRONMENT</td>
+ <td>DML</td>
<td>2</td>
- <td><p>The token field holds the name of an environment variable on the
-Bytebase server that holds the token value.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>FILE</td>
+ <td>NON_READ_ONLY</td>
<td>3</td>
- <td><p>The token field holds a path to a file on the Bytebase server that
-holds the token value.</p></td>
+ <td><p></p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.DataSourceType">DataSourceType</h3>
+ <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -9094,537 +8682,241 @@ holds the token value.</p></td>
<tbody>
<tr>
- <td>DATA_SOURCE_UNSPECIFIED</td>
+ <td>LEVEL_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified data source type.</p></td>
+ <td><p>Unspecified message level.</p></td>
</tr>
<tr>
- <td>ADMIN</td>
+ <td>INFO</td>
<td>1</td>
- <td><p>Admin data source with write permissions.</p></td>
+ <td><p>Informational message.</p></td>
</tr>
<tr>
- <td>READ_ONLY</td>
+ <td>WARNING</td>
<td>2</td>
- <td><p>Read-only data source for query operations.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.InstanceService">InstanceService</h3>
- <p>InstanceService manages database instances and their connections.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetInstance</td>
- <td><a href="#bytebase.v1.GetInstanceRequest">GetInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Gets a database instance by name.
-Permissions required: bb.instances.get</p></td>
- </tr>
-
- <tr>
- <td>ListInstances</td>
- <td><a href="#bytebase.v1.ListInstancesRequest">ListInstancesRequest</a></td>
- <td><a href="#bytebase.v1.ListInstancesResponse">ListInstancesResponse</a></td>
- <td><p>Lists all database instances.
-Permissions required: bb.instances.list</p></td>
- </tr>
-
- <tr>
- <td>CreateInstance</td>
- <td><a href="#bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Creates a new database instance.
-Permissions required: bb.instances.create</p></td>
- </tr>
-
- <tr>
- <td>UpdateInstance</td>
- <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Updates a database instance.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>DeleteInstance</td>
- <td><a href="#bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes or soft-deletes a database instance.
-Permissions required: bb.instances.delete</p></td>
- </tr>
-
- <tr>
- <td>UndeleteInstance</td>
- <td><a href="#bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Restores a soft-deleted database instance.
-Permissions required: bb.instances.undelete</p></td>
- </tr>
-
- <tr>
- <td>SyncInstance</td>
- <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
- <td><a href="#bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</a></td>
- <td><p>Syncs database schemas and metadata from an instance.
-Permissions required: bb.instances.sync</p></td>
- </tr>
-
- <tr>
- <td>ListInstanceDatabase</td>
- <td><a href="#bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</a></td>
- <td><p>Lists all databases within an instance without creating them.
-Permissions required: bb.instances.get</p></td>
- </tr>
-
- <tr>
- <td>BatchSyncInstances</td>
- <td><a href="#bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</a></td>
- <td><a href="#bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</a></td>
- <td><p>Syncs multiple instances in a single request.
-Permissions required: bb.instances.sync</p></td>
- </tr>
-
- <tr>
- <td>BatchUpdateInstances</td>
- <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>
- <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>
- <td><p>Updates multiple instances in a single request.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>AddDataSource</td>
- <td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Adds a read-only data source to an instance.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>RemoveDataSource</td>
- <td><a href="#bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Removes a read-only data source from an instance.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- <tr>
- <td>UpdateDataSource</td>
- <td><a href="#bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</a></td>
- <td><a href="#bytebase.v1.Instance">Instance</a></td>
- <td><p>Updates a data source configuration.
-Permissions required: bb.instances.update</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>GetInstance</td>
- <td>GET</td>
- <td>/v1/{name=instances/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListInstances</td>
- <td>GET</td>
- <td>/v1/instances</td>
- <td></td>
+ <td><p>Warning message indicating potential issues.</p></td>
</tr>
-
-
-
<tr>
- <td>CreateInstance</td>
- <td>POST</td>
- <td>/v1/instances</td>
- <td>instance</td>
+ <td>DEBUG</td>
+ <td>3</td>
+ <td><p>Debug message for development and troubleshooting.</p></td>
</tr>
-
-
-
<tr>
- <td>UpdateInstance</td>
- <td>PATCH</td>
- <td>/v1/{instance.name=instances/*}</td>
- <td>instance</td>
+ <td>LOG</td>
+ <td>4</td>
+ <td><p>General log message.</p></td>
</tr>
-
-
-
<tr>
- <td>DeleteInstance</td>
- <td>DELETE</td>
- <td>/v1/{name=instances/*}</td>
- <td></td>
+ <td>NOTICE</td>
+ <td>5</td>
+ <td><p>Notice message for important information.</p></td>
</tr>
-
-
-
<tr>
- <td>UndeleteInstance</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:undelete</td>
- <td>*</td>
+ <td>EXCEPTION</td>
+ <td>6</td>
+ <td><p>Exception message indicating error conditions.</p></td>
</tr>
-
-
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SQLService">SQLService</h3>
+ <p>SQLService executes SQL queries and manages query operations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>SyncInstance</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:sync</td>
- <td>*</td>
+ <td>Query</td>
+ <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
+ <td><p>Executes a read-only SQL query against a database.
+Permissions required: bb.databases.get</p></td>
</tr>
-
-
-
<tr>
- <td>ListInstanceDatabase</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:databases</td>
- <td>*</td>
+ <td>AdminExecute</td>
+ <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
+ <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
+ <td><p>Executes SQL with admin privileges via streaming connection.
+Permissions required: bb.sql.admin</p></td>
</tr>
-
-
-
<tr>
- <td>BatchSyncInstances</td>
- <td>POST</td>
- <td>/v1/instances:batchSync</td>
- <td>*</td>
+ <td>SearchQueryHistories</td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
+ <td><p>Deprecated: use QueryHistoryService.SearchQueryHistories instead.
+Delegating alias kept for upgrade transition; will be removed in a future release.
+No HTTP binding: the REST route is served by QueryHistoryService.
+Permissions required: None (only returns caller&#39;s own query histories)</p></td>
</tr>
-
-
-
<tr>
- <td>BatchUpdateInstances</td>
- <td>POST</td>
- <td>/v1/instances:batchUpdate</td>
- <td>*</td>
+ <td>ListQueryHistories</td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
+ <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
+ <td><p>Deprecated: use QueryHistoryService.ListQueryHistories instead.
+Delegating alias kept for upgrade transition; will be removed in a future release.
+No HTTP binding: the REST route is served by QueryHistoryService.
+Permissions required: bb.queryHistories.list</p></td>
</tr>
-
-
-
<tr>
- <td>AddDataSource</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:addDataSource</td>
- <td>*</td>
+ <td>GetQueryHistory</td>
+ <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
+ <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td><p>Deprecated: use QueryHistoryService.GetQueryHistory instead.
+Delegating alias kept for upgrade transition; will be removed in a future release.
+No HTTP binding: the REST route is served by QueryHistoryService.
+Permissions required: None (only returns the caller&#39;s own query history)</p></td>
</tr>
-
-
-
<tr>
- <td>RemoveDataSource</td>
- <td>POST</td>
- <td>/v1/{name=instances/*}:removeDataSource</td>
- <td>*</td>
+ <td>Export</td>
+ <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
+ <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
+ <td><p>Exports query results to a file format.
+Permissions required: bb.databases.get</p></td>
</tr>
-
-
-
<tr>
- <td>UpdateDataSource</td>
- <td>PATCH</td>
- <td>/v1/{name=instances/*}:updateDataSource</td>
- <td>data_source</td>
+ <td>AICompletion</td>
+ <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>
+ <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>
+ <td><p>Provides AI-powered SQL completion and generation.
+Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>
</tr>
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/database_service.proto">v1/database_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource shared by all databases being retrieved.
-- projects/{project}: batch get databases in a project;
-- instances/{instances}: batch get databases in a instance;
-Use &#34;-&#34; as wildcard to batch get databases across parent. </p></td>
- </tr>
-
- <tr>
- <td>names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of database names to retrieve. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td>repeated</td>
- <td><p>The databases from the specified request. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource shared by all databases being updated.
-Format: instances/{instance}
-If the operation spans parents, a dash (-) may be accepted as a wildcard. </p></td>
- </tr>
-
- <tr>
- <td>names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of database names to sync. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</h3>
- <p></p>
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with deprecated option</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Option</td>
+ </tr>
</thead>
<tbody>
-
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource shared by all databases being updated.
-Format: instances/{instance}
-If the operation spans parents, a dash (-) may be accepted as a wildcard.
-We only support updating the project of databases for now. </p></td>
- </tr>
-
- <tr>
- <td>requests</td>
- <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
- <td>repeated</td>
- <td><p>The request message specifying the resources to update.
-A maximum of 1000 databases can be modified in a batch. </p></td>
- </tr>
-
+
+ <tr>
+ <td>SearchQueryHistories</td>
+ <td><p>true</p></td>
+ </tr>
+
+ <tr>
+ <td>ListQueryHistories</td>
+ <td><p>true</p></td>
+ </tr>
+
+ <tr>
+ <td>GetQueryHistory</td>
+ <td><p>true</p></td>
+ </tr>
+
</tbody>
</table>
-
-
-
- <h3 id="bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</h3>
- <p></p>
-
-
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td>repeated</td>
- <td><p>Databases updated. </p></td>
- </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BoundingBox">BoundingBox</h3>
- <p>BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>Query</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:query</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>xmin</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Minimum X coordinate </p></td>
- </tr>
+
- <tr>
- <td>ymin</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Minimum Y coordinate </p></td>
- </tr>
- <tr>
- <td>xmax</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Maximum X coordinate </p></td>
- </tr>
+ <tr>
+ <td>AdminExecute</td>
+ <td>GET</td>
+ <td>/v1:adminExecute</td>
+ <td></td>
+ </tr>
- <tr>
- <td>ymax</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p>Maximum Y coordinate </p></td>
- </tr>
+
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>
- <p>CheckConstraintMetadata is the metadata for check constraints.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a check constraint. </p></td>
- </tr>
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:export</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/plans/*/rollout}:export</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>Export</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/plans/*/rollout/stages/*}:export</td>
+ <td>*</td>
+ </tr>
+
+
- <tr>
- <td>expression</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The expression is the expression of a check constraint. </p></td>
- </tr>
+ <tr>
+ <td>AICompletion</td>
+ <td>POST</td>
+ <td>/v1/sql/aiCompletion</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.ColumnMetadata">ColumnMetadata</h3>
- <p>ColumnMetadata is the metadata for columns.</p>
+ <div class="file-heading">
+ <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3>
+ <p></p>
<table class="field-table">
@@ -9634,161 +8926,100 @@ A maximum of 1000 databases can be modified in a batch. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a column. </p></td>
- </tr>
-
- <tr>
- <td>position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The position is the position in columns. </p></td>
- </tr>
-
- <tr>
- <td>has_default</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>default</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The default value of column. </p></td>
- </tr>
-
- <tr>
- <td>default_on_null</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Oracle specific metadata.
-The default_on_null is the default on null of a column. </p></td>
- </tr>
-
- <tr>
- <td>on_update</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_update is the on update action of a column.
-For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with
-CURRENT_TIMESTAMP as on update value. </p></td>
- </tr>
-
- <tr>
- <td>nullable</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The nullable is the nullable of a column. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The type is the type of a column. </p></td>
- </tr>
-
- <tr>
- <td>character_set</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The character_set is the character_set of a column. </p></td>
+ <td><p>The name of the plan check run to cancel.
+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
</tr>
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation is the collation of a column. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>comment</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a column. </p></td>
- </tr>
-
- <tr>
- <td>generation</td>
- <td><a href="#bytebase.v1.GenerationMetadata">GenerationMetadata</a></td>
- <td></td>
- <td><p>The generation is the generation of a column. </p></td>
- </tr>
-
- <tr>
- <td>is_identity</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The parent project where this plan will be created.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>identity_generation</td>
- <td><a href="#bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p>The identity_generation is for identity columns, PG only. </p></td>
+ <td><p>The plan to create. </p></td>
</tr>
- <tr>
- <td>identity_seed</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The identity_seed is for identity columns, MSSQL only. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>identity_increment</td>
- <td><a href="#int64">int64</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The identity_increment is for identity columns, MSSQL only. </p></td>
+ <td><p>The name of the plan check run to retrieve.
+Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
</tr>
- <tr>
- <td>default_constraint_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The default_constraint_name is the name of the default constraint, MSSQL only.
-In MSSQL, default values are implemented as named constraints. When modifying or
-dropping a column&#39;s default value, you must reference the constraint by name.
-This field stores the actual constraint name from the database.
-
-Example: A column definition like:
- CREATE TABLE employees (
- status NVARCHAR(20) DEFAULT &#39;active&#39;
- )
+ </tbody>
+ </table>
-Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39;
-or a user-defined name if specified:
- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; FOR status
+
-To modify the default, you must first drop the existing constraint by name:
- ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760
- ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;inactive&#39; FOR status
+
+
+ <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
+ <p></p>
-This field is populated when syncing from the database. When empty (e.g., when parsing
-from SQL files), the system cannot automatically drop the constraint. </p></td>
- </tr>
-
- <tr>
- <td>srid</td>
- <td><a href="#uint32">uint32</a></td>
- <td>optional</td>
- <td><p>The spatial reference system identifier of a spatial column, MySQL 8.0 only.
-Unset means the column declares no SRID; presence carries the explicit SRID,
-including the valid SRID 0. SRS_IDs are unsigned 32-bit (custom SRSs may exceed
-int32). </p></td>
- </tr>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>is_invisible</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. </p></td>
+ <td><p>The name of the plan to retrieve.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
</tbody>
@@ -9798,7 +9029,7 @@ int32). </p></td>
- <h3 id="bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</h3>
+ <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
<p></p>
@@ -9809,33 +9040,56 @@ int32). </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the attribute. </p></td>
+ <td><p>The parent, which owns this collection of plans.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The attribute type. User-defined types are always schema-qualified. </p></td>
+ <td><p>The maximum number of plans to return. The service may return fewer than
+this value.
+If unspecified, at most 10 plans will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>collation</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The non-default collation of the attribute as an emit-ready SQL
-identifier reference (quoted as needed, schema-qualified when outside
-pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
+ <td><p>A page token, received from a previous `ListPlans` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListPlans` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment describing the attribute. </p></td>
+ <td><p>Filter is used to filter plans returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
+- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
+- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match.
+- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;.
+- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
+
+For example:
+creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
+title == &#34;My Plan&#34;
+title.contains(&#34;database migration&#34;)
+spec_type == &#34;change_database_config&#34;
+state == &#34;ACTIVE&#34; </p></td>
</tr>
</tbody>
@@ -9845,7 +9099,7 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
- <h3 id="bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</h3>
+ <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
<p></p>
@@ -9856,24 +9110,18 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the composite type. </p></td>
- </tr>
-
- <tr>
- <td>attributes</td>
- <td><a href="#bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</a></td>
+ <td>plans</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td>repeated</td>
- <td><p>The ordered attributes of the composite type. </p></td>
+ <td><p>The plans from the specified request. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment describing the composite type. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -9883,7 +9131,7 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
- <h3 id="bytebase.v1.Database">Database</h3>
+ <h3 id="bytebase.v1.Plan">Plan</h3>
<p></p>
@@ -9897,92 +9145,110 @@ pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database.
-Format: instances/{instance}/databases/{database}
-{database} is the database name in the instance. </p></td>
+ <td><p>The name of the plan.
+`plan` is a system generated ID.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
<td>state</td>
<td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>The existence of a database. </p></td>
+ <td><p>The state of the plan. </p></td>
</tr>
<tr>
- <td>successful_sync_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>issue</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The latest synchronization time. </p></td>
+ <td><p>The issue associated with the plan.
+Can be empty.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>project</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The project for a database.
-Format: projects/{project} </p></td>
+ <td><p>The title of the plan. </p></td>
</tr>
<tr>
- <td>release</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The release that was last applied to this database.
-Format: projects/{project}/releases/{release_id}
-Example: projects/my-project/releases/release_20260115-RC00 </p></td>
+ <td><p>The description of the plan. </p></td>
</tr>
<tr>
- <td>environment</td>
+ <td>specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
+ <td>repeated</td>
+ <td><p>The deployment specs for the plan. </p></td>
+ </tr>
+
+ <tr>
+ <td>creator</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td></td>
+ <td><p>Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>effective_environment</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The effective environment based on environment tag above and environment
-tag on the instance. Inheritance follows
-https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</a></td>
+ <td>plan_check_run_status_count</td>
+ <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
<td>repeated</td>
- <td><p>Labels will be used for deployment and policy control. </p></td>
+ <td><p>The status count of the latest plan check runs.
+Keys are:
+- SUCCESS
+- WARNING
+- ERROR
+- RUNNING </p></td>
</tr>
<tr>
- <td>instance_resource</td>
- <td><a href="#bytebase.v1.InstanceResource">InstanceResource</a></td>
+ <td>has_rollout</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The instance resource. </p></td>
+ <td><p>Whether the plan has started the rollout. </p></td>
</tr>
<tr>
- <td>backup_available</td>
- <td><a href="#bool">bool</a></td>
+ <td>approval_status</td>
+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
<td></td>
- <td><p>The database is available for DML prior backup. </p></td>
+ <td><p>The approval status of the linked issue.
+Unspecified when no linked issue exists or the linked issue is a draft. </p></td>
</tr>
<tr>
- <td>sync_status</td>
- <td><a href="#bytebase.v1.SyncStatus">SyncStatus</a></td>
- <td></td>
- <td><p>The sync status of the database. </p></td>
+ <td>rollout_stage_summaries</td>
+ <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>
+ <td>repeated</td>
+ <td><p>Per-stage rollout status summary.
+Ordered by environment deployment order. Empty when no rollout exists. </p></td>
</tr>
<tr>
- <td>sync_error</td>
- <td><a href="#string">string</a></td>
+ <td>issue_status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
<td></td>
- <td><p>The error message if sync failed. </p></td>
+ <td><p>The lifecycle status of the linked issue.
+Unspecified when no linked issue exists. </p></td>
</tr>
</tbody>
@@ -9992,7 +9258,7 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
- <h3 id="bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</h3>
+ <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
<p></p>
@@ -10003,17 +9269,35 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>targets</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
+ </tr>
+
+ <tr>
+ <td>sheet</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>release</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The resource name of the release.
+Format: projects/{project}/releases/{release} </p></td>
+ </tr>
+
+ <tr>
+ <td>enable_prior_backup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
</tr>
</tbody>
@@ -10023,8 +9307,8 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
- <h3 id="bytebase.v1.DatabaseMetadata">DatabaseMetadata</h3>
- <p>DatabaseMetadata is the metadata for databases.</p>
+ <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <p></p>
<table class="field-table">
@@ -10034,115 +9318,62 @@ https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>target</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The database metadata name.
-
-Format: instances/{instance}/databases/{database}/metadata </p></td>
- </tr>
-
- <tr>
- <td>schemas</td>
- <td><a href="#bytebase.v1.SchemaMetadata">SchemaMetadata</a></td>
- <td>repeated</td>
- <td><p>The schemas is the list of schemas in a database. </p></td>
+ <td><p>The resource name of the instance on which the database is created.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>character_set</td>
+ <td>database</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The character_set is the character set of a database. </p></td>
+ <td><p>The name of the database to create. </p></td>
</tr>
<tr>
- <td>collation</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The collation is the collation of a database. </p></td>
- </tr>
-
- <tr>
- <td>extensions</td>
- <td><a href="#bytebase.v1.ExtensionMetadata">ExtensionMetadata</a></td>
- <td>repeated</td>
- <td><p>The extensions is the list of extensions in a database. </p></td>
+ <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
+For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>character_set</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner of the database. </p></td>
+ <td><p>character_set is the character set of the database. </p></td>
</tr>
<tr>
- <td>search_path</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The search_path is the search path of a PostgreSQL database. </p></td>
+ <td><p>collation is the collation of the database. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</h3>
- <p>DatabaseSDLSchema contains the schema in SDL format.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>schema</td>
- <td><a href="#bytes">bytes</a></td>
+ <td>cluster</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The SDL schema content.
-- For SINGLE_FILE format: contains the complete SDL schema as a text string.
-- For MULTI_FILE format: contains the ZIP archive as binary data. </p></td>
+ <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
</tr>
<tr>
- <td>content_type</td>
+ <td>owner</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The MIME type of the schema content.
-Indicates how the client should interpret the schema field.
-Examples:
-- &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format
-- &#34;application/zip&#34; for MULTI_FILE format </p></td>
+ <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DatabaseSchema">DatabaseSchema</h3>
- <p>DatabaseSchema is the metadata for databases.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>schema</td>
+ <td>environment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The schema dump from database. </p></td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
</tr>
</tbody>
@@ -10152,8 +9383,8 @@ Examples:
- <h3 id="bytebase.v1.DependencyColumn">DependencyColumn</h3>
- <p>DependencyColumn is the metadata for dependency columns.</p>
+ <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>
+ <p></p>
<table class="field-table">
@@ -10163,55 +9394,35 @@ Examples:
<tbody>
<tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schema is the schema of a reference column. </p></td>
- </tr>
-
- <tr>
- <td>table</td>
+ <td>targets</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The table is the table of a reference column. </p></td>
+ <td>repeated</td>
+ <td><p>The list of targets.
+Multi-database format: [instances/{instance-id}/databases/{database-name}].
+Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
</tr>
<tr>
- <td>column</td>
+ <td>sheet</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The column is the name of a reference column. </p></td>
+ <td><p>The resource name of the sheet.
+Format: projects/{project}/sheets/{sheet} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DependencyTable">DependencyTable</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
<td></td>
- <td><p>The schema is the schema of a reference table. </p></td>
+ <td><p>The format of the exported file. </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The table is the name of a reference table. </p></td>
+ <td>optional</td>
+ <td><p>The zip password provide by users.
+Leave it empty if no needs to encrypt the zip file. </p></td>
</tr>
</tbody>
@@ -10221,7 +9432,7 @@ Examples:
- <h3 id="bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</h3>
+ <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
<p></p>
@@ -10232,29 +9443,17 @@ Examples:
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database or changelog.
-Format:
-database: instances/{instance}/databases/{database}
-changelog: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The target schema. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>changelog</td>
- <td><a href="#string">string</a></td>
+ <td>value</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The resource name of the changelog
-Format:
-instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10264,7 +9463,7 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- <h3 id="bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</h3>
+ <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>
<p></p>
@@ -10275,10 +9474,18 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
<tbody>
<tr>
- <td>diff</td>
+ <td>stage</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The stage resource name.
+Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
+ </tr>
+
+ <tr>
+ <td>task_status_counts</td>
+ <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>
+ <td>repeated</td>
+ <td><p>Task status counts for this stage. </p></td>
</tr>
</tbody>
@@ -10288,8 +9495,8 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- <h3 id="bytebase.v1.DimensionConstraint">DimensionConstraint</h3>
- <p>DimensionConstraint defines constraints for a spatial dimension.</p>
+ <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
+ <p></p>
<table class="field-table">
@@ -10299,31 +9506,31 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
<tbody>
<tr>
- <td>dimension</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Dimension name/type (X, Y, Z, M, etc.) </p></td>
+ <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
</tr>
<tr>
- <td>min_value</td>
- <td><a href="#double">double</a></td>
+ <td>create_database_config</td>
+ <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
<td></td>
- <td><p>Minimum value for this dimension </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>max_value</td>
- <td><a href="#double">double</a></td>
+ <td>change_database_config</td>
+ <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
<td></td>
- <td><p>Maximum value for this dimension </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>tolerance</td>
- <td><a href="#double">double</a></td>
+ <td>export_data_config</td>
+ <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>
<td></td>
- <td><p>Tolerance for this dimension </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10333,8 +9540,8 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- <h3 id="bytebase.v1.DimensionalConfig">DimensionalConfig</h3>
- <p>DimensionalConfig defines dimensional and constraint parameters for spatial indexes.</p>
+ <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>
+ <p></p>
<table class="field-table">
@@ -10344,31 +9551,17 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
<tbody>
<tr>
- <td>dimensions</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Number of dimensions (2-4, default 2) </p></td>
- </tr>
-
- <tr>
- <td>data_type</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>
<td></td>
- <td><p>Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) </p></td>
+ <td><p>The task status. </p></td>
</tr>
<tr>
- <td>srid</td>
+ <td>count</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Spatial reference system identifier (SRID) </p></td>
- </tr>
-
- <tr>
- <td>constraints</td>
- <td><a href="#bytebase.v1.DimensionConstraint">DimensionConstraint</a></td>
- <td>repeated</td>
- <td><p>Coordinate system constraints </p></td>
+ <td><p>The number of tasks in the status. </p></td>
</tr>
</tbody>
@@ -10378,7 +9571,7 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- <h3 id="bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</h3>
+ <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
<p></p>
@@ -10392,28 +9585,35 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of a type. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
</tr>
<tr>
- <td>values</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>results</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
<td>repeated</td>
- <td><p>The enum values of a type. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment describing the enum type. </p></td>
+ <td><p>error is set if the Status is FAILED. </p></td>
</tr>
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>Whether to skip this enum type during schema dump operations. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10423,7 +9623,7 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
- <h3 id="bytebase.v1.EventMetadata">EventMetadata</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
<p></p>
@@ -10434,98 +9634,60 @@ instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the event. </p></td>
- </tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schedule of the event. </p></td>
- </tr>
-
- <tr>
- <td>time_zone</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The time zone of the event. </p></td>
- </tr>
-
- <tr>
- <td>sql_mode</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
<td></td>
- <td><p>The SQL mode setting for the event. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>character_set_client</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The character set used by the client creating the event. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>collation_connection</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The collation used for the connection when creating the event. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>code</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The comment is the comment of an event. </p></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ExtensionMetadata">ExtensionMetadata</h3>
- <p>ExtensionMetadata is the metadata for extensions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>target</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of an extension. </p></td>
+ <td><p>Target identification for consolidated results.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>
<td></td>
- <td><p>The schema is the extension that is installed to. But the extension usage
-is not limited to the schema. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
+ <td>sql_summary_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
<td></td>
- <td><p>The version is the version of an extension. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
+ <td>sql_review_report</td>
+ <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
<td></td>
- <td><p>The description is the description of an extension. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10535,7 +9697,7 @@ is not limited to the schema. </p></td>
- <h3 id="bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</h3>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
<p></p>
@@ -10546,31 +9708,17 @@ is not limited to the schema. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a external table. </p></td>
- </tr>
-
- <tr>
- <td>external_server_name</td>
- <td><a href="#string">string</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>The external_server_name is the name of the external server. </p></td>
+ <td><p>Position of the SQL statement. </p></td>
</tr>
<tr>
- <td>external_database_name</td>
- <td><a href="#string">string</a></td>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
<td></td>
- <td><p>The external_database_name is the name of the external database. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a foreign table. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10580,8 +9728,8 @@ is not limited to the schema. </p></td>
- <h3 id="bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</h3>
- <p>ForeignKeyMetadata is the metadata for foreign keys.</p>
+ <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
+ <p></p>
<table class="field-table">
@@ -10591,62 +9739,17 @@ is not limited to the schema. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>referenced_schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The referenced_schema is the referenced schema name of a foreign key.
-It is an empty string for databases without such concept such as MySQL. </p></td>
- </tr>
-
- <tr>
- <td>referenced_table</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>referenced_columns</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>on_delete</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_delete is the on delete action of a foreign key. </p></td>
- </tr>
-
- <tr>
- <td>on_update</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_update is the on update action of a foreign key. </p></td>
+ <td>statement_types</td>
+ <td><a href="#bytebase.v1.StatementType">StatementType</a></td>
+ <td>repeated</td>
+ <td><p>statement_types are the types of statements that are found in the sql. </p></td>
</tr>
<tr>
- <td>match_type</td>
- <td><a href="#string">string</a></td>
+ <td>affected_rows</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The match_type is the match type of a foreign key.
-The match_type is the PostgreSQL specific field.
-It&#39;s empty string for other databases. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -10656,8 +9759,8 @@ It&#39;s empty string for other databases. </p></td>
- <h3 id="bytebase.v1.FunctionMetadata">FunctionMetadata</h3>
- <p>FunctionMetadata is the metadata for functions.</p>
+ <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
+ <p></p>
<table class="field-table">
@@ -10670,72 +9773,66 @@ It&#39;s empty string for other databases. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a function. </p></td>
- </tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition is the definition of a function. </p></td>
- </tr>
-
- <tr>
- <td>signature</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The signature is the name with the number and type of input arguments the
-function takes. </p></td>
- </tr>
-
- <tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>MySQL specific metadata. </p></td>
+ <td><p>The plan to run plan checks.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>collation_connection</td>
+ <td>spec_id</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The UUID of the specific spec to run plan checks for.
+This should match the spec.id field in Plan.Spec.
+If not set, all specs in the plan will be used. </p></td>
</tr>
- <tr>
- <td>database_collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>sql_mode</td>
- <td><a href="#string">string</a></td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The plan to update.
+
+The plan&#39;s `name` field is used to identify the plan to update.
+Format: projects/{project}/plans/{plan} </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>dependency_tables</td>
- <td><a href="#bytebase.v1.DependencyTable">DependencyTable</a></td>
- <td>repeated</td>
- <td><p>The dependency_tables is the list of dependency tables of a function.
-For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>skip_dump</td>
+ <td>allow_missing</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, and the plan is not found, a new plan will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -10745,150 +9842,254 @@ For PostgreSQL, it&#39;s the list of tables that the function depends on the ret
- <h3 id="bytebase.v1.GenerationMetadata">GenerationMetadata</h3>
+
+
+ <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STATEMENT_ADVISE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STATEMENT_SUMMARY_REPORT</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GHOST_SYNC</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>
<p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>RUNNING</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DONE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CANCELED</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PlanService">PlanService</h3>
+ <p>PlanService manages deployment plans for database changes.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetPlan</td>
+ <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>Retrieves a deployment plan by name.
+Permissions required: bb.plans.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListPlans</td>
+ <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
+ <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
+ <td><p>Lists deployment plans in a project.
+Permissions required: bb.plans.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreatePlan</td>
+ <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>Creates a new deployment plan.
+Permissions required: bb.plans.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdatePlan</td>
+ <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
+ <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td><p>UpdatePlan updates the plan.
+The plan creator and the user with bb.plans.update permission on the project can update the plan.
+Permissions required: bb.plans.update (or creator)</p></td>
+ </tr>
+
+ <tr>
+ <td>GetPlanCheckRun</td>
+ <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>
+ <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
+ <td><p>Gets the plan check run for a deployment plan.
+Permissions required: bb.planCheckRuns.get</p></td>
+ </tr>
+
+ <tr>
+ <td>RunPlanChecks</td>
+ <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
+ <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
+ <td><p>Executes validation checks on a deployment plan.
+Permissions required: bb.planCheckRuns.run</p></td>
+ </tr>
+
+ <tr>
+ <td>CancelPlanCheckRun</td>
+ <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>
+ <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>
+ <td><p>Cancels the plan check run for a deployment plan.
+Permissions required: bb.planCheckRuns.run</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>expression</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>GetPlan</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/plans/*}</td>
+ <td></td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to retrieve metadata.
-Format: instances/{instance}/databases/{database}/metadata </p></td>
- </tr>
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter databases returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- schema: the schema name, support &#34;==&#34; operator.
-- table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-
-For example:
-schema == &#34;schema-a&#34;
-table == &#34;table-a&#34;
-table.contains(&#34;table-a&#34;)
-schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;)
-The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;.
-The column masking level will only be returned when a table filter is used. </p></td>
- </tr>
+ <tr>
+ <td>ListPlans</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/plans</td>
+ <td></td>
+ </tr>
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Limit the response size of returned table metadata per schema.
-For example, if the database has 3 schemas, and each schema has 100 tables,
-if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.
-Default 0, means no limit. </p></td>
- </tr>
+
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to retrieve.
-Format: instances/{instance}/databases/{database} </p></td>
- </tr>
+ <tr>
+ <td>CreatePlan</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/plans</td>
+ <td>plan</td>
+ </tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to retrieve SDL schema.
-Format: instances/{instance}/databases/{database}/sdlSchema </p></td>
- </tr>
- <tr>
- <td>format</td>
- <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</a></td>
- <td></td>
- <td><p>The format of the SDL schema output. </p></td>
- </tr>
+ <tr>
+ <td>UpdatePlan</td>
+ <td>PATCH</td>
+ <td>/v1/{plan.name=projects/*/plans/*}</td>
+ <td>plan</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetPlanCheckRun</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RunPlanChecks</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
+ <td>*</td>
+ </tr>
+
+
+
+ <tr>
+ <td>CancelPlanCheckRun</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</h3>
+ <div class="file-heading">
+ <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>
<p></p>
@@ -10899,11 +10100,10 @@ Format: instances/{instance}/databases/{database}/sdlSchema </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>roles</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to retrieve schema.
-Format: instances/{instance}/databases/{database}/schema </p></td>
+ <td>repeated</td>
+ <td><p>The roles required for approval in order. </p></td>
</tr>
</tbody>
@@ -10913,7 +10113,7 @@ Format: instances/{instance}/databases/{database}/schema </p></td>
- <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>
+ <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>
<p></p>
@@ -10924,64 +10124,24 @@ Format: instances/{instance}/databases/{database}/schema </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database.
-Format: instances/{instance}/databases/{database} </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
+ <td>flow</td>
+ <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>
<td></td>
- <td><p>It&#39;s empty for DATABASE. </p></td>
+ <td><p>The approval flow definition. </p></td>
</tr>
<tr>
- <td>object</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>It&#39;s empty for DATABASE and SCHEMA. </p></td>
- </tr>
-
- <tr>
- <td>metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.
-Also the schema and object are empty. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <td></td>
+ <td><p>The title of the approval template. </p></td>
+ </tr>
<tr>
- <td>schema_string</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The description of the approval template. </p></td>
</tr>
</tbody>
@@ -10991,8 +10151,8 @@ Also the schema and object are empty. </p></td>
- <h3 id="bytebase.v1.GridLevel">GridLevel</h3>
- <p>GridLevel defines a tessellation grid level with its density.</p>
+ <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>
+ <p></p>
<table class="field-table">
@@ -11002,17 +10162,18 @@ Also the schema and object are empty. </p></td>
<tbody>
<tr>
- <td>level</td>
- <td><a href="#int32">int32</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Grid level number (1-4 for SQL Server) </p></td>
+ <td><p>The name of the issue to add an approver.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>density</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Grid density (LOW, MEDIUM, HIGH) </p></td>
+ <td><p>The comment explaining the approval decision. </p></td>
</tr>
</tbody>
@@ -11022,8 +10183,8 @@ Also the schema and object are empty. </p></td>
- <h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3>
- <p>IndexMetadata is the metadata for indexes.</p>
+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>
+ <p></p>
<table class="field-table">
@@ -11033,126 +10194,35 @@ Also the schema and object are empty. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of an index. </p></td>
+ <td><p>The parent resource shared by all issues being updated.
+Format: projects/{project}
+If the operation spans parents, a dash (-) may be accepted as a wildcard.
+We only support updating the status of databases for now. </p></td>
</tr>
<tr>
- <td>expressions</td>
+ <td>issues</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The expressions are the ordered columns or expressions of an index.
-This could refer to a column or an expression. </p></td>
- </tr>
-
- <tr>
- <td>key_length</td>
- <td><a href="#int64">int64</a></td>
- <td>repeated</td>
- <td><p>The key_lengths are the ordered key lengths of an index.
-If the key length is not specified, it&#39;s -1. </p></td>
- </tr>
-
- <tr>
- <td>descending</td>
- <td><a href="#bool">bool</a></td>
- <td>repeated</td>
- <td><p>The descending is the ordered descending of an index. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The type is the type of an index. </p></td>
- </tr>
-
- <tr>
- <td>unique</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The unique is whether the index is unique. </p></td>
- </tr>
-
- <tr>
- <td>primary</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The primary is whether the index is a primary key index. </p></td>
- </tr>
-
- <tr>
- <td>visible</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The visible is whether the index is visible. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment is the comment of an index. </p></td>
- </tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition of an index. </p></td>
+ <td><p>The list of issues to update.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>parent_index_schema</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
<td></td>
- <td><p>The schema name of the parent index. </p></td>
+ <td><p>The new status. </p></td>
</tr>
<tr>
- <td>parent_index_name</td>
+ <td>reason</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The index name of the parent index. </p></td>
- </tr>
-
- <tr>
- <td>granularity</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The number of granules in the block. It&#39;s a ClickHouse specific field. </p></td>
- </tr>
-
- <tr>
- <td>is_constraint</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>It&#39;s a PostgreSQL specific field.
-The unique constraint and unique index are not the same thing in PostgreSQL. </p></td>
- </tr>
-
- <tr>
- <td>spatial_config</td>
- <td><a href="#bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</a></td>
- <td></td>
- <td><p>Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. </p></td>
- </tr>
-
- <tr>
- <td>opclass_names</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>https://www.postgresql.org/docs/current/catalog-pg-opclass.html
-Name of the operator class for each column. (PostgreSQL specific). </p></td>
- </tr>
-
- <tr>
- <td>opclass_defaults</td>
- <td><a href="#bool">bool</a></td>
- <td>repeated</td>
- <td><p>True if the operator class is the default. (PostgreSQL specific). </p></td>
+ <td><p>The reason for the status change. </p></td>
</tr>
</tbody>
@@ -11162,7 +10232,14 @@ Name of the operator class for each column. (PostgreSQL specific). </p></td>
- <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>
+ <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>
<p></p>
@@ -11176,86 +10253,47 @@ Name of the operator class for each column. (PostgreSQL specific). </p></td>
<td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>- projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission.
-- workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission.
-- instances/{instances}: list databases in a instance, require &#34;bb.instances.get&#34; permission </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of databases to return. The service may return fewer
-than this value.
-If unspecified, at most 10 databases will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The issue name
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
+ <td>issue_comment</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListDatabases` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListDatabases` must
-match the call that provided the page token. </p></td>
+ <td><p>The comment to create. </p></td>
</tr>
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter databases returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ </tbody>
+ </table>
-Supported filter:
-- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
-- name: the database name, support &#34;.contains()&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
-- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
-- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
-- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
+
-For example:
-environment == &#34;environments/{environment resource id}&#34;
-environment == &#34;&#34; (find databases which environment is not set)
-project == &#34;projects/{project resource id}&#34;
-instance == &#34;instances/{instance resource id}&#34;
-name.contains(&#34;database name&#34;)
-engine == &#34;MYSQL&#34;
-engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
-!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
-exclude_unassigned == true
-table == &#34;sample&#34;
-table.contains(&#34;sam&#34;)
-labels.environment == &#34;production&#34;
-labels.region == &#34;asia&#34;
-labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+
+
+ <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>
+ <p></p>
-You can combine filter conditions like:
-environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
- </tr>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Show deleted database if specified. </p></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>order_by</td>
- <td><a href="#string">string</a></td>
+ <td>issue</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
<td></td>
- <td><p>The order by of databases.
-Support name, project, instance. The default sorting order is ascending.
-For example:
-- order_by = &#34;name&#34; - order by name ascending
-- order_by = &#34;name desc&#34;
-- order_by = &#34;name desc, project asc&#34; </p></td>
+ <td><p>The issue to create. </p></td>
</tr>
</tbody>
@@ -11265,7 +10303,7 @@ For example:
- <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>
+ <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>
<p></p>
@@ -11276,18 +10314,18 @@ For example:
<tbody>
<tr>
- <td>databases</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td>repeated</td>
- <td><p>The databases from the specified request. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the issue to retrieve.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>If set to true, bypass cache and fetch the latest data. </p></td>
</tr>
</tbody>
@@ -11297,8 +10335,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>
- <p>MaterializedViewMetadata is the metadata for materialized views.</p>
+ <h3 id="bytebase.v1.Issue">Issue</h3>
+ <p></p>
<table class="field-table">
@@ -11311,50 +10349,123 @@ If this field is omitted, there are no subsequent pages. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a materialized view. </p></td>
+ <td><p>The name of the issue.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a materialized view. </p></td>
+ <td><p>The title of the issue. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a materialized view. </p></td>
+ <td><p>The description of the issue. </p></td>
</tr>
<tr>
- <td>dependency_columns</td>
- <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
- <td>repeated</td>
- <td><p>The dependency_columns is the list of dependency columns of a materialized
-view. </p></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>triggers</td>
- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td></td>
+ <td><p>The status of the issue. </p></td>
+ </tr>
+
+ <tr>
+ <td>approvers</td>
+ <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>
<td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>indexes</td>
- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>approval_template</td>
+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td></td>
+ <td><p>The approval template for the issue. </p></td>
+ </tr>
+
+ <tr>
+ <td>creator</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: users/[email protected] </p></td>
+ </tr>
+
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>plan</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The plan associated with the issue.
+Can be empty.
+Format: projects/{project}/plans/{plan} </p></td>
+ </tr>
+
+ <tr>
+ <td>role_grant</td>
+ <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td>
+ <td></td>
+ <td><p>Used if the issue type is ROLE_GRANT. </p></td>
+ </tr>
+
+ <tr>
+ <td>risk_level</td>
+ <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>
+ <td></td>
+ <td><p>The risk level of the issue. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The indexes is the list of indexes in a table. </p></td>
+ <td><p>Labels attached to the issue for categorization and filtering. </p></td>
</tr>
<tr>
- <td>skip_dump</td>
+ <td>approval_status</td>
+ <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
+ <td></td>
+ <td><p>The overall approval status for the issue. </p></td>
+ </tr>
+
+ <tr>
+ <td>access_grant</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The access grant associated with this issue.
+Format: projects/{project}/accessGrants/{access_grant} </p></td>
+ </tr>
+
+ <tr>
+ <td>draft</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether this issue is a Draft Review Issue. </p></td>
</tr>
</tbody>
@@ -11364,8 +10475,8 @@ view. </p></td>
- <h3 id="bytebase.v1.PackageMetadata">PackageMetadata</h3>
- <p>PackageMetadata is the metadata for packages.</p>
+ <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>
+ <p>Approvers and their approval status for the issue.</p>
<table class="field-table">
@@ -11375,17 +10486,17 @@ view. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>
<td></td>
- <td><p>The name is the name of a package. </p></td>
+ <td><p>The new status. </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>principal</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a package. </p></td>
+ <td><p>Format: users/[email protected] </p></td>
</tr>
</tbody>
@@ -11395,8 +10506,8 @@ view. </p></td>
- <h3 id="bytebase.v1.ProcedureMetadata">ProcedureMetadata</h3>
- <p>ProcedureMetadata is the metadata for procedures.</p>
+ <h3 id="bytebase.v1.IssueComment">IssueComment</h3>
+ <p>A comment on an issue.</p>
<table class="field-table">
@@ -11409,64 +10520,70 @@ view. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a procedure. </p></td>
+ <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a procedure. </p></td>
+ <td><p>The text content of the comment. </p></td>
</tr>
<tr>
- <td>signature</td>
+ <td>payload</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The signature is the name with the number and type of input arguments the
-procedure takes. </p></td>
+ <td><p>TODO: use struct message instead. </p></td>
</tr>
<tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>MySQL specific metadata. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>collation_connection</td>
- <td><a href="#string">string</a></td>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>database_collation</td>
+ <td>creator</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Format: users/{email} </p></td>
</tr>
<tr>
- <td>sql_mode</td>
- <td><a href="#string">string</a></td>
+ <td>approval</td>
+ <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Approval event. </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>issue_update</td>
+ <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td>
<td></td>
- <td><p>The comment is the comment of a procedure. </p></td>
+ <td><p>Issue update event. </p></td>
</tr>
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>plan_update</td>
+ <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Plan update event. </p></td>
+ </tr>
+
+ <tr>
+ <td>review_submission</td>
+ <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td>
+ <td></td>
+ <td><p>Review submission event. </p></td>
</tr>
</tbody>
@@ -11476,8 +10593,8 @@ procedure takes. </p></td>
- <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>
- <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
+ <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>
+ <p>Approval event information.</p>
<table class="field-table">
@@ -11487,127 +10604,166 @@ procedure takes. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td>
<td></td>
- <td><p>The name is the schema name.
-It is an empty string for databases without such concept such as MySQL. </p></td>
- </tr>
-
- <tr>
- <td>tables</td>
- <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
- <td>repeated</td>
- <td><p>The tables is the list of tables in a schema. </p></td>
- </tr>
-
- <tr>
- <td>external_tables</td>
- <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>
- <td>repeated</td>
- <td><p>The external_tables is the list of external tables in a schema. </p></td>
+ <td><p>The approval status. </p></td>
</tr>
- <tr>
- <td>views</td>
- <td><a href="#bytebase.v1.ViewMetadata">ViewMetadata</a></td>
- <td>repeated</td>
- <td><p>The views is the list of views in a schema. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>
+ <p>Issue update event information.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>functions</td>
- <td><a href="#bytebase.v1.FunctionMetadata">FunctionMetadata</a></td>
- <td>repeated</td>
- <td><p>The functions is the list of functions in a schema. </p></td>
+ <td>from_title</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>procedures</td>
- <td><a href="#bytebase.v1.ProcedureMetadata">ProcedureMetadata</a></td>
- <td>repeated</td>
- <td><p>The procedures is the list of procedures in a schema. </p></td>
+ <td>to_title</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>streams</td>
- <td><a href="#bytebase.v1.StreamMetadata">StreamMetadata</a></td>
- <td>repeated</td>
- <td><p>The streams is the list of streams in a schema, currently, only used for
-Snowflake. </p></td>
+ <td>from_description</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>tasks</td>
- <td><a href="#bytebase.v1.TaskMetadata">TaskMetadata</a></td>
- <td>repeated</td>
- <td><p>The routines is the list of routines in a schema, currently, only used for
-Snowflake. </p></td>
+ <td>to_description</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>materialized_views</td>
- <td><a href="#bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</a></td>
- <td>repeated</td>
- <td><p>The materialized_views is the list of materialized views in a schema. </p></td>
+ <td>from_status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>packages</td>
- <td><a href="#bytebase.v1.PackageMetadata">PackageMetadata</a></td>
- <td>repeated</td>
- <td><p>The packages is the list of packages in a schema. </p></td>
+ <td>to_status</td>
+ <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
+ <td>optional</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>from_labels</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the schema. </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sequences</td>
- <td><a href="#bytebase.v1.SequenceMetadata">SequenceMetadata</a></td>
+ <td>to_labels</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>The sequences is the list of sequences in a schema, sorted by name. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</h3>
+ <p>Plan update event information (snapshot of plan.config.specs before</p><p>and after a PlanService.UpdatePlan call that mutated specs).</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>events</td>
- <td><a href="#bytebase.v1.EventMetadata">EventMetadata</a></td>
+ <td>from_specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
<td>repeated</td>
- <td><p>The events is the list of scheduled events in a schema. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>enum_types</td>
- <td><a href="#bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</a></td>
+ <td>to_specs</td>
+ <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
<td>repeated</td>
- <td><p>The enum_types is the list of user-defined enum types in a schema. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3>
+ <p>Review submission event information.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to skip this schema during schema dump operations. </p></td>
+ <td><p>Format: projects/{projects}/issues/{issue} </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The comment is the comment of a schema. </p></td>
+ <td><p>The maximum number of issue comments to return. The service may return fewer than
+this value.
+If unspecified, at most 10 issue comments will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>composite_types</td>
- <td><a href="#bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</a></td>
- <td>repeated</td>
- <td><p>The composite_types is the list of user-defined composite types in a
-schema (PostgreSQL family, CREATE TYPE ... AS). Excludes table/view row
-types and derived types. </p></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListIssueComments` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListIssueComments` must match
+the call that provided the page token. </p></td>
</tr>
</tbody>
@@ -11617,7 +10773,7 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.SequenceMetadata">SequenceMetadata</h3>
+ <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>
<p></p>
@@ -11628,94 +10784,174 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of a sequence. </p></td>
+ <td>issue_comments</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td>repeated</td>
+ <td><p>The issue comments from the specified request. </p></td>
</tr>
<tr>
- <td>data_type</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data type of a sequence. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>start</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The start value of a sequence. </p></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>min_value</td>
- <td><a href="#string">string</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The minimum value of a sequence. </p></td>
+ <td><p>The maximum number of issues to return. The service may return fewer than
+this value.
+If unspecified, at most 10 issues will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>max_value</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum value of a sequence. </p></td>
+ <td><p>A page token, received from a previous `ListIssues` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListIssues` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>increment</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Increment value of a sequence. </p></td>
+ <td><p>Filter is used to filter issues returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- creator: issue creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
+- status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values.
+- create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+- type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values.
+- labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator.
+- risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values.
+- approval_status: issue approval status, support &#34;==&#34; operator.
+- current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
+
+For example:
+creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;]
+status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34;
+labels in [&#34;label1&#34;, &#34;label2&#34;]
+risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;]
+create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; </p></td>
</tr>
<tr>
- <td>cycle</td>
- <td><a href="#bool">bool</a></td>
+ <td>query</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Cycle is whether the sequence cycles. </p></td>
+ <td><p>Query is the query statement. </p></td>
</tr>
<tr>
- <td>cache_size</td>
+ <td>order_by</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Cache size of a sequence. </p></td>
+ <td><p>The order by of issues.
+Support:
+- create_time
+- update_time
+The default sorting order is ascending.
+For example:
+- order_by = &#34;create_time desc&#34;
+- order_by = &#34;update_time asc&#34; </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>last_value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Last value of a sequence. </p></td>
+ <td>issues</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>repeated</td>
+ <td><p>The issues from the specified request. </p></td>
</tr>
<tr>
- <td>owner_table</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner table of the sequence. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>owner_column</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner column of the sequence. </p></td>
+ <td><p>The name of the issue to add a rejection.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
<td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment describing the sequence. </p></td>
- </tr>
-
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip this sequence during schema dump operations. </p></td>
+ <td><p>The comment explaining the rejection decision. </p></td>
</tr>
</tbody>
@@ -11725,8 +10961,8 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</h3>
- <p>SpatialIndexConfig defines the spatial index configuration for spatial databases.</p>
+ <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3>
+ <p></p>
<table class="field-table">
@@ -11736,31 +10972,18 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>method</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) </p></td>
- </tr>
-
- <tr>
- <td>tessellation</td>
- <td><a href="#bytebase.v1.TessellationConfig">TessellationConfig</a></td>
- <td></td>
- <td><p>Tessellation configuration for grid-based spatial indexes </p></td>
- </tr>
-
- <tr>
- <td>storage</td>
- <td><a href="#bytebase.v1.StorageConfig">StorageConfig</a></td>
- <td></td>
- <td><p>Storage and performance configuration </p></td>
+ <td><p>The name of the issue to request a issue.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>dimensional</td>
- <td><a href="#bytebase.v1.DimensionalConfig">DimensionalConfig</a></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Dimensional configuration </p></td>
+ <td><p>The comment explaining the request. </p></td>
</tr>
</tbody>
@@ -11770,8 +10993,8 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.StorageConfig">StorageConfig</h3>
- <p>StorageConfig defines storage and performance parameters for spatial indexes.</p>
+ <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>
+ <p></p>
<table class="field-table">
@@ -11781,101 +11004,134 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>fillfactor</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Fill factor percentage (1-100) </p></td>
- </tr>
-
- <tr>
- <td>buffering</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Buffering mode for PostgreSQL (auto, on, off) </p></td>
+ <td><p>The name of the issue whose approval-finding should be retried.
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>tablespace</td>
+ <td>role</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Tablespace configuration for Oracle </p></td>
+ <td><p>The requested role.
+Format: roles/EXPORTER. </p></td>
</tr>
<tr>
- <td>work_tablespace</td>
+ <td>user</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The user to be granted.
+Format: users/{email}. </p></td>
</tr>
<tr>
- <td>sdo_level</td>
- <td><a href="#int32">int32</a></td>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>
</tr>
<tr>
- <td>commit_interval</td>
- <td><a href="#int32">int32</a></td>
+ <td>expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The duration for which the grant is valid. </p></td>
</tr>
- <tr>
- <td>pad_index</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>SQL Server specific parameters </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>sort_in_tempdb</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>ON, OFF </p></td>
- </tr>
-
- <tr>
- <td>drop_existing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The parent, which owns this collection of issues.
+Format: projects/{project}
+Use &#34;projects/-&#34; to list all issues from all projects. </p></td>
</tr>
<tr>
- <td>online</td>
- <td><a href="#bool">bool</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The maximum number of issues to return. The service may return fewer than
+this value.
+If unspecified, at most 10 issues will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>allow_row_locks</td>
- <td><a href="#bool">bool</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `SearchIssues` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `SearchIssues` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>allow_page_locks</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Filter is used to filter issues returned in the list.
+Check the filter field in the ListIssuesRequest message. </p></td>
</tr>
<tr>
- <td>maxdop</td>
- <td><a href="#int32">int32</a></td>
+ <td>query</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Query is the query statement. </p></td>
</tr>
<tr>
- <td>data_compression</td>
+ <td>order_by</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>NONE, ROW, PAGE </p></td>
+ <td><p>The order by of issues.
+Support:
+- create_time
+- update_time
+The default sorting order is ascending.
+For example:
+- order_by = &#34;create_time desc&#34;
+- order_by = &#34;update_time asc&#34; </p></td>
</tr>
</tbody>
@@ -11885,7 +11141,7 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.StreamMetadata">StreamMetadata</h3>
+ <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>
<p></p>
@@ -11896,59 +11152,65 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a stream. </p></td>
+ <td>issues</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>repeated</td>
+ <td><p>The issues from the specified request. </p></td>
</tr>
<tr>
- <td>table_name</td>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
- <tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the stream. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>comment</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment of the stream. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</a></td>
- <td></td>
- <td><p>The type of the stream. </p></td>
+ <td><p>The issue name
+Format: projects/{project}/issues/{issue} </p></td>
</tr>
<tr>
- <td>stale</td>
- <td><a href="#bool">bool</a></td>
+ <td>issue_comment</td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
<td></td>
- <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>
+ <td><p>The comment to update. </p></td>
</tr>
<tr>
- <td>mode</td>
- <td><a href="#bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>The mode of the stream. </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The definition of the stream. </p></td>
+ <td><p>If set to true, and the issue comment is not found, a new issue comment will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -11958,7 +11220,7 @@ types and derived types. </p></td>
- <h3 id="bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</h3>
+ <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3>
<p></p>
@@ -11969,11 +11231,28 @@ types and derived types. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>issue</td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td></td>
+ <td><p>The issue to update.
+
+The issue&#39;s `name` field is used to identify the issue to update.
+Format: projects/{project}/issues/{issue} </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p>The name of the database to sync.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the issue is not found, a new issue will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -11983,181 +11262,404 @@ Format: instances/{instance}/databases/{database} </p></td>
- <h3 id="bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</h3>
- <p></p>
-
+
+ <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>
+ <p>The approval status of an approver.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified status.</p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p>Awaiting approval.</p></td>
+ </tr>
+
+ <tr>
+ <td>APPROVED</td>
+ <td>2</td>
+ <td><p>Approved.</p></td>
+ </tr>
+
+ <tr>
+ <td>REJECTED</td>
+ <td>3</td>
+ <td><p>Rejected.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.Issue.Type">Issue.Type</h3>
+ <p>The type of issue.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified issue type.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_CHANGE</td>
+ <td>1</td>
+ <td><p>Database schema or data change.</p></td>
+ </tr>
+
+ <tr>
+ <td>ROLE_GRANT</td>
+ <td>2</td>
+ <td><p>Role grant request.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_EXPORT</td>
+ <td>3</td>
+ <td><p>Database data export request.</p></td>
+ </tr>
+
+ <tr>
+ <td>ACCESS_GRANT</td>
+ <td>4</td>
+ <td><p>Temporary access grant request.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>
+ <p>Approval status values.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified status.</p></td>
+ </tr>
+
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p>Approval pending.</p></td>
+ </tr>
+
+ <tr>
+ <td>APPROVED</td>
+ <td>2</td>
+ <td><p>Approved.</p></td>
+ </tr>
+
+ <tr>
+ <td>REJECTED</td>
+ <td>3</td>
+ <td><p>Rejected.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
-
- <h3 id="bytebase.v1.TableMetadata">TableMetadata</h3>
- <p>TableMetadata is the metadata for tables.</p>
+
+
+ <h3 id="bytebase.v1.IssueService">IssueService</h3>
+ <p>IssueService manages issues for tracking database changes and tasks.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetIssue</td>
+ <td><a href="#bytebase.v1.GetIssueRequest">GetIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Retrieves an issue by name.
+Permissions required: bb.issues.get</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIssue</td>
+ <td><a href="#bytebase.v1.CreateIssueRequest">CreateIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Creates a new issue for database changes or tasks.
+Permissions required: bb.issues.create</p></td>
+ </tr>
+
+ <tr>
+ <td>ListIssues</td>
+ <td><a href="#bytebase.v1.ListIssuesRequest">ListIssuesRequest</a></td>
+ <td><a href="#bytebase.v1.ListIssuesResponse">ListIssuesResponse</a></td>
+ <td><p>Lists issues in a project.
+Permissions required: bb.issues.list</p></td>
+ </tr>
+
+ <tr>
+ <td>SearchIssues</td>
+ <td><a href="#bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</a></td>
+ <td><a href="#bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</a></td>
+ <td><p>Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query.
+Permissions required: bb.issues.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIssue</td>
+ <td><a href="#bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Updates an issue&#39;s properties such as title, description, or labels.
+Permissions required: bb.issues.update</p></td>
+ </tr>
+
+ <tr>
+ <td>ListIssueComments</td>
+ <td><a href="#bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</a></td>
+ <td><a href="#bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</a></td>
+ <td><p>Lists comments on an issue.
+Permissions required: bb.issueComments.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateIssueComment</td>
+ <td><a href="#bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</a></td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td><p>Adds a comment to an issue.
+Permissions required: bb.issueComments.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateIssueComment</td>
+ <td><a href="#bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</a></td>
+ <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td><p>Updates an existing issue comment.
+Permissions required: bb.issueComments.update</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchUpdateIssuesStatus</td>
+ <td><a href="#bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</a></td>
+ <td><a href="#bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</a></td>
+ <td><p>Updates the status of multiple issues in a single operation.
+Permissions required: bb.issues.update</p></td>
+ </tr>
+
+ <tr>
+ <td>ApproveIssue</td>
+ <td><a href="#bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
+Permissions required: None (determined by approval flow)</p></td>
+ </tr>
+
+ <tr>
+ <td>RejectIssue</td>
+ <td><a href="#bytebase.v1.RejectIssueRequest">RejectIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
+Permissions required: None (determined by approval flow)</p></td>
+ </tr>
+
+ <tr>
+ <td>RequestIssue</td>
+ <td><a href="#bytebase.v1.RequestIssueRequest">RequestIssueRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
+Permissions required: None (determined by approval flow)</p></td>
+ </tr>
+
+ <tr>
+ <td>RetryIssueApproval</td>
+ <td><a href="#bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</a></td>
+ <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td><p>Re-runs approval-template finding for an issue stuck in CHECKING.
+Useful when the synchronous post-create finding errored (e.g. against
+a malformed workspace approval rule) and the operator has since
+corrected it — without this, the issue would remain in CHECKING
+indefinitely because there is no other retry path for non-DATABASE_CHANGE
+issue types. Idempotent: returns the existing issue unchanged when
+approval-finding has already completed.
+Permissions required: None (caller must be the issue creator;
+mirrors RequestIssue&#39;s authorization model).</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a table. </p></td>
- </tr>
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
- </tr>
+ <tr>
+ <td>GetIssue</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/issues/*}</td>
+ <td></td>
+ </tr>
- <tr>
- <td>indexes</td>
- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
- <td>repeated</td>
- <td><p>The indexes is the list of indexes in a table. </p></td>
- </tr>
+
- <tr>
- <td>engine</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The engine is the engine of a table. </p></td>
- </tr>
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The collation is the collation of a table. </p></td>
- </tr>
+ <tr>
+ <td>CreateIssue</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/issues</td>
+ <td>issue</td>
+ </tr>
- <tr>
- <td>charset</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The character set of table. </p></td>
- </tr>
+
- <tr>
- <td>row_count</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The row_count is the estimated number of rows of a table. </p></td>
- </tr>
- <tr>
- <td>data_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The data_size is the estimated data size of a table. </p></td>
- </tr>
+ <tr>
+ <td>ListIssues</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/issues</td>
+ <td></td>
+ </tr>
- <tr>
- <td>index_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The index_size is the estimated index size of a table. </p></td>
- </tr>
+
- <tr>
- <td>data_free</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The data_free is the estimated free data size of a table. </p></td>
- </tr>
- <tr>
- <td>create_options</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The create_options is the create option of a table. </p></td>
- </tr>
+ <tr>
+ <td>SearchIssues</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/issues:search</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment is the comment of a table. </p></td>
- </tr>
+
- <tr>
- <td>foreign_keys</td>
- <td><a href="#bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</a></td>
- <td>repeated</td>
- <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>
- </tr>
- <tr>
- <td>partitions</td>
- <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
- <td>repeated</td>
- <td><p>The partitions is the list of partitions in a table. </p></td>
- </tr>
+ <tr>
+ <td>UpdateIssue</td>
+ <td>PATCH</td>
+ <td>/v1/{issue.name=projects/*/issues/*}</td>
+ <td>issue</td>
+ </tr>
- <tr>
- <td>check_constraints</td>
- <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
- <td>repeated</td>
- <td><p>The check_constraints is the list of check constraints in a table. </p></td>
- </tr>
+
- <tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the table. </p></td>
- </tr>
- <tr>
- <td>sorting_keys</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.
-Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by </p></td>
- </tr>
+ <tr>
+ <td>ListIssueComments</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*/issues/*}/issueComments</td>
+ <td></td>
+ </tr>
- <tr>
- <td>triggers</td>
- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
- <td>repeated</td>
- <td><p>The triggers is the list of triggers associated with the table. </p></td>
- </tr>
+
- <tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip this table during schema dump operations. </p></td>
- </tr>
- <tr>
- <td>sharding_info</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>https://docs.pingcap.com/tidb/stable/information-schema-tables/ </p></td>
- </tr>
+ <tr>
+ <td>CreateIssueComment</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*/issues/*}:comment</td>
+ <td>issue_comment</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateIssueComment</td>
+ <td>PATCH</td>
+ <td>/v1/{parent=projects/*/issues/*}:comment</td>
+ <td>issue_comment</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchUpdateIssuesStatus</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ApproveIssue</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:approve</td>
+ <td>*</td>
+ </tr>
+
+
- <tr>
- <td>primary_key_type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes
-CLUSTERED or NONCLUSTERED. </p></td>
- </tr>
+ <tr>
+ <td>RejectIssue</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:reject</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RequestIssue</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:request</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RetryIssueApproval</td>
+ <td>POST</td>
+ <td>/v1/{name=projects/*/issues/*}:retryApproval</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
-
- <h3 id="bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</h3>
- <p>TablePartitionMetadata is the metadata for table partitions.</p>
+ <h3 id="bytebase.v1.AISetting">AISetting</h3>
+ <p></p>
<table class="field-table">
@@ -12167,77 +11669,44 @@ CLUSTERED or NONCLUSTERED. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The name is the name of a table partition. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>
+ <td>provider</td>
+ <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>
<td></td>
- <td><p>The type of a table partition. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>expression</td>
+ <td>endpoint</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The expression is the expression of a table partition.
-For PostgreSQL, the expression is the text of {FOR VALUES
-partition_bound_spec}, see
-https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,
-the expression is the `expr` or `column_list` of the following syntax.
-PARTITION BY
- { [LINEAR] HASH(expr)
- | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)
- | RANGE{(expr) | COLUMNS(column_list)}
- | LIST{(expr) | COLUMNS(column_list)} }. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>api_key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The value is the value of a table partition.
-For MySQL, the value is for RANGE and LIST partition types,
-- For a RANGE partition, it contains the value set in the partition&#39;s
-VALUES LESS THAN clause, which can be either an integer or MAXVALUE.
-- For a LIST partition, this column contains the values defined in the
-partition&#39;s VALUES IN clause, which is a list of comma-separated integer
-values.
-- For others, it&#39;s an empty string. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>use_default</td>
+ <td>model</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The use_default is whether the users use the default partition, it stores
-the different value for different database engines. For MySQL, it&#39;s [INT]
-type, 0 means not use default partition, otherwise, it&#39;s equals to number
-in syntax [SUB]PARTITION {number}. </p></td>
- </tr>
-
- <tr>
- <td>subpartitions</td>
- <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
- <td>repeated</td>
- <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>
- </tr>
-
- <tr>
- <td>indexes</td>
- <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
- <td>repeated</td>
<td><p> </p></td>
</tr>
<tr>
- <td>check_constraints</td>
- <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
- <td>repeated</td>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -12248,7 +11717,7 @@ in syntax [SUB]PARTITION {number}. </p></td>
- <h3 id="bytebase.v1.TaskMetadata">TaskMetadata</h3>
+ <h3 id="bytebase.v1.Algorithm">Algorithm</h3>
<p></p>
@@ -12259,74 +11728,31 @@ in syntax [SUB]PARTITION {number}. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a task. </p></td>
- </tr>
-
- <tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The id is the snowflake-generated id of a task.
-Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
- </tr>
-
- <tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the task. </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment of the task. </p></td>
- </tr>
-
- <tr>
- <td>warehouse</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The warehouse of the task. </p></td>
- </tr>
-
- <tr>
- <td>schedule</td>
- <td><a href="#string">string</a></td>
+ <td>full_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>
<td></td>
- <td><p>The schedule interval of the task. </p></td>
- </tr>
-
- <tr>
- <td>predecessors</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The predecessor tasks of the task. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>state</td>
- <td><a href="#bytebase.v1.TaskMetadata.State">TaskMetadata.State</a></td>
+ <td>range_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
<td></td>
- <td><p>The state of the task. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#string">string</a></td>
+ <td>md5_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
<td></td>
- <td><p>The condition of the task. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
+ <td>inner_outer_mask</td>
+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
<td></td>
- <td><p>The definition of the task. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -12336,8 +11762,8 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
- <h3 id="bytebase.v1.TessellationConfig">TessellationConfig</h3>
- <p>TessellationConfig defines tessellation parameters for spatial indexes.</p>
+ <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>
+ <p></p>
<table class="field-table">
@@ -12347,31 +11773,11 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
<tbody>
<tr>
- <td>scheme</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) </p></td>
- </tr>
-
- <tr>
- <td>grid_levels</td>
- <td><a href="#bytebase.v1.GridLevel">GridLevel</a></td>
- <td>repeated</td>
- <td><p>Grid levels and densities for multi-level tessellation </p></td>
- </tr>
-
- <tr>
- <td>cells_per_object</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Number of cells per object (1-8192 for SQL Server) </p></td>
- </tr>
-
- <tr>
- <td>bounding_box</td>
- <td><a href="#bytebase.v1.BoundingBox">BoundingBox</a></td>
- <td></td>
- <td><p>Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) </p></td>
+ <td><p>substitution is the string used to replace the original value, the
+max length of the string is 16 bytes. </p></td>
</tr>
</tbody>
@@ -12381,7 +11787,7 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
- <h3 id="bytebase.v1.TriggerMetadata">TriggerMetadata</h3>
+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
<p></p>
@@ -12392,67 +11798,80 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of the trigger. </p></td>
- </tr>
-
- <tr>
- <td>event</td>
- <td><a href="#string">string</a></td>
+ <td>prefix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,
-TRUNCATE. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>timing</td>
- <td><a href="#string">string</a></td>
+ <td>suffix_len</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>body</td>
- <td><a href="#string">string</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
<td></td>
- <td><p>The body is the body of the trigger. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sql_mode</td>
+ <td>substitution</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SQL mode setting for the trigger. </p></td>
+ <td><p> </p></td>
</tr>
- <tr>
- <td>character_set_client</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The character set used by the client creating the trigger. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>collation_connection</td>
+ <td>salt</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The collation used for the connection when creating the trigger. </p></td>
+ <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
</tr>
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment describing the trigger. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether to skip this trigger during schema dump operations. </p></td>
+ <td>slices</td>
+ <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
+ <td>repeated</td>
+ <td><p>We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.
+But frontend can be started with a single rule easily. </p></td>
</tr>
</tbody>
@@ -12462,7 +11881,7 @@ TRUNCATE. </p></td>
- <h3 id="bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</h3>
+ <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
<p></p>
@@ -12473,28 +11892,27 @@ TRUNCATE. </p></td>
<tbody>
<tr>
- <td>database</td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td>start</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The database to update.
-
-The database&#39;s `name` field is used to identify the database to update.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>start is the start character index (0-based) of the original value, should be less than end.
+Uses character indices (not byte offsets) for display-oriented masking.
+Example: For &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>end</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>end is the end character index (exclusive) of the original value.
+Uses character indices (not byte offsets) for display-oriented masking. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>substitution</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the database is not found, a new database will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>
</tr>
</tbody>
@@ -12504,8 +11922,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.ViewMetadata">ViewMetadata</h3>
- <p>ViewMetadata is the metadata for views.</p>
+ <h3 id="bytebase.v1.Announcement">Announcement</h3>
+ <p></p>
<table class="field-table">
@@ -12515,50 +11933,54 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>text</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a view. </p></td>
+ <td><p>The text of announcement </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>link</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a view. </p></td>
+ <td><p>The optional link, user can follow the link to check extra details </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
+ <td>theme</td>
+ <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>
<td></td>
- <td><p>The comment is the comment of a view. </p></td>
- </tr>
-
- <tr>
- <td>dependency_columns</td>
- <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
- <td>repeated</td>
- <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>
+ <td><p>Banner colors. Built-in presets (info/warning/critical) are a
+frontend-only concept that seeds these colors; the store only holds them. </p></td>
</tr>
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>triggers</td>
- <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
- <td>repeated</td>
- <td><p>The triggers is the list of triggers in a view. </p></td>
+ <td>background</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>skip_dump</td>
- <td><a href="#bool">bool</a></td>
+ <td>text</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -12570,629 +11992,595 @@ In this situation, `update_mask` is ignored. </p></td>
-
-
- <h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>IDENTITY_GENERATION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ALWAYS</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>BY_DEFAULT</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>VIRTUAL</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STORED</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</h3>
- <p>SDLFormat specifies the output format for SDL schema.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SDL_FORMAT_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified format. Defaults to SINGLE_FILE.</p></td>
- </tr>
-
- <tr>
- <td>SINGLE_FILE</td>
- <td>1</td>
- <td><p>Single file format: returns the complete SDL schema as a single file.</p></td>
- </tr>
-
- <tr>
- <td>MULTI_FILE</td>
- <td>2</td>
- <td><p>Multi-file format: returns the SDL schema as a ZIP archive containing
-multiple files organized by schema objects (tables, views, functions, etc.).</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>
+ <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>OBJECT_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DATABASE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SCHEMA</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>TABLE</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>VIEW</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MATERIALIZED_VIEW</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FUNCTION</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PROCEDURE</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SEQUENCE</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>settings</td>
+ <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3>
+ <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DEFAULT</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>APPEND_ONLY</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>INSERT_ONLY</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>robot_code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</h3>
+ <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DELTA</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.SyncStatus">SyncStatus</h3>
- <p>SyncStatus is the status of the database sync operation.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SYNC_STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OK</td>
- <td>1</td>
- <td><p>The database was synced successfully.</p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>2</td>
- <td><p>The database sync failed.</p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>app_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>
- <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RANGE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RANGE_COLUMNS</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LIST</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LIST_COLUMNS</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>HASH</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LINEAR_HASH</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>KEY</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LINEAR_KEY</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>slack</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>feishu</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>wecom</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>lark</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>dingtalk</td>
+ <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>teams</td>
+ <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.TaskMetadata.State">TaskMetadata.State</h3>
+ <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STARTED</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SUSPENDED</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>app_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>app_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.DatabaseService">DatabaseService</h3>
- <p>DatabaseService manages databases and their schemas.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetDatabase</td>
- <td><a href="#bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td><p>Retrieves a database by name.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>BatchGetDatabases</td>
- <td><a href="#bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</a></td>
- <td><p>Retrieves multiple databases by their names.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>ListDatabases</td>
- <td><a href="#bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</a></td>
- <td><p>Lists databases in a project, instance, or workspace.
-Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)</p></td>
- </tr>
-
- <tr>
- <td>UpdateDatabase</td>
- <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.Database">Database</a></td>
- <td><p>Updates database properties such as labels and project assignment.
-Permissions required: bb.databases.update</p></td>
- </tr>
-
- <tr>
- <td>BatchUpdateDatabases</td>
- <td><a href="#bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</a></td>
- <td><p>Updates multiple databases in a single batch operation.
-Permissions required: bb.databases.update</p></td>
- </tr>
-
- <tr>
- <td>SyncDatabase</td>
- <td><a href="#bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</a></td>
- <td><p>Synchronizes database schema from the instance.
-Permissions required: bb.databases.sync</p></td>
- </tr>
-
- <tr>
- <td>BatchSyncDatabases</td>
- <td><a href="#bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</a></td>
- <td><a href="#bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</a></td>
- <td><p>Synchronizes multiple databases in a single batch operation.
-Permissions required: bb.databases.sync</p></td>
- </tr>
-
- <tr>
- <td>GetDatabaseMetadata</td>
- <td><a href="#bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td><p>Retrieves database metadata including tables, columns, and indexes.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- <tr>
- <td>GetDatabaseSchema</td>
- <td><a href="#bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseSchema">DatabaseSchema</a></td>
- <td><p>Retrieves database schema as DDL statements.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- <tr>
- <td>GetDatabaseSDLSchema</td>
- <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</a></td>
- <td><p>Retrieves database schema in SDL (Schema Definition Language) format.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- <tr>
- <td>DiffSchema</td>
- <td><a href="#bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</a></td>
- <td><a href="#bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</a></td>
- <td><p>Compares and generates migration statements between two schemas.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>GetSchemaString</td>
- <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>
- <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>
- <td><p>Generates schema DDL for a database object.
-Permissions required: bb.databases.getSchema</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</h3>
+ <p></p>
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>tenant_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Azure AD tenant ID (Directory ID). </p></td>
+ </tr>
+
+ <tr>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Azure AD application (client) ID. </p></td>
+ </tr>
+
+ <tr>
+ <td>client_secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Azure AD client secret. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
- <h4>Methods with HTTP bindings</h4>
- <table>
+
+
+
+ <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
+ <p></p>
+
+
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>GetDatabase</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchGetDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/databases:batchGet</td>
- <td></td>
- </tr>
-
- <tr>
- <td>BatchGetDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/databases:batchGet</td>
- <td></td>
- </tr>
-
-
+ <tr>
+ <td>corp_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/databases</td>
- <td></td>
- </tr>
+ <tr>
+ <td>agent_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*}/databases</td>
- <td></td>
- </tr>
+ <tr>
+ <td>secret</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>ListDatabases</td>
- <td>GET</td>
- <td>/v1/{parent=workspaces/*}/databases</td>
- <td></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
-
+ <tr>
+ <td>configs</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>UpdateDatabase</td>
- <td>PATCH</td>
- <td>/v1/{database.name=instances/*/databases/*}</td>
- <td>database</td>
- </tr>
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>
+ </tr>
-
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>levels</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
+ <td>repeated</td>
+ <td><p>levels is user defined level list for classification. </p></td>
+ </tr>
- <tr>
- <td>BatchUpdateDatabases</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*}/databases:batchUpdate</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>classification</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>
+ <td>repeated</td>
+ <td><p>classification is the id - DataClassification map.
+The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>SyncDatabase</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:sync</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ </tr>
- <tr>
- <td>BatchSyncDatabases</td>
- <td>POST</td>
- <td>/v1/{parent=instances/*}/databases:batchSync</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>level</td>
+ <td><a href="#int32">int32</a></td>
+ <td>optional</td>
+ <td><p>The sensitivity level. Maps to Level.level. </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>GetDatabaseMetadata</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/metadata}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>level</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The numeric level for ordering. Higher = more sensitive. </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>GetDatabaseSchema</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/schema}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>from</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>from_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetDatabaseSDLSchema</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/sdlSchema}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>smtp</td>
+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>DiffSchema</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:diffSchema</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>port</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>DiffSchema</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>username</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>encryption</td>
+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetSchemaString</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/schemaString}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>authentication</td>
+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
</tbody>
</table>
+
+
-
- <div class="file-heading">
- <h2 id="v1/query_history_service.proto">v1/query_history_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+ <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>environments</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</h3>
+ <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
<p></p>
@@ -13206,8 +12594,39 @@ Permissions required: bb.databases.getSchema</p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the query history to retrieve.
-Format: projects/{project}/queryHistories/{id} </p></td>
+ <td><p>The resource name of the environment.
+Format: environments/{environment}.
+Output only. </p></td>
+ </tr>
+
+ <tr>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource id of the environment.
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display name of the environment. </p></td>
+ </tr>
+
+ <tr>
+ <td>tags</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>color</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -13217,7 +12636,7 @@ Format: projects/{project}/queryHistories/{id} </p></td>
- <h3 id="bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</h3>
+ <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
<p></p>
@@ -13228,46 +12647,65 @@ Format: projects/{project}/queryHistories/{id} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project whose query histories are listed.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list query histories across all projects
-(https://google.aip.dev/159); this requires the bb.queryHistories.list
-permission on the workspace. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum number of histories to return.
-The service may return fewer than this value.
-If unspecified, at most 10 history entries will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>
+ <p>The request message for getting a setting.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>page_token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListQueryHistories` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>The resource name of the setting. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>
+ <p>The response message for getting a setting.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
+ <td>setting</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
<td></td>
- <td><p>Filter is the filter to apply on the list query histories.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- creator: the user full name in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
-
-For example:
-creator == &#34;users/{email}&#34; </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -13277,7 +12715,14 @@ creator == &#34;users/{email}&#34; </p></td>
- <h3 id="bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</h3>
+ <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>
<p></p>
@@ -13288,19 +12733,10 @@ creator == &#34;users/{email}&#34; </p></td>
<tbody>
<tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
+ <td>settings</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
<td>repeated</td>
- <td><p>The list of query histories. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token to retrieve next page of history.
-Pass this value in the page_token field in the subsequent call to
-`ListQueryHistories` method to retrieve the next page of history. </p></td>
+ <td><p>The settings from the specified request. </p></td>
</tr>
</tbody>
@@ -13310,7 +12746,7 @@ Pass this value in the page_token field in the subsequent call to
- <h3 id="bytebase.v1.QueryHistory">QueryHistory</h3>
+ <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>
<p></p>
@@ -13321,60 +12757,85 @@ Pass this value in the page_token field in the subsequent call to
<tbody>
<tr>
- <td>name</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name for the query history.
-Format: projects/{project}/queryHistories/{id} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>database</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The database name to execute the query.
-Format: instances/{instance}/databases/{databaseName} </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>creator</td>
+ <td>monaco_base</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>tokens</td>
+ <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>
+ <td>repeated</td>
+ <td><p>CSS token colors. </p></td>
</tr>
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>error</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>value</td>
+ <td><a href="#google.type.Color">google.type.Color</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.QueryHistory.Type">QueryHistory.Type</a></td>
- <td></td>
+ <td>types</td>
+ <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -13385,7 +12846,7 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
- <h3 id="bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</h3>
+ <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
<p></p>
@@ -13396,55 +12857,38 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project to search query histories in.
-Format: projects/{project}
-The AIP-159 wildcard &#34;projects/-&#34; is not supported; use
-ListQueryHistories for cross-project reads. </p></td>
+ <td><p>id is the uuid for semantic type. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum number of histories to return.
-The service may return fewer than this value.
-If unspecified, at most 10 history entries will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>the title of the semantic type, it should not be empty. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListQueryHistory` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>the description of the semantic type, it can be empty. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>algorithm</td>
+ <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>icon</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is the filter to apply on the search query history
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-- database: the database full name in &#34;instances/{id}/databases/{name}&#34; format, support &#34;==&#34; operator.
-- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
-- type: the type, should be &#34;QUERY&#34; or &#34;EXPORT&#34;, support &#34;==&#34; operator.
-- statement: the SQL statement, support &#34;.contains()&#34; operator.
-
-For example:
-project == &#34;projects/{project}&#34;
-database == &#34;instances/{instance}/databases/{database}&#34;
-instance == &#34;instances/{instance}&#34;
-type == &#34;QUERY&#34;
-type == &#34;EXPORT&#34;
-statement.contains(&#34;select&#34;)
-type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td>
+ <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
</tr>
</tbody>
@@ -13454,8 +12898,8 @@ type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td
- <h3 id="bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.Setting">Setting</h3>
+ <p>The schema of setting.</p>
<table class="field-table">
@@ -13465,156 +12909,102 @@ type == &#34;QUERY&#34; &amp;&amp; statement.contains(&#34;select&#34;) </p></td
<tbody>
<tr>
- <td>query_histories</td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td>repeated</td>
- <td><p>The list of history. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token to retrieve next page of history.
-Pass this value in the page_token field in the subsequent call to
-`ListQueryHistory` method to retrieve the next page of history. </p></td>
+ <td><p>The resource name of the setting.
+Format: settings/{setting}
+Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.QueryHistory.Type">QueryHistory.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified query history type.</p></td>
- </tr>
-
- <tr>
- <td>QUERY</td>
- <td>1</td>
- <td><p>Query execution for data retrieval.</p></td>
- </tr>
-
- <tr>
- <td>EXPORT</td>
- <td>2</td>
- <td><p>Data export operation to file.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryHistoryService">QueryHistoryService</h3>
- <p>QueryHistoryService manages query history records of SQL Editor queries and exports.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>SearchQueryHistories searches query histories for the caller.
-Permissions required: None (only returns caller&#39;s own query histories)</p></td>
- </tr>
-
- <tr>
- <td>ListQueryHistories</td>
- <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
- <td><p>ListQueryHistories lists query histories of all users in a project.
-Permissions required: bb.queryHistories.list</p></td>
- </tr>
-
- <tr>
- <td>GetQueryHistory</td>
- <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td><p>GetQueryHistory gets a single query history for the caller.
-Permissions required: None (only returns the caller&#39;s own query history)</p></td>
- </tr>
-
- </tbody>
- </table>
+ <tr>
+ <td>value</td>
+ <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>
+ <td></td>
+ <td><p>The configuration value of the setting. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+
+
+
+ <h3 id="bytebase.v1.SettingValue">SettingValue</h3>
+ <p>The data in setting value.</p>
+
+
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>app_im</td>
+ <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>SearchQueryHistories</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/queryHistories:search</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>workspace_profile</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>workspace_approval</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>data_classification</td>
+ <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>ListQueryHistories</td>
- <td>GET</td>
- <td>/v1/{parent=projects/*}/queryHistories</td>
- <td></td>
- </tr>
+ <tr>
+ <td>semantic_type</td>
+ <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ <tr>
+ <td>ai</td>
+ <td><a href="#bytebase.v1.AISetting">AISetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ <tr>
+ <td>environment</td>
+ <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>GetQueryHistory</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/queryHistories/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>email</td>
+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/sql_service.proto">v1/sql_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.AICompletionRequest">AICompletionRequest</h3>
+ <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>
<p></p>
@@ -13625,9 +13015,23 @@ Permissions required: None (only returns the caller&#39;s own query history)</p>
<tbody>
<tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</a></td>
- <td>repeated</td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>email_setting</td>
+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>to</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -13638,7 +13042,7 @@ Permissions required: None (only returns the caller&#39;s own query history)</p>
- <h3 id="bytebase.v1.AICompletionRequest.Message">AICompletionRequest.Message</h3>
+ <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>
<p></p>
@@ -13649,14 +13053,14 @@ Permissions required: None (only returns the caller&#39;s own query history)</p>
<tbody>
<tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
+ <td>success</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>error</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
@@ -13669,8 +13073,8 @@ Permissions required: None (only returns the caller&#39;s own query history)</p>
- <h3 id="bytebase.v1.AICompletionResponse">AICompletionResponse</h3>
- <p></p>
+ <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>
+ <p>The request message for updating or creating a setting.</p>
<table class="field-table">
@@ -13680,11 +13084,32 @@ Permissions required: None (only returns the caller&#39;s own query history)</p>
<tbody>
<tr>
- <td>candidates</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</a></td>
- <td>repeated</td>
- <td><p>candidates is used for results with multiple choices and candidates. Used
-for OpenAI and Gemini. </p></td>
+ <td>setting</td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td></td>
+ <td><p>The setting to update. </p></td>
+ </tr>
+
+ <tr>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>validate_only is a flag to indicate whether to validate the setting value,
+server would not persist the setting value if it is true. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -13694,7 +13119,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate">AICompletionResponse.Candidate</h3>
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
<p></p>
@@ -13705,9 +13130,9 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>content</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</a></td>
- <td></td>
+ <td>rules</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -13718,7 +13143,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content">AICompletionResponse.Candidate.Content</h3>
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
<p></p>
@@ -13729,10 +13154,50 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>parts</td>
- <td><a href="#bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</a></td>
- <td>repeated</td>
- <td><p>parts is used for a result content with multiple parts. </p></td>
+ <td>template</td>
+ <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with the rule.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+The `source` field filters which rules apply. The `condition` field then evaluates with full context.
+
+All supported variables:
+statement.affected_rows: affected row count in the DDL/DML, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
+statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
+resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
+resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values.
+statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
+resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
+request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
+
+When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)
+When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name
+When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role
+When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export
+
+For examples:
+resource.environment_id == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100
+resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; </p></td>
+ </tr>
+
+ <tr>
+ <td>source</td>
+ <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -13742,7 +13207,7 @@ for OpenAI and Gemini. </p></td>
- <h3 id="bytebase.v1.AICompletionResponse.Candidate.Content.Part">AICompletionResponse.Candidate.Content.Part</h3>
+ <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
<p></p>
@@ -13753,218 +13218,189 @@ for OpenAI and Gemini. </p></td>
<tbody>
<tr>
- <td>text</td>
- <td><a href="#string">string</a></td>
+ <td>external_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The external URL is used for sso authentication callback. </p></td>
+ </tr>
+
+ <tr>
+ <td>disallow_signup</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>
+ </tr>
+
+ <tr>
+ <td>require_mfa</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Require MFA for all users. </p></td>
+ </tr>
+
+ <tr>
+ <td>refresh_token_duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The duration for refresh token. Default is 7 days. </p></td>
+ </tr>
+
+ <tr>
+ <td>announcement</td>
+ <td><a href="#bytebase.v1.Announcement">Announcement</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The setting of custom announcement </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>maximum_request_expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The name is the instance name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} </p></td>
+ <td><p>The max expiration duration for data access requests. </p></td>
</tr>
<tr>
- <td>statement</td>
+ <td>domains</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The SQL statement to execute. </p></td>
+ <td>repeated</td>
+ <td><p>The workspace domain, e.g., bytebase.com. </p></td>
</tr>
<tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
+ <td>enforce_identity_domain</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The maximum number of rows to return. </p></td>
+ <td><p>Only user and group from the domains can be created and login. </p></td>
</tr>
<tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to execute the statement. Equals to the current schema
-in Oracle and search path in Postgres. </p></td>
+ <td>database_change_mode</td>
+ <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td></td>
+ <td><p>The workspace database change mode. </p></td>
</tr>
<tr>
- <td>container</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
+ <td>enable_metric_collection</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to enable metric collection for the workspace. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Advice">Advice</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>inactive_session_timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. </p></td>
+ </tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td>enable_audit_log_stdout</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The advice level. </p></td>
+ <td><p>Whether to enable audit logging to stdout in structured JSON format.
+Requires TEAM or ENTERPRISE license. </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
+ <td>watermark</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The advice code. </p></td>
+ <td><p>Whether to display watermark on pages.
+Requires ENTERPRISE license. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>directory_sync_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The advice title. </p></td>
+ <td><p>The token for directory sync authentication. </p></td>
</tr>
<tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
+ <td>password_restriction</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
<td></td>
- <td><p>The advice content. </p></td>
+ <td><p>Password restriction settings. </p></td>
</tr>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>access_token_duration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The start_position is inclusive and the end_position is exclusive.
-TODO: use range instead </p></td>
+ <td><p>The duration for access token. Default is 1 hour. </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>enable_debug</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether debug mode is enabled. </p></td>
</tr>
<tr>
- <td>rule_type</td>
- <td><a href="#bytebase.v1.Advice.RuleType">Advice.RuleType</a></td>
+ <td>sql_result_size</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The type of linting rule that generated this advice. </p></td>
+ <td><p>The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.
+The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>query_timeout</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>
+ </tr>
<tr>
- <td>source_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td>allow_email_code_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The metadata of the source schema. </p></td>
+ <td><p>Allow signin/signup using email &#43; a 6-digit one-time verification code.
+Requires the EMAIL setting to be configured on the workspace. </p></td>
</tr>
<tr>
- <td>target_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td>sql_editor_theme_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The metadata of the target schema. </p></td>
+ <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id
+OR a custom theme&#39;s uuid. Empty ⇒ default light. </p></td>
</tr>
<tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td>sql_editor_custom_theme</td>
+ <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>
<td></td>
- <td><p>The database engine of the schema. </p></td>
+ <td><p>The enforced CUSTOM theme&#39;s full definition — present ONLY when
+sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>maximum_role_expiration</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The max expiration duration for request role.
+Deprecated: use just-in-time access request flows instead. </p></td>
+ </tr>
<tr>
- <td>diff</td>
- <td><a href="#string">string</a></td>
+ <td>mcp_capability</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</a></td>
<td></td>
- <td><p>The diff of the metadata. </p></td>
+ <td><p>The maximum capability available to MCP (Model Context Protocol) sessions in
+this workspace, acting as an admin-set ceiling. Unset is treated as
+READ_WRITE for backward compatibility; DISABLED rejects all MCP
+connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected —
+omit the update mask path to leave the ceiling unset. </p></td>
</tr>
</tbody>
@@ -13974,7 +13410,7 @@ TODO: use range instead </p></td>
- <h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
+ <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>
<p></p>
@@ -13985,69 +13421,52 @@ TODO: use range instead </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the resource name to execute the export against.
-Format: instances/{instance}/databases/{database}
-Format: instances/{instance}
-Format: projects/{project}/plans/{plan}/rollout
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- </tr>
-
- <tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
+ <td>min_length</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The SQL statement to execute. </p></td>
+ <td><p>min_length is the minimum length for password, should no less than 8. </p></td>
</tr>
<tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
+ <td>require_number</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The maximum number of rows to return. </p></td>
+ <td><p>require_number requires the password must contains at least one number. </p></td>
</tr>
<tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td>require_letter</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The export format. </p></td>
+ <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>
</tr>
<tr>
- <td>admin</td>
+ <td>require_uppercase_letter</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The admin is used for workspace owner and DBA for exporting data from SQL
-Editor Admin mode. The exported data is not masked. </p></td>
+ <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>
</tr>
<tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
+ <td>require_special_character</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The zip password provide by users. </p></td>
+ <td><p>require_special_character requires the password must contains at least one special character. </p></td>
</tr>
<tr>
- <td>data_source_id</td>
- <td><a href="#string">string</a></td>
+ <td>require_reset_password_for_first_login</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The id of data source.
-If omitted, Export resolves the data source server-side by using the
-single read-only data source when exactly one exists, or the admin data
-source otherwise. It can also be set explicitly to export from the admin
-data source or a specific read-only data source. </p></td>
+ <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>
</tr>
<tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
+ <td>password_rotation</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>password_rotation requires users to reset their password after the duration. </p></td>
</tr>
</tbody>
@@ -14057,138 +13476,466 @@ Oracle and search path in Postgres. </p></td>
- <h3 id="bytebase.v1.ExportResponse">ExportResponse</h3>
+
+
+ <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>PROVIDER_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OPEN_AI</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CLAUDE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GEMINI</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_OPENAI</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MASK_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>INNER</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OUTER</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PIPELINE</td>
+ <td>1</td>
+ <td><p>A more advanced database change process, including custom approval workflows and other advanced features.
+Default to this mode.</p></td>
+ </tr>
+
+ <tr>
+ <td>EDITOR</td>
+ <td>2</td>
+ <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>AUTHENTICATION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AUTHENTICATION_NONE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PLAIN</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LOGIN</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CRAM_MD5</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ENCRYPTION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENCRYPTION_NONE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STARTTLS</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SSL_TLS</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SMTP</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SETTING_NAME_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_PROFILE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WORKSPACE_APPROVAL</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>APP_IM</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AI</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATA_CLASSIFICATION</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SEMANTIC_TYPES</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>EMAIL</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</h3>
<p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>content</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p>The export file content. </p></td>
- </tr>
-
- <tr>
- <td>applied_access_grant</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The just-in-time access grant applied to this export, if any.
-Format: projects/{project}/accessGrants/{accessGrant}.
-Empty when the user was authorized through normal ACL rather than a grant. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SOURCE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CHANGE_DATABASE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CREATE_DATABASE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>REQUEST_ROLE</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>REQUEST_ACCESS</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</h3>
+ <p>MCPCapability is the maximum capability an MCP (Model Context Protocol)</p><p>session may have in the workspace. It is a ceiling: a session runs at this</p><p>level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing</p><p>workspaces are unaffected.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MCP_CAPABILITY_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DISABLED</td>
+ <td>1</td>
+ <td><p>MCP connections are rejected.</p></td>
+ </tr>
+
+ <tr>
+ <td>READ_ONLY</td>
+ <td>3</td>
+ <td><p>MCP may inspect metadata and run read-only queries. Not enforceable yet:
+until per-tool enforcement ships, this fails closed and refuses all MCP
+connections, the same as DISABLED.</p></td>
+ </tr>
+
+ <tr>
+ <td>READ_WRITE</td>
+ <td>4</td>
+ <td><p>MCP may perform mutations, still bounded by the user&#39;s RBAC.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.MaskingReason">MaskingReason</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>semantic_type_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The semantic type that triggered masking (e.g., &#34;SSN&#34;, &#34;email&#34;, &#34;phone&#34;). </p></td>
- </tr>
-
- <tr>
- <td>semantic_type_title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Human-readable semantic type title. </p></td>
- </tr>
-
- <tr>
- <td>masking_rule_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking rule ID that matched (if applicable). </p></td>
- </tr>
-
- <tr>
- <td>algorithm</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The masking algorithm used. </p></td>
- </tr>
-
- <tr>
- <td>context</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Additional context (e.g., &#34;Matched global rule: PII Protection&#34;). </p></td>
- </tr>
-
- <tr>
- <td>classification_level</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The classification level that triggered masking. </p></td>
- </tr>
-
- <tr>
- <td>semantic_type_icon</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Icon associated with the semantic type (if any). </p></td>
- </tr>
-
- </tbody>
- </table>
-
+
-
- <h3 id="bytebase.v1.QueryOption">QueryOption</h3>
- <p></p>
+ <h3 id="bytebase.v1.SettingService">SettingService</h3>
+ <p>SettingService manages workspace-level settings and configurations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListSettings</td>
+ <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>
+ <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>
+ <td><p>Lists all workspace settings.
+Permissions required: bb.settings.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetSetting</td>
+ <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td><p>Retrieves a workspace setting by name.
+Permissions required: bb.settings.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateSetting</td>
+ <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>
+ <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td><p>Updates a workspace setting.
+Permissions required: bb.settings.set</p></td>
+ </tr>
+
+ <tr>
+ <td>TestEmailSetting</td>
+ <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>
+ <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>
+ <td><p>Sends a test email using the provided config (without persisting).
+Permissions required: bb.settings.set</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>redis_run_commands_on</td>
- <td><a href="#bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>mssql_explain_format</td>
- <td><a href="#bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>ListSettings</td>
+ <td>GET</td>
+ <td>/v1/settings</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetSetting</td>
+ <td>GET</td>
+ <td>/v1/{name=settings/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateSetting</td>
+ <td>PATCH</td>
+ <td>/v1/{setting.name=settings/*}</td>
+ <td>setting</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>TestEmailSetting</td>
+ <td>POST</td>
+ <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>
+ <td>*</td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.QueryRequest">QueryRequest</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.ActuatorInfo">ActuatorInfo</h3>
+ <p>System information and configuration for the Bytebase instance.</p><p>Actuator concept is similar to the Spring Boot Actuator.</p>
<table class="field-table">
@@ -14198,209 +13945,152 @@ Empty when the user was authorized through normal ACL rather than a grant. </p><
<tbody>
<tr>
- <td>name</td>
+ <td>version</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the instance name to execute the query against.
-Format: instances/{instance}/databases/{databaseName} </p></td>
+ <td><p>The Bytebase server version. </p></td>
</tr>
<tr>
- <td>statement</td>
+ <td>git_commit</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The SQL statement to execute. </p></td>
- </tr>
-
- <tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of rows to return. </p></td>
+ <td><p>The git commit hash of the build. </p></td>
</tr>
<tr>
- <td>data_source_id</td>
- <td><a href="#string">string</a></td>
+ <td>readonly</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The id of data source.
-If omitted, Query resolves the data source server-side by using the single
-read-only data source when exactly one exists, or the admin data source
-otherwise. It can also be set explicitly to query the admin data source or
-a specific read-only data source. </p></td>
+ <td><p>Whether the Bytebase instance is running in read-only mode. </p></td>
</tr>
<tr>
- <td>explain</td>
+ <td>saas</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Explain the statement. </p></td>
+ <td><p>Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td>
</tr>
<tr>
- <td>schema</td>
+ <td>host</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The default schema to search objects. Equals to the current schema in
-Oracle and search path in Postgres. </p></td>
- </tr>
-
- <tr>
- <td>query_option</td>
- <td><a href="#bytebase.v1.QueryOption">QueryOption</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The host address of the Bytebase instance. </p></td>
</tr>
<tr>
- <td>container</td>
+ <td>port</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Container is the container name to execute the query against, used for
-CosmosDB only. </p></td>
+ <td></td>
+ <td><p>The port number of the Bytebase instance. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryResponse">QueryResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.QueryResult">QueryResult</a></td>
- <td>repeated</td>
- <td><p>The query results. </p></td>
+ <td>external_url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td>
</tr>
<tr>
- <td>applied_access_grant</td>
- <td><a href="#string">string</a></td>
+ <td>last_active_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The just-in-time access grant applied to this query, if any.
-Format: projects/{project}/accessGrants/{accessGrant}.
-Empty when the user was authorized through normal ACL rather than a grant. </p></td>
+ <td><p>The last time any API call was made, refreshed on each request. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryResult">QueryResult</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>column_names</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Column names of the query result. </p></td>
+ <td></td>
+ <td><p>The unique identifier for the workspace.
+Format: workspaces/{id} </p></td>
</tr>
<tr>
- <td>column_type_names</td>
+ <td>unlicensed_features</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>Column types of the query result.
-The types come from the Golang SQL driver. </p></td>
+ <td><p>List of features that are not licensed. </p></td>
</tr>
<tr>
- <td>rows</td>
- <td><a href="#bytebase.v1.QueryRow">QueryRow</a></td>
- <td>repeated</td>
- <td><p>Rows of the query result. </p></td>
+ <td>docker</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the Bytebase instance is running in Docker. </p></td>
</tr>
<tr>
- <td>rows_count</td>
- <td><a href="#int64">int64</a></td>
+ <td>activated_user_count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The number of activated users. </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>activated_instance_count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The error message if the query failed. </p></td>
+ <td><p>The number of activated database instances. </p></td>
</tr>
<tr>
- <td>latency</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>total_instance_count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The time it takes to execute the query. </p></td>
+ <td><p>The total number of database instances. </p></td>
</tr>
<tr>
- <td>statement</td>
- <td><a href="#string">string</a></td>
+ <td>enable_sample</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The query statement for the result. </p></td>
+ <td><p>Whether sample data setup is enabled. </p></td>
</tr>
<tr>
- <td>postgres_error</td>
- <td><a href="#bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</a></td>
+ <td>external_url_from_flag</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether the external URL is set via command-line flag (and thus cannot be changed via UI). </p></td>
</tr>
<tr>
- <td>syntax_error</td>
- <td><a href="#bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</a></td>
+ <td>replica_count</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The number of active replicas (servers sharing the same database). </p></td>
</tr>
<tr>
- <td>permission_denied</td>
- <td><a href="#bytebase.v1.PermissionDeniedDetail">PermissionDeniedDetail</a></td>
+ <td>restriction</td>
+ <td><a href="#bytebase.v1.Restriction">Restriction</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>command_error</td>
- <td><a href="#bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</a></td>
+ <td>default_project</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The default project for unassigned databases.
+Format: projects/{id} </p></td>
</tr>
<tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.QueryResult.Message">QueryResult.Message</a></td>
- <td>repeated</td>
- <td><p>Informational or debug messages returned by the database engine during query execution.
-Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39;s DBMS_OUTPUT.PUT_LINE. </p></td>
+ <td>user_count_in_iam</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The number of users in the workspace IAM (for seat limit display). </p></td>
</tr>
-
- <tr>
- <td>masked</td>
- <td><a href="#bytebase.v1.MaskingReason">MaskingReason</a></td>
- <td>repeated</td>
- <td><p>Masking reasons for each column (empty for non-masked columns). </p></td>
+
+ <tr>
+ <td>active_vcs_user_count</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The number of active VCS users seen in the active window. </p></td>
</tr>
</tbody>
@@ -14410,32 +14100,15 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.CommandError">QueryResult.CommandError</h3>
- <p>Permission denied with resource information or disallowed command_type.</p><p>Either resources or command_type is available.</p>
+ <h3 id="bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</h3>
+ <p>Request message for deleting cache.</p>
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>command_type</td>
- <td><a href="#bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</a></td>
- <td></td>
- <td><p>Disallowed command_type. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h3 id="bytebase.v1.QueryResult.Message">QueryResult.Message</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>
+ <p>Request message for getting actuator information.</p>
<table class="field-table">
@@ -14445,17 +14118,13 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>level</td>
- <td><a href="#bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>content</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Optional. The workspace to scope the response to.
+Format: workspaces/{workspace}
+When unset, the workspace is resolved from the request context (self-hosted)
+or no workspace-scoped fields are returned (SaaS). </p></td>
</tr>
</tbody>
@@ -14465,8 +14134,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.PostgresError">QueryResult.PostgresError</h3>
- <p>refer https://www.postgresql.org/docs/11/protocol-error-fields.html</p><p>for field description.</p>
+ <h3 id="bytebase.v1.Restriction">Restriction</h3>
+ <p></p>
<table class="field-table">
@@ -14476,122 +14145,198 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>severity</td>
- <td><a href="#string">string</a></td>
+ <td>disallow_signup</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether self-service user signup is disabled. </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#string">string</a></td>
+ <td>disallow_password_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether password-based signin is disabled (except for workspace admins). </p></td>
</tr>
<tr>
- <td>message</td>
- <td><a href="#string">string</a></td>
+ <td>password_restriction</td>
+ <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Password complexity and restriction requirements. </p></td>
</tr>
<tr>
- <td>detail</td>
- <td><a href="#string">string</a></td>
+ <td>allow_email_code_signin</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether email &#43; 6-digit code signin is enabled for this workspace. </p></td>
</tr>
<tr>
- <td>hint</td>
- <td><a href="#string">string</a></td>
+ <td>password_reset_enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether password reset via email is available for this workspace.
+True when the workspace (or deployment) has an email setting configured. </p></td>
</tr>
- <tr>
- <td>position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>
+ <p>Request message for setting up sample data.</p>
+
+
+
+
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>
+ <p>ActuatorService manages system health and operational information.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetActuatorInfo</td>
+ <td><a href="#bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</a></td>
+ <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>
+ <td><p>Gets system information and health status of the Bytebase instance.
+When `name` is provided (or the workspace-scoped binding is used), the
+response includes workspace-scoped fields for that workspace.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>SetupSample</td>
+ <td><a href="#bytebase.v1.SetupSampleRequest">SetupSampleRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Sets up sample data for demonstration and testing purposes.
+Permissions required: bb.projects.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteCache</td>
+ <td><a href="#bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Clears the system cache to force data refresh.
+Permissions required: None</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
- <tr>
- <td>internal_position</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>internal_query</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>GetActuatorInfo</td>
+ <td>GET</td>
+ <td>/v1/actuator/info</td>
+ <td></td>
+ </tr>
- <tr>
- <td>where</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>GetActuatorInfo</td>
+ <td>GET</td>
+ <td>/v1/{name=workspaces/*}/actuator/info</td>
+ <td></td>
+ </tr>
- <tr>
- <td>schema_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
- <tr>
- <td>table_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>column_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>SetupSample</td>
+ <td>POST</td>
+ <td>/v1/actuator:setupSample</td>
+ <td></td>
+ </tr>
- <tr>
- <td>data_type_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+
+
+
+ <tr>
+ <td>DeleteCache</td>
+ <td>DELETE</td>
+ <td>/v1/actuator/cache</td>
+ <td></td>
+ </tr>
+
+
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/ai_service.proto">v1/ai_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AIChatMessage">AIChatMessage</h3>
+ <p>A single message in the conversation.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>constraint_name</td>
- <td><a href="#string">string</a></td>
+ <td>role</td>
+ <td><a href="#bytebase.v1.AIChatMessageRole">AIChatMessageRole</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The role of the message sender. </p></td>
</tr>
<tr>
- <td>file</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The text content of the message. Optional for assistant messages that only contain tool calls. </p></td>
</tr>
<tr>
- <td>line</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>tool_calls</td>
+ <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>
+ <td>repeated</td>
+ <td><p>Tool calls made by the assistant. Only present in assistant messages. </p></td>
</tr>
<tr>
- <td>routine</td>
+ <td>tool_call_id</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>optional</td>
+ <td><p>The ID of the tool call this message is responding to. Only present in tool messages. </p></td>
</tr>
</tbody>
@@ -14601,8 +14346,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.QueryResult.SyntaxError">QueryResult.SyntaxError</h3>
- <p>Syntax error with position information for editor highlighting</p>
+ <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>
+ <p>Request message for AIService.Chat.</p>
<table class="field-table">
@@ -14612,34 +14357,17 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
- <td></td>
- <td><p>Position information for highlighting in editor </p></td>
+ <td>messages</td>
+ <td><a href="#bytebase.v1.AIChatMessage">AIChatMessage</a></td>
+ <td>repeated</td>
+ <td><p>The conversation messages. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.QueryRow">QueryRow</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>values</td>
- <td><a href="#bytebase.v1.RowValue">RowValue</a></td>
+ <td>tool_definitions</td>
+ <td><a href="#bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</a></td>
<td>repeated</td>
- <td><p>Row values of the query result. </p></td>
+ <td><p>The tool definitions available to the AI. </p></td>
</tr>
</tbody>
@@ -14649,8 +14377,8 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
- <h3 id="bytebase.v1.RowValue">RowValue</h3>
- <p></p>
+ <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>
+ <p>Response message for AIService.Chat.</p>
<table class="field-table">
@@ -14660,98 +14388,24 @@ Examples include PostgreSQL&#39;s RAISE NOTICE, MSSQL&#39;s PRINT, or Oracle&#39
<tbody>
<tr>
- <td>null_value</td>
- <td><a href="#google.protobuf.NullValue">google.protobuf.NullValue</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>bool_value</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>bytes_value</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>double_value</td>
- <td><a href="#double">double</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>float_value</td>
- <td><a href="#float">float</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>int32_value</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>int64_value</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>string_value</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>uint32_value</td>
- <td><a href="#uint32">uint32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>uint64_value</td>
- <td><a href="#uint64">uint64</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value_value</td>
- <td><a href="#google.protobuf.Value">google.protobuf.Value</a></td>
- <td></td>
- <td><p>value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only. </p></td>
+ <td>optional</td>
+ <td><p>The text content of the AI response. Optional when the response only contains tool calls. </p></td>
</tr>
<tr>
- <td>timestamp_value</td>
- <td><a href="#bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</a></td>
- <td></td>
- <td><p>timestamp_value is used for the timestamp without time zone data type,
-meaning it only includes the timestamp without any time zone or location
-info. Although it may be expressed as a UTC value, it should be seen as a
-timestamp missing location context. </p></td>
+ <td>tool_calls</td>
+ <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>
+ <td>repeated</td>
+ <td><p>Tool calls the AI wants to make. </p></td>
</tr>
<tr>
- <td>timestamp_tz_value</td>
- <td><a href="#bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</a></td>
- <td></td>
- <td><p>timestamp_tz_value is used for the timestamptz data type, which
-accurately represents the timestamp with location information. </p></td>
+ <td>usage</td>
+ <td><a href="#bytebase.v1.AIChatUsage">AIChatUsage</a></td>
+ <td>optional</td>
+ <td><p>Token usage for this provider call, when available. </p></td>
</tr>
</tbody>
@@ -14761,8 +14415,8 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.Timestamp">RowValue.Timestamp</h3>
- <p></p>
+ <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>
+ <p>A tool call made by the AI.</p>
<table class="field-table">
@@ -14772,17 +14426,32 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The unique ID of this tool call. </p></td>
</tr>
<tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The accuracy is the number of digits after the decimal point. </p></td>
+ <td><p>The name of the tool to call. </p></td>
+ </tr>
+
+ <tr>
+ <td>arguments</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The JSON-encoded arguments to pass to the tool. </p></td>
+ </tr>
+
+ <tr>
+ <td>metadata</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Opaque provider-specific metadata (e.g., Gemini thought_signature).
+Frontend must echo this back unchanged when sending tool results. </p></td>
</tr>
</tbody>
@@ -14792,8 +14461,8 @@ accurately represents the timestamp with location information. </p></td>
- <h3 id="bytebase.v1.RowValue.TimestampTZ">RowValue.TimestampTZ</h3>
- <p></p>
+ <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>
+ <p>A tool definition that the AI can invoke.</p>
<table class="field-table">
@@ -14803,36 +14472,24 @@ accurately represents the timestamp with location information. </p></td>
<tbody>
<tr>
- <td>google_timestamp</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>zone</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Zone is the time zone abbreviations in timezone database such as &#34;PDT&#34;,
-&#34;PST&#34;. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
-retrieve the time zone information from the timestamptz field in the
-database. A timestamp is in UTC or epoch time, and with zone info, we can
-convert it to a local time string. Zone and offset are returned by
-time.Time.Zone() </p></td>
+ <td><p>The name of the tool. </p></td>
</tr>
<tr>
- <td>offset</td>
- <td><a href="#int32">int32</a></td>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The offset is in seconds east of UTC </p></td>
+ <td><p>A description of what the tool does. </p></td>
</tr>
<tr>
- <td>accuracy</td>
- <td><a href="#int32">int32</a></td>
+ <td>parameters_schema</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The JSON Schema describing the tool&#39;s parameters. </p></td>
</tr>
</tbody>
@@ -14842,45 +14499,34 @@ time.Time.Zone() </p></td>
-
-
- <h3 id="bytebase.v1.Advice.Level">Advice.Level</h3>
- <p>Level represents the severity level of the advice.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ADVICE_LEVEL_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified advice level.</p></td>
- </tr>
-
- <tr>
- <td>SUCCESS</td>
- <td>1</td>
- <td><p>Success status indicating the check passed without issues.</p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p>Warning status indicating potential issues that should be reviewed.</p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>3</td>
- <td><p>Error status indicating critical issues that must be addressed.</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>
+ <p>Token usage for a single AI provider call.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>total_tokens</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Total tokens used by the provider call. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.Advice.RuleType">Advice.RuleType</h3>
- <p>RuleType indicates the source of the linting rule.</p>
+
+
+ <h3 id="bytebase.v1.AIChatMessageRole">AIChatMessageRole</h3>
+ <p>Role of a chat message.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -14888,383 +14534,592 @@ time.Time.Zone() </p></td>
<tbody>
<tr>
- <td>RULE_TYPE_UNSPECIFIED</td>
+ <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified rule type.</p></td>
+ <td><p>Unspecified role.</p></td>
</tr>
<tr>
- <td>PARSER_BASED</td>
+ <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td>
<td>1</td>
- <td><p>Parser-based rule enforced by the built-in SQL parser.
-These are non-configurable, mandatory checks for schema health.</p></td>
+ <td><p>System message providing instructions.</p></td>
</tr>
<tr>
- <td>AI_POWERED</td>
+ <td>AI_CHAT_MESSAGE_ROLE_USER</td>
<td>2</td>
- <td><p>AI-powered rule defined by user in natural language.
-These are custom, flexible checks powered by AI models.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.QueryOption.MSSQLExplainFormat">QueryOption.MSSQLExplainFormat</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MSSQL_EXPLAIN_FORMAT_UNSPECIFIED</td>
- <td>0</td>
- <td><p>defaults to SHOWPLAN_ALL</p></td>
+ <td><p>User message.</p></td>
</tr>
<tr>
- <td>MSSQL_EXPLAIN_FORMAT_ALL</td>
- <td>1</td>
- <td><p>SHOWPLAN_ALL</p></td>
+ <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td>
+ <td>3</td>
+ <td><p>Assistant (AI) message.</p></td>
</tr>
<tr>
- <td>MSSQL_EXPLAIN_FORMAT_XML</td>
- <td>2</td>
- <td><p>SHOWPLAN_XML</p></td>
+ <td>AI_CHAT_MESSAGE_ROLE_TOOL</td>
+ <td>4</td>
+ <td><p>Tool result message.</p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.v1.QueryOption.RedisRunCommandsOn">QueryOption.RedisRunCommandsOn</h3>
- <p></p>
+
+
+
+
+ <h3 id="bytebase.v1.AIService">AIService</h3>
+ <p>AIService provides AI chat capabilities for the page agent.</p>
<table class="enum-table">
<thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>REDIS_RUN_COMMANDS_ON_UNSPECIFIED</td>
- <td>0</td>
- <td><p>UNSPECIFIED defaults to SINGLE_NODE.</p></td>
- </tr>
-
- <tr>
- <td>SINGLE_NODE</td>
- <td>1</td>
- <td><p>Execute Redis commands on a single node in the cluster.</p></td>
- </tr>
-
- <tr>
- <td>ALL_NODES</td>
- <td>2</td>
- <td><p>Execute Redis commands on all nodes in the cluster for cluster-wide operations.</p></td>
+ <td>Chat</td>
+ <td><a href="#bytebase.v1.AIChatRequest">AIChatRequest</a></td>
+ <td><a href="#bytebase.v1.AIChatResponse">AIChatResponse</a></td>
+ <td><p>Chat sends a conversation with tool definitions to the configured AI provider
+and returns the AI response.</p></td>
</tr>
</tbody>
</table>
-
- <h3 id="bytebase.v1.QueryResult.CommandError.Type">QueryResult.CommandError.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DDL</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
<tr>
- <td>DML</td>
- <td>2</td>
- <td><p></p></td>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
</tr>
+ </thead>
+ <tbody>
+
+
<tr>
- <td>NON_READ_ONLY</td>
- <td>3</td>
- <td><p></p></td>
+ <td>Chat</td>
+ <td>POST</td>
+ <td>/v1/ai/chat</td>
+ <td>*</td>
</tr>
+
- </tbody>
- </table>
+ </tbody>
+ </table>
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.Binding">Binding</h3>
+ <p>Binding associates members with a role and optional conditions.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>role</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The role that is assigned to the members.
+Format: roles/{role} </p></td>
+ </tr>
+
+ <tr>
+ <td>members</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Specifies the principals requesting access for a Bytebase resource.
+For users, the member should be: user:{email}
+For groups, the member should be: group:{email}
+For service accounts, the member should be: serviceAccount:{email}
+For workload identities, the member should be: workloadIdentity:{email} </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with this binding, only used in the project IAM policy.
+If the condition evaluates to true, then this binding applies to the current request.
+If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Support variables:
+resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by any role with SQL Editor read (e.g. &#34;roles/sqlEditorUser&#34;, &#34;roles/sqlEditorReadUser&#34;) or write (bb.sql.ddl / bb.sql.dml) access, support &#34;==&#34; operator.
+resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator.
+resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator.
+resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support &#34;in&#34; operator.
+request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
+
+Known limitations of table/schema-scoped DDL/DML grants:
+- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.
+- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).
+- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).
+- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session&#39;s default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.
+- A write target in a different project than the SQL-Editor session&#39;s database is denied: the per-target check evaluates the session project&#39;s IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).
+- Enforcement is on the statement&#39;s literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.
+- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:
+ - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.
+ - Modeled non-table object DDL (gated at the DATABASE level by the object&#39;s own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).
+ NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural &#34;write-target object database&#34; extraction layer to remove this allowlist dependence is tracked as a follow-up.
+ - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.
+ Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.
+
+For example:
+resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;]
+resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;]
+resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.environment_id in [&#34;test&#34;]
+request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
+ </tr>
+
+ <tr>
+ <td>parsed_expr</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td></td>
+ <td><p>The parsed expression of the condition. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>
+ <p>A single change to a binding.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>action</td>
+ <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>
+ <td></td>
+ <td><p>The action that was performed on a Binding. </p></td>
+ </tr>
+
+ <tr>
+ <td>role</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Role that is assigned to `members`.
+For example, `roles/projectOwner`. </p></td>
+ </tr>
+
+ <tr>
+ <td>member</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Follows the same format of Binding.members. </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with this binding. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.QueryResult.Message.Level">QueryResult.Message.Level</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>LEVEL_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified message level.</p></td>
- </tr>
-
- <tr>
- <td>INFO</td>
- <td>1</td>
- <td><p>Informational message.</p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>2</td>
- <td><p>Warning message indicating potential issues.</p></td>
- </tr>
-
- <tr>
- <td>DEBUG</td>
- <td>3</td>
- <td><p>Debug message for development and troubleshooting.</p></td>
- </tr>
-
- <tr>
- <td>LOG</td>
- <td>4</td>
- <td><p>General log message.</p></td>
- </tr>
-
- <tr>
- <td>NOTICE</td>
- <td>5</td>
- <td><p>Notice message for important information.</p></td>
- </tr>
-
- <tr>
- <td>EXCEPTION</td>
- <td>6</td>
- <td><p>Exception message indicating error conditions.</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>
+ <p>Request message for getting an IAM policy.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>resource</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the resource to get the IAM policy.
+Format: projects/{project}
+Format: workspaces/{workspace} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>
+ <p>IAM policy that binds members to roles.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>bindings</td>
+ <td><a href="#bytebase.v1.Binding">Binding</a></td>
+ <td>repeated</td>
+ <td><p>Collection of binding.
+A binding binds one or more project members to a single project role. </p></td>
+ </tr>
+
+ <tr>
+ <td>etag</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The current etag of the policy.
+If an etag is provided and does not match the current etag of the policy,
+the call will be blocked and an ABORTED error will be returned. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>
+ <p>Describes changes between two IAM policies.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>binding_deltas</td>
+ <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td>
+ <td>repeated</td>
+ <td><p>The delta for Bindings between two policies. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>
+ <p>Request message for setting an IAM policy.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>resource</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the resource to set the IAM policy.
+Format: projects/{project}
+Format: workspaces/{workspace} </p></td>
+ </tr>
+
+ <tr>
+ <td>policy</td>
+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>etag</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The current etag of the policy. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.SQLService">SQLService</h3>
- <p>SQLService executes SQL queries and manages query operations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>Query</td>
- <td><a href="#bytebase.v1.QueryRequest">QueryRequest</a></td>
- <td><a href="#bytebase.v1.QueryResponse">QueryResponse</a></td>
- <td><p>Executes a read-only SQL query against a database.
-Permissions required: bb.databases.get</p></td>
- </tr>
-
- <tr>
- <td>AdminExecute</td>
- <td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>
- <td><a href="#bytebase.v1.AdminExecuteResponse">AdminExecuteResponse</a> stream</td>
- <td><p>Executes SQL with admin privileges via streaming connection.
-Permissions required: bb.sql.admin</p></td>
- </tr>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesRequest">SearchQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.SearchQueryHistoriesResponse">SearchQueryHistoriesResponse</a></td>
- <td><p>Deprecated: use QueryHistoryService.SearchQueryHistories instead.
-Delegating alias kept for upgrade transition; will be removed in a future release.
-No HTTP binding: the REST route is served by QueryHistoryService.
-Permissions required: None (only returns caller&#39;s own query histories)</p></td>
- </tr>
-
- <tr>
- <td>ListQueryHistories</td>
- <td><a href="#bytebase.v1.ListQueryHistoriesRequest">ListQueryHistoriesRequest</a></td>
- <td><a href="#bytebase.v1.ListQueryHistoriesResponse">ListQueryHistoriesResponse</a></td>
- <td><p>Deprecated: use QueryHistoryService.ListQueryHistories instead.
-Delegating alias kept for upgrade transition; will be removed in a future release.
-No HTTP binding: the REST route is served by QueryHistoryService.
-Permissions required: bb.queryHistories.list</p></td>
- </tr>
-
- <tr>
- <td>GetQueryHistory</td>
- <td><a href="#bytebase.v1.GetQueryHistoryRequest">GetQueryHistoryRequest</a></td>
- <td><a href="#bytebase.v1.QueryHistory">QueryHistory</a></td>
- <td><p>Deprecated: use QueryHistoryService.GetQueryHistory instead.
-Delegating alias kept for upgrade transition; will be removed in a future release.
-No HTTP binding: the REST route is served by QueryHistoryService.
-Permissions required: None (only returns the caller&#39;s own query history)</p></td>
- </tr>
+
+
+ <h3 id="bytebase.v1.BindingDelta.Action">BindingDelta.Action</h3>
+ <p>Type of action performed on a binding.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>Export</td>
- <td><a href="#bytebase.v1.ExportRequest">ExportRequest</a></td>
- <td><a href="#bytebase.v1.ExportResponse">ExportResponse</a></td>
- <td><p>Exports query results to a file format.
-Permissions required: bb.databases.get</p></td>
+ <td>ACTION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified action.</p></td>
</tr>
<tr>
- <td>DiffMetadata</td>
- <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
- <td><p>Computes schema differences between two database metadata.
-Permissions required: None</p></td>
+ <td>ADD</td>
+ <td>1</td>
+ <td><p>Add a binding.</p></td>
</tr>
<tr>
- <td>AICompletion</td>
- <td><a href="#bytebase.v1.AICompletionRequest">AICompletionRequest</a></td>
- <td><a href="#bytebase.v1.AICompletionResponse">AICompletionResponse</a></td>
- <td><p>Provides AI-powered SQL completion and generation.
-Permissions required: None (authenticated users only, requires AI to be enabled)</p></td>
+ <td>REMOVE</td>
+ <td>2</td>
+ <td><p>Remove a binding.</p></td>
</tr>
</tbody>
</table>
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AuditData">AuditData</h3>
+ <p>Additional audit data specific to certain operations.</p>
-
-
- <h4>Methods with deprecated option</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Option</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
- <tr>
- <td>SearchQueryHistories</td>
- <td><p>true</p></td>
- </tr>
-
- <tr>
- <td>ListQueryHistories</td>
- <td><p>true</p></td>
- </tr>
-
- <tr>
- <td>GetQueryHistory</td>
- <td><p>true</p></td>
- </tr>
-
+
+ <tr>
+ <td>policy_delta</td>
+ <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>
+ <td></td>
+ <td><p>Changes to IAM policies. </p></td>
+ </tr>
+
</tbody>
</table>
+
+
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+
+ <h3 id="bytebase.v1.AuditLog">AuditLog</h3>
+ <p>Audit log entry recording system activity or API call.</p>
+
+
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the log.
+Formats:
+- projects/{project}/auditLogs/{uid}
+- workspaces/{workspace}/auditLogs/{uid} </p></td>
+ </tr>
- <tr>
- <td>Query</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:query</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The timestamp when the audit log was created. </p></td>
+ </tr>
-
+ <tr>
+ <td>user</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The user who performed the action.
+Format: users/{email} </p></td>
+ </tr>
+ <tr>
+ <td>method</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The method or action being audited.
+For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td>
+ </tr>
- <tr>
- <td>AdminExecute</td>
- <td>GET</td>
- <td>/v1:adminExecute</td>
- <td></td>
- </tr>
+ <tr>
+ <td>severity</td>
+ <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>
+ <td></td>
+ <td><p>The severity level of this audit log entry. </p></td>
+ </tr>
-
+ <tr>
+ <td>resource</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource associated with this audit log. </p></td>
+ </tr>
+ <tr>
+ <td>request</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The request payload in JSON format. </p></td>
+ </tr>
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=instances/*/databases/*}:export</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>response</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The response payload in JSON format.
+Some fields may be omitted if they are too large or contain sensitive information. </p></td>
+ </tr>
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/plans/*/rollout}:export</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>status</td>
+ <td><a href="#google.rpc.Status">google.rpc.Status</a></td>
+ <td></td>
+ <td><p>The status of the operation. </p></td>
+ </tr>
- <tr>
- <td>Export</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/plans/*/rollout/stages/*}:export</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>latency</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>The duration of the operation. </p></td>
+ </tr>
-
+ <tr>
+ <td>service_data</td>
+ <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>
+ <td></td>
+ <td><p>Service-specific metadata about the request, response, and activities. </p></td>
+ </tr>
+ <tr>
+ <td>request_metadata</td>
+ <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td>
+ <td></td>
+ <td><p>Metadata about the request context. </p></td>
+ </tr>
- <tr>
- <td>DiffMetadata</td>
- <td>POST</td>
- <td>/v1/schemaDesign:diffMetadata</td>
- <td>*</td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>
+ <p>Request message for exporting audit logs.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The filter of the log. It should be a valid CEL expression.
+Check the filter field in the SearchAuditLogsRequest message. </p></td>
+ </tr>
+
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of the log.
+Only support order by create_time. The default sorting order is ascending.
+For example:
+ - order_by = &#34;create_time asc&#34;
+ - order_by = &#34;create_time desc&#34; </p></td>
+ </tr>
-
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
+ <td></td>
+ <td><p>The export format. </p></td>
+ </tr>
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of logs to return.
+The service may return fewer than this value.
+If unspecified, at most 10 log entries will be returned.
+The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>
+ </tr>
- <tr>
- <td>AICompletion</td>
- <td>POST</td>
- <td>/v1/sql/aiCompletion</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ExportAuditLogs` call.
+Provide this to retrieve the subsequent page. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/plan_service.proto">v1/plan_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>
+ <p>Response message for exporting audit logs.</p>
<table class="field-table">
@@ -15274,11 +15129,19 @@ Permissions required: None (authenticated users only, requires AI to be enabled)
<tbody>
<tr>
- <td>name</td>
+ <td>content</td>
+ <td><a href="#bytes">bytes</a></td>
+ <td></td>
+ <td><p>The exported audit log content in the requested format. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the plan check run to cancel.
-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ <td><p>A token to retrieve next page of log entities.
+Pass this value in the page_token field in the subsequent call
+to retrieve the next page of log entities. </p></td>
</tr>
</tbody>
@@ -15288,15 +15151,8 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
- <h3 id="bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.CreatePlanRequest">CreatePlanRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>
+ <p>Metadata about the incoming request.</p>
<table class="field-table">
@@ -15306,18 +15162,18 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>caller_ip</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent project where this plan will be created.
-Format: projects/{project} </p></td>
+ <td><p>The IP address of the request originator. </p></td>
</tr>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>caller_supplied_user_agent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The plan to create. </p></td>
+ <td><p>The user agent string provided by the caller.
+This is supplied by the client and is not authenticated. </p></td>
</tr>
</tbody>
@@ -15327,8 +15183,8 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>
+ <p>Request message for searching audit logs.</p>
<table class="field-table">
@@ -15338,11 +15194,59 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the plan check run to retrieve.
-Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The filter of the log. It should be a valid CEL expression.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- method: the API name, can be found in the docs, should start with &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator.
+- severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values.
+- user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
+- create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
+
+For example:
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; </p></td>
+ </tr>
+
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of the log.
+Only support order by create_time. The default sorting order is ascending.
+For example:
+ - order_by = &#34;create_time asc&#34;
+ - order_by = &#34;create_time desc&#34; </p></td>
+ </tr>
+
+ <tr>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of logs to return.
+The service may return fewer than this value.
+If unspecified, at most 10 log entries will be returned.
+The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A page token, received from a previous `SearchLogs` call.
+Provide this to retrieve the subsequent page. </p></td>
</tr>
</tbody>
@@ -15352,8 +15256,8 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
- <h3 id="bytebase.v1.GetPlanRequest">GetPlanRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>
+ <p>Response message for searching audit logs.</p>
<table class="field-table">
@@ -15363,11 +15267,19 @@ Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>audit_logs</td>
+ <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the plan to retrieve.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p>A token to retrieve next page of log entities.
+Pass this value in the page_token field in the subsequent call
+to retrieve the next page of log entities. </p></td>
</tr>
</tbody>
@@ -15377,77 +15289,166 @@ Format: projects/{project}/plans/{plan} </p></td>
- <h3 id="bytebase.v1.ListPlansRequest">ListPlansRequest</h3>
- <p></p>
+
+
+ <h3 id="bytebase.v1.AuditLog.Severity">AuditLog.Severity</h3>
+ <p>Severity level for audit log entries.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SEVERITY_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified severity level.</p></td>
+ </tr>
+
+ <tr>
+ <td>DEBUG</td>
+ <td>1</td>
+ <td><p>Debug-level information.</p></td>
+ </tr>
+
+ <tr>
+ <td>INFO</td>
+ <td>2</td>
+ <td><p>Informational messages.</p></td>
+ </tr>
+
+ <tr>
+ <td>NOTICE</td>
+ <td>3</td>
+ <td><p>Notable events.</p></td>
+ </tr>
+
+ <tr>
+ <td>WARNING</td>
+ <td>4</td>
+ <td><p>Warning conditions.</p></td>
+ </tr>
+
+ <tr>
+ <td>ERROR</td>
+ <td>5</td>
+ <td><p>Error conditions.</p></td>
+ </tr>
+
+ <tr>
+ <td>CRITICAL</td>
+ <td>6</td>
+ <td><p>Critical conditions.</p></td>
+ </tr>
+
+ <tr>
+ <td>ALERT</td>
+ <td>7</td>
+ <td><p>Action must be taken immediately.</p></td>
+ </tr>
+
+ <tr>
+ <td>EMERGENCY</td>
+ <td>8</td>
+ <td><p>System is unusable.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>
+ <p>AuditLogService manages audit logs for system activities and API calls.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SearchAuditLogs</td>
+ <td><a href="#bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</a></td>
+ <td><a href="#bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</a></td>
+ <td><p>Searches audit logs with optional filtering and pagination.
+Permissions required: bb.auditLogs.search</p></td>
+ </tr>
+
+ <tr>
+ <td>ExportAuditLogs</td>
+ <td><a href="#bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</a></td>
+ <td><a href="#bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</a></td>
+ <td><p>Exports audit logs in a specified format for external analysis.
+Permissions required: bb.auditLogs.export</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent, which owns this collection of plans.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all plans from all projects. </p></td>
- </tr>
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of plans to return. The service may return fewer than
-this value.
-If unspecified, at most 10 plans will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
+ <tr>
+ <td>SearchAuditLogs</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/auditLogs:search</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListPlans` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListPlans` must match
-the call that provided the page token. </p></td>
- </tr>
+ <tr>
+ <td>SearchAuditLogs</td>
+ <td>POST</td>
+ <td>/v1/auditLogs:search</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>filter</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter plans returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filters:
-- creator: the plan creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
-- create_time: the plan create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- has_rollout: whether the plan has rollout, support &#34;==&#34; operator, the value should be &#34;true&#34; or &#34;false&#34;.
-- title: the plan title, support &#34;==&#34; operator for exact match and &#34;.contains()&#34; operator for case-insensitive substring match.
-- spec_type: the plan spec config type, support &#34;==&#34; operator, the value should be &#34;create_database_config&#34;, &#34;change_database_config&#34;, or &#34;export_data_config&#34;.
-- state: the plan state, support &#34;==&#34; operator, the value should be &#34;ACTIVE&#34; or &#34;DELETED&#34;.
-
-For example:
-creator == &#34;users/[email protected]&#34; &amp;&amp; create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34;
-title == &#34;My Plan&#34;
-title.contains(&#34;database migration&#34;)
-spec_type == &#34;change_database_config&#34;
-state == &#34;ACTIVE&#34; </p></td>
- </tr>
+
+
+
+ <tr>
+ <td>ExportAuditLogs</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/auditLogs:export</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>ExportAuditLogs</td>
+ <td>POST</td>
+ <td>/v1/auditLogs:export</td>
+ <td>*</td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.ListPlansResponse">ListPlansResponse</h3>
+ <div class="file-heading">
+ <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>
<p></p>
@@ -15458,18 +15459,11 @@ state == &#34;ACTIVE&#34; </p></td>
<tbody>
<tr>
- <td>plans</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td>repeated</td>
- <td><p>The plans from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
+ <td>names</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td>repeated</td>
+ <td><p>The user names to retrieve.
+Format: users/{email} </p></td>
</tr>
</tbody>
@@ -15479,7 +15473,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.Plan">Plan</h3>
+ <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>
<p></p>
@@ -15490,113 +15484,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the plan.
-`plan` is a system generated ID.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
- <td></td>
- <td><p>The state of the plan. </p></td>
- </tr>
-
- <tr>
- <td>issue</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The issue associated with the plan.
-Can be empty.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The title of the plan. </p></td>
- </tr>
-
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The description of the plan. </p></td>
- </tr>
-
- <tr>
- <td>specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
- <td>repeated</td>
- <td><p>The deployment specs for the plan. </p></td>
- </tr>
-
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>plan_check_run_status_count</td>
- <td><a href="#bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</a></td>
- <td>repeated</td>
- <td><p>The status count of the latest plan check runs.
-Keys are:
-- SUCCESS
-- WARNING
-- ERROR
-- RUNNING </p></td>
- </tr>
-
- <tr>
- <td>has_rollout</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the plan has started the rollout. </p></td>
- </tr>
-
- <tr>
- <td>approval_status</td>
- <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
- <td></td>
- <td><p>The approval status of the linked issue.
-Unspecified when no linked issue exists or the linked issue is a draft. </p></td>
- </tr>
-
- <tr>
- <td>rollout_stage_summaries</td>
- <td><a href="#bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</a></td>
+ <td>users</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
<td>repeated</td>
- <td><p>Per-stage rollout status summary.
-Ordered by environment deployment order. Empty when no rollout exists. </p></td>
- </tr>
-
- <tr>
- <td>issue_status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td></td>
- <td><p>The lifecycle status of the linked issue.
-Unspecified when no linked issue exists. </p></td>
+ <td><p>The users from the specified request. </p></td>
</tr>
</tbody>
@@ -15606,7 +15497,7 @@ Unspecified when no linked issue exists. </p></td>
- <h3 id="bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</h3>
+ <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>
<p></p>
@@ -15617,35 +15508,10 @@ Unspecified when no linked issue exists. </p></td>
<tbody>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>release</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the release.
-Format: projects/{project}/releases/{release} </p></td>
- </tr>
-
- <tr>
- <td>enable_prior_backup</td>
- <td><a href="#bool">bool</a></td>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
<td></td>
- <td><p>If set, a backup of the modified data will be created automatically before any changes are applied. </p></td>
+ <td><p>The user to create. </p></td>
</tr>
</tbody>
@@ -15655,7 +15521,7 @@ Format: projects/{project}/releases/{release} </p></td>
- <h3 id="bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</h3>
+ <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>
<p></p>
@@ -15666,62 +15532,11 @@ Format: projects/{project}/releases/{release} </p></td>
<tbody>
<tr>
- <td>target</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the instance on which the database is created.
-Format: instances/{instance} </p></td>
- </tr>
-
- <tr>
- <td>database</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the database to create. </p></td>
- </tr>
-
- <tr>
- <td>table</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.
-For example, in MongoDB, it only creates the database when we first store data in that database. </p></td>
- </tr>
-
- <tr>
- <td>character_set</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>character_set is the character set of the database. </p></td>
- </tr>
-
- <tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>collation is the collation of the database. </p></td>
- </tr>
-
- <tr>
- <td>cluster</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>cluster is the cluster of the database. This is only applicable to ClickHouse for &#34;ON CLUSTER &lt;&lt;cluster&gt;&gt;&#34;. </p></td>
- </tr>
-
- <tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>owner is the owner of the database. This is only applicable to Postgres for &#34;WITH OWNER &lt;&lt;owner&gt;&gt;&#34;. </p></td>
- </tr>
-
- <tr>
- <td>environment</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The environment resource.
-Format: environments/prod where prod is the environment resource ID. </p></td>
+ <td><p>The name of the user to delete.
+Format: users/{email} </p></td>
</tr>
</tbody>
@@ -15731,7 +15546,7 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</h3>
+ <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>
<p></p>
@@ -15742,35 +15557,11 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>targets</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of targets.
-Multi-database format: [instances/{instance-id}/databases/{database-name}].
-Single database group format: [projects/{project}/databaseGroups/{databaseGroup}]. </p></td>
- </tr>
-
- <tr>
- <td>sheet</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the sheet.
-Format: projects/{project}/sheets/{sheet} </p></td>
- </tr>
-
- <tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>The format of the exported file. </p></td>
- </tr>
-
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The zip password provide by users.
-Leave it empty if no needs to encrypt the zip file. </p></td>
+ <td><p>The name of the user to retrieve.
+Format: users/{email} </p></td>
</tr>
</tbody>
@@ -15780,7 +15571,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.Plan.PlanCheckRunStatusCountEntry">Plan.PlanCheckRunStatusCountEntry</h3>
+ <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3>
<p></p>
@@ -15791,17 +15582,56 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The maximum number of users to return. The service may return fewer than
+this value.
+If unspecified, at most 10 users will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ </tr>
+
+ <tr>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A page token, received from a previous `ListUsers` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListUsers` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#int32">int32</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Show deleted users if specified. </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter is used to filter users returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- state: check State enum for values, support &#34;==&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+
+For example:
+name == &#34;ed&#34;
+name.contains(&#34;ed&#34;)
+email == &#34;[email protected]&#34;
+email.contains(&#34;ed&#34;)
+state == &#34;DELETED&#34;
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
+(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
</tr>
</tbody>
@@ -15811,7 +15641,7 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
- <h3 id="bytebase.v1.Plan.RolloutStageSummary">Plan.RolloutStageSummary</h3>
+ <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>
<p></p>
@@ -15822,18 +15652,18 @@ Leave it empty if no needs to encrypt the zip file. </p></td>
<tbody>
<tr>
- <td>stage</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The stage resource name.
-Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
+ <td>users</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td>repeated</td>
+ <td><p>The users from the specified request. </p></td>
</tr>
<tr>
- <td>task_status_counts</td>
- <td><a href="#bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</a></td>
- <td>repeated</td>
- <td><p>Task status counts for this stage. </p></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -15843,7 +15673,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- <h3 id="bytebase.v1.Plan.Spec">Plan.Spec</h3>
+ <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3>
<p></p>
@@ -15854,31 +15684,11 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
<tbody>
<tr>
- <td>id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A UUID4 string that uniquely identifies the Spec. </p></td>
- </tr>
-
- <tr>
- <td>create_database_config</td>
- <td><a href="#bytebase.v1.Plan.CreateDatabaseConfig">Plan.CreateDatabaseConfig</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>change_database_config</td>
- <td><a href="#bytebase.v1.Plan.ChangeDatabaseConfig">Plan.ChangeDatabaseConfig</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>export_data_config</td>
- <td><a href="#bytebase.v1.Plan.ExportDataConfig">Plan.ExportDataConfig</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The name of the deleted user.
+Format: users/{email} </p></td>
</tr>
</tbody>
@@ -15888,7 +15698,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- <h3 id="bytebase.v1.Plan.TaskStatusCount">Plan.TaskStatusCount</h3>
+ <h3 id="bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</h3>
<p></p>
@@ -15899,17 +15709,19 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Task.Status">Task.Status</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The task status. </p></td>
+ <td><p>The name of the user whose email to update.
+Format: users/{email}
+Note: This is the current (old) email address. The new email is specified in the &#39;email&#39; field. </p></td>
</tr>
<tr>
- <td>count</td>
- <td><a href="#int32">int32</a></td>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The number of tasks in the status. </p></td>
+ <td><p>The new email address. </p></td>
</tr>
</tbody>
@@ -15919,7 +15731,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- <h3 id="bytebase.v1.PlanCheckRun">PlanCheckRun</h3>
+ <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>
<p></p>
@@ -15930,38 +15742,50 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/planCheckRun </p></td>
+ <td><p>The user to update.
+
+The user&#39;s `name` field is used to identify the user to update.
+Format: users/{email} </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>results</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>otp_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
</tr>
<tr>
- <td>error</td>
- <td><a href="#string">string</a></td>
+ <td>regenerate_temp_mfa_secret</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>error is set if the Status is FAILED. </p></td>
+ <td><p>The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.
+This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>regenerate_recovery_codes</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The regenerate_recovery_codes flag means to regenerate recovery codes for user. </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the user is not found, a new user will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -15971,7 +15795,7 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result">PlanCheckRun.Result</h3>
+ <h3 id="bytebase.v1.User">User</h3>
<p></p>
@@ -15982,156 +15806,105 @@ Format: projects/{project}/plans/{plan}/rollout/stages/{stage} </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Advice.Level">Advice.Level</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the user.
+Format: users/{email} </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The lifecycle state of the user account. </p></td>
</tr>
<tr>
- <td>content</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The email address of the user, used for login and notifications. </p></td>
</tr>
<tr>
- <td>code</td>
- <td><a href="#int32">int32</a></td>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The display title or full name of the user. </p></td>
</tr>
<tr>
- <td>target</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Target identification for consolidated results.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>The password for authentication. Only used during user creation or password updates. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</a></td>
+ <td>service_key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The service key for service account authentication. </p></td>
</tr>
<tr>
- <td>sql_summary_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</a></td>
+ <td>mfa_enabled</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The mfa_enabled flag means if the user has enabled MFA. </p></td>
</tr>
<tr>
- <td>sql_review_report</td>
- <td><a href="#bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</a></td>
+ <td>temp_otp_secret</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Temporary OTP secret used during MFA setup and regeneration. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlReviewReport">PlanCheckRun.Result.SqlReviewReport</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>start_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
- <td></td>
- <td><p>Position of the SQL statement. </p></td>
+ <td>temp_recovery_codes</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Temporary recovery codes used during MFA setup and regeneration. </p></td>
</tr>
<tr>
- <td>end_position</td>
- <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td>temp_otp_secret_created_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.PlanCheckRun.Result.SqlSummaryReport">PlanCheckRun.Result.SqlSummaryReport</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>statement_types</td>
- <td><a href="#bytebase.v1.StatementType">StatementType</a></td>
- <td>repeated</td>
- <td><p>statement_types are the types of statements that are found in the sql. </p></td>
+ <td>phone</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Should be a valid E.164 compliant phone number.
+Could be empty. </p></td>
</tr>
<tr>
- <td>affected_rows</td>
- <td><a href="#int64">int64</a></td>
+ <td>profile</td>
+ <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>User profile metadata. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>groups</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The plan to run plan checks.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td>repeated</td>
+ <td><p>The groups for the user.
+Format: groups/{email} </p></td>
</tr>
<tr>
- <td>spec_id</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The UUID of the specific spec to run plan checks for.
-This should match the spec.id field in Plan.Spec.
-If not set, all specs in the plan will be used. </p></td>
+ <td></td>
+ <td><p>The current workspace.
+Format: workspaces/{id} </p></td>
</tr>
</tbody>
@@ -16141,14 +15914,7 @@ If not set, all specs in the plan will be used. </p></td>
- <h3 id="bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</h3>
+ <h3 id="bytebase.v1.User.Profile">User.Profile</h3>
<p></p>
@@ -16159,28 +15925,24 @@ If not set, all specs in the plan will be used. </p></td>
<tbody>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
+ <td>last_login_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The plan to update.
-
-The plan&#39;s `name` field is used to identify the plan to update.
-Format: projects/{project}/plans/{plan} </p></td>
+ <td><p>The last time the user successfully logged in. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>last_change_password_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>The last time the user changed their password. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the plan is not found, a new plan will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>
</tr>
</tbody>
@@ -16192,88 +15954,12 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.PlanCheckRun.Result.Type">PlanCheckRun.Result.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STATEMENT_ADVISE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STATEMENT_SUMMARY_REPORT</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GHOST_SYNC</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.PlanCheckRun.Status">PlanCheckRun.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RUNNING</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CANCELED</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.PlanService">PlanService</h3>
- <p>PlanService manages deployment plans for database changes.</p>
+ <h3 id="bytebase.v1.UserService">UserService</h3>
+ <p>UserService manages user accounts and authentication.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -16281,60 +15967,80 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>GetPlan</td>
- <td><a href="#bytebase.v1.GetPlanRequest">GetPlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Retrieves a deployment plan by name.
-Permissions required: bb.plans.get</p></td>
+ <td>GetUser</td>
+ <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Get the user.
+Any authenticated user can get the user.
+Permissions required: bb.users.get</p></td>
</tr>
<tr>
- <td>ListPlans</td>
- <td><a href="#bytebase.v1.ListPlansRequest">ListPlansRequest</a></td>
- <td><a href="#bytebase.v1.ListPlansResponse">ListPlansResponse</a></td>
- <td><p>Lists deployment plans in a project.
-Permissions required: bb.plans.list</p></td>
+ <td>BatchGetUsers</td>
+ <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>
+ <td><p>Get the users in batch.
+Any authenticated user can batch get users.
+Permissions required: bb.users.get</p></td>
</tr>
<tr>
- <td>CreatePlan</td>
- <td><a href="#bytebase.v1.CreatePlanRequest">CreatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>Creates a new deployment plan.
-Permissions required: bb.plans.create</p></td>
+ <td>GetCurrentUser</td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Get the current authenticated user.
+Permissions required: None</p></td>
</tr>
<tr>
- <td>UpdatePlan</td>
- <td><a href="#bytebase.v1.UpdatePlanRequest">UpdatePlanRequest</a></td>
- <td><a href="#bytebase.v1.Plan">Plan</a></td>
- <td><p>UpdatePlan updates the plan.
-The plan creator and the user with bb.plans.update permission on the project can update the plan.
-Permissions required: bb.plans.update (or creator)</p></td>
+ <td>ListUsers</td>
+ <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>
+ <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>
+ <td><p>List all users.
+Any authenticated user can list users.
+Permissions required: bb.users.list</p></td>
</tr>
<tr>
- <td>GetPlanCheckRun</td>
- <td><a href="#bytebase.v1.GetPlanCheckRunRequest">GetPlanCheckRunRequest</a></td>
- <td><a href="#bytebase.v1.PlanCheckRun">PlanCheckRun</a></td>
- <td><p>Gets the plan check run for a deployment plan.
-Permissions required: bb.planCheckRuns.get</p></td>
+ <td>CreateUser</td>
+ <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Creates a user in the caller&#39;s workspace (admin action, self-hosted only).
+In SaaS mode, admins should add users via workspace IAM policy instead.
+Permissions required: bb.users.create</p></td>
</tr>
<tr>
- <td>RunPlanChecks</td>
- <td><a href="#bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</a></td>
- <td><a href="#bytebase.v1.RunPlanChecksResponse">RunPlanChecksResponse</a></td>
- <td><p>Executes validation checks on a deployment plan.
-Permissions required: bb.planCheckRuns.run</p></td>
+ <td>UpdateUser</td>
+ <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.
+Note: Email updates are not supported through this API. Use UpdateEmail instead.
+Permissions required: bb.users.update (or self)</p></td>
</tr>
<tr>
- <td>CancelPlanCheckRun</td>
- <td><a href="#bytebase.v1.CancelPlanCheckRunRequest">CancelPlanCheckRunRequest</a></td>
- <td><a href="#bytebase.v1.CancelPlanCheckRunResponse">CancelPlanCheckRunResponse</a></td>
- <td><p>Cancels the plan check run for a deployment plan.
-Permissions required: bb.planCheckRuns.run</p></td>
+ <td>DeleteUser</td>
+ <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
+Permissions required: bb.users.delete</p></td>
+ </tr>
+
+ <tr>
+ <td>UndeleteUser</td>
+ <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Restores a deleted user.
+Permissions required: bb.users.undelete</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateEmail</td>
+ <td><a href="#bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</a></td>
+ <td><a href="#bytebase.v1.User">User</a></td>
+ <td><p>Updates a user&#39;s email address.
+Permissions required: bb.users.updateEmail</p></td>
</tr>
</tbody>
@@ -16358,9 +16064,9 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>GetPlan</td>
+ <td>GetUser</td>
<td>GET</td>
- <td>/v1/{name=projects/*/plans/*}</td>
+ <td>/v1/{name=users/*}</td>
<td></td>
</tr>
@@ -16368,9 +16074,9 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>ListPlans</td>
+ <td>BatchGetUsers</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/plans</td>
+ <td>/v1/users:batchGet</td>
<td></td>
</tr>
@@ -16378,29 +16084,19 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>CreatePlan</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/plans</td>
- <td>plan</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdatePlan</td>
- <td>PATCH</td>
- <td>/v1/{plan.name=projects/*/plans/*}</td>
- <td>plan</td>
+ <td>GetCurrentUser</td>
+ <td>GET</td>
+ <td>/v1/users/me</td>
+ <td></td>
</tr>
<tr>
- <td>GetPlanCheckRun</td>
+ <td>ListUsers</td>
<td>GET</td>
- <td>/v1/{name=projects/*/plans/*/planCheckRun}</td>
+ <td>/v1/users</td>
<td></td>
</tr>
@@ -16408,186 +16104,66 @@ Permissions required: bb.planCheckRuns.run</p></td>
<tr>
- <td>RunPlanChecks</td>
+ <td>CreateUser</td>
<td>POST</td>
- <td>/v1/{name=projects/*/plans/*}:runPlanChecks</td>
- <td>*</td>
+ <td>/v1/users</td>
+ <td>user</td>
</tr>
<tr>
- <td>CancelPlanCheckRun</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/plans/*/planCheckRun}:cancel</td>
- <td>*</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/issue_service.proto">v1/issue_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.ApprovalFlow">ApprovalFlow</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>roles</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The roles required for approval in order. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ApprovalTemplate">ApprovalTemplate</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>flow</td>
- <td><a href="#bytebase.v1.ApprovalFlow">ApprovalFlow</a></td>
- <td></td>
- <td><p>The approval flow definition. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The title of the approval template. </p></td>
- </tr>
-
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The description of the approval template. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue to add an approver.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment explaining the approval decision. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <td>UpdateUser</td>
+ <td>PATCH</td>
+ <td>/v1/{user.name=users/*}</td>
+ <td>user</td>
+ </tr>
- <tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The parent resource shared by all issues being updated.
-Format: projects/{project}
-If the operation spans parents, a dash (-) may be accepted as a wildcard.
-We only support updating the status of databases for now. </p></td>
- </tr>
+
- <tr>
- <td>issues</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The list of issues to update.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td></td>
- <td><p>The new status. </p></td>
- </tr>
+ <tr>
+ <td>DeleteUser</td>
+ <td>DELETE</td>
+ <td>/v1/{name=users/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteUser</td>
+ <td>POST</td>
+ <td>/v1/{name=users/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+
- <tr>
- <td>reason</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The reason for the status change. </p></td>
- </tr>
+ <tr>
+ <td>UpdateEmail</td>
+ <td>POST</td>
+ <td>/v1/{name=users/*}:updateEmail</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</h3>
- <p></p>
-
-
+ <div class="file-heading">
+ <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
-
- <h3 id="bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</h3>
+ <h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3>
<p></p>
@@ -16598,18 +16174,18 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The issue name
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>External OIDC token (JWT) from CI/CD platform. </p></td>
</tr>
<tr>
- <td>issue_comment</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment to create. </p></td>
+ <td><p>Workload Identity email for identifying which identity to authenticate as.
+Format: {name}@workload.bytebase.com </p></td>
</tr>
</tbody>
@@ -16619,7 +16195,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.CreateIssueRequest">CreateIssueRequest</h3>
+ <h3 id="bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</h3>
<p></p>
@@ -16630,18 +16206,10 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>access_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>issue</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td></td>
- <td><p>The issue to create. </p></td>
+ <td><p>Bytebase access token. </p></td>
</tr>
</tbody>
@@ -16651,8 +16219,8 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.GetIssueRequest">GetIssueRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>
+ <p>Context for identity provider authentication.</p>
<table class="field-table">
@@ -16662,18 +16230,17 @@ Format: projects/{project} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>oauth2_context</td>
+ <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>
<td></td>
- <td><p>The name of the issue to retrieve.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>OAuth2 authentication context. </p></td>
</tr>
<tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
+ <td>oidc_context</td>
+ <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>
<td></td>
- <td><p>If set to true, bypass cache and fetch the latest data. </p></td>
+ <td><p>OpenID Connect authentication context. </p></td>
</tr>
</tbody>
@@ -16683,7 +16250,7 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.Issue">Issue</h3>
+ <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3>
<p></p>
@@ -16694,157 +16261,80 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>title</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the issue. </p></td>
+ <td><p>User&#39;s email address. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>password</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The description of the issue. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Issue.Type">Issue.Type</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td></td>
- <td><p>The status of the issue. </p></td>
- </tr>
-
- <tr>
- <td>approvers</td>
- <td><a href="#bytebase.v1.Issue.Approver">Issue.Approver</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>User&#39;s password for authentication. </p></td>
</tr>
<tr>
- <td>approval_template</td>
- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td>web</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The approval template for the issue. </p></td>
+ <td><p>If true, sets access token and refresh token as HTTP-only cookies instead of
+returning the token in the response body. Use for browser-based clients. </p></td>
</tr>
<tr>
- <td>creator</td>
+ <td>idp_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/[email protected] </p></td>
- </tr>
-
- <tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The name of the identity provider.
+Format: idps/{idp} </p></td>
</tr>
<tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>idp_context</td>
+ <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The idp_context is used to get the user information from identity provider. </p></td>
</tr>
<tr>
- <td>plan</td>
+ <td>otp_code</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The plan associated with the issue.
-Can be empty.
-Format: projects/{project}/plans/{plan} </p></td>
- </tr>
-
- <tr>
- <td>role_grant</td>
- <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td>
- <td></td>
- <td><p>Used if the issue type is ROLE_GRANT. </p></td>
- </tr>
-
- <tr>
- <td>risk_level</td>
- <td><a href="#bytebase.v1.RiskLevel">RiskLevel</a></td>
- <td></td>
- <td><p>The risk level of the issue. </p></td>
+ <td>optional</td>
+ <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
</tr>
<tr>
- <td>labels</td>
+ <td>recovery_code</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Labels attached to the issue for categorization and filtering. </p></td>
- </tr>
-
- <tr>
- <td>approval_status</td>
- <td><a href="#bytebase.v1.ApprovalStatus">ApprovalStatus</a></td>
- <td></td>
- <td><p>The overall approval status for the issue. </p></td>
+ <td>optional</td>
+ <td><p>The recovery_code is used to recovery the user&#39;s identity with MFA. </p></td>
</tr>
<tr>
- <td>access_grant</td>
+ <td>mfa_temp_token</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The access grant associated with this issue.
-Format: projects/{project}/accessGrants/{access_grant} </p></td>
- </tr>
-
- <tr>
- <td>draft</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether this issue is a Draft Review Issue. </p></td>
+ <td>optional</td>
+ <td><p>The mfa_temp_token is used to verify the user&#39;s identity by MFA. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Issue.Approver">Issue.Approver</h3>
- <p>Approvers and their approval status for the issue.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</a></td>
- <td></td>
- <td><p>The new status. </p></td>
+ <td>email_code</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>6-digit code from email for passwordless login/signup.
+Pairs with `email`. Mutually exclusive with `password` and `idp_name`. </p></td>
</tr>
<tr>
- <td>principal</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Format: users/[email protected] </p></td>
+ <td>optional</td>
+ <td><p>Preferred workspace to land in after login. If the user is a member of this
+workspace, the token is issued for it; otherwise falls back to the default
+resolution (last login workspace → first membership). Typically populated
+from the ?workspace= query parameter in invite links.
+Format: workspaces/{workspace} </p></td>
</tr>
</tbody>
@@ -16854,8 +16344,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment">IssueComment</h3>
- <p>A comment on an issue.</p>
+ <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>
+ <p></p>
<table class="field-table">
@@ -16865,73 +16355,63 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid} </p></td>
+ <td><p>Access token for authenticated requests.
+Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>mfa_temp_token</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The text content of the comment. </p></td>
+ <td>optional</td>
+ <td><p>Temporary token for MFA verification. </p></td>
</tr>
<tr>
- <td>payload</td>
- <td><a href="#string">string</a></td>
+ <td>require_reset_password</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>TODO: use struct message instead. </p></td>
+ <td><p>Whether user must reset password before continuing. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>user</td>
+ <td><a href="#bytebase.v1.User">User</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The user from the successful login. </p></td>
</tr>
- <tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>
+ <p>Request to logout current user session.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>
+ <p>OAuth2 authentication context.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>creator</td>
+ <td>code</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: users/{email} </p></td>
- </tr>
-
- <tr>
- <td>approval</td>
- <td><a href="#bytebase.v1.IssueComment.Approval">IssueComment.Approval</a></td>
- <td></td>
- <td><p>Approval event. </p></td>
- </tr>
-
- <tr>
- <td>issue_update</td>
- <td><a href="#bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</a></td>
- <td></td>
- <td><p>Issue update event. </p></td>
- </tr>
-
- <tr>
- <td>plan_update</td>
- <td><a href="#bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</a></td>
- <td></td>
- <td><p>Plan update event. </p></td>
- </tr>
-
- <tr>
- <td>review_submission</td>
- <td><a href="#bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</a></td>
- <td></td>
- <td><p>Review submission event. </p></td>
+ <td><p>Authorization code from OAuth2 provider. </p></td>
</tr>
</tbody>
@@ -16941,8 +16421,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.Approval">IssueComment.Approval</h3>
- <p>Approval event information.</p>
+ <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>
+ <p>OpenID Connect authentication context.</p>
<table class="field-table">
@@ -16952,10 +16432,10 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</a></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The approval status. </p></td>
+ <td><p>Authorization code from OIDC provider. </p></td>
</tr>
</tbody>
@@ -16965,8 +16445,22 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.IssueUpdate">IssueComment.IssueUpdate</h3>
- <p>Issue update event information.</p>
+ <h3 id="bytebase.v1.RefreshRequest">RefreshRequest</h3>
+ <p>Request to refresh the access token.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.RefreshResponse">RefreshResponse</h3>
+ <p>Response from refreshing the access token.</p>
+
+
+
+
+
+ <h3 id="bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</h3>
+ <p></p>
<table class="field-table">
@@ -16976,59 +16470,20 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>from_title</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_title</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>from_description</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p> </p></td>
+ <td></td>
+ <td><p>The email address of the account to reset. </p></td>
</tr>
<tr>
- <td>to_description</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
<td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>from_status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_status</td>
- <td><a href="#bytebase.v1.IssueStatus">IssueStatus</a></td>
- <td>optional</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>from_labels</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>to_labels</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,
+and later (at verify time) for signup gate checks and workspace assignment.
+Unset for SaaS brand-new signup (no workspace exists yet).
+Format: workspaces/{workspace} </p></td>
</tr>
</tbody>
@@ -17038,8 +16493,8 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.PlanUpdate">IssueComment.PlanUpdate</h3>
- <p>Plan update event information (snapshot of plan.config.specs before</p><p>and after a PlanService.UpdatePlan call that mutated specs).</p>
+ <h3 id="bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</h3>
+ <p></p>
<table class="field-table">
@@ -17049,17 +16504,24 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>from_specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The email address of the account. </p></td>
</tr>
<tr>
- <td>to_specs</td>
- <td><a href="#bytebase.v1.Plan.Spec">Plan.Spec</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>code</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The 6-digit code from the reset email. </p></td>
+ </tr>
+
+ <tr>
+ <td>new_password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The new password to set. </p></td>
</tr>
</tbody>
@@ -17069,14 +16531,7 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
- <h3 id="bytebase.v1.IssueComment.ReviewSubmission">IssueComment.ReviewSubmission</h3>
- <p>Review submission event information.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</h3>
+ <h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</h3>
<p></p>
@@ -17087,31 +16542,20 @@ Format: projects/{project}/accessGrants/{access_grant} </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>email</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{projects}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of issue comments to return. The service may return fewer than
-this value.
-If unspecified, at most 10 issue comments will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>The email address to send the code to. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListIssueComments` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListIssueComments` must match
-the call that provided the page token. </p></td>
+ <td>optional</td>
+ <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,
+and later (at verify time) for signup gate checks and workspace assignment.
+Unset for SaaS brand-new signup (no workspace exists yet).
+Format: workspaces/{workspace} </p></td>
</tr>
</tbody>
@@ -17121,7 +16565,7 @@ the call that provided the page token. </p></td>
- <h3 id="bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</h3>
+ <h3 id="bytebase.v1.SignupRequest">SignupRequest</h3>
<p></p>
@@ -17132,18 +16576,24 @@ the call that provided the page token. </p></td>
<tbody>
<tr>
- <td>issue_comments</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td>repeated</td>
- <td><p>The issue comments from the specified request. </p></td>
+ <td>email</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The email for the new account. </p></td>
+ </tr>
+
+ <tr>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The password for the new account. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The display name of the user. </p></td>
</tr>
</tbody>
@@ -17153,7 +16603,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.ListIssuesRequest">ListIssuesRequest</h3>
+ <h3 id="bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</h3>
<p></p>
@@ -17164,89 +16614,261 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>workspace</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project} </p></td>
+ <td><p>The target workspace to switch to.
+Format: workspaces/{workspace} </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>web</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The maximum number of issues to return. The service may return fewer than
-this value.
-If unspecified, at most 10 issues will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p>If true, sets tokens as HTTP-only cookies (browser clients). </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>otp_code</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>A page token, received from a previous `ListIssues` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListIssues` must match
-the call that provided the page token. </p></td>
+ <td>optional</td>
+ <td><p>OTP code for MFA verification. Required if the target workspace enforces MFA. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>recovery_code</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Filter is used to filter issues returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+ <td>optional</td>
+ <td><p>Recovery code for MFA verification (alternative to otp_code). </p></td>
+ </tr>
+
+ <tr>
+ <td>mfa_temp_token</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-Supported filters:
-- creator: issue creator full name in &#34;users/{email or id}&#34; format, support &#34;==&#34; operator.
-- status: the issue status, support &#34;==&#34; and &#34;in&#34; operator, check the IssueStatus enum for the values.
-- create_time: issue create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-- type: the issue type, support &#34;==&#34; and &#34;in&#34; operator, check the Type enum in the Issue message for the values.
-- labels: the issue labels, support &#34;==&#34; and &#34;in&#34; operator.
-- risk_level: the issue risk level, support &#34;in&#34; operator, check the RiskLevel enum for the values.
-- approval_status: issue approval status, support &#34;==&#34; operator.
-- current_approver: the issue approver, should in &#34;users/{email} format&#34;, support &#34;==&#34; operator.
+
-For example:
-creator == &#34;users/[email protected]&#34; &amp;&amp; status in [&#34;OPEN&#34;, &#34;DONE&#34;]
-status == &#34;CANCELED&#34; &amp;&amp; type == &#34;DATABASE_CHANGE&#34;
-labels in [&#34;label1&#34;, &#34;label2&#34;]
-risk_level in [&#34;HIGH&#34;, &#34;MODERATE&#34;]
-create_time &gt;= &#34;2025-01-02T15:04:05Z07:00&#34; </p></td>
- </tr>
+
+
+
+
+
+
+
+
+ <h3 id="bytebase.v1.AuthService">AuthService</h3>
+ <p>AuthService handles user authentication operations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>Login</td>
+ <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Authenticates a user and returns access tokens.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>Logout</td>
+ <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Logs out the current user session.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>ExchangeToken</td>
+ <td><a href="#bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</a></td>
+ <td><a href="#bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</a></td>
+ <td><p>Exchanges an external OIDC token for a Bytebase access token.
+Used by CI/CD pipelines with Workload Identity Federation.
+Permissions required: None (validates via OIDC token)</p></td>
+ </tr>
+
+ <tr>
+ <td>Signup</td>
+ <td><a href="#bytebase.v1.SignupRequest">SignupRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Registers a new user account. Creates a principal and assigns a workspace:
+- If the user&#39;s email was pre-invited to a workspace, joins that workspace.
+- Otherwise, creates a new workspace with the user as admin.
+Returns access tokens so the user is logged in immediately after signup.</p></td>
+ </tr>
+
+ <tr>
+ <td>Refresh</td>
+ <td><a href="#bytebase.v1.RefreshRequest">RefreshRequest</a></td>
+ <td><a href="#bytebase.v1.RefreshResponse">RefreshResponse</a></td>
+ <td><p>Refreshes the access token using the refresh token cookie.
+Permissions required: None (validates via refresh token cookie)</p></td>
+ </tr>
+
+ <tr>
+ <td>SwitchWorkspace</td>
+ <td><a href="#bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</a></td>
+ <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
+ <td><p>Switches the current user&#39;s active workspace and issues new tokens.
+The user must be a member of the target workspace.</p></td>
+ </tr>
+
+ <tr>
+ <td>RequestPasswordReset</td>
+ <td><a href="#bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Requests a password reset email for the given email address.
+Always returns success to avoid leaking whether the email exists.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>ResetPassword</td>
+ <td><a href="#bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Resets the user&#39;s password using a password reset token from email.
+Permissions required: None (validates via token)</p></td>
+ </tr>
+
+ <tr>
+ <td>SendEmailLoginCode</td>
+ <td><a href="#bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Sends a 6-digit verification code to the email for login/signup.
+Always returns success (no email enumeration). Enforces 60-sec resend cooldown.
+Permissions required: None</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
+ <thead>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
+ </thead>
+ <tbody>
+
+
+
+ <tr>
+ <td>Login</td>
+ <td>POST</td>
+ <td>/v1/auth/login</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Logout</td>
+ <td>POST</td>
+ <td>/v1/auth/logout</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ExchangeToken</td>
+ <td>POST</td>
+ <td>/v1/auth:exchangeToken</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Signup</td>
+ <td>POST</td>
+ <td>/v1/auth/signup</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>Refresh</td>
+ <td>POST</td>
+ <td>/v1/auth/refresh</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SwitchWorkspace</td>
+ <td>POST</td>
+ <td>/v1/auth:switchWorkspace</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RequestPasswordReset</td>
+ <td>POST</td>
+ <td>/v1/auth:requestPasswordReset</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ResetPassword</td>
+ <td>POST</td>
+ <td>/v1/auth:resetPassword</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>query</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Query is the query statement. </p></td>
- </tr>
+
- <tr>
- <td>order_by</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The order by of issues.
-Support:
-- create_time
-- update_time
-The default sorting order is ascending.
-For example:
-- order_by = &#34;create_time desc&#34;
-- order_by = &#34;update_time asc&#34; </p></td>
- </tr>
+ <tr>
+ <td>SendEmailLoginCode</td>
+ <td>POST</td>
+ <td>/v1/auth:sendEmailLoginCode</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.ListIssuesResponse">ListIssuesResponse</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>
+ <p>Request message for batch deparsing CEL expressions.</p>
<table class="field-table">
@@ -17256,18 +16878,10 @@ For example:
<tbody>
<tr>
- <td>issues</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
+ <td>expressions</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
<td>repeated</td>
- <td><p>The issues from the specified request. </p></td>
- </tr>
-
- <tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The CEL expression ASTs to deparse. </p></td>
</tr>
</tbody>
@@ -17277,8 +16891,8 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.RejectIssueRequest">RejectIssueRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>
+ <p>Response message for batch deparsing CEL expressions.</p>
<table class="field-table">
@@ -17288,18 +16902,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue to add a rejection.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
+ <td>expressions</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment explaining the rejection decision. </p></td>
+ <td>repeated</td>
+ <td><p>The deparsed CEL expressions as strings. </p></td>
</tr>
</tbody>
@@ -17309,8 +16915,8 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.RequestIssueRequest">RequestIssueRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>
+ <p>Request message for batch parsing CEL expressions.</p>
<table class="field-table">
@@ -17320,18 +16926,10 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue to request a issue.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>comment</td>
+ <td>expressions</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment explaining the request. </p></td>
+ <td>repeated</td>
+ <td><p>The CEL expression strings to parse. </p></td>
</tr>
</tbody>
@@ -17341,8 +16939,8 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>
+ <p>Response message for batch parsing CEL expressions.</p>
<table class="field-table">
@@ -17352,11 +16950,10 @@ Format: projects/{project}/issues/{issue} </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the issue whose approval-finding should be retried.
-Format: projects/{project}/issues/{issue} </p></td>
+ <td>expressions</td>
+ <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td>repeated</td>
+ <td><p>The parsed CEL expressions as AST. </p></td>
</tr>
</tbody>
@@ -17366,54 +16963,87 @@ Format: projects/{project}/issues/{issue} </p></td>
- <h3 id="bytebase.v1.RoleGrant">RoleGrant</h3>
- <p></p>
+
+
+
+
+
+
+ <h3 id="bytebase.v1.CelService">CelService</h3>
+ <p>CelService manages CEL (Common Expression Language) parsing and formatting operations.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>BatchParse</td>
+ <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>
+ <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>
+ <td><p>Parses multiple CEL expression strings into AST representations.
+Permissions required: None</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchDeparse</td>
+ <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>
+ <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>
+ <td><p>Converts multiple CEL AST representations back into expression strings.
+Permissions required: None</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The requested role.
-Format: roles/EXPORTER. </p></td>
- </tr>
- <tr>
- <td>user</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The user to be granted.
-Format: users/{email}. </p></td>
- </tr>
+ <tr>
+ <td>BatchParse</td>
+ <td>POST</td>
+ <td>/v1/cel/batchParse</td>
+ <td>*</td>
+ </tr>
- <tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
- <td></td>
- <td><p>The condition for the role. Same as the condition in IAM Binding message. </p></td>
- </tr>
+
- <tr>
- <td>expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
- <td></td>
- <td><p>The duration for which the grant is valid. </p></td>
- </tr>
+ <tr>
+ <td>BatchDeparse</td>
+ <td>POST</td>
+ <td>/v1/cel/batchDeparse</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3>
+ <div class="file-heading">
+ <h2 id="v1/changelog_service.proto">v1/changelog_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.Changelog">Changelog</h3>
<p></p>
@@ -17424,62 +17054,53 @@ Format: users/{email}. </p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent, which owns this collection of issues.
-Format: projects/{project}
-Use &#34;projects/-&#34; to list all issues from all projects. </p></td>
+ <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>create_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The maximum number of issues to return. The service may return fewer than
-this value.
-If unspecified, at most 10 issues will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>
<td></td>
- <td><p>A page token, received from a previous `SearchIssues` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `SearchIssues` must match
-the call that provided the page token. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter issues returned in the list.
-Check the filter field in the ListIssuesRequest message. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>query</td>
+ <td>schema_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>task_run</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Query is the query statement. </p></td>
+ <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>plan_title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The order by of issues.
-Support:
-- create_time
-- update_time
-The default sorting order is ascending.
-For example:
-- order_by = &#34;create_time desc&#34;
-- order_by = &#34;update_time asc&#34; </p></td>
+ <td><p>The title of the plan associated with this changelog&#39;s task run.
+This field is populated by deriving the plan from task_run for display purposes. </p></td>
</tr>
</tbody>
@@ -17489,7 +17110,7 @@ For example:
- <h3 id="bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</h3>
+ <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>
<p></p>
@@ -17500,18 +17121,18 @@ For example:
<tbody>
<tr>
- <td>issues</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td>repeated</td>
- <td><p>The issues from the specified request. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the changelog to retrieve.
+Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -17521,7 +17142,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</h3>
+ <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3>
<p></p>
@@ -17535,30 +17156,52 @@ If this field is omitted, there are no subsequent pages. </p></td>
<td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The issue name
-Format: projects/{project}/issues/{issue} </p></td>
+ <td><p>The parent of the changelogs.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>issue_comment</td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The comment to update. </p></td>
+ <td><p>The maximum number of changelogs to return. The service may return fewer
+than this value. If unspecified, at most 10 changelogs will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The list of fields to update. </p></td>
+ <td><p>A page token, received from the previous call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
<td></td>
- <td><p>If set to true, and the issue comment is not found, a new issue comment will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Filter is used to filter changelogs returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values.
+- create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
+
+Example:
+status == &#34;DONE&#34;
+status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34;
+create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; </p></td>
</tr>
</tbody>
@@ -17568,7 +17211,7 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</h3>
+ <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>
<p></p>
@@ -17579,28 +17222,18 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>issue</td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td></td>
- <td><p>The issue to update.
-
-The issue&#39;s `name` field is used to identify the issue to update.
-Format: projects/{project}/issues/{issue} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
+ <td>changelogs</td>
+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td>repeated</td>
+ <td><p>The list of changelogs. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set to true, and the issue is not found, a new issue will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -17612,84 +17245,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.Issue.Approver.Status">Issue.Approver.Status</h3>
- <p>The approval status of an approver.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified status.</p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p>Awaiting approval.</p></td>
- </tr>
-
- <tr>
- <td>APPROVED</td>
- <td>2</td>
- <td><p>Approved.</p></td>
- </tr>
-
- <tr>
- <td>REJECTED</td>
- <td>3</td>
- <td><p>Rejected.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.Issue.Type">Issue.Type</h3>
- <p>The type of issue.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified issue type.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_CHANGE</td>
- <td>1</td>
- <td><p>Database schema or data change.</p></td>
- </tr>
-
- <tr>
- <td>ROLE_GRANT</td>
- <td>2</td>
- <td><p>Role grant request.</p></td>
- </tr>
-
- <tr>
- <td>DATABASE_EXPORT</td>
- <td>3</td>
- <td><p>Database data export request.</p></td>
- </tr>
-
- <tr>
- <td>ACCESS_GRANT</td>
- <td>4</td>
- <td><p>Temporary access grant request.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.IssueComment.Approval.Status">IssueComment.Approval.Status</h3>
- <p>Approval status values.</p>
+ <h3 id="bytebase.v1.Changelog.Status">Changelog.Status</h3>
+ <p></p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -17699,151 +17256,86 @@ In this situation, `update_mask` is ignored. </p></td>
<tr>
<td>STATUS_UNSPECIFIED</td>
<td>0</td>
- <td><p>Unspecified status.</p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p>Approval pending.</p></td>
- </tr>
-
- <tr>
- <td>APPROVED</td>
- <td>2</td>
- <td><p>Approved.</p></td>
- </tr>
-
- <tr>
- <td>REJECTED</td>
- <td>3</td>
- <td><p>Rejected.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.IssueService">IssueService</h3>
- <p>IssueService manages issues for tracking database changes and tasks.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetIssue</td>
- <td><a href="#bytebase.v1.GetIssueRequest">GetIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Retrieves an issue by name.
-Permissions required: bb.issues.get</p></td>
- </tr>
-
- <tr>
- <td>CreateIssue</td>
- <td><a href="#bytebase.v1.CreateIssueRequest">CreateIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Creates a new issue for database changes or tasks.
-Permissions required: bb.issues.create</p></td>
- </tr>
-
- <tr>
- <td>ListIssues</td>
- <td><a href="#bytebase.v1.ListIssuesRequest">ListIssuesRequest</a></td>
- <td><a href="#bytebase.v1.ListIssuesResponse">ListIssuesResponse</a></td>
- <td><p>Lists issues in a project.
-Permissions required: bb.issues.list</p></td>
- </tr>
-
- <tr>
- <td>SearchIssues</td>
- <td><a href="#bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</a></td>
- <td><a href="#bytebase.v1.SearchIssuesResponse">SearchIssuesResponse</a></td>
- <td><p>Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter &amp; query.
-Permissions required: bb.issues.get</p></td>
- </tr>
-
- <tr>
- <td>UpdateIssue</td>
- <td><a href="#bytebase.v1.UpdateIssueRequest">UpdateIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Updates an issue&#39;s properties such as title, description, or labels.
-Permissions required: bb.issues.update</p></td>
+ <td><p></p></td>
</tr>
- <tr>
- <td>ListIssueComments</td>
- <td><a href="#bytebase.v1.ListIssueCommentsRequest">ListIssueCommentsRequest</a></td>
- <td><a href="#bytebase.v1.ListIssueCommentsResponse">ListIssueCommentsResponse</a></td>
- <td><p>Lists comments on an issue.
-Permissions required: bb.issueComments.list</p></td>
+ <tr>
+ <td>PENDING</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>CreateIssueComment</td>
- <td><a href="#bytebase.v1.CreateIssueCommentRequest">CreateIssueCommentRequest</a></td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td><p>Adds a comment to an issue.
-Permissions required: bb.issueComments.create</p></td>
+ <td>DONE</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>UpdateIssueComment</td>
- <td><a href="#bytebase.v1.UpdateIssueCommentRequest">UpdateIssueCommentRequest</a></td>
- <td><a href="#bytebase.v1.IssueComment">IssueComment</a></td>
- <td><p>Updates an existing issue comment.
-Permissions required: bb.issueComments.update</p></td>
+ <td>FAILED</td>
+ <td>3</td>
+ <td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>BatchUpdateIssuesStatus</td>
- <td><a href="#bytebase.v1.BatchUpdateIssuesStatusRequest">BatchUpdateIssuesStatusRequest</a></td>
- <td><a href="#bytebase.v1.BatchUpdateIssuesStatusResponse">BatchUpdateIssuesStatusResponse</a></td>
- <td><p>Updates the status of multiple issues in a single operation.
-Permissions required: bb.issues.update</p></td>
+ <td>CHANGELOG_VIEW_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>The default / unset value.
+The API will default to the BASIC view.</p></td>
</tr>
<tr>
- <td>ApproveIssue</td>
- <td><a href="#bytebase.v1.ApproveIssueRequest">ApproveIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
-Permissions required: None (determined by approval flow)</p></td>
+ <td>CHANGELOG_VIEW_BASIC</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>RejectIssue</td>
- <td><a href="#bytebase.v1.RejectIssueRequest">RejectIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
-Permissions required: None (determined by approval flow)</p></td>
+ <td>CHANGELOG_VIEW_FULL</td>
+ <td>2</td>
+ <td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ChangelogService">ChangelogService</h3>
+ <p>ChangelogService manages database migration history.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>RequestIssue</td>
- <td><a href="#bytebase.v1.RequestIssueRequest">RequestIssueRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.
-Permissions required: None (determined by approval flow)</p></td>
+ <td>ListChangelogs</td>
+ <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
+ <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>
+ <td><p>Lists migration history for a database.
+Permissions required: bb.changelogs.list</p></td>
</tr>
<tr>
- <td>RetryIssueApproval</td>
- <td><a href="#bytebase.v1.RetryIssueApprovalRequest">RetryIssueApprovalRequest</a></td>
- <td><a href="#bytebase.v1.Issue">Issue</a></td>
- <td><p>Re-runs approval-template finding for an issue stuck in CHECKING.
-Useful when the synchronous post-create finding errored (e.g. against
-a malformed workspace approval rule) and the operator has since
-corrected it — without this, the issue would remain in CHECKING
-indefinitely because there is no other retry path for non-DATABASE_CHANGE
-issue types. Idempotent: returns the existing issue unchanged when
-approval-finding has already completed.
-Permissions required: None (caller must be the issue creator;
-mirrors RequestIssue&#39;s authorization model).</p></td>
+ <td>GetChangelog</td>
+ <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>
+ <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
+ <td><p>Retrieves a specific changelog entry.
+Permissions required: bb.changelogs.get</p></td>
</tr>
</tbody>
@@ -17867,29 +17359,9 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<tr>
- <td>GetIssue</td>
- <td>GET</td>
- <td>/v1/{name=projects/*/issues/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateIssue</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/issues</td>
- <td>issue</td>
- </tr>
-
-
-
-
- <tr>
- <td>ListIssues</td>
+ <td>ListChangelogs</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/issues</td>
+ <td>/v1/{parent=instances/*/databases/*}/changelogs</td>
<td></td>
</tr>
@@ -17897,103 +17369,13 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<tr>
- <td>SearchIssues</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/issues:search</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateIssue</td>
- <td>PATCH</td>
- <td>/v1/{issue.name=projects/*/issues/*}</td>
- <td>issue</td>
- </tr>
-
-
-
-
- <tr>
- <td>ListIssueComments</td>
+ <td>GetChangelog</td>
<td>GET</td>
- <td>/v1/{parent=projects/*/issues/*}/issueComments</td>
+ <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>
<td></td>
</tr>
-
-
- <tr>
- <td>CreateIssueComment</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*/issues/*}:comment</td>
- <td>issue_comment</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateIssueComment</td>
- <td>PATCH</td>
- <td>/v1/{parent=projects/*/issues/*}:comment</td>
- <td>issue_comment</td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchUpdateIssuesStatus</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/issues:batchUpdateStatus</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ApproveIssue</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:approve</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RejectIssue</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:reject</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RequestIssue</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:request</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>RetryIssueApproval</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/issues/*}:retryApproval</td>
- <td>*</td>
- </tr>
-
-
</tbody>
</table>
@@ -18001,13 +17383,13 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<div class="file-heading">
- <h2 id="v1/setting_service.proto">v1/setting_service.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.AISetting">AISetting</h3>
- <p></p>
+ <h3 id="bytebase.v1.ColumnCatalog">ColumnCatalog</h3>
+ <p>Column metadata within a table.</p>
<table class="field-table">
@@ -18017,45 +17399,38 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<tbody>
<tr>
- <td>enabled</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>provider</td>
- <td><a href="#bytebase.v1.AISetting.Provider">AISetting.Provider</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>endpoint</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The column name. </p></td>
</tr>
<tr>
- <td>api_key</td>
+ <td>semantic_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The semantic type describing the data purpose. </p></td>
</tr>
<tr>
- <td>model</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>User-defined labels for this column. </p></td>
</tr>
<tr>
- <td>version</td>
+ <td>classification</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The data classification level for this column. </p></td>
+ </tr>
+
+ <tr>
+ <td>object_schema</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td>optional</td>
+ <td><p>Object schema for complex column types like JSON. </p></td>
</tr>
</tbody>
@@ -18065,7 +17440,7 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
- <h3 id="bytebase.v1.Algorithm">Algorithm</h3>
+ <h3 id="bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3>
<p></p>
@@ -18076,31 +17451,49 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<tbody>
<tr>
- <td>full_mask</td>
- <td><a href="#bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>range_mask</td>
- <td><a href="#bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseCatalog">DatabaseCatalog</h3>
+ <p>Catalog metadata for a database including schemas, tables, and columns.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>md5_mask</td>
- <td><a href="#bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the database catalog.
+Format: instances/{instance}/databases/{database}/catalog </p></td>
</tr>
<tr>
- <td>inner_outer_mask</td>
- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>schemas</td>
+ <td><a href="#bytebase.v1.SchemaCatalog">SchemaCatalog</a></td>
+ <td>repeated</td>
+ <td><p>The schemas in the database. </p></td>
</tr>
</tbody>
@@ -18110,8 +17503,8 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
- <h3 id="bytebase.v1.Algorithm.FullMask">Algorithm.FullMask</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</h3>
+ <p>Request message for getting a database catalog.</p>
<table class="field-table">
@@ -18121,11 +17514,11 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<tbody>
<tr>
- <td>substitution</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>substitution is the string used to replace the original value, the
-max length of the string is 16 bytes. </p></td>
+ <td><p>The name of the database catalog to retrieve.
+Format: instances/{instance}/databases/{database}/catalog </p></td>
</tr>
</tbody>
@@ -18135,8 +17528,8 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.InnerOuterMask">Algorithm.InnerOuterMask</h3>
- <p></p>
+ <h3 id="bytebase.v1.ObjectSchema">ObjectSchema</h3>
+ <p>Schema definition for object-type columns.</p>
<table class="field-table">
@@ -18146,31 +17539,31 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>prefix_len</td>
- <td><a href="#int32">int32</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The data type of this object. </p></td>
</tr>
<tr>
- <td>suffix_len</td>
- <td><a href="#int32">int32</a></td>
+ <td>struct_kind</td>
+ <td><a href="#bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Struct schema. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</a></td>
+ <td>array_kind</td>
+ <td><a href="#bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Array schema. </p></td>
</tr>
<tr>
- <td>substitution</td>
+ <td>semantic_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The semantic type of this object. </p></td>
</tr>
</tbody>
@@ -18180,8 +17573,8 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.MD5Mask">Algorithm.MD5Mask</h3>
- <p></p>
+ <h3 id="bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>
+ <p>Array type with element schema.</p>
<table class="field-table">
@@ -18191,10 +17584,10 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>salt</td>
- <td><a href="#string">string</a></td>
+ <td>kind</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
<td></td>
- <td><p>salt is the salt value to generate a different hash that with the word alone. </p></td>
+ <td><p>The schema of array elements. </p></td>
</tr>
</tbody>
@@ -18204,8 +17597,8 @@ max length of the string is 16 bytes. </p></td>
- <h3 id="bytebase.v1.Algorithm.RangeMask">Algorithm.RangeMask</h3>
- <p></p>
+ <h3 id="bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>
+ <p>Structure type with named properties.</p>
<table class="field-table">
@@ -18215,11 +17608,10 @@ max length of the string is 16 bytes. </p></td>
<tbody>
<tr>
- <td>slices</td>
- <td><a href="#bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</a></td>
+ <td>properties</td>
+ <td><a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>
<td>repeated</td>
- <td><p>We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.
-But frontend can be started with a single rule easily. </p></td>
+ <td><p>Properties of the struct. </p></td>
</tr>
</tbody>
@@ -18229,7 +17621,7 @@ But frontend can be started with a single rule easily. </p></td>
- <h3 id="bytebase.v1.Algorithm.RangeMask.Slice">Algorithm.RangeMask.Slice</h3>
+ <h3 id="bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3>
<p></p>
@@ -18240,27 +17632,17 @@ But frontend can be started with a single rule easily. </p></td>
<tbody>
<tr>
- <td>start</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>start is the start character index (0-based) of the original value, should be less than end.
-Uses character indices (not byte offsets) for display-oriented masking.
-Example: For &#34;你好world&#34;, character index 2 refers to &#39;w&#39; (the 3rd character). </p></td>
- </tr>
-
- <tr>
- <td>end</td>
- <td><a href="#int32">int32</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>end is the end character index (exclusive) of the original value.
-Uses character indices (not byte offsets) for display-oriented masking. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>substitution</td>
- <td><a href="#string">string</a></td>
+ <td>value</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
<td></td>
- <td><p>substitution is the string used to replace the OriginalValue[start:end). </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -18270,8 +17652,8 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td
- <h3 id="bytebase.v1.Announcement">Announcement</h3>
- <p></p>
+ <h3 id="bytebase.v1.SchemaCatalog">SchemaCatalog</h3>
+ <p>Schema metadata within a database.</p>
<table class="field-table">
@@ -18281,25 +17663,17 @@ Uses character indices (not byte offsets) for display-oriented masking. </p></td
<tbody>
<tr>
- <td>text</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The text of announcement </p></td>
- </tr>
-
- <tr>
- <td>link</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The optional link, user can follow the link to check extra details </p></td>
+ <td><p>The schema name. </p></td>
</tr>
<tr>
- <td>theme</td>
- <td><a href="#bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</a></td>
- <td></td>
- <td><p>Banner colors. Built-in presets (info/warning/critical) are a
-frontend-only concept that seeds these colors; the store only holds them. </p></td>
+ <td>tables</td>
+ <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>
+ <td>repeated</td>
+ <td><p>The tables in the schema. </p></td>
</tr>
</tbody>
@@ -18309,8 +17683,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.Announcement.AnnouncementTheme">Announcement.AnnouncementTheme</h3>
- <p></p>
+ <h3 id="bytebase.v1.TableCatalog">TableCatalog</h3>
+ <p>Table metadata within a schema.</p>
<table class="field-table">
@@ -18320,17 +17694,31 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>background</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The table name. </p></td>
</tr>
<tr>
- <td>text</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Regular table columns. </p></td>
+ </tr>
+
+ <tr>
+ <td>object_schema</td>
+ <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td></td>
+ <td><p>Object schema for JSON/XML columns. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The data classification level for this table. </p></td>
</tr>
</tbody>
@@ -18340,8 +17728,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting">AppIMSetting</h3>
- <p></p>
+ <h3 id="bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</h3>
+ <p>Column list for regular tables.</p>
<table class="field-table">
@@ -18351,10 +17739,10 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>settings</td>
- <td><a href="#bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</a></td>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The columns in the table. </p></td>
</tr>
</tbody>
@@ -18364,8 +17752,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</h3>
- <p></p>
+ <h3 id="bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</h3>
+ <p>Request message for updating a database catalog.</p>
<table class="field-table">
@@ -18375,66 +17763,159 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>client_secret</td>
- <td><a href="#string">string</a></td>
+ <td>catalog</td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database catalog to update.
+
+The catalog&#39;s `name` field is used to identify the database catalog to update.
+Format: instances/{instance}/databases/{database}/catalog </p></td>
</tr>
<tr>
- <td>robot_code</td>
- <td><a href="#string">string</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set to true, and the database catalog is not found, a new database catalog will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
</table>
-
+
+
+
+
+
+
+ <h3 id="bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</h3>
+ <p>Object schema data types.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified type.</p></td>
+ </tr>
+
+ <tr>
+ <td>STRING</td>
+ <td>1</td>
+ <td><p>String type.</p></td>
+ </tr>
+
+ <tr>
+ <td>NUMBER</td>
+ <td>2</td>
+ <td><p>Number type.</p></td>
+ </tr>
+
+ <tr>
+ <td>BOOLEAN</td>
+ <td>3</td>
+ <td><p>Boolean type.</p></td>
+ </tr>
+
+ <tr>
+ <td>OBJECT</td>
+ <td>4</td>
+ <td><p>Object/struct type.</p></td>
+ </tr>
+
+ <tr>
+ <td>ARRAY</td>
+ <td>5</td>
+ <td><p>Array type.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
-
- <h3 id="bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseCatalogService">DatabaseCatalogService</h3>
+ <p>DatabaseCatalogService manages database schema metadata and classification.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>GetDatabaseCatalog</td>
+ <td><a href="#bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td><p>Gets the catalog metadata for a database.
+Permissions required: bb.databaseCatalogs.get</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateDatabaseCatalog</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td><p>Updates catalog metadata such as classifications and labels.
+Permissions required: bb.databaseCatalogs.update</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>app_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>app_secret</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>GetDatabaseCatalog</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/catalog}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateDatabaseCatalog</td>
+ <td>PATCH</td>
+ <td>/v1/{catalog.name=instances/*/databases/*/catalog}</td>
+ <td>catalog</td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.AppIMSetting.IMSetting">AppIMSetting.IMSetting</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>
+ <p>Request message for creating a database group.</p>
<table class="field-table">
@@ -18444,52 +17925,36 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.WebhookType">WebhookType</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>slack</td>
- <td><a href="#bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>feishu</td>
- <td><a href="#bytebase.v1.AppIMSetting.Feishu">AppIMSetting.Feishu</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>wecom</td>
- <td><a href="#bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</a></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The parent resource where this database group will be created.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>lark</td>
- <td><a href="#bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</a></td>
+ <td>database_group</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The database group to create. </p></td>
</tr>
<tr>
- <td>dingtalk</td>
- <td><a href="#bytebase.v1.AppIMSetting.DingTalk">AppIMSetting.DingTalk</a></td>
+ <td>database_group_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The ID to use for the database group, which will become the final component of
+the database group&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>teams</td>
- <td><a href="#bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</a></td>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>
</tr>
</tbody>
@@ -18499,8 +17964,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Lark">AppIMSetting.Lark</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>
+ <p>A group of databases matched by expressions.</p>
<table class="field-table">
@@ -18510,41 +17975,44 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>app_id</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the database group.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>app_secret</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The short name used in actual databases specified by users. </p></td>
</tr>
- </tbody>
- </table>
-
-
+ <tr>
+ <td>database_expr</td>
+ <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td></td>
+ <td><p>The condition that is associated with this database group.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-
- <h3 id="bytebase.v1.AppIMSetting.Slack">AppIMSetting.Slack</h3>
- <p></p>
+Support variables:
+resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations.
+resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
+resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
+resource.database_labels: the database labels. Support map access operations.
+All variables should join with &#34;&amp;&amp;&#34; condition.
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+For example:
+resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;)
+resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
+ </tr>
<tr>
- <td>token</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>matched_databases</td>
+ <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>
+ <td>repeated</td>
+ <td><p>The list of databases that match the database group condition. </p></td>
</tr>
</tbody>
@@ -18554,8 +18022,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Teams">AppIMSetting.Teams</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>
+ <p>A database within a database group.</p>
<table class="field-table">
@@ -18565,24 +18033,11 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>tenant_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Azure AD tenant ID (Directory ID). </p></td>
- </tr>
-
- <tr>
- <td>client_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Azure AD application (client) ID. </p></td>
- </tr>
-
- <tr>
- <td>client_secret</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Azure AD client secret. </p></td>
+ <td><p>The resource name of the database.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
</tbody>
@@ -18592,8 +18047,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.AppIMSetting.Wecom">AppIMSetting.Wecom</h3>
- <p></p>
+ <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>
+ <p>Request message for deleting a database group.</p>
<table class="field-table">
@@ -18603,24 +18058,11 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>corp_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>agent_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>secret</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the database group to delete.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
</tbody>
@@ -18630,8 +18072,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.DataClassificationSetting">DataClassificationSetting</h3>
- <p></p>
+ <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>
+ <p>Request message for getting a database group.</p>
<table class="field-table">
@@ -18641,10 +18083,18 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>configs</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database group to retrieve.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ </tr>
+
+ <tr>
+ <td>view</td>
+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td></td>
+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
</tr>
</tbody>
@@ -18654,8 +18104,8 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig">DataClassificationSetting.DataClassificationConfig</h3>
- <p></p>
+ <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>
+ <p>Request message for listing database groups.</p>
<table class="field-table">
@@ -18665,32 +18115,18 @@ frontend-only concept that seeds these colors; the store only holds them. </p></
<tbody>
<tr>
- <td>id</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>id is the uuid for classification. Each project can chose one classification config. </p></td>
+ <td><p>The parent resource whose database groups are to be listed.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>view</td>
+ <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>levels</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</a></td>
- <td>repeated</td>
- <td><p>levels is user defined level list for classification. </p></td>
- </tr>
-
- <tr>
- <td>classification</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</a></td>
- <td>repeated</td>
- <td><p>classification is the id - DataClassification map.
-The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
</tr>
</tbody>
@@ -18700,8 +18136,8 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry">DataClassificationSetting.DataClassificationConfig.ClassificationEntry</h3>
- <p></p>
+ <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>
+ <p>Response message for listing database groups.</p>
<table class="field-table">
@@ -18711,17 +18147,10 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>database_groups</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>repeated</td>
+ <td><p>The database groups from the specified request. </p></td>
</tr>
</tbody>
@@ -18731,8 +18160,8 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification">DataClassificationSetting.DataClassificationConfig.DataClassification</h3>
- <p></p>
+ <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>
+ <p>Request message for updating a database group.</p>
<table class="field-table">
@@ -18742,24 +18171,28 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>database_group</td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
<td></td>
- <td><p>id is the classification id in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
+ <td><p>The database group to update.
+
+The database group&#39;s `name` field is used to identify the database group to update.
+Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>level</td>
- <td><a href="#int32">int32</a></td>
- <td>optional</td>
- <td><p>The sensitivity level. Maps to Level.level. </p></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the database group is not found, a new database group will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -18769,39 +18202,173 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level">DataClassificationSetting.DataClassificationConfig.Level</h3>
- <p></p>
+
+
+ <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>
+ <p>View options for database group responses.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>The default / unset value.
+The API will default to the BASIC view.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_GROUP_VIEW_BASIC</td>
+ <td>1</td>
+ <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE_GROUP_VIEW_FULL</td>
+ <td>2</td>
+ <td><p>Include everything.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>
+ <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListDatabaseGroups</td>
+ <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>
+ <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>
+ <td><p>Lists database groups in a project.
+Permissions required: bb.databaseGroups.list</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseGroup</td>
+ <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Gets a database group by name.
+Permissions required: bb.databaseGroups.get</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateDatabaseGroup</td>
+ <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Creates a new database group.
+Permissions required: bb.databaseGroups.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateDatabaseGroup</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td><p>Updates a database group.
+Permissions required: bb.databaseGroups.update
+When allow_missing=true, also requires: bb.databaseGroups.create</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteDatabaseGroup</td>
+ <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes a database group.
+Permissions required: bb.databaseGroups.delete</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>level</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The numeric level for ordering. Higher = more sensitive. </p></td>
- </tr>
+ <tr>
+ <td>ListDatabaseGroups</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetDatabaseGroup</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateDatabaseGroup</td>
+ <td>POST</td>
+ <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td>database_group</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateDatabaseGroup</td>
+ <td>PATCH</td>
+ <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>
+ <td>database_group</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteDatabaseGroup</td>
+ <td>DELETE</td>
+ <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td></td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>
- <p></p>
+ <div class="file-heading">
+ <h2 id="v1/instance_role_service.proto">v1/instance_role_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.InstanceRole">InstanceRole</h3>
+ <p>InstanceRole is the API message for instance role.</p>
<table class="field-table">
@@ -18811,31 +18378,49 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>from</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the role.
+Format: instances/{instance}/roles/{role}
+The role name is the unique name for the role. </p></td>
</tr>
<tr>
- <td>from_name</td>
+ <td>role_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The role name. It&#39;s unique within the instance. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The role password. </p></td>
</tr>
<tr>
- <td>smtp</td>
- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>connection_limit</td>
+ <td><a href="#int32">int32</a></td>
+ <td>optional</td>
+ <td><p>The connection count limit for this role. </p></td>
+ </tr>
+
+ <tr>
+ <td>valid_until</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The expiration for the role&#39;s password. </p></td>
+ </tr>
+
+ <tr>
+ <td>attribute</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The role attribute.
+For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
+For MySQL, it&#39;s the global privileges as GRANT statements, which means it only contains &#34;GRANT ... ON *.* TO ...&#34;. Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td>
</tr>
</tbody>
@@ -18845,7 +18430,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>
+ <h3 id="bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</h3>
<p></p>
@@ -18856,45 +18441,41 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>host</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The parent, which owns this collection of roles.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>port</td>
+ <td>page_size</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>username</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>Not used.
+The maximum number of roles to return. The service may return fewer than
+this value.
+If unspecified, at most 10 roles will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>encryption</td>
- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>Not used.
+A page token, received from a previous `ListInstanceRoles` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListInstanceRoles` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>authentication</td>
- <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>
+ <td>refresh</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Refresh will refresh and return the latest data. </p></td>
</tr>
</tbody>
@@ -18904,7 +18485,7 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3>
+ <h3 id="bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</h3>
<p></p>
@@ -18915,10 +18496,18 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
<tbody>
<tr>
- <td>environments</td>
- <td><a href="#bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</a></td>
+ <td>roles</td>
+ <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The roles from the specified request. </p></td>
+ </tr>
+
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
</tbody>
@@ -18928,63 +18517,69 @@ The id should in [0-9]&#43;-[0-9]&#43;-[0-9]&#43; format. </p></td>
- <h3 id="bytebase.v1.EnvironmentSetting.Environment">EnvironmentSetting.Environment</h3>
- <p></p>
+
+
+
+
+
+
+ <h3 id="bytebase.v1.InstanceRoleService">InstanceRoleService</h3>
+ <p>InstanceRoleService manages database roles within instances.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>ListInstanceRoles</td>
+ <td><a href="#bytebase.v1.ListInstanceRolesRequest">ListInstanceRolesRequest</a></td>
+ <td><a href="#bytebase.v1.ListInstanceRolesResponse">ListInstanceRolesResponse</a></td>
+ <td><p>Lists all database roles in an instance.
+Permissions required: bb.instanceRoles.list</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <table class="field-table">
+
+
+ <h4>Methods with HTTP bindings</h4>
+ <table>
<thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ <tr>
+ <td>Method Name</td>
+ <td>Method</td>
+ <td>Pattern</td>
+ <td>Body</td>
+ </tr>
</thead>
<tbody>
+
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the environment.
-Format: environments/{environment}.
-Output only. </p></td>
- </tr>
-
- <tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource id of the environment.
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The display name of the environment. </p></td>
- </tr>
-
- <tr>
- <td>tags</td>
- <td><a href="#bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
- <tr>
- <td>color</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
+ <tr>
+ <td>ListInstanceRoles</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/roles</td>
+ <td></td>
+ </tr>
+
</tbody>
</table>
-
-
+
- <h3 id="bytebase.v1.EnvironmentSetting.Environment.TagsEntry">EnvironmentSetting.Environment.TagsEntry</h3>
+ <div class="file-heading">
+ <h2 id="v1/instance_service.proto">v1/instance_service.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</h3>
<p></p>
@@ -18995,17 +18590,26 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the instance to add a data source to.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
+ <td>data_source</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Identified by data source ID.
+Only READ_ONLY data source can be added. </p></td>
+ </tr>
+
+ <tr>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Validate only also tests the data source connection. </p></td>
</tr>
</tbody>
@@ -19015,8 +18619,8 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.GetSettingRequest">GetSettingRequest</h3>
- <p>The request message for getting a setting.</p>
+ <h3 id="bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -19026,10 +18630,11 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The resource name of the setting. </p></td>
+ <td>requests</td>
+ <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
+ <td>repeated</td>
+ <td><p>The request message specifying the instances to sync.
+A maximum of 1000 instances can be synced in a batch. </p></td>
</tr>
</tbody>
@@ -19039,8 +18644,15 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.GetSettingResponse">GetSettingResponse</h3>
- <p>The response message for getting a setting.</p>
+ <h3 id="bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -19048,12 +18660,12 @@ are /[a-z][0-9]-/. </p></td>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
- <tr>
- <td>setting</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
- <td></td>
- <td><p> </p></td>
+
+ <tr>
+ <td>requests</td>
+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
+ <td>repeated</td>
+ <td><p>The request message specifying the resources to update. </p></td>
</tr>
</tbody>
@@ -19063,14 +18675,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.ListSettingsRequest">ListSettingsRequest</h3>
- <p></p>
-
-
-
-
-
- <h3 id="bytebase.v1.ListSettingsResponse">ListSettingsResponse</h3>
+ <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3>
<p></p>
@@ -19081,10 +18686,10 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>settings</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td>instances</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
<td>repeated</td>
- <td><p>The settings from the specified request. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -19094,7 +18699,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</h3>
+ <h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3>
<p></p>
@@ -19105,31 +18710,36 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
+ <td>instance</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The instance to create. </p></td>
</tr>
<tr>
- <td>name</td>
+ <td>instance_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The ID to use for the instance, which will become the final component of
+the instance&#39;s resource name.
+
+This value should be 4-63 characters, and valid characters
+are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>monaco_base</td>
- <td><a href="#string">string</a></td>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Validate only also tests the data source connection. </p></td>
</tr>
<tr>
- <td>tokens</td>
- <td><a href="#bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</a></td>
- <td>repeated</td>
- <td><p>CSS token colors. </p></td>
+ <td>initial_database_project</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The project to assign newly discovered databases to during initial sync.
+Format: projects/{project} </p></td>
</tr>
</tbody>
@@ -19139,7 +18749,7 @@ are /[a-z][0-9]-/. </p></td>
- <h3 id="bytebase.v1.SQLEditorThemeSetting.TokensEntry">SQLEditorThemeSetting.TokensEntry</h3>
+ <h3 id="bytebase.v1.DataSource">DataSource</h3>
<p></p>
@@ -19150,605 +18760,561 @@ are /[a-z][0-9]-/. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The unique identifier for this data source. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#google.type.Color">google.type.Color</a></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.DataSourceType">DataSourceType</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The type of data source (ADMIN or READ_ONLY). </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>username</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The username for database authentication. </p></td>
+ </tr>
<tr>
- <td>types</td>
- <td><a href="#bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>password</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The password for database authentication. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SemanticTypeSetting.SemanticType">SemanticTypeSetting.SemanticType</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>use_ssl</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>
+ </tr>
<tr>
- <td>id</td>
+ <td>ssl_ca</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>id is the uuid for semantic type. </p></td>
+ <td><p>The SSL certificate authority certificate. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>ssl_cert</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>the title of the semantic type, it should not be empty. </p></td>
+ <td><p>The SSL client certificate. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>ssl_key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>the description of the semantic type, it can be empty. </p></td>
+ <td><p>The SSL client private key. </p></td>
</tr>
<tr>
- <td>algorithm</td>
- <td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>
+ <td>ssl_ca_path</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The local filesystem path to the SSL certificate authority certificate. </p></td>
</tr>
<tr>
- <td>icon</td>
+ <td>ssl_cert_path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>icon is the icon for semantic type, it can be emoji or base64 encoded image. </p></td>
+ <td><p>The local filesystem path to the SSL client certificate. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.Setting">Setting</h3>
- <p>The schema of setting.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>ssl_key_path</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The resource name of the setting.
-Format: settings/{setting}
-Example: &#34;settings/SEMANTIC_TYPES&#34; </p></td>
+ <td><p>The local filesystem path to the SSL client private key. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#bytebase.v1.SettingValue">SettingValue</a></td>
+ <td>ssl_ca_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The configuration value of the setting. </p></td>
+ <td><p>Whether an SSL certificate authority certificate has been configured. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SettingValue">SettingValue</h3>
- <p>The data in setting value.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>ssl_cert_set</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether an SSL client certificate has been configured. </p></td>
+ </tr>
<tr>
- <td>app_im</td>
- <td><a href="#bytebase.v1.AppIMSetting">AppIMSetting</a></td>
+ <td>ssl_key_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether an SSL client private key has been configured. </p></td>
</tr>
<tr>
- <td>workspace_profile</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</a></td>
+ <td>ssl_ca_path_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether an SSL certificate authority path has been configured. </p></td>
</tr>
<tr>
- <td>workspace_approval</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</a></td>
+ <td>ssl_cert_path_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether an SSL client certificate path has been configured. </p></td>
</tr>
<tr>
- <td>data_classification</td>
- <td><a href="#bytebase.v1.DataClassificationSetting">DataClassificationSetting</a></td>
+ <td>ssl_key_path_set</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Whether an SSL client private key path has been configured. </p></td>
</tr>
<tr>
- <td>semantic_type</td>
- <td><a href="#bytebase.v1.SemanticTypeSetting">SemanticTypeSetting</a></td>
+ <td>verify_tls_certificate</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>verify_tls_certificate enables TLS certificate verification for SSL connections.
+Default is false (no verification) for backward compatibility.
+Set to true for secure connections (recommended for production).
+Only set to false for development or when certificates cannot be properly
+validated (e.g., self-signed certs, VPN environments). </p></td>
+ </tr>
+
+ <tr>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The hostname or IP address of the database server. </p></td>
+ </tr>
+
+ <tr>
+ <td>port</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The port number of the database server. </p></td>
+ </tr>
+
+ <tr>
+ <td>database</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database to connect to. </p></td>
+ </tr>
+
+ <tr>
+ <td>srv</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>srv, authentication_database and replica_set are used for MongoDB.
+srv is a boolean flag that indicates whether the host is a DNS SRV record. </p></td>
+ </tr>
+
+ <tr>
+ <td>authentication_database</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>
</tr>
<tr>
- <td>ai</td>
- <td><a href="#bytebase.v1.AISetting">AISetting</a></td>
+ <td>replica_set</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>replica_set is used for MongoDB replica set. </p></td>
</tr>
<tr>
- <td>environment</td>
- <td><a href="#bytebase.v1.EnvironmentSetting">EnvironmentSetting</a></td>
+ <td>sid</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>sid and service_name are used for Oracle. </p></td>
</tr>
<tr>
- <td>email</td>
- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
+ <td>service_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>parent</td>
+ <td>ssh_host</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Connection over SSH.
+The hostname of the SSH server agent.
+Required. </p></td>
</tr>
<tr>
- <td>email_setting</td>
- <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>
+ <td>ssh_port</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The port of the SSH server agent. It&#39;s 22 typically.
+Required. </p></td>
</tr>
<tr>
- <td>to</td>
+ <td>ssh_user</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The user to login the server.
+Required. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>success</td>
- <td><a href="#bool">bool</a></td>
+ <td>ssh_password</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The password to login the server. If it&#39;s empty string, no password is required. </p></td>
</tr>
<tr>
- <td>error</td>
+ <td>ssh_private_key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The private key to login the server. If it&#39;s empty string, we will use the system default private key from os.Getenv(&#34;SSH_AUTH_SOCK&#34;). </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</h3>
- <p>The request message for updating or creating a setting.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>setting</td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
+ <td>authentication_private_key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The setting to update. </p></td>
+ <td><p>PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required.
+Used for authentication when connecting to the data source. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>authentication_private_key_passphrase</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>validate_only is a flag to indicate whether to validate the setting value,
-server would not persist the setting value if it is true. </p></td>
+ <td><p>Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted. </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>external_secret</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td>authentication_type</td>
+ <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.WorkspaceApprovalSetting">WorkspaceApprovalSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>rules</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td>cloud_sql_ip_type</td>
+ <td><a href="#bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</a></td>
+ <td></td>
+ <td><p>cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.
+CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule">WorkspaceApprovalSetting.Rule</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>template</td>
- <td><a href="#bytebase.v1.ApprovalTemplate">ApprovalTemplate</a></td>
+ <td>azure_credential</td>
+ <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>aws_credential</td>
+ <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td>
<td></td>
- <td><p>The condition that is associated with the rule.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-The `source` field filters which rules apply. The `condition` field then evaluates with full context.
-
-All supported variables:
-statement.affected_rows: affected row count in the DDL/DML, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
-statement.table_rows: table row count number, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
-resource.environment_id: the environment resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
-resource.project_id: the project resource id, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-resource.db_engine: the database engine type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations. Check the Engine enum for values.
-statement.sql_type: the SQL type, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operations.
-resource.database_name: the database name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-resource.schema_name: the schema name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-resource.table_name: the table name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-statement.text: the SQL statement, support &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-request.expiration_days: the role expiration days for the request, support &#34;==&#34;, &#34;!=&#34;, &#34;&lt;&#34;, &#34;&lt;=&#34;, &#34;&gt;&#34;, &#34;&gt;=&#34; operations.
-request.role: the request role full name, support &#34;==&#34;, &#34;!=&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34;, &#34;contains()&#34;, &#34;matches()&#34;, &#34;startsWith()&#34;, &#34;endsWith()&#34; operations.
-
-When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)
-When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name
-When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role
-When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export
-
-For examples:
-resource.environment_id == &#34;prod&#34; &amp;&amp; statement.affected_rows &gt;= 100
-resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engine == &#34;MYSQL&#34; </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>source</td>
- <td><a href="#bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</a></td>
+ <td>gcp_credential</td>
+ <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td>
<td></td>
<td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.WorkspaceProfileSetting">WorkspaceProfileSetting</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>external_url</td>
- <td><a href="#string">string</a></td>
+ <td>sasl_config</td>
+ <td><a href="#bytebase.v1.SASLConfig">SASLConfig</a></td>
<td></td>
- <td><p>The external URL is used for sso authentication callback. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>disallow_signup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Disallow self-service signup, users can only be invited by the owner. </p></td>
+ <td>additional_addresses</td>
+ <td><a href="#bytebase.v1.DataSource.Address">DataSource.Address</a></td>
+ <td>repeated</td>
+ <td><p>additional_addresses is used for MongoDB replica set. </p></td>
</tr>
<tr>
- <td>require_mfa</td>
+ <td>direct_connection</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Require MFA for all users. </p></td>
+ <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>
</tr>
<tr>
- <td>refresh_token_duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>region</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The duration for refresh token. Default is 7 days. </p></td>
+ <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>
</tr>
<tr>
- <td>announcement</td>
- <td><a href="#bytebase.v1.Announcement">Announcement</a></td>
+ <td>warehouse_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The setting of custom announcement </p></td>
+ <td><p>warehouse_id is used by Databricks. </p></td>
</tr>
<tr>
- <td>maximum_request_expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>master_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The max expiration duration for data access requests. </p></td>
+ <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td>
</tr>
<tr>
- <td>domains</td>
+ <td>master_username</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The workspace domain, e.g., bytebase.com. </p></td>
+ <td></td>
+ <td><p>master_username and master_password are master credentials used by redis sentinel mode. </p></td>
</tr>
<tr>
- <td>enforce_identity_domain</td>
- <td><a href="#bool">bool</a></td>
+ <td>master_password</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Only user and group from the domains can be created and login. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>database_change_mode</td>
- <td><a href="#bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</a></td>
+ <td>redis_type</td>
+ <td><a href="#bytebase.v1.DataSource.RedisType">DataSource.RedisType</a></td>
<td></td>
- <td><p>The workspace database change mode. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>disallow_password_signin</td>
- <td><a href="#bool">bool</a></td>
+ <td>cluster</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to disallow password signin. (Except workspace admins) </p></td>
+ <td><p>Cluster is the cluster name for the data source. Used by CockroachDB. </p></td>
</tr>
<tr>
- <td>enable_metric_collection</td>
- <td><a href="#bool">bool</a></td>
+ <td>extra_connection_parameters</td>
+ <td><a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>
+ <td>repeated</td>
+ <td><p>Extra connection parameters for the database connection.
+For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>
+ </tr>
+
+ <tr>
+ <td>project_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to enable metric collection for the workspace. </p></td>
+ <td><p>project_id and instance_id are the GCP resource identifiers.
+project_id is used by Spanner and BigQuery; instance_id is used by Spanner.
+For these engines, host and port optionally override the default Google API
+endpoint (e.g. a Private Service Connect endpoint like
+spanner-nonprod.p.googleapis.com). </p></td>
</tr>
<tr>
- <td>inactive_session_timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>instance_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The session expiration time if not activity detected for the user. Value &lt;= 0 means no limit. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>enable_audit_log_stdout</td>
- <td><a href="#bool">bool</a></td>
+ <td>access_key_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to enable audit logging to stdout in structured JSON format.
-Requires TEAM or ENTERPRISE license. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>watermark</td>
- <td><a href="#bool">bool</a></td>
+ <td>secret_access_key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether to display watermark on pages.
-Requires ENTERPRISE license. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>directory_sync_token</td>
+ <td>session_token</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The token for directory sync authentication. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>password_restriction</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
+ <td>role_arn</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Password restriction settings. </p></td>
+ <td><p>ARN of IAM role to assume for cross-account access.
+See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html </p></td>
</tr>
<tr>
- <td>access_token_duration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>external_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The duration for access token. Default is 1 hour. </p></td>
+ <td><p>Optional external ID for additional security when assuming role.
+See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>enable_debug</td>
- <td><a href="#bool">bool</a></td>
+ <td>host</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether debug mode is enabled. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sql_result_size</td>
- <td><a href="#int64">int64</a></td>
+ <td>port</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.
-The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>query_timeout</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>tenant_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The query timeout duration for query and export, works for the SQL Editor and Export Center. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>allow_email_code_signin</td>
- <td><a href="#bool">bool</a></td>
+ <td>client_id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Allow signin/signup using email &#43; a 6-digit one-time verification code.
-Requires the EMAIL setting to be configured on the workspace. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>sql_editor_theme_id</td>
+ <td>client_secret</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id
-OR a custom theme&#39;s uuid. Empty ⇒ default light. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>sql_editor_custom_theme</td>
- <td><a href="#bytebase.v1.SQLEditorThemeSetting">SQLEditorThemeSetting</a></td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The enforced CUSTOM theme&#39;s full definition — present ONLY when
-sql_editor_theme_id is a custom uuid. tokens is always complete. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>maximum_role_expiration</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The max expiration duration for request role.
-Deprecated: use just-in-time access request flows instead. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>mcp_capability</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</a></td>
+ <td>content</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The maximum capability available to MCP (Model Context Protocol) sessions in
-this workspace, acting as an admin-set ceiling. Unset is treated as
-READ_WRITE for backward compatibility; DISABLED rejects all MCP
-connections. Writing MCP_CAPABILITY_UNSPECIFIED explicitly is rejected —
-omit the update mask path to leave the ceiling unset. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -19758,7 +19324,7 @@ omit the update mask path to leave the ceiling unset. </p></td>
- <h3 id="bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</h3>
<p></p>
@@ -19769,521 +19335,441 @@ omit the update mask path to leave the ceiling unset. </p></td>
<tbody>
<tr>
- <td>min_length</td>
- <td><a href="#int32">int32</a></td>
+ <td>secret_type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>
+ <td></td>
+ <td><p>The type of external secret store. </p></td>
+ </tr>
+
+ <tr>
+ <td>url</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The URL of the external secret store. </p></td>
+ </tr>
+
+ <tr>
+ <td>auth_type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>
+ <td></td>
+ <td><p>The authentication method for accessing the secret store. </p></td>
+ </tr>
+
+ <tr>
+ <td>app_role</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>
+ <td></td>
+ <td><p>AppRole authentication configuration. </p></td>
+ </tr>
+
+ <tr>
+ <td>token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Token for direct authentication. Interpreted according to token_type:
+the literal token (PLAIN), an environment variable name (ENVIRONMENT),
+or a file path (FILE). </p></td>
+ </tr>
+
+ <tr>
+ <td>token_type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</a></td>
<td></td>
- <td><p>min_length is the minimum length for password, should no less than 8. </p></td>
+ <td><p>How to interpret the token field when auth_type is TOKEN. </p></td>
</tr>
<tr>
- <td>require_number</td>
- <td><a href="#bool">bool</a></td>
+ <td>engine_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_number requires the password must contains at least one number. </p></td>
+ <td><p>engine name is the name for secret engine. </p></td>
</tr>
<tr>
- <td>require_letter</td>
- <td><a href="#bool">bool</a></td>
+ <td>secret_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_letter requires the password must contains at least one letter, regardless of upper case or lower case </p></td>
+ <td><p>the secret name in the engine to store the password. </p></td>
</tr>
<tr>
- <td>require_uppercase_letter</td>
- <td><a href="#bool">bool</a></td>
+ <td>password_key_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_uppercase_letter requires the password must contains at least one upper case letter. </p></td>
+ <td><p>the key name for the password. </p></td>
</tr>
<tr>
- <td>require_special_character</td>
+ <td>skip_vault_tls_verification</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>require_special_character requires the password must contains at least one special character. </p></td>
+ <td><p>TLS configuration for connecting to Vault server.
+These fields are separate from the database TLS configuration in DataSource.
+skip_vault_tls_verification disables TLS certificate verification for Vault connections.
+Default is false (verification enabled) for security.
+Only set to true for development or when certificates cannot be properly validated. </p></td>
</tr>
<tr>
- <td>require_reset_password_for_first_login</td>
- <td><a href="#bool">bool</a></td>
+ <td>vault_ssl_ca</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>require_reset_password_for_first_login requires users to reset their password after the 1st login. </p></td>
+ <td><p>CA certificate for Vault server verification. </p></td>
</tr>
<tr>
- <td>password_rotation</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>vault_ssl_cert</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>password_rotation requires users to reset their password after the duration. </p></td>
+ <td><p>Client certificate for mutual TLS authentication with Vault. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.AISetting.Provider">AISetting.Provider</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>PROVIDER_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OPEN_AI</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CLAUDE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>GEMINI</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AZURE_OPENAI</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.Algorithm.InnerOuterMask.MaskType">Algorithm.InnerOuterMask.MaskType</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MASK_TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>INNER</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OUTER</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.DatabaseChangeMode">DatabaseChangeMode</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>DATABASE_CHANGE_MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PIPELINE</td>
- <td>1</td>
- <td><p>A more advanced database change process, including custom approval workflows and other advanced features.
-Default to this mode.</p></td>
- </tr>
-
- <tr>
- <td>EDITOR</td>
- <td>2</td>
- <td><p>A simple database change process in SQL editor. Users can execute SQL directly.</p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>AUTHENTICATION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AUTHENTICATION_NONE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PLAIN</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LOGIN</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CRAM_MD5</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ENCRYPTION_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENCRYPTION_NONE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STARTTLS</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SSL_TLS</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SMTP</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+ <tr>
+ <td>vault_ssl_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Client private key for mutual TLS authentication with Vault. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3>
+ <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SETTING_NAME_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_PROFILE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>WORKSPACE_APPROVAL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>APP_IM</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>AI</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DATA_CLASSIFICATION</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SEMANTIC_TYPES</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ENVIRONMENT</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>EMAIL</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>role_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The role ID for Vault AppRole authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>secret_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>the secret id for the role without ttl. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td>
+ <td></td>
+ <td><p>The type of secret for AppRole authentication. </p></td>
+ </tr>
+
+ <tr>
+ <td>mount_path</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The path where the approle auth method is mounted. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.WorkspaceApprovalSetting.Rule.Source">WorkspaceApprovalSetting.Rule.Source</h3>
+ <h3 id="bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SOURCE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CHANGE_DATABASE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CREATE_DATABASE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REQUEST_ROLE</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REQUEST_ACCESS</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance to delete.
+Format: instances/{instance} </p></td>
+ </tr>
+
+ <tr>
+ <td>force</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed. </p></td>
+ </tr>
+
+ <tr>
+ <td>purge</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, permanently purge the soft-deleted instance and all related resources.
+This operation is irreversible. Following AIP-165, this should only be used for
+administrative cleanup of old soft-deleted instances.
+The instance must already be soft-deleted for this to work. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
- <h3 id="bytebase.v1.WorkspaceProfileSetting.MCPCapability">WorkspaceProfileSetting.MCPCapability</h3>
- <p>MCPCapability is the maximum capability an MCP (Model Context Protocol)</p><p>session may have in the workspace. It is a ceiling: a session runs at this</p><p>level or lower. Unset (UNSPECIFIED) is treated as READ_WRITE so existing</p><p>workspaces are unaffected.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MCP_CAPABILITY_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DISABLED</td>
- <td>1</td>
- <td><p>MCP connections are rejected.</p></td>
- </tr>
-
- <tr>
- <td>READ_ONLY</td>
- <td>3</td>
- <td><p>MCP may inspect metadata and run read-only queries. Not enforceable yet:
-until per-tool enforcement ships, this fails closed and refuses all MCP
-connections, the same as DISABLED.</p></td>
- </tr>
-
- <tr>
- <td>READ_WRITE</td>
- <td>4</td>
- <td><p>MCP may perform mutations, still bounded by the user&#39;s RBAC.</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.GetInstanceRequest">GetInstanceRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance to retrieve.
+Format: instances/{instance} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+ <h3 id="bytebase.v1.Instance">Instance</h3>
+ <p></p>
-
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance.
+Format: instances/{instance} </p></td>
+ </tr>
+
+ <tr>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
+ <td></td>
+ <td><p>The lifecycle state of the instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title of the instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine type. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine_version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The version of the database engine. </p></td>
+ </tr>
+
+ <tr>
+ <td>external_link</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>External URL to the database instance console. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_sources</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>repeated</td>
+ <td><p>Data source configurations for connecting to the instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
+ </tr>
+
+ <tr>
+ <td>activation</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the instance is activated for use. </p></td>
+ </tr>
+
+ <tr>
+ <td>roles</td>
+ <td><a href="#bytebase.v1.InstanceRole">InstanceRole</a></td>
+ <td>repeated</td>
+ <td><p>Database roles available in this instance. </p></td>
+ </tr>
+
+ <tr>
+ <td>sync_interval</td>
+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td></td>
+ <td><p>How often the instance is synced. </p></td>
+ </tr>
+
+ <tr>
+ <td>sync_databases</td>
+ <td><a href="#bytebase.v1.SyncDatabases">SyncDatabases</a></td>
+ <td></td>
+ <td><p>Enable sync for following databases.
+Not set means sync all schemas &amp; databases. </p></td>
+ </tr>
+
+ <tr>
+ <td>last_sync_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The last time the instance was synced. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels are key-value pairs that can be attached to the instance.
+For example, { &#34;org_group&#34;: &#34;infrastructure&#34;, &#34;environment&#34;: &#34;production&#34; } </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.v1.SettingService">SettingService</h3>
- <p>SettingService manages workspace-level settings and configurations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ListSettings</td>
- <td><a href="#bytebase.v1.ListSettingsRequest">ListSettingsRequest</a></td>
- <td><a href="#bytebase.v1.ListSettingsResponse">ListSettingsResponse</a></td>
- <td><p>Lists all workspace settings.
-Permissions required: bb.settings.list</p></td>
- </tr>
-
- <tr>
- <td>GetSetting</td>
- <td><a href="#bytebase.v1.GetSettingRequest">GetSettingRequest</a></td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
- <td><p>Retrieves a workspace setting by name.
-Permissions required: bb.settings.get</p></td>
- </tr>
-
- <tr>
- <td>UpdateSetting</td>
- <td><a href="#bytebase.v1.UpdateSettingRequest">UpdateSettingRequest</a></td>
- <td><a href="#bytebase.v1.Setting">Setting</a></td>
- <td><p>Updates a workspace setting.
-Permissions required: bb.settings.set</p></td>
- </tr>
-
- <tr>
- <td>TestEmailSetting</td>
- <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>
- <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>
- <td><p>Sends a test email using the provided config (without persisting).
-Permissions required: bb.settings.set</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.Instance.LabelsEntry">Instance.LabelsEntry</h3>
+ <p></p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
+ <tr>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
- <tr>
- <td>ListSettings</td>
- <td>GET</td>
- <td>/v1/settings</td>
- <td></td>
- </tr>
-
-
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.InstanceResource">InstanceResource</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>GetSetting</td>
- <td>GET</td>
- <td>/v1/{name=settings/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The display title of the instance. </p></td>
+ </tr>
-
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine type. </p></td>
+ </tr>
+ <tr>
+ <td>engine_version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The version of the database engine. </p></td>
+ </tr>
- <tr>
- <td>UpdateSetting</td>
- <td>PATCH</td>
- <td>/v1/{setting.name=settings/*}</td>
- <td>setting</td>
- </tr>
+ <tr>
+ <td>data_sources</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td>repeated</td>
+ <td><p>Data source configurations for the instance. </p></td>
+ </tr>
-
+ <tr>
+ <td>activation</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether the instance is activated. </p></td>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the instance.
+Format: instances/{instance} </p></td>
+ </tr>
- <tr>
- <td>TestEmailSetting</td>
- <td>POST</td>
- <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/actuator_service.proto">v1/actuator_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.ActuatorInfo">ActuatorInfo</h3>
- <p>System information and configuration for the Bytebase instance.</p><p>Actuator concept is similar to the Spring Boot Actuator.</p>
+ <h3 id="bytebase.v1.KerberosConfig">KerberosConfig</h3>
+ <p></p>
<table class="field-table">
@@ -20293,152 +19779,271 @@ Permissions required: bb.settings.set</p></td>
<tbody>
<tr>
- <td>version</td>
+ <td>primary</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The Bytebase server version. </p></td>
+ <td><p>The primary component of the Kerberos principal. </p></td>
</tr>
<tr>
- <td>git_commit</td>
+ <td>instance</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The git commit hash of the build. </p></td>
+ <td><p>The instance component of the Kerberos principal. </p></td>
</tr>
<tr>
- <td>readonly</td>
- <td><a href="#bool">bool</a></td>
+ <td>realm</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether the Bytebase instance is running in read-only mode. </p></td>
+ <td><p>The Kerberos realm. </p></td>
</tr>
<tr>
- <td>saas</td>
- <td><a href="#bool">bool</a></td>
+ <td>keytab</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
- <td><p>Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users. </p></td>
+ <td><p>The keytab file contents for authentication. </p></td>
</tr>
<tr>
- <td>host</td>
+ <td>kdc_host</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The host address of the Bytebase instance. </p></td>
+ <td><p>The hostname of the Key Distribution Center (KDC). </p></td>
</tr>
<tr>
- <td>port</td>
+ <td>kdc_port</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The port number of the Bytebase instance. </p></td>
+ <td><p>The port of the Key Distribution Center (KDC). </p></td>
</tr>
<tr>
- <td>external_url</td>
+ <td>kdc_transport_protocol</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The external URL where users or webhook callbacks access Bytebase. </p></td>
+ <td><p>The transport protocol for KDC communication (tcp or udp). </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>last_active_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The last time any API call was made, refreshed on each request. </p></td>
+ <td><p>The name of the instance.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>workspace</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The unique identifier for the workspace.
-Format: workspaces/{id} </p></td>
+ <td>instance</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>optional</td>
+ <td><p>The target instance. We need to set this field if the target instance is not created yet. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>unlicensed_features</td>
+ <td>databases</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>List of features that are not licensed. </p></td>
+ <td><p>All database name list in the instance. </p></td>
</tr>
- <tr>
- <td>docker</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether the Bytebase instance is running in Docker. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListInstancesRequest">ListInstancesRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>activated_user_count</td>
+ <td>page_size</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The number of activated users. </p></td>
+ <td><p>The maximum number of instances to return. The service may return fewer than
+this value.
+If unspecified, at most 10 instances will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>activated_instance_count</td>
- <td><a href="#int32">int32</a></td>
+ <td>page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The number of activated database instances. </p></td>
+ <td><p>A page token, received from a previous `ListInstances` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListInstances` must match
+the call that provided the page token. </p></td>
</tr>
<tr>
- <td>total_instance_count</td>
- <td><a href="#int32">int32</a></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The total number of database instances. </p></td>
+ <td><p>Show deleted instances if specified. </p></td>
</tr>
<tr>
- <td>enable_sample</td>
- <td><a href="#bool">bool</a></td>
+ <td>filter</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether sample data setup is enabled. </p></td>
+ <td><p>Filter the instance.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filters:
+- name: the instance name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- resource_id: the instance id, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
+- state: the instance state, check State enum for values, support &#34;==&#34; operator.
+- engine: the instance engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
+- host: the instance host, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- port: the instance port, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- labels.{key}: the instance label, support &#34;==&#34; and &#34;in&#34; operators.
+
+For example:
+name == &#34;sample instance&#34;
+name.contains(&#34;sample&#34;)
+resource_id == &#34;sample-instance&#34;
+resource_id.contains(&#34;sample&#34;)
+state == &#34;DELETED&#34;
+environment == &#34;environments/test&#34;
+environment == &#34;&#34; (find instances which environment is not set)
+engine == &#34;MYSQL&#34;
+engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
+!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
+host == &#34;127.0.0.1&#34;
+host.contains(&#34;127.0&#34;)
+port == &#34;54321&#34;
+port.contains(&#34;543&#34;)
+labels.org_group == &#34;infrastructure&#34;
+labels.environment in [&#34;prod&#34;, &#34;production&#34;]
+project == &#34;projects/sample-project&#34;
+You can combine filter conditions like:
+name.contains(&#34;sample&#34;) &amp;&amp; environment == &#34;environments/test&#34;
+host == &#34;127.0.0.1&#34; &amp;&amp; port == &#34;54321&#34; </p></td>
</tr>
<tr>
- <td>external_url_from_flag</td>
- <td><a href="#bool">bool</a></td>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether the external URL is set via command-line flag (and thus cannot be changed via UI). </p></td>
+ <td><p>The order by of instances.
+Support title, environment. The default sorting order is ascending.
+For example:
+- order_by = &#34;title&#34;
+- order_by = &#34;title desc&#34;
+- order_by = &#34;title desc, environment asc&#34; </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.ListInstancesResponse">ListInstancesResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>replica_count</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The number of active replicas (servers sharing the same database). </p></td>
+ <td>instances</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td>repeated</td>
+ <td><p>The instances from the specified request. </p></td>
</tr>
<tr>
- <td>restriction</td>
- <td><a href="#bytebase.v1.Restriction">Restriction</a></td>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>default_project</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The default project for unassigned databases.
-Format: projects/{id} </p></td>
- </tr>
-
- <tr>
- <td>user_count_in_iam</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The number of users in the workspace IAM (for seat limit display). </p></td>
+ <td><p>The name of the instance to remove a data source from.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>active_vcs_user_count</td>
- <td><a href="#int32">int32</a></td>
+ <td>data_source</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
<td></td>
- <td><p>The number of active VCS users seen in the active window. </p></td>
+ <td><p>Identified by data source ID.
+Only READ_ONLY data source can be removed. </p></td>
</tr>
</tbody>
@@ -20448,15 +20053,32 @@ Format: projects/{id} </p></td>
- <h3 id="bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</h3>
- <p>Request message for deleting cache.</p>
+ <h3 id="bytebase.v1.SASLConfig">SASLConfig</h3>
+ <p></p>
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>krb_config</td>
+ <td><a href="#bytebase.v1.KerberosConfig">KerberosConfig</a></td>
+ <td></td>
+ <td><p>Kerberos authentication configuration. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
- <h3 id="bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</h3>
- <p>Request message for getting actuator information.</p>
+ <h3 id="bytebase.v1.SyncDatabases">SyncDatabases</h3>
+ <p></p>
<table class="field-table">
@@ -20466,13 +20088,10 @@ Format: projects/{id} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>databases</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p>Optional. The workspace to scope the response to.
-Format: workspaces/{workspace}
-When unset, the workspace is resolved from the request context (self-hosted)
-or no workspace-scoped fields are returned (SaaS). </p></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -20482,7 +20101,7 @@ or no workspace-scoped fields are returned (SaaS). </p></td>
- <h3 id="bytebase.v1.Restriction">Restriction</h3>
+ <h3 id="bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</h3>
<p></p>
@@ -20493,39 +20112,19 @@ or no workspace-scoped fields are returned (SaaS). </p></td>
<tbody>
<tr>
- <td>disallow_signup</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether self-service user signup is disabled. </p></td>
- </tr>
-
- <tr>
- <td>disallow_password_signin</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Whether password-based signin is disabled (except for workspace admins). </p></td>
- </tr>
-
- <tr>
- <td>password_restriction</td>
- <td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
- <td></td>
- <td><p>Password complexity and restriction requirements. </p></td>
- </tr>
-
- <tr>
- <td>allow_email_code_signin</td>
- <td><a href="#bool">bool</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Whether email &#43; 6-digit code signin is enabled for this workspace. </p></td>
+ <td><p>The name of instance.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>password_reset_enabled</td>
+ <td>enable_full_sync</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether password reset via email is available for this workspace.
-True when the workspace (or deployment) has an email setting configured. </p></td>
+ <td><p>When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only
+the instance metadata (such as the database list) and any newly discovered databases will be synced. </p></td>
</tr>
</tbody>
@@ -20535,122 +20134,57 @@ True when the workspace (or deployment) has an email setting configured. </p></t
- <h3 id="bytebase.v1.SetupSampleRequest">SetupSampleRequest</h3>
- <p>Request message for setting up sample data.</p>
-
-
+ <h3 id="bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</h3>
+ <p></p>
-
-
-
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>databases</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>All database name list in the instance. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
+
+
- <h3 id="bytebase.v1.ActuatorService">ActuatorService</h3>
- <p>ActuatorService manages system health and operational information.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetActuatorInfo</td>
- <td><a href="#bytebase.v1.GetActuatorInfoRequest">GetActuatorInfoRequest</a></td>
- <td><a href="#bytebase.v1.ActuatorInfo">ActuatorInfo</a></td>
- <td><p>Gets system information and health status of the Bytebase instance.
-When `name` is provided (or the workspace-scoped binding is used), the
-response includes workspace-scoped fields for that workspace.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>SetupSample</td>
- <td><a href="#bytebase.v1.SetupSampleRequest">SetupSampleRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Sets up sample data for demonstration and testing purposes.
-Permissions required: bb.projects.create</p></td>
- </tr>
-
- <tr>
- <td>DeleteCache</td>
- <td><a href="#bytebase.v1.DeleteCacheRequest">DeleteCacheRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Clears the system cache to force data refresh.
-Permissions required: None</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</h3>
+ <p></p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>GetActuatorInfo</td>
- <td>GET</td>
- <td>/v1/actuator/info</td>
- <td></td>
- </tr>
-
- <tr>
- <td>GetActuatorInfo</td>
- <td>GET</td>
- <td>/v1/{name=workspaces/*}/actuator/info</td>
- <td></td>
- </tr>
-
-
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the deleted instance.
+Format: instances/{instance} </p></td>
+ </tr>
- <tr>
- <td>SetupSample</td>
- <td>POST</td>
- <td>/v1/actuator:setupSample</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>DeleteCache</td>
- <td>DELETE</td>
- <td>/v1/actuator/cache</td>
- <td></td>
- </tr>
-
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/ai_service.proto">v1/ai_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.AIChatMessage">AIChatMessage</h3>
- <p>A single message in the conversation.</p>
+ <h3 id="bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</h3>
+ <p></p>
<table class="field-table">
@@ -20660,62 +20194,40 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>role</td>
- <td><a href="#bytebase.v1.AIChatMessageRole">AIChatMessageRole</a></td>
- <td></td>
- <td><p>The role of the message sender. </p></td>
- </tr>
-
- <tr>
- <td>content</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The text content of the message. Optional for assistant messages that only contain tool calls. </p></td>
+ <td></td>
+ <td><p>The name of the instance to update a data source.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>tool_calls</td>
- <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>
- <td>repeated</td>
- <td><p>Tool calls made by the assistant. Only present in assistant messages. </p></td>
+ <td>data_source</td>
+ <td><a href="#bytebase.v1.DataSource">DataSource</a></td>
+ <td></td>
+ <td><p>Identified by data source ID. </p></td>
</tr>
<tr>
- <td>tool_call_id</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The ID of the tool call this message is responding to. Only present in tool messages. </p></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AIChatRequest">AIChatRequest</h3>
- <p>Request message for AIService.Chat.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>messages</td>
- <td><a href="#bytebase.v1.AIChatMessage">AIChatMessage</a></td>
- <td>repeated</td>
- <td><p>The conversation messages. </p></td>
+ <td>validate_only</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Validate only also tests the data source connection. </p></td>
</tr>
<tr>
- <td>tool_definitions</td>
- <td><a href="#bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</a></td>
- <td>repeated</td>
- <td><p>The tool definitions available to the AI. </p></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the data source is not found, a new data source will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -20725,8 +20237,8 @@ Permissions required: None</p></td>
- <h3 id="bytebase.v1.AIChatResponse">AIChatResponse</h3>
- <p>Response message for AIService.Chat.</p>
+ <h3 id="bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</h3>
+ <p></p>
<table class="field-table">
@@ -20736,24 +20248,28 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>content</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The text content of the AI response. Optional when the response only contains tool calls. </p></td>
+ <td>instance</td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td></td>
+ <td><p>The instance to update.
+
+The instance&#39;s `name` field is used to identify the instance to update.
+Format: instances/{instance} </p></td>
</tr>
<tr>
- <td>tool_calls</td>
- <td><a href="#bytebase.v1.AIChatToolCall">AIChatToolCall</a></td>
- <td>repeated</td>
- <td><p>Tool calls the AI wants to make. </p></td>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
</tr>
<tr>
- <td>usage</td>
- <td><a href="#bytebase.v1.AIChatUsage">AIChatUsage</a></td>
- <td>optional</td>
- <td><p>Token usage for this provider call, when available. </p></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If set to true, and the instance is not found, a new instance will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -20763,175 +20279,398 @@ Permissions required: None</p></td>
- <h3 id="bytebase.v1.AIChatToolCall">AIChatToolCall</h3>
- <p>A tool call made by the AI.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The unique ID of this tool call. </p></td>
- </tr>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the tool to call. </p></td>
- </tr>
-
- <tr>
- <td>arguments</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The JSON-encoded arguments to pass to the tool. </p></td>
- </tr>
-
- <tr>
- <td>metadata</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Opaque provider-specific metadata (e.g., Gemini thought_signature).
-Frontend must echo this back unchanged when sending tool results. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+
+
+ <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>AUTHENTICATION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PASSWORD</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GOOGLE_CLOUD_SQL_IAM</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AWS_RDS_IAM</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_IAM</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DataSource.CloudSQLIPType">DataSource.CloudSQLIPType</h3>
+ <p>CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CLOUD_SQL_IP_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PUBLIC</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PRIVATE</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PSC</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DataSource.RedisType">DataSource.RedisType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>REDIS_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STANDALONE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SENTINEL</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CLUSTER</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SECRET_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified secret type.</p></td>
+ </tr>
+
+ <tr>
+ <td>PLAIN</td>
+ <td>1</td>
+ <td><p>Plain text secret.</p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>2</td>
+ <td><p>Secret from environment variable.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>AUTH_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified authentication type.</p></td>
+ </tr>
+
+ <tr>
+ <td>TOKEN</td>
+ <td>1</td>
+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>
+ </tr>
+
+ <tr>
+ <td>VAULT_APP_ROLE</td>
+ <td>2</td>
+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SECRET_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified secret type.</p></td>
+ </tr>
+
+ <tr>
+ <td>VAULT_KV_V2</td>
+ <td>1</td>
+ <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>
+ </tr>
+
+ <tr>
+ <td>AWS_SECRETS_MANAGER</td>
+ <td>2</td>
+ <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>
+ </tr>
+
+ <tr>
+ <td>GCP_SECRET_MANAGER</td>
+ <td>3</td>
+ <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_KEY_VAULT</td>
+ <td>4</td>
+ <td><p>ref: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TOKEN_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified token type, treated as PLAIN for backward compatibility.</p></td>
+ </tr>
+
+ <tr>
+ <td>PLAIN</td>
+ <td>1</td>
+ <td><p>The token field holds the literal token value.</p></td>
+ </tr>
+
+ <tr>
+ <td>ENVIRONMENT</td>
+ <td>2</td>
+ <td><p>The token field holds the name of an environment variable on the
+Bytebase server that holds the token value.</p></td>
+ </tr>
+
+ <tr>
+ <td>FILE</td>
+ <td>3</td>
+ <td><p>The token field holds a path to a file on the Bytebase server that
+holds the token value.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.AIChatToolDefinition">AIChatToolDefinition</h3>
- <p>A tool definition that the AI can invoke.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the tool. </p></td>
- </tr>
-
- <tr>
- <td>description</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>A description of what the tool does. </p></td>
- </tr>
-
- <tr>
- <td>parameters_schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The JSON Schema describing the tool&#39;s parameters. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.DataSourceType">DataSourceType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DATA_SOURCE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified data source type.</p></td>
+ </tr>
+
+ <tr>
+ <td>ADMIN</td>
+ <td>1</td>
+ <td><p>Admin data source with write permissions.</p></td>
+ </tr>
+
+ <tr>
+ <td>READ_ONLY</td>
+ <td>2</td>
+ <td><p>Read-only data source for query operations.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.AIChatUsage">AIChatUsage</h3>
- <p>Token usage for a single AI provider call.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>total_tokens</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>Total tokens used by the provider call. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
- <h3 id="bytebase.v1.AIChatMessageRole">AIChatMessageRole</h3>
- <p>Role of a chat message.</p>
+ <h3 id="bytebase.v1.InstanceService">InstanceService</h3>
+ <p>InstanceService manages database instances and their connections.</p>
<table class="enum-table">
<thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
- <td>AI_CHAT_MESSAGE_ROLE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified role.</p></td>
+ <td>GetInstance</td>
+ <td><a href="#bytebase.v1.GetInstanceRequest">GetInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Gets a database instance by name.
+Permissions required: bb.instances.get</p></td>
+ </tr>
+
+ <tr>
+ <td>ListInstances</td>
+ <td><a href="#bytebase.v1.ListInstancesRequest">ListInstancesRequest</a></td>
+ <td><a href="#bytebase.v1.ListInstancesResponse">ListInstancesResponse</a></td>
+ <td><p>Lists all database instances.
+Permissions required: bb.instances.list</p></td>
+ </tr>
+
+ <tr>
+ <td>CreateInstance</td>
+ <td><a href="#bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Creates a new database instance.
+Permissions required: bb.instances.create</p></td>
+ </tr>
+
+ <tr>
+ <td>UpdateInstance</td>
+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Updates a database instance.
+Permissions required: bb.instances.update</p></td>
+ </tr>
+
+ <tr>
+ <td>DeleteInstance</td>
+ <td><a href="#bytebase.v1.DeleteInstanceRequest">DeleteInstanceRequest</a></td>
+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
+ <td><p>Deletes or soft-deletes a database instance.
+Permissions required: bb.instances.delete</p></td>
+ </tr>
+
+ <tr>
+ <td>UndeleteInstance</td>
+ <td><a href="#bytebase.v1.UndeleteInstanceRequest">UndeleteInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Restores a soft-deleted database instance.
+Permissions required: bb.instances.undelete</p></td>
+ </tr>
+
+ <tr>
+ <td>SyncInstance</td>
+ <td><a href="#bytebase.v1.SyncInstanceRequest">SyncInstanceRequest</a></td>
+ <td><a href="#bytebase.v1.SyncInstanceResponse">SyncInstanceResponse</a></td>
+ <td><p>Syncs database schemas and metadata from an instance.
+Permissions required: bb.instances.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>ListInstanceDatabase</td>
+ <td><a href="#bytebase.v1.ListInstanceDatabaseRequest">ListInstanceDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.ListInstanceDatabaseResponse">ListInstanceDatabaseResponse</a></td>
+ <td><p>Lists all databases within an instance without creating them.
+Permissions required: bb.instances.get</p></td>
</tr>
<tr>
- <td>AI_CHAT_MESSAGE_ROLE_SYSTEM</td>
- <td>1</td>
- <td><p>System message providing instructions.</p></td>
+ <td>BatchSyncInstances</td>
+ <td><a href="#bytebase.v1.BatchSyncInstancesRequest">BatchSyncInstancesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchSyncInstancesResponse">BatchSyncInstancesResponse</a></td>
+ <td><p>Syncs multiple instances in a single request.
+Permissions required: bb.instances.sync</p></td>
</tr>
<tr>
- <td>AI_CHAT_MESSAGE_ROLE_USER</td>
- <td>2</td>
- <td><p>User message.</p></td>
+ <td>BatchUpdateInstances</td>
+ <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>
+ <td><p>Updates multiple instances in a single request.
+Permissions required: bb.instances.update</p></td>
</tr>
<tr>
- <td>AI_CHAT_MESSAGE_ROLE_ASSISTANT</td>
- <td>3</td>
- <td><p>Assistant (AI) message.</p></td>
+ <td>AddDataSource</td>
+ <td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Adds a read-only data source to an instance.
+Permissions required: bb.instances.update</p></td>
</tr>
<tr>
- <td>AI_CHAT_MESSAGE_ROLE_TOOL</td>
- <td>4</td>
- <td><p>Tool result message.</p></td>
+ <td>RemoveDataSource</td>
+ <td><a href="#bytebase.v1.RemoveDataSourceRequest">RemoveDataSourceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Removes a read-only data source from an instance.
+Permissions required: bb.instances.update</p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AIService">AIService</h3>
- <p>AIService provides AI chat capabilities for the page agent.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>Chat</td>
- <td><a href="#bytebase.v1.AIChatRequest">AIChatRequest</a></td>
- <td><a href="#bytebase.v1.AIChatResponse">AIChatResponse</a></td>
- <td><p>Chat sends a conversation with tool definitions to the configured AI provider
-and returns the AI response.</p></td>
+ <td>UpdateDataSource</td>
+ <td><a href="#bytebase.v1.UpdateDataSourceRequest">UpdateDataSourceRequest</a></td>
+ <td><a href="#bytebase.v1.Instance">Instance</a></td>
+ <td><p>Updates a data source configuration.
+Permissions required: bb.instances.update</p></td>
</tr>
</tbody>
@@ -20955,13 +20694,133 @@ and returns the AI response.</p></td>
<tr>
- <td>Chat</td>
+ <td>GetInstance</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListInstances</td>
+ <td>GET</td>
+ <td>/v1/instances</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>CreateInstance</td>
<td>POST</td>
- <td>/v1/ai/chat</td>
+ <td>/v1/instances</td>
+ <td>instance</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UpdateInstance</td>
+ <td>PATCH</td>
+ <td>/v1/{instance.name=instances/*}</td>
+ <td>instance</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DeleteInstance</td>
+ <td>DELETE</td>
+ <td>/v1/{name=instances/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>UndeleteInstance</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:undelete</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SyncInstance</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:sync</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>ListInstanceDatabase</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:databases</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchSyncInstances</td>
+ <td>POST</td>
+ <td>/v1/instances:batchSync</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchUpdateInstances</td>
+ <td>POST</td>
+ <td>/v1/instances:batchUpdate</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>AddDataSource</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:addDataSource</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>RemoveDataSource</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*}:removeDataSource</td>
<td>*</td>
</tr>
+
+
+ <tr>
+ <td>UpdateDataSource</td>
+ <td>PATCH</td>
+ <td>/v1/{name=instances/*}:updateDataSource</td>
+ <td>data_source</td>
+ </tr>
+
+
</tbody>
</table>
@@ -20969,13 +20828,13 @@ and returns the AI response.</p></td>
<div class="file-heading">
- <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>
+ <h2 id="v1/database_service.proto">v1/database_service.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.v1.Binding">Binding</h3>
- <p>Binding associates members with a role and optional conditions.</p>
+ <h3 id="bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -20985,66 +20844,20 @@ and returns the AI response.</p></td>
<tbody>
<tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The role that is assigned to the members.
-Format: roles/{role} </p></td>
- </tr>
-
- <tr>
- <td>members</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Specifies the principals requesting access for a Bytebase resource.
-For users, the member should be: user:{email}
-For groups, the member should be: group:{email}
-For service accounts, the member should be: serviceAccount:{email}
-For workload identities, the member should be: workloadIdentity:{email} </p></td>
- </tr>
-
- <tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
<td></td>
- <td><p>The condition that is associated with this binding, only used in the project IAM policy.
-If the condition evaluates to true, then this binding applies to the current request.
-If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Support variables:
-resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by any role with SQL Editor read (e.g. &#34;roles/sqlEditorUser&#34;, &#34;roles/sqlEditorReadUser&#34;) or write (bb.sql.ddl / bb.sql.dml) access, support &#34;==&#34; operator.
-resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator.
-resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support &#34;==&#34; operator.
-resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support &#34;in&#34; operator.
-request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
-
-Known limitations of table/schema-scoped DDL/DML grants:
-- The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.
-- It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).
-- A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).
-- Multi-statement batches are authorized at the database level: an earlier statement can rebind the session&#39;s default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.
-- A write target in a different project than the SQL-Editor session&#39;s database is denied: the per-target check evaluates the session project&#39;s IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).
-- Enforcement is on the statement&#39;s literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.
-- Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:
- - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.
- - Modeled non-table object DDL (gated at the DATABASE level by the object&#39;s own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).
- NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural &#34;write-target object database&#34; extraction layer to remove this allowlist dependence is tracked as a follow-up.
- - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.
- Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.
-
-For example:
-resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema_name in [&#34;public&#34;,&#34;another_schema&#34;]
-resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema_name == &#34;public&#34; &amp;&amp; resource.table_name in [&#34;audit_log&#34;]
-resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.environment_id in [&#34;test&#34;]
-request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
+ <td><p>The parent resource shared by all databases being retrieved.
+- projects/{project}: batch get databases in a project;
+- instances/{instances}: batch get databases in a instance;
+Use &#34;-&#34; as wildcard to batch get databases across parent. </p></td>
</tr>
- <tr>
- <td>parsed_expr</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
- <td></td>
- <td><p>The parsed expression of the condition. </p></td>
+ <tr>
+ <td>names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of database names to retrieve. </p></td>
</tr>
</tbody>
@@ -21054,8 +20867,8 @@ request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
- <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>
- <p>A single change to a binding.</p>
+ <h3 id="bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</h3>
+ <p></p>
<table class="field-table">
@@ -21065,32 +20878,10 @@ request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) </p></td>
<tbody>
<tr>
- <td>action</td>
- <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>
- <td></td>
- <td><p>The action that was performed on a Binding. </p></td>
- </tr>
-
- <tr>
- <td>role</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Role that is assigned to `members`.
-For example, `roles/projectOwner`. </p></td>
- </tr>
-
- <tr>
- <td>member</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Follows the same format of Binding.members. </p></td>
- </tr>
-
- <tr>
- <td>condition</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
- <td></td>
- <td><p>The condition that is associated with this binding. </p></td>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td>repeated</td>
+ <td><p>The databases from the specified request. </p></td>
</tr>
</tbody>
@@ -21100,8 +20891,8 @@ For example, `roles/projectOwner`. </p></td>
- <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>
- <p>Request message for getting an IAM policy.</p>
+ <h3 id="bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -21111,12 +20902,19 @@ For example, `roles/projectOwner`. </p></td>
<tbody>
<tr>
- <td>resource</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the resource to get the IAM policy.
-Format: projects/{project}
-Format: workspaces/{workspace} </p></td>
+ <td><p>The parent resource shared by all databases being updated.
+Format: instances/{instance}
+If the operation spans parents, a dash (-) may be accepted as a wildcard. </p></td>
+ </tr>
+
+ <tr>
+ <td>names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The list of database names to sync. </p></td>
</tr>
</tbody>
@@ -21126,8 +20924,15 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>
- <p>IAM policy that binds members to roles.</p>
+ <h3 id="bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</h3>
+ <p></p>
+
+
+
+
+
+ <h3 id="bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</h3>
+ <p></p>
<table class="field-table">
@@ -21137,20 +20942,21 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>bindings</td>
- <td><a href="#bytebase.v1.Binding">Binding</a></td>
- <td>repeated</td>
- <td><p>Collection of binding.
-A binding binds one or more project members to a single project role. </p></td>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The parent resource shared by all databases being updated.
+Format: instances/{instance}
+If the operation spans parents, a dash (-) may be accepted as a wildcard.
+We only support updating the project of databases for now. </p></td>
</tr>
<tr>
- <td>etag</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The current etag of the policy.
-If an etag is provided and does not match the current etag of the policy,
-the call will be blocked and an ABORTED error will be returned. </p></td>
+ <td>requests</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
+ <td>repeated</td>
+ <td><p>The request message specifying the resources to update.
+A maximum of 1000 databases can be modified in a batch. </p></td>
</tr>
</tbody>
@@ -21160,8 +20966,8 @@ the call will be blocked and an ABORTED error will be returned. </p></td>
- <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>
- <p>Describes changes between two IAM policies.</p>
+ <h3 id="bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</h3>
+ <p></p>
<table class="field-table">
@@ -21171,10 +20977,10 @@ the call will be blocked and an ABORTED error will be returned. </p></td>
<tbody>
<tr>
- <td>binding_deltas</td>
- <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
<td>repeated</td>
- <td><p>The delta for Bindings between two policies. </p></td>
+ <td><p>Databases updated. </p></td>
</tr>
</tbody>
@@ -21184,8 +20990,8 @@ the call will be blocked and an ABORTED error will be returned. </p></td>
- <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>
- <p>Request message for setting an IAM policy.</p>
+ <h3 id="bytebase.v1.BoundingBox">BoundingBox</h3>
+ <p>BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.</p>
<table class="field-table">
@@ -21195,26 +21001,31 @@ the call will be blocked and an ABORTED error will be returned. </p></td>
<tbody>
<tr>
- <td>resource</td>
- <td><a href="#string">string</a></td>
+ <td>xmin</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>The name of the resource to set the IAM policy.
-Format: projects/{project}
-Format: workspaces/{workspace} </p></td>
+ <td><p>Minimum X coordinate </p></td>
</tr>
<tr>
- <td>policy</td>
- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>
+ <td>ymin</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Minimum Y coordinate </p></td>
</tr>
<tr>
- <td>etag</td>
- <td><a href="#string">string</a></td>
+ <td>xmax</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>The current etag of the policy. </p></td>
+ <td><p>Maximum X coordinate </p></td>
+ </tr>
+
+ <tr>
+ <td>ymax</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p>Maximum Y coordinate </p></td>
</tr>
</tbody>
@@ -21224,51 +21035,8 @@ Format: workspaces/{workspace} </p></td>
-
-
- <h3 id="bytebase.v1.BindingDelta.Action">BindingDelta.Action</h3>
- <p>Type of action performed on a binding.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ACTION_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified action.</p></td>
- </tr>
-
- <tr>
- <td>ADD</td>
- <td>1</td>
- <td><p>Add a binding.</p></td>
- </tr>
-
- <tr>
- <td>REMOVE</td>
- <td>2</td>
- <td><p>Remove a binding.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.AuditData">AuditData</h3>
- <p>Additional audit data specific to certain operations.</p>
+ <h3 id="bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</h3>
+ <p>CheckConstraintMetadata is the metadata for check constraints.</p>
<table class="field-table">
@@ -21278,10 +21046,17 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>policy_delta</td>
- <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Changes to IAM policies. </p></td>
+ <td><p>The name is the name of a check constraint. </p></td>
+ </tr>
+
+ <tr>
+ <td>expression</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The expression is the expression of a check constraint. </p></td>
</tr>
</tbody>
@@ -21291,8 +21066,8 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.AuditLog">AuditLog</h3>
- <p>Audit log entry recording system activity or API call.</p>
+ <h3 id="bytebase.v1.ColumnMetadata">ColumnMetadata</h3>
+ <p>ColumnMetadata is the metadata for columns.</p>
<table class="field-table">
@@ -21305,90 +21080,158 @@ Format: workspaces/{workspace} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the log.
-Formats:
-- projects/{project}/auditLogs/{uid}
-- workspaces/{workspace}/auditLogs/{uid} </p></td>
+ <td><p>The name is the name of a column. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>The position is the position in columns. </p></td>
+ </tr>
+
+ <tr>
+ <td>has_default</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>default</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The default value of column. </p></td>
+ </tr>
+
+ <tr>
+ <td>default_on_null</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Oracle specific metadata.
+The default_on_null is the default on null of a column. </p></td>
+ </tr>
+
+ <tr>
+ <td>on_update</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The on_update is the on update action of a column.
+For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with
+CURRENT_TIMESTAMP as on update value. </p></td>
+ </tr>
+
+ <tr>
+ <td>nullable</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The nullable is the nullable of a column. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The type is the type of a column. </p></td>
+ </tr>
+
+ <tr>
+ <td>character_set</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The timestamp when the audit log was created. </p></td>
+ <td><p>The character_set is the character_set of a column. </p></td>
</tr>
<tr>
- <td>user</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The user who performed the action.
-Format: users/{email} </p></td>
+ <td><p>The collation is the collation of a column. </p></td>
</tr>
<tr>
- <td>method</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The method or action being audited.
-For example: /bytebase.v1.SQLService/Query or bb.project.repository.push </p></td>
+ <td><p>The comment is the comment of a column. </p></td>
</tr>
<tr>
- <td>severity</td>
- <td><a href="#bytebase.v1.AuditLog.Severity">AuditLog.Severity</a></td>
+ <td>generation</td>
+ <td><a href="#bytebase.v1.GenerationMetadata">GenerationMetadata</a></td>
<td></td>
- <td><p>The severity level of this audit log entry. </p></td>
+ <td><p>The generation is the generation of a column. </p></td>
</tr>
<tr>
- <td>resource</td>
- <td><a href="#string">string</a></td>
+ <td>is_identity</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The resource associated with this audit log. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>request</td>
- <td><a href="#string">string</a></td>
+ <td>identity_generation</td>
+ <td><a href="#bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td>
<td></td>
- <td><p>The request payload in JSON format. </p></td>
+ <td><p>The identity_generation is for identity columns, PG only. </p></td>
</tr>
<tr>
- <td>response</td>
- <td><a href="#string">string</a></td>
+ <td>identity_seed</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The response payload in JSON format.
-Some fields may be omitted if they are too large or contain sensitive information. </p></td>
+ <td><p>The identity_seed is for identity columns, MSSQL only. </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#google.rpc.Status">google.rpc.Status</a></td>
+ <td>identity_increment</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The status of the operation. </p></td>
+ <td><p>The identity_increment is for identity columns, MSSQL only. </p></td>
</tr>
<tr>
- <td>latency</td>
- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
+ <td>default_constraint_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The duration of the operation. </p></td>
+ <td><p>The default_constraint_name is the name of the default constraint, MSSQL only.
+In MSSQL, default values are implemented as named constraints. When modifying or
+dropping a column&#39;s default value, you must reference the constraint by name.
+This field stores the actual constraint name from the database.
+
+Example: A column definition like:
+ CREATE TABLE employees (
+ status NVARCHAR(20) DEFAULT &#39;active&#39;
+ )
+
+Will create a constraint with an auto-generated name like &#39;DF__employees__statu__3B75D760&#39;
+or a user-defined name if specified:
+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;active&#39; FOR status
+
+To modify the default, you must first drop the existing constraint by name:
+ ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760
+ ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT &#39;inactive&#39; FOR status
+
+This field is populated when syncing from the database. When empty (e.g., when parsing
+from SQL files), the system cannot automatically drop the constraint. </p></td>
</tr>
<tr>
- <td>service_data</td>
- <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>
- <td></td>
- <td><p>Service-specific metadata about the request, response, and activities. </p></td>
+ <td>srid</td>
+ <td><a href="#uint32">uint32</a></td>
+ <td>optional</td>
+ <td><p>The spatial reference system identifier of a spatial column, MySQL 8.0 only.
+Unset means the column declares no SRID; presence carries the explicit SRID,
+including the valid SRID 0. SRS_IDs are unsigned 32-bit (custom SRSs may exceed
+int32). </p></td>
</tr>
<tr>
- <td>request_metadata</td>
- <td><a href="#bytebase.v1.RequestMetadata">RequestMetadata</a></td>
+ <td>is_invisible</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Metadata about the request context. </p></td>
+ <td><p>Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23&#43; only. </p></td>
</tr>
</tbody>
@@ -21398,8 +21241,8 @@ Some fields may be omitted if they are too large or contain sensitive informatio
- <h3 id="bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</h3>
- <p>Request message for exporting audit logs.</p>
+ <h3 id="bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</h3>
+ <p></p>
<table class="field-table">
@@ -21409,54 +21252,33 @@ Some fields may be omitted if they are too large or contain sensitive informatio
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name of the attribute. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The filter of the log. It should be a valid CEL expression.
-Check the filter field in the SearchAuditLogsRequest message. </p></td>
+ <td><p>The attribute type. User-defined types are always schema-qualified. </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The order by of the log.
-Only support order by create_time. The default sorting order is ascending.
-For example:
- - order_by = &#34;create_time asc&#34;
- - order_by = &#34;create_time desc&#34; </p></td>
- </tr>
-
- <tr>
- <td>format</td>
- <td><a href="#bytebase.v1.ExportFormat">ExportFormat</a></td>
- <td></td>
- <td><p>The export format. </p></td>
- </tr>
-
- <tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of logs to return.
-The service may return fewer than this value.
-If unspecified, at most 10 log entries will be returned.
-The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>
+ <td><p>The non-default collation of the attribute as an emit-ready SQL
+identifier reference (quoted as needed, schema-qualified when outside
+pg_catalog), empty otherwise. e.g. `&#34;C&#34;` or `locale.en_us`. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ExportAuditLogs` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>The comment describing the attribute. </p></td>
</tr>
</tbody>
@@ -21466,8 +21288,8 @@ Provide this to retrieve the subsequent page. </p></td>
- <h3 id="bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</h3>
- <p>Response message for exporting audit logs.</p>
+ <h3 id="bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -21477,19 +21299,24 @@ Provide this to retrieve the subsequent page. </p></td>
<tbody>
<tr>
- <td>content</td>
- <td><a href="#bytes">bytes</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The exported audit log content in the requested format. </p></td>
+ <td><p>The name of the composite type. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>attributes</td>
+ <td><a href="#bytebase.v1.CompositeTypeAttribute">CompositeTypeAttribute</a></td>
+ <td>repeated</td>
+ <td><p>The ordered attributes of the composite type. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token to retrieve next page of log entities.
-Pass this value in the page_token field in the subsequent call
-to retrieve the next page of log entities. </p></td>
+ <td><p>The comment describing the composite type. </p></td>
</tr>
</tbody>
@@ -21499,8 +21326,8 @@ to retrieve the next page of log entities. </p></td>
- <h3 id="bytebase.v1.RequestMetadata">RequestMetadata</h3>
- <p>Metadata about the incoming request.</p>
+ <h3 id="bytebase.v1.Database">Database</h3>
+ <p></p>
<table class="field-table">
@@ -21510,91 +21337,95 @@ to retrieve the next page of log entities. </p></td>
<tbody>
<tr>
- <td>caller_ip</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The IP address of the request originator. </p></td>
+ <td><p>The name of the database.
+Format: instances/{instance}/databases/{database}
+{database} is the database name in the instance. </p></td>
</tr>
<tr>
- <td>caller_supplied_user_agent</td>
- <td><a href="#string">string</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.State">State</a></td>
<td></td>
- <td><p>The user agent string provided by the caller.
-This is supplied by the client and is not authenticated. </p></td>
+ <td><p>The existence of a database. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</h3>
- <p>Request message for searching audit logs.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>successful_sync_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The latest synchronization time. </p></td>
+ </tr>
<tr>
- <td>parent</td>
+ <td>project</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The project for a database.
+Format: projects/{project} </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>release</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The filter of the log. It should be a valid CEL expression.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- method: the API name, can be found in the docs, should start with &#34;/bytebase.v1.&#34; prefix. For example &#34;/bytebase.v1.UserService/CreateUser&#34;. Support &#34;==&#34; operator.
-- severity: support &#34;==&#34; operator, check Severity enum in AuditLog message for values.
-- user: the actor, should in &#34;users/{email}&#34; format, support &#34;==&#34; operator.
-- create_time: support &#34;&gt;=&#34; and &#34;&lt;=&#34; operator.
-
-For example:
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34;
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34;
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34;
- - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; </p></td>
+ <td><p>The release that was last applied to this database.
+Format: projects/{project}/releases/{release_id}
+Example: projects/my-project/releases/release_20260115-RC00 </p></td>
</tr>
<tr>
- <td>order_by</td>
+ <td>environment</td>
+ <td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The environment resource.
+Format: environments/prod where prod is the environment resource ID. </p></td>
+ </tr>
+
+ <tr>
+ <td>effective_environment</td>
<td><a href="#string">string</a></td>
+ <td>optional</td>
+ <td><p>The effective environment based on environment tag above and environment
+tag on the instance. Inheritance follows
+https://cloud.google.com/resource-manager/docs/tags/tags-overview. </p></td>
+ </tr>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>Labels will be used for deployment and policy control. </p></td>
+ </tr>
+
+ <tr>
+ <td>instance_resource</td>
+ <td><a href="#bytebase.v1.InstanceResource">InstanceResource</a></td>
<td></td>
- <td><p>The order by of the log.
-Only support order by create_time. The default sorting order is ascending.
-For example:
- - order_by = &#34;create_time asc&#34;
- - order_by = &#34;create_time desc&#34; </p></td>
+ <td><p>The instance resource. </p></td>
+ </tr>
+
+ <tr>
+ <td>backup_available</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The database is available for DML prior backup. </p></td>
</tr>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
+ <td>sync_status</td>
+ <td><a href="#bytebase.v1.SyncStatus">SyncStatus</a></td>
<td></td>
- <td><p>The maximum number of logs to return.
-The service may return fewer than this value.
-If unspecified, at most 10 log entries will be returned.
-The maximum value is 5000; values above 5000 will be coerced to 5000. </p></td>
+ <td><p>The sync status of the database. </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>sync_error</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `SearchLogs` call.
-Provide this to retrieve the subsequent page. </p></td>
+ <td><p>The error message if sync failed. </p></td>
</tr>
</tbody>
@@ -21604,8 +21435,8 @@ Provide this to retrieve the subsequent page. </p></td>
- <h3 id="bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</h3>
- <p>Response message for searching audit logs.</p>
+ <h3 id="bytebase.v1.Database.LabelsEntry">Database.LabelsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -21615,19 +21446,17 @@ Provide this to retrieve the subsequent page. </p></td>
<tbody>
<tr>
- <td>audit_logs</td>
- <td><a href="#bytebase.v1.AuditLog">AuditLog</a></td>
- <td>repeated</td>
+ <td>key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token to retrieve next page of log entities.
-Pass this value in the page_token field in the subsequent call
-to retrieve the next page of log entities. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -21637,167 +21466,8 @@ to retrieve the next page of log entities. </p></td>
-
-
- <h3 id="bytebase.v1.AuditLog.Severity">AuditLog.Severity</h3>
- <p>Severity level for audit log entries.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SEVERITY_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified severity level.</p></td>
- </tr>
-
- <tr>
- <td>DEBUG</td>
- <td>1</td>
- <td><p>Debug-level information.</p></td>
- </tr>
-
- <tr>
- <td>INFO</td>
- <td>2</td>
- <td><p>Informational messages.</p></td>
- </tr>
-
- <tr>
- <td>NOTICE</td>
- <td>3</td>
- <td><p>Notable events.</p></td>
- </tr>
-
- <tr>
- <td>WARNING</td>
- <td>4</td>
- <td><p>Warning conditions.</p></td>
- </tr>
-
- <tr>
- <td>ERROR</td>
- <td>5</td>
- <td><p>Error conditions.</p></td>
- </tr>
-
- <tr>
- <td>CRITICAL</td>
- <td>6</td>
- <td><p>Critical conditions.</p></td>
- </tr>
-
- <tr>
- <td>ALERT</td>
- <td>7</td>
- <td><p>Action must be taken immediately.</p></td>
- </tr>
-
- <tr>
- <td>EMERGENCY</td>
- <td>8</td>
- <td><p>System is unusable.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.AuditLogService">AuditLogService</h3>
- <p>AuditLogService manages audit logs for system activities and API calls.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>SearchAuditLogs</td>
- <td><a href="#bytebase.v1.SearchAuditLogsRequest">SearchAuditLogsRequest</a></td>
- <td><a href="#bytebase.v1.SearchAuditLogsResponse">SearchAuditLogsResponse</a></td>
- <td><p>Searches audit logs with optional filtering and pagination.
-Permissions required: bb.auditLogs.search</p></td>
- </tr>
-
- <tr>
- <td>ExportAuditLogs</td>
- <td><a href="#bytebase.v1.ExportAuditLogsRequest">ExportAuditLogsRequest</a></td>
- <td><a href="#bytebase.v1.ExportAuditLogsResponse">ExportAuditLogsResponse</a></td>
- <td><p>Exports audit logs in a specified format for external analysis.
-Permissions required: bb.auditLogs.export</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>SearchAuditLogs</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/auditLogs:search</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>SearchAuditLogs</td>
- <td>POST</td>
- <td>/v1/auditLogs:search</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ExportAuditLogs</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/auditLogs:export</td>
- <td>*</td>
- </tr>
-
- <tr>
- <td>ExportAuditLogs</td>
- <td>POST</td>
- <td>/v1/auditLogs:export</td>
- <td>*</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/user_service.proto">v1/user_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseMetadata">DatabaseMetadata</h3>
+ <p>DatabaseMetadata is the metadata for databases.</p>
<table class="field-table">
@@ -21807,35 +21477,54 @@ Permissions required: bb.auditLogs.export</p></td>
<tbody>
<tr>
- <td>names</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The database metadata name.
+
+Format: instances/{instance}/databases/{database}/metadata </p></td>
+ </tr>
+
+ <tr>
+ <td>schemas</td>
+ <td><a href="#bytebase.v1.SchemaMetadata">SchemaMetadata</a></td>
<td>repeated</td>
- <td><p>The user names to retrieve.
-Format: users/{email} </p></td>
+ <td><p>The schemas is the list of schemas in a database. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>character_set</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The character_set is the character set of a database. </p></td>
+ </tr>
<tr>
- <td>users</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The collation is the collation of a database. </p></td>
+ </tr>
+
+ <tr>
+ <td>extensions</td>
+ <td><a href="#bytebase.v1.ExtensionMetadata">ExtensionMetadata</a></td>
<td>repeated</td>
- <td><p>The users from the specified request. </p></td>
+ <td><p>The extensions is the list of extensions in a database. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the database. </p></td>
+ </tr>
+
+ <tr>
+ <td>search_path</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The search_path is the search path of a PostgreSQL database. </p></td>
</tr>
</tbody>
@@ -21845,8 +21534,8 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.CreateUserRequest">CreateUserRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</h3>
+ <p>DatabaseSDLSchema contains the schema in SDL format.</p>
<table class="field-table">
@@ -21856,10 +21545,23 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>schema</td>
+ <td><a href="#bytes">bytes</a></td>
<td></td>
- <td><p>The user to create. </p></td>
+ <td><p>The SDL schema content.
+- For SINGLE_FILE format: contains the complete SDL schema as a text string.
+- For MULTI_FILE format: contains the ZIP archive as binary data. </p></td>
+ </tr>
+
+ <tr>
+ <td>content_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The MIME type of the schema content.
+Indicates how the client should interpret the schema field.
+Examples:
+- &#34;text/plain; charset=utf-8&#34; for SINGLE_FILE format
+- &#34;application/zip&#34; for MULTI_FILE format </p></td>
</tr>
</tbody>
@@ -21869,8 +21571,8 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.DeleteUserRequest">DeleteUserRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.DatabaseSchema">DatabaseSchema</h3>
+ <p>DatabaseSchema is the metadata for databases.</p>
<table class="field-table">
@@ -21880,11 +21582,10 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user to delete.
-Format: users/{email} </p></td>
+ <td><p>The schema dump from database. </p></td>
</tr>
</tbody>
@@ -21894,8 +21595,8 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.GetUserRequest">GetUserRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.DependencyColumn">DependencyColumn</h3>
+ <p>DependencyColumn is the metadata for dependency columns.</p>
<table class="field-table">
@@ -21905,11 +21606,24 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user to retrieve.
-Format: users/{email} </p></td>
+ <td><p>The schema is the schema of a reference column. </p></td>
+ </tr>
+
+ <tr>
+ <td>table</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The table is the table of a reference column. </p></td>
+ </tr>
+
+ <tr>
+ <td>column</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The column is the name of a reference column. </p></td>
</tr>
</tbody>
@@ -21919,7 +21633,7 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.ListUsersRequest">ListUsersRequest</h3>
+ <h3 id="bytebase.v1.DependencyTable">DependencyTable</h3>
<p></p>
@@ -21930,56 +21644,17 @@ Format: users/{email} </p></td>
<tbody>
<tr>
- <td>page_size</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p>The maximum number of users to return. The service may return fewer than
-this value.
-If unspecified, at most 10 users will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
- </tr>
-
- <tr>
- <td>page_token</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from a previous `ListUsers` call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided to `ListUsers` must match
-the call that provided the page token. </p></td>
- </tr>
-
- <tr>
- <td>show_deleted</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Show deleted users if specified. </p></td>
+ <td><p>The schema is the schema of a reference table. </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter users returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- name: the user name, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- email: the user email, support &#34;==&#34; and &#34;.contains()&#34; operator.
-- state: check State enum for values, support &#34;==&#34; operator.
-- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
-
-For example:
-name == &#34;ed&#34;
-name.contains(&#34;ed&#34;)
-email == &#34;[email protected]&#34;
-email.contains(&#34;ed&#34;)
-state == &#34;DELETED&#34;
-project == &#34;projects/sample-project&#34;
-You can combine filter conditions like:
-name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#34;
-(name == &#34;ed&#34; || email == &#34;[email protected]&#34;) &amp;&amp; project == &#34;projects/sample-project&#34; </p></td>
+ <td><p>The table is the name of a reference table. </p></td>
</tr>
</tbody>
@@ -21989,7 +21664,7 @@ name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#
- <h3 id="bytebase.v1.ListUsersResponse">ListUsersResponse</h3>
+ <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
<p></p>
@@ -22000,18 +21675,22 @@ name.contains(&#34;ed&#34;) &amp;&amp; project == &#34;projects/sample-project&#
<tbody>
<tr>
- <td>users</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td>repeated</td>
- <td><p>The users from the specified request. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The database whose current schema is the diff source.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>next_page_token</td>
- <td><a href="#string">string</a></td>
+ <td>target_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The metadata of the target schema. The source metadata and the engine are
+read from the database, so only the target travels in the request.
+Must describe the COMPLETE target schema: the diff runs against the full
+stored source, so any object omitted from the target (for example by a
+truncated metadata fetch) is treated as dropped. </p></td>
</tr>
</tbody>
@@ -22021,7 +21700,7 @@ If this field is omitted, there are no subsequent pages. </p></td>
- <h3 id="bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</h3>
+ <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
<p></p>
@@ -22032,11 +21711,10 @@ If this field is omitted, there are no subsequent pages. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>diff</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the deleted user.
-Format: users/{email} </p></td>
+ <td><p>The generated migration statements. </p></td>
</tr>
</tbody>
@@ -22046,7 +21724,7 @@ Format: users/{email} </p></td>
- <h3 id="bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</h3>
+ <h3 id="bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</h3>
<p></p>
@@ -22060,16 +21738,26 @@ Format: users/{email} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the user whose email to update.
-Format: users/{email}
-Note: This is the current (old) email address. The new email is specified in the &#39;email&#39; field. </p></td>
+ <td><p>The name of the database or changelog.
+Format:
+database: instances/{instance}/databases/{database}
+changelog: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
<tr>
- <td>email</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The new email address. </p></td>
+ <td><p>The target schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>changelog</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The resource name of the changelog
+Format:
+instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
</tr>
</tbody>
@@ -22079,7 +21767,7 @@ Note: This is the current (old) email address. The new email is specified in the
- <h3 id="bytebase.v1.UpdateUserRequest">UpdateUserRequest</h3>
+ <h3 id="bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</h3>
<p></p>
@@ -22090,50 +21778,10 @@ Note: This is the current (old) email address. The new email is specified in the
<tbody>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td></td>
- <td><p>The user to update.
-
-The user&#39;s `name` field is used to identify the user to update.
-Format: users/{email} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>otp_code</td>
+ <td>diff</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
- </tr>
-
- <tr>
- <td>regenerate_temp_mfa_secret</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.
-This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response. </p></td>
- </tr>
-
- <tr>
- <td>regenerate_recovery_codes</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The regenerate_recovery_codes flag means to regenerate recovery codes for user. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, and the user is not found, a new user will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -22143,8 +21791,8 @@ In this situation, `update_mask` is ignored. </p></td>
- <h3 id="bytebase.v1.User">User</h3>
- <p></p>
+ <h3 id="bytebase.v1.DimensionConstraint">DimensionConstraint</h3>
+ <p>DimensionConstraint defines constraints for a spatial dimension.</p>
<table class="field-table">
@@ -22154,105 +21802,76 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the user.
-Format: users/{email} </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.v1.State">State</a></td>
- <td></td>
- <td><p>The lifecycle state of the user account. </p></td>
- </tr>
-
- <tr>
- <td>email</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The email address of the user, used for login and notifications. </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The display title or full name of the user. </p></td>
- </tr>
-
- <tr>
- <td>password</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The password for authentication. Only used during user creation or password updates. </p></td>
- </tr>
-
- <tr>
- <td>service_key</td>
+ <td>dimension</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The service key for service account authentication. </p></td>
+ <td><p>Dimension name/type (X, Y, Z, M, etc.) </p></td>
</tr>
<tr>
- <td>mfa_enabled</td>
- <td><a href="#bool">bool</a></td>
+ <td>min_value</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>The mfa_enabled flag means if the user has enabled MFA. </p></td>
+ <td><p>Minimum value for this dimension </p></td>
</tr>
<tr>
- <td>temp_otp_secret</td>
- <td><a href="#string">string</a></td>
+ <td>max_value</td>
+ <td><a href="#double">double</a></td>
<td></td>
- <td><p>Temporary OTP secret used during MFA setup and regeneration. </p></td>
+ <td><p>Maximum value for this dimension </p></td>
</tr>
<tr>
- <td>temp_recovery_codes</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>Temporary recovery codes used during MFA setup and regeneration. </p></td>
+ <td>tolerance</td>
+ <td><a href="#double">double</a></td>
+ <td></td>
+ <td><p>Tolerance for this dimension </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DimensionalConfig">DimensionalConfig</h3>
+ <p>DimensionalConfig defines dimensional and constraint parameters for spatial indexes.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>temp_otp_secret_created_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>dimensions</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer. </p></td>
+ <td><p>Number of dimensions (2-4, default 2) </p></td>
</tr>
<tr>
- <td>phone</td>
+ <td>data_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Should be a valid E.164 compliant phone number.
-Could be empty. </p></td>
+ <td><p>Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.) </p></td>
</tr>
<tr>
- <td>profile</td>
- <td><a href="#bytebase.v1.User.Profile">User.Profile</a></td>
+ <td>srid</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>User profile metadata. </p></td>
+ <td><p>Spatial reference system identifier (SRID) </p></td>
</tr>
<tr>
- <td>groups</td>
- <td><a href="#string">string</a></td>
+ <td>constraints</td>
+ <td><a href="#bytebase.v1.DimensionConstraint">DimensionConstraint</a></td>
<td>repeated</td>
- <td><p>The groups for the user.
-Format: groups/{email} </p></td>
- </tr>
-
- <tr>
- <td>workspace</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The current workspace.
-Format: workspaces/{id} </p></td>
+ <td><p>Coordinate system constraints </p></td>
</tr>
</tbody>
@@ -22262,7 +21881,7 @@ Format: workspaces/{id} </p></td>
- <h3 id="bytebase.v1.User.Profile">User.Profile</h3>
+ <h3 id="bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</h3>
<p></p>
@@ -22273,24 +21892,31 @@ Format: workspaces/{id} </p></td>
<tbody>
<tr>
- <td>last_login_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The last time the user successfully logged in. </p></td>
+ <td><p>The name of a type. </p></td>
</tr>
<tr>
- <td>last_change_password_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The last time the user changed their password. </p></td>
+ <td>values</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The enum values of a type. </p></td>
</tr>
<tr>
- <td>source</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>
+ <td><p>The comment describing the enum type. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this enum type during schema dump operations. </p></td>
</tr>
</tbody>
@@ -22300,219 +21926,74 @@ Format: workspaces/{id} </p></td>
-
-
-
-
-
-
- <h3 id="bytebase.v1.UserService">UserService</h3>
- <p>UserService manages user accounts and authentication.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetUser</td>
- <td><a href="#bytebase.v1.GetUserRequest">GetUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Get the user.
-Any authenticated user can get the user.
-Permissions required: bb.users.get</p></td>
- </tr>
-
- <tr>
- <td>BatchGetUsers</td>
- <td><a href="#bytebase.v1.BatchGetUsersRequest">BatchGetUsersRequest</a></td>
- <td><a href="#bytebase.v1.BatchGetUsersResponse">BatchGetUsersResponse</a></td>
- <td><p>Get the users in batch.
-Any authenticated user can batch get users.
-Permissions required: bb.users.get</p></td>
- </tr>
-
- <tr>
- <td>GetCurrentUser</td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Get the current authenticated user.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>ListUsers</td>
- <td><a href="#bytebase.v1.ListUsersRequest">ListUsersRequest</a></td>
- <td><a href="#bytebase.v1.ListUsersResponse">ListUsersResponse</a></td>
- <td><p>List all users.
-Any authenticated user can list users.
-Permissions required: bb.users.list</p></td>
- </tr>
-
- <tr>
- <td>CreateUser</td>
- <td><a href="#bytebase.v1.CreateUserRequest">CreateUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Creates a user in the caller&#39;s workspace (admin action, self-hosted only).
-In SaaS mode, admins should add users via workspace IAM policy instead.
-Permissions required: bb.users.create</p></td>
- </tr>
-
- <tr>
- <td>UpdateUser</td>
- <td><a href="#bytebase.v1.UpdateUserRequest">UpdateUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.
-Note: Email updates are not supported through this API. Use UpdateEmail instead.
-Permissions required: bb.users.update (or self)</p></td>
- </tr>
-
- <tr>
- <td>DeleteUser</td>
- <td><a href="#bytebase.v1.DeleteUserRequest">DeleteUserRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.
-Permissions required: bb.users.delete</p></td>
- </tr>
-
- <tr>
- <td>UndeleteUser</td>
- <td><a href="#bytebase.v1.UndeleteUserRequest">UndeleteUserRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Restores a deleted user.
-Permissions required: bb.users.undelete</p></td>
- </tr>
-
- <tr>
- <td>UpdateEmail</td>
- <td><a href="#bytebase.v1.UpdateEmailRequest">UpdateEmailRequest</a></td>
- <td><a href="#bytebase.v1.User">User</a></td>
- <td><p>Updates a user&#39;s email address.
-Permissions required: bb.users.updateEmail</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.EventMetadata">EventMetadata</h3>
+ <p></p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>GetUser</td>
- <td>GET</td>
- <td>/v1/{name=users/*}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>BatchGetUsers</td>
- <td>GET</td>
- <td>/v1/users:batchGet</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>GetCurrentUser</td>
- <td>GET</td>
- <td>/v1/users/me</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>ListUsers</td>
- <td>GET</td>
- <td>/v1/users</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>CreateUser</td>
- <td>POST</td>
- <td>/v1/users</td>
- <td>user</td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateUser</td>
- <td>PATCH</td>
- <td>/v1/{user.name=users/*}</td>
- <td>user</td>
- </tr>
-
-
-
- <tr>
- <td>DeleteUser</td>
- <td>DELETE</td>
- <td>/v1/{name=users/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the event. </p></td>
+ </tr>
-
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The schedule of the event. </p></td>
+ </tr>
+ <tr>
+ <td>time_zone</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The time zone of the event. </p></td>
+ </tr>
- <tr>
- <td>UndeleteUser</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:undelete</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>sql_mode</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL mode setting for the event. </p></td>
+ </tr>
-
+ <tr>
+ <td>character_set_client</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The character set used by the client creating the event. </p></td>
+ </tr>
+ <tr>
+ <td>collation_connection</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The collation used for the connection when creating the event. </p></td>
+ </tr>
- <tr>
- <td>UpdateEmail</td>
- <td>POST</td>
- <td>/v1/{name=users/*}:updateEmail</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of an event. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/auth_service.proto">v1/auth_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.ExtensionMetadata">ExtensionMetadata</h3>
+ <p>ExtensionMetadata is the metadata for extensions.</p>
<table class="field-table">
@@ -22522,18 +22003,32 @@ Permissions required: bb.users.updateEmail</p></td>
<tbody>
<tr>
- <td>token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>External OIDC token (JWT) from CI/CD platform. </p></td>
+ <td><p>The name is the name of an extension. </p></td>
</tr>
<tr>
- <td>email</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Workload Identity email for identifying which identity to authenticate as.
-Format: {name}@workload.bytebase.com </p></td>
+ <td><p>The schema is the extension that is installed to. But the extension usage
+is not limited to the schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The version is the version of an extension. </p></td>
+ </tr>
+
+ <tr>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The description is the description of an extension. </p></td>
</tr>
</tbody>
@@ -22543,7 +22038,7 @@ Format: {name}@workload.bytebase.com </p></td>
- <h3 id="bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</h3>
+ <h3 id="bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</h3>
<p></p>
@@ -22554,10 +22049,31 @@ Format: {name}@workload.bytebase.com </p></td>
<tbody>
<tr>
- <td>access_token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Bytebase access token. </p></td>
+ <td><p>The name is the name of a external table. </p></td>
+ </tr>
+
+ <tr>
+ <td>external_server_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The external_server_name is the name of the external server. </p></td>
+ </tr>
+
+ <tr>
+ <td>external_database_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The external_database_name is the name of the external database. </p></td>
+ </tr>
+
+ <tr>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a foreign table. </p></td>
</tr>
</tbody>
@@ -22567,8 +22083,8 @@ Format: {name}@workload.bytebase.com </p></td>
- <h3 id="bytebase.v1.IdentityProviderContext">IdentityProviderContext</h3>
- <p>Context for identity provider authentication.</p>
+ <h3 id="bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</h3>
+ <p>ForeignKeyMetadata is the metadata for foreign keys.</p>
<table class="field-table">
@@ -22578,17 +22094,62 @@ Format: {name}@workload.bytebase.com </p></td>
<tbody>
<tr>
- <td>oauth2_context</td>
- <td><a href="#bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>OAuth2 authentication context. </p></td>
+ <td><p>The name is the name of a foreign key. </p></td>
</tr>
<tr>
- <td>oidc_context</td>
- <td><a href="#bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</a></td>
+ <td>columns</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>referenced_schema</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>OpenID Connect authentication context. </p></td>
+ <td><p>The referenced_schema is the referenced schema name of a foreign key.
+It is an empty string for databases without such concept such as MySQL. </p></td>
+ </tr>
+
+ <tr>
+ <td>referenced_table</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>referenced_columns</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>on_delete</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The on_delete is the on delete action of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>on_update</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The on_update is the on update action of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>match_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The match_type is the match type of a foreign key.
+The match_type is the PostgreSQL specific field.
+It&#39;s empty string for other databases. </p></td>
</tr>
</tbody>
@@ -22598,8 +22159,8 @@ Format: {name}@workload.bytebase.com </p></td>
- <h3 id="bytebase.v1.LoginRequest">LoginRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.FunctionMetadata">FunctionMetadata</h3>
+ <p>FunctionMetadata is the metadata for functions.</p>
<table class="field-table">
@@ -22609,80 +22170,106 @@ Format: {name}@workload.bytebase.com </p></td>
<tbody>
<tr>
- <td>email</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>User&#39;s email address. </p></td>
+ <td><p>The name is the name of a function. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>User&#39;s password for authentication. </p></td>
+ <td><p>The definition is the definition of a function. </p></td>
</tr>
<tr>
- <td>web</td>
- <td><a href="#bool">bool</a></td>
+ <td>signature</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If true, sets access token and refresh token as HTTP-only cookies instead of
-returning the token in the response body. Use for browser-based clients. </p></td>
+ <td><p>The signature is the name with the number and type of input arguments the
+function takes. </p></td>
</tr>
<tr>
- <td>idp_name</td>
+ <td>character_set_client</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the identity provider.
-Format: idps/{idp} </p></td>
+ <td><p>MySQL specific metadata. </p></td>
</tr>
<tr>
- <td>idp_context</td>
- <td><a href="#bytebase.v1.IdentityProviderContext">IdentityProviderContext</a></td>
+ <td>collation_connection</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The idp_context is used to get the user information from identity provider. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>otp_code</td>
+ <td>database_collation</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The otp_code is used to verify the user&#39;s identity by MFA. </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>recovery_code</td>
+ <td>sql_mode</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The recovery_code is used to recovery the user&#39;s identity with MFA. </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>mfa_temp_token</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>The mfa_temp_token is used to verify the user&#39;s identity by MFA. </p></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>dependency_tables</td>
+ <td><a href="#bytebase.v1.DependencyTable">DependencyTable</a></td>
+ <td>repeated</td>
+ <td><p>The dependency_tables is the list of dependency tables of a function.
+For PostgreSQL, it&#39;s the list of tables that the function depends on the return type definition. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GenerationMetadata">GenerationMetadata</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>email_code</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>6-digit code from email for passwordless login/signup.
-Pairs with `email`. Mutually exclusive with `password` and `idp_name`. </p></td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>workspace</td>
+ <td>expression</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Preferred workspace to land in after login. If the user is a member of this
-workspace, the token is issued for it; otherwise falls back to the default
-resolution (last login workspace → first membership). Typically populated
-from the ?workspace= query parameter in invite links.
-Format: workspaces/{workspace} </p></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -22692,7 +22279,7 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.LoginResponse">LoginResponse</h3>
+ <h3 id="bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</h3>
<p></p>
@@ -22703,32 +22290,41 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>token</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Access token for authenticated requests.
-Only returned when web=false. For web=true, the token is set as an HTTP-only cookie. </p></td>
+ <td><p>The name of the database to retrieve metadata.
+Format: instances/{instance}/databases/{database}/metadata </p></td>
</tr>
<tr>
- <td>mfa_temp_token</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Temporary token for MFA verification. </p></td>
- </tr>
-
- <tr>
- <td>require_reset_password</td>
- <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>Whether user must reset password before continuing. </p></td>
+ <td><p>Filter is used to filter databases returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- schema: the schema name, support &#34;==&#34; operator.
+- table: the table name, support &#34;==&#34; and &#34;.contains()&#34; operator.
+
+For example:
+schema == &#34;schema-a&#34;
+table == &#34;table-a&#34;
+table.contains(&#34;table-a&#34;)
+schema == &#34;schema-a&#34; &amp;&amp; table.contains(&#34;sample&#34;)
+The filter is used to search for tables containing &#34;sample&#34; in the schema &#34;schemas/schema-a&#34;.
+The column masking level will only be returned when a table filter is used. </p></td>
</tr>
<tr>
- <td>user</td>
- <td><a href="#bytebase.v1.User">User</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The user from the successful login. </p></td>
+ <td><p>Limit the response size of returned table metadata per schema.
+For example, if the database has 3 schemas, and each schema has 100 tables,
+if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.
+Default 0, means no limit. </p></td>
</tr>
</tbody>
@@ -22738,15 +22334,8 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
- <h3 id="bytebase.v1.LogoutRequest">LogoutRequest</h3>
- <p>Request to logout current user session.</p>
-
-
-
-
-
- <h3 id="bytebase.v1.OAuth2IdentityProviderContext">OAuth2IdentityProviderContext</h3>
- <p>OAuth2 authentication context.</p>
+ <h3 id="bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</h3>
+ <p></p>
<table class="field-table">
@@ -22756,10 +22345,11 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorization code from OAuth2 provider. </p></td>
+ <td><p>The name of the database to retrieve.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
</tbody>
@@ -22769,8 +22359,8 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
- <h3 id="bytebase.v1.OIDCIdentityProviderContext">OIDCIdentityProviderContext</h3>
- <p>OpenID Connect authentication context.</p>
+ <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</h3>
+ <p></p>
<table class="field-table">
@@ -22780,10 +22370,18 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
<tbody>
<tr>
- <td>code</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Authorization code from OIDC provider. </p></td>
+ <td><p>The name of the database to retrieve SDL schema.
+Format: instances/{instance}/databases/{database}/sdlSchema </p></td>
+ </tr>
+
+ <tr>
+ <td>format</td>
+ <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</a></td>
+ <td></td>
+ <td><p>The format of the SDL schema output. </p></td>
</tr>
</tbody>
@@ -22793,21 +22391,32 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
- <h3 id="bytebase.v1.RefreshRequest">RefreshRequest</h3>
- <p>Request to refresh the access token.</p>
-
-
+ <h3 id="bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</h3>
+ <p></p>
-
- <h3 id="bytebase.v1.RefreshResponse">RefreshResponse</h3>
- <p>Response from refreshing the access token.</p>
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database to retrieve schema.
+Format: instances/{instance}/databases/{database}/schema </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
+
- <h3 id="bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</h3>
+ <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>
<p></p>
@@ -22818,20 +22427,40 @@ Only returned when web=false. For web=true, the token is set as an HTTP-only coo
<tbody>
<tr>
- <td>email</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email address of the account to reset. </p></td>
+ <td><p>The name of the database.
+Format: instances/{instance}/databases/{database} </p></td>
</tr>
<tr>
- <td>workspace</td>
+ <td>type</td>
+ <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>schema</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,
-and later (at verify time) for signup gate checks and workspace assignment.
-Unset for SaaS brand-new signup (no workspace exists yet).
-Format: workspaces/{workspace} </p></td>
+ <td></td>
+ <td><p>It&#39;s empty for DATABASE. </p></td>
+ </tr>
+
+ <tr>
+ <td>object</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>It&#39;s empty for DATABASE and SCHEMA. </p></td>
+ </tr>
+
+ <tr>
+ <td>metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td></td>
+ <td><p>If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.
+Also the schema and object are empty. </p></td>
</tr>
</tbody>
@@ -22841,7 +22470,7 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</h3>
+ <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3>
<p></p>
@@ -22852,24 +22481,41 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>email</td>
+ <td>schema_string</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email address of the account. </p></td>
+ <td><p> </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.GridLevel">GridLevel</h3>
+ <p>GridLevel defines a tessellation grid level with its density.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>code</td>
- <td><a href="#string">string</a></td>
+ <td>level</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The 6-digit code from the reset email. </p></td>
+ <td><p>Grid level number (1-4 for SQL Server) </p></td>
</tr>
<tr>
- <td>new_password</td>
+ <td>density</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The new password to set. </p></td>
+ <td><p>Grid density (LOW, MEDIUM, HIGH) </p></td>
</tr>
</tbody>
@@ -22879,8 +22525,8 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3>
+ <p>IndexMetadata is the metadata for indexes.</p>
<table class="field-table">
@@ -22890,58 +22536,126 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>email</td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of an index. </p></td>
+ </tr>
+
+ <tr>
+ <td>expressions</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The expressions are the ordered columns or expressions of an index.
+This could refer to a column or an expression. </p></td>
+ </tr>
+
+ <tr>
+ <td>key_length</td>
+ <td><a href="#int64">int64</a></td>
+ <td>repeated</td>
+ <td><p>The key_lengths are the ordered key lengths of an index.
+If the key length is not specified, it&#39;s -1. </p></td>
+ </tr>
+
+ <tr>
+ <td>descending</td>
+ <td><a href="#bool">bool</a></td>
+ <td>repeated</td>
+ <td><p>The descending is the ordered descending of an index. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The type is the type of an index. </p></td>
+ </tr>
+
+ <tr>
+ <td>unique</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The unique is whether the index is unique. </p></td>
+ </tr>
+
+ <tr>
+ <td>primary</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The primary is whether the index is a primary key index. </p></td>
+ </tr>
+
+ <tr>
+ <td>visible</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The visible is whether the index is visible. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email address to send the code to. </p></td>
+ <td><p>The comment is the comment of an index. </p></td>
</tr>
<tr>
- <td>workspace</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Optional workspace context captured at send time, used to locate the EMAIL setting,
-and later (at verify time) for signup gate checks and workspace assignment.
-Unset for SaaS brand-new signup (no workspace exists yet).
-Format: workspaces/{workspace} </p></td>
+ <td></td>
+ <td><p>The definition of an index. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SignupRequest">SignupRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>email</td>
+ <td>parent_index_schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The email for the new account. </p></td>
+ <td><p>The schema name of the parent index. </p></td>
</tr>
<tr>
- <td>password</td>
+ <td>parent_index_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The password for the new account. </p></td>
+ <td><p>The index name of the parent index. </p></td>
</tr>
<tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
+ <td>granularity</td>
+ <td><a href="#int64">int64</a></td>
<td></td>
- <td><p>The display name of the user. </p></td>
+ <td><p>The number of granules in the block. It&#39;s a ClickHouse specific field. </p></td>
+ </tr>
+
+ <tr>
+ <td>is_constraint</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>It&#39;s a PostgreSQL specific field.
+The unique constraint and unique index are not the same thing in PostgreSQL. </p></td>
+ </tr>
+
+ <tr>
+ <td>spatial_config</td>
+ <td><a href="#bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</a></td>
+ <td></td>
+ <td><p>Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc. </p></td>
+ </tr>
+
+ <tr>
+ <td>opclass_names</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>https://www.postgresql.org/docs/current/catalog-pg-opclass.html
+Name of the operator class for each column. (PostgreSQL specific). </p></td>
+ </tr>
+
+ <tr>
+ <td>opclass_defaults</td>
+ <td><a href="#bool">bool</a></td>
+ <td>repeated</td>
+ <td><p>True if the operator class is the default. (PostgreSQL specific). </p></td>
</tr>
</tbody>
@@ -22951,7 +22665,7 @@ Format: workspaces/{workspace} </p></td>
- <h3 id="bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</h3>
+ <h3 id="bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</h3>
<p></p>
@@ -22962,261 +22676,230 @@ Format: workspaces/{workspace} </p></td>
<tbody>
<tr>
- <td>workspace</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The target workspace to switch to.
-Format: workspaces/{workspace} </p></td>
+ <td><p>- projects/{project}: list databases in a project, require &#34;bb.projects.get&#34; permission.
+- workspaces/{id}: list databases in the workspace, require &#34;bb.databases.list&#34; permission.
+- instances/{instances}: list databases in a instance, require &#34;bb.instances.get&#34; permission </p></td>
</tr>
<tr>
- <td>web</td>
- <td><a href="#bool">bool</a></td>
+ <td>page_size</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>If true, sets tokens as HTTP-only cookies (browser clients). </p></td>
+ <td><p>The maximum number of databases to return. The service may return fewer
+than this value.
+If unspecified, at most 10 databases will be returned.
+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
</tr>
<tr>
- <td>otp_code</td>
+ <td>page_token</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>OTP code for MFA verification. Required if the target workspace enforces MFA. </p></td>
+ <td></td>
+ <td><p>A page token, received from a previous `ListDatabases` call.
+Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListDatabases` must
+match the call that provided the page token. </p></td>
</tr>
<tr>
- <td>recovery_code</td>
+ <td>filter</td>
<td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Recovery code for MFA verification (alternative to otp_code). </p></td>
+ <td></td>
+ <td><p>Filter is used to filter databases returned in the list.
+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
+
+Supported filter:
+- environment: the environment full name in &#34;environments/{id}&#34; format, support &#34;==&#34; operator.
+- name: the database name, support &#34;.contains()&#34; operator.
+- project: the project full name in &#34;projects/{id}&#34; format, support &#34;==&#34; operator.
+- instance: the instance full name in &#34;instances/{id}&#34; format, support &#34;==&#34; operator.
+- engine: the database engine, check Engine enum for values. Support &#34;==&#34;, &#34;in [xx]&#34;, &#34;!(in [xx])&#34; operator.
+- exclude_unassigned: should be &#34;true&#34; or &#34;false&#34;, will not show unassigned databases if it&#39;s true, support &#34;==&#34; operator.
+- table: filter by the database table, support &#34;==&#34; and &#34;.contains()&#34; operator.
+- labels.{key}: the database label, support &#34;==&#34; and &#34;in&#34; operators.
+
+For example:
+environment == &#34;environments/{environment resource id}&#34;
+environment == &#34;&#34; (find databases which environment is not set)
+project == &#34;projects/{project resource id}&#34;
+instance == &#34;instances/{instance resource id}&#34;
+name.contains(&#34;database name&#34;)
+engine == &#34;MYSQL&#34;
+engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;]
+!(engine in [&#34;MYSQL&#34;, &#34;POSTGRES&#34;])
+exclude_unassigned == true
+table == &#34;sample&#34;
+table.contains(&#34;sam&#34;)
+labels.environment == &#34;production&#34;
+labels.region == &#34;asia&#34;
+labels.region in [&#34;asia&#34;, &#34;europe&#34;]
+
+You can combine filter conditions like:
+environment == &#34;environments/prod&#34; &amp;&amp; name.contains(&#34;employee&#34;) </p></td>
</tr>
<tr>
- <td>mfa_temp_token</td>
- <td><a href="#string">string</a></td>
- <td>optional</td>
- <td><p>Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token. </p></td>
+ <td>show_deleted</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Show deleted database if specified. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.AuthService">AuthService</h3>
- <p>AuthService handles user authentication operations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>Login</td>
- <td><a href="#bytebase.v1.LoginRequest">LoginRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Authenticates a user and returns access tokens.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>Logout</td>
- <td><a href="#bytebase.v1.LogoutRequest">LogoutRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Logs out the current user session.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>ExchangeToken</td>
- <td><a href="#bytebase.v1.ExchangeTokenRequest">ExchangeTokenRequest</a></td>
- <td><a href="#bytebase.v1.ExchangeTokenResponse">ExchangeTokenResponse</a></td>
- <td><p>Exchanges an external OIDC token for a Bytebase access token.
-Used by CI/CD pipelines with Workload Identity Federation.
-Permissions required: None (validates via OIDC token)</p></td>
- </tr>
-
- <tr>
- <td>Signup</td>
- <td><a href="#bytebase.v1.SignupRequest">SignupRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Registers a new user account. Creates a principal and assigns a workspace:
-- If the user&#39;s email was pre-invited to a workspace, joins that workspace.
-- Otherwise, creates a new workspace with the user as admin.
-Returns access tokens so the user is logged in immediately after signup.</p></td>
- </tr>
-
- <tr>
- <td>Refresh</td>
- <td><a href="#bytebase.v1.RefreshRequest">RefreshRequest</a></td>
- <td><a href="#bytebase.v1.RefreshResponse">RefreshResponse</a></td>
- <td><p>Refreshes the access token using the refresh token cookie.
-Permissions required: None (validates via refresh token cookie)</p></td>
- </tr>
-
- <tr>
- <td>SwitchWorkspace</td>
- <td><a href="#bytebase.v1.SwitchWorkspaceRequest">SwitchWorkspaceRequest</a></td>
- <td><a href="#bytebase.v1.LoginResponse">LoginResponse</a></td>
- <td><p>Switches the current user&#39;s active workspace and issues new tokens.
-The user must be a member of the target workspace.</p></td>
- </tr>
-
- <tr>
- <td>RequestPasswordReset</td>
- <td><a href="#bytebase.v1.RequestPasswordResetRequest">RequestPasswordResetRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Requests a password reset email for the given email address.
-Always returns success to avoid leaking whether the email exists.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>ResetPassword</td>
- <td><a href="#bytebase.v1.ResetPasswordRequest">ResetPasswordRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Resets the user&#39;s password using a password reset token from email.
-Permissions required: None (validates via token)</p></td>
- </tr>
-
- <tr>
- <td>SendEmailLoginCode</td>
- <td><a href="#bytebase.v1.SendEmailLoginCodeRequest">SendEmailLoginCodeRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Sends a 6-digit verification code to the email for login/signup.
-Always returns success (no email enumeration). Enforces 60-sec resend cooldown.
-Permissions required: None</p></td>
- </tr>
-
- </tbody>
- </table>
+ <tr>
+ <td>order_by</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The order by of databases.
+Support name, project, instance. The default sorting order is ascending.
+For example:
+- order_by = &#34;name&#34; - order by name ascending
+- order_by = &#34;name desc&#34;
+- order_by = &#34;name desc, project asc&#34; </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+
+
+
+ <h3 id="bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>Login</td>
- <td>POST</td>
- <td>/v1/auth/login</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>Logout</td>
- <td>POST</td>
- <td>/v1/auth/logout</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>ExchangeToken</td>
- <td>POST</td>
- <td>/v1/auth:exchangeToken</td>
- <td>*</td>
- </tr>
-
-
-
-
- <tr>
- <td>Signup</td>
- <td>POST</td>
- <td>/v1/auth/signup</td>
- <td>*</td>
- </tr>
-
-
-
- <tr>
- <td>Refresh</td>
- <td>POST</td>
- <td>/v1/auth/refresh</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>databases</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td>repeated</td>
+ <td><p>The databases from the specified request. </p></td>
+ </tr>
-
+ <tr>
+ <td>next_page_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.
+If this field is omitted, there are no subsequent pages. </p></td>
+ </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</h3>
+ <p>MaterializedViewMetadata is the metadata for materialized views.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
- <tr>
- <td>SwitchWorkspace</td>
- <td>POST</td>
- <td>/v1/auth:switchWorkspace</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a materialized view. </p></td>
+ </tr>
-
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition is the definition of a materialized view. </p></td>
+ </tr>
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a materialized view. </p></td>
+ </tr>
- <tr>
- <td>RequestPasswordReset</td>
- <td>POST</td>
- <td>/v1/auth:requestPasswordReset</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>dependency_columns</td>
+ <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
+ <td>repeated</td>
+ <td><p>The dependency_columns is the list of dependency columns of a materialized
+view. </p></td>
+ </tr>
-
+ <tr>
+ <td>triggers</td>
+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The indexes is the list of indexes in a table. </p></td>
+ </tr>
- <tr>
- <td>ResetPassword</td>
- <td>POST</td>
- <td>/v1/auth:resetPassword</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
-
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.PackageMetadata">PackageMetadata</h3>
+ <p>PackageMetadata is the metadata for packages.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a package. </p></td>
+ </tr>
- <tr>
- <td>SendEmailLoginCode</td>
- <td>POST</td>
- <td>/v1/auth:sendEmailLoginCode</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition is the definition of a package. </p></td>
+ </tr>
-
</tbody>
</table>
+
-
-
-
- <div class="file-heading">
- <h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
- <h3 id="bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</h3>
- <p>Request message for batch deparsing CEL expressions.</p>
+ <h3 id="bytebase.v1.ProcedureMetadata">ProcedureMetadata</h3>
+ <p>ProcedureMetadata is the metadata for procedures.</p>
<table class="field-table">
@@ -23226,10 +22909,67 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>expressions</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
- <td>repeated</td>
- <td><p>The CEL expression ASTs to deparse. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a procedure. </p></td>
+ </tr>
+
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition is the definition of a procedure. </p></td>
+ </tr>
+
+ <tr>
+ <td>signature</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The signature is the name with the number and type of input arguments the
+procedure takes. </p></td>
+ </tr>
+
+ <tr>
+ <td>character_set_client</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>MySQL specific metadata. </p></td>
+ </tr>
+
+ <tr>
+ <td>collation_connection</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>database_collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sql_mode</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a procedure. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23239,8 +22979,8 @@ Permissions required: None</p></td>
- <h3 id="bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</h3>
- <p>Response message for batch deparsing CEL expressions.</p>
+ <h3 id="bytebase.v1.SchemaMetadata">SchemaMetadata</h3>
+ <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
<table class="field-table">
@@ -23250,58 +22990,127 @@ Permissions required: None</p></td>
<tbody>
<tr>
- <td>expressions</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the schema name.
+It is an empty string for databases without such concept such as MySQL. </p></td>
+ </tr>
+
+ <tr>
+ <td>tables</td>
+ <td><a href="#bytebase.v1.TableMetadata">TableMetadata</a></td>
<td>repeated</td>
- <td><p>The deparsed CEL expressions as strings. </p></td>
+ <td><p>The tables is the list of tables in a schema. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchParseRequest">BatchParseRequest</h3>
- <p>Request message for batch parsing CEL expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>external_tables</td>
+ <td><a href="#bytebase.v1.ExternalTableMetadata">ExternalTableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The external_tables is the list of external tables in a schema. </p></td>
+ </tr>
<tr>
- <td>expressions</td>
+ <td>views</td>
+ <td><a href="#bytebase.v1.ViewMetadata">ViewMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The views is the list of views in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>functions</td>
+ <td><a href="#bytebase.v1.FunctionMetadata">FunctionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The functions is the list of functions in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>procedures</td>
+ <td><a href="#bytebase.v1.ProcedureMetadata">ProcedureMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The procedures is the list of procedures in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>streams</td>
+ <td><a href="#bytebase.v1.StreamMetadata">StreamMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The streams is the list of streams in a schema, currently, only used for
+Snowflake. </p></td>
+ </tr>
+
+ <tr>
+ <td>tasks</td>
+ <td><a href="#bytebase.v1.TaskMetadata">TaskMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The routines is the list of routines in a schema, currently, only used for
+Snowflake. </p></td>
+ </tr>
+
+ <tr>
+ <td>materialized_views</td>
+ <td><a href="#bytebase.v1.MaterializedViewMetadata">MaterializedViewMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The materialized_views is the list of materialized views in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>packages</td>
+ <td><a href="#bytebase.v1.PackageMetadata">PackageMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The packages is the list of packages in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
<td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>sequences</td>
+ <td><a href="#bytebase.v1.SequenceMetadata">SequenceMetadata</a></td>
<td>repeated</td>
- <td><p>The CEL expression strings to parse. </p></td>
+ <td><p>The sequences is the list of sequences in a schema, sorted by name. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.BatchParseResponse">BatchParseResponse</h3>
- <p>Response message for batch parsing CEL expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>events</td>
+ <td><a href="#bytebase.v1.EventMetadata">EventMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The events is the list of scheduled events in a schema. </p></td>
+ </tr>
<tr>
- <td>expressions</td>
- <td><a href="#google.api.expr.v1alpha1.Expr">google.api.expr.v1alpha1.Expr</a></td>
+ <td>enum_types</td>
+ <td><a href="#bytebase.v1.EnumTypeMetadata">EnumTypeMetadata</a></td>
<td>repeated</td>
- <td><p>The parsed CEL expressions as AST. </p></td>
+ <td><p>The enum_types is the list of user-defined enum types in a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this schema during schema dump operations. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>composite_types</td>
+ <td><a href="#bytebase.v1.CompositeTypeMetadata">CompositeTypeMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The composite_types is the list of user-defined composite types in a
+schema (PostgreSQL family, CREATE TYPE ... AS). Excludes table/view row
+types and derived types. </p></td>
</tr>
</tbody>
@@ -23311,144 +23120,105 @@ Permissions required: None</p></td>
-
-
-
-
-
-
- <h3 id="bytebase.v1.CelService">CelService</h3>
- <p>CelService manages CEL (Common Expression Language) parsing and formatting operations.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>BatchParse</td>
- <td><a href="#bytebase.v1.BatchParseRequest">BatchParseRequest</a></td>
- <td><a href="#bytebase.v1.BatchParseResponse">BatchParseResponse</a></td>
- <td><p>Parses multiple CEL expression strings into AST representations.
-Permissions required: None</p></td>
- </tr>
-
- <tr>
- <td>BatchDeparse</td>
- <td><a href="#bytebase.v1.BatchDeparseRequest">BatchDeparseRequest</a></td>
- <td><a href="#bytebase.v1.BatchDeparseResponse">BatchDeparseResponse</a></td>
- <td><p>Converts multiple CEL AST representations back into expression strings.
-Permissions required: None</p></td>
- </tr>
-
- </tbody>
- </table>
+ <h3 id="bytebase.v1.SequenceMetadata">SequenceMetadata</h3>
+ <p></p>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
- <tr>
- <td>BatchParse</td>
- <td>POST</td>
- <td>/v1/cel/batchParse</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of a sequence. </p></td>
+ </tr>
-
+ <tr>
+ <td>data_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The data type of a sequence. </p></td>
+ </tr>
+ <tr>
+ <td>start</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The start value of a sequence. </p></td>
+ </tr>
- <tr>
- <td>BatchDeparse</td>
- <td>POST</td>
- <td>/v1/cel/batchDeparse</td>
- <td>*</td>
- </tr>
+ <tr>
+ <td>min_value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The minimum value of a sequence. </p></td>
+ </tr>
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/changelog_service.proto">v1/changelog_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.Changelog">Changelog</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>max_value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The maximum value of a sequence. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>increment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ <td><p>Increment value of a sequence. </p></td>
</tr>
<tr>
- <td>create_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>cycle</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Cycle is whether the sequence cycles. </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#bytebase.v1.Changelog.Status">Changelog.Status</a></td>
+ <td>cache_size</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Cache size of a sequence. </p></td>
</tr>
<tr>
- <td>schema</td>
+ <td>last_value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Last value of a sequence. </p></td>
</tr>
<tr>
- <td>schema_size</td>
- <td><a href="#int64">int64</a></td>
+ <td>owner_table</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The owner table of the sequence. </p></td>
</tr>
<tr>
- <td>task_run</td>
+ <td>owner_column</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun} </p></td>
+ <td><p>The owner column of the sequence. </p></td>
</tr>
<tr>
- <td>plan_title</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The title of the plan associated with this changelog&#39;s task run.
-This field is populated by deriving the plan from task_run for display purposes. </p></td>
+ <td><p>The comment describing the sequence. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this sequence during schema dump operations. </p></td>
</tr>
</tbody>
@@ -23458,8 +23228,8 @@ This field is populated by deriving the plan from task_run for display purposes.
- <h3 id="bytebase.v1.GetChangelogRequest">GetChangelogRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.SpatialIndexConfig">SpatialIndexConfig</h3>
+ <p>SpatialIndexConfig defines the spatial index configuration for spatial databases.</p>
<table class="field-table">
@@ -23469,18 +23239,31 @@ This field is populated by deriving the plan from task_run for display purposes.
<tbody>
<tr>
- <td>name</td>
+ <td>method</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the changelog to retrieve.
-Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></td>
+ <td><p>Spatial indexing method (e.g., &#34;SPATIAL&#34;, &#34;R-TREE&#34;, &#34;GIST&#34;) </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
+ <td>tessellation</td>
+ <td><a href="#bytebase.v1.TessellationConfig">TessellationConfig</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>Tessellation configuration for grid-based spatial indexes </p></td>
+ </tr>
+
+ <tr>
+ <td>storage</td>
+ <td><a href="#bytebase.v1.StorageConfig">StorageConfig</a></td>
+ <td></td>
+ <td><p>Storage and performance configuration </p></td>
+ </tr>
+
+ <tr>
+ <td>dimensional</td>
+ <td><a href="#bytebase.v1.DimensionalConfig">DimensionalConfig</a></td>
+ <td></td>
+ <td><p>Dimensional configuration </p></td>
</tr>
</tbody>
@@ -23490,8 +23273,8 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t
- <h3 id="bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</h3>
- <p></p>
+ <h3 id="bytebase.v1.StorageConfig">StorageConfig</h3>
+ <p>StorageConfig defines storage and performance parameters for spatial indexes.</p>
<table class="field-table">
@@ -23501,55 +23284,101 @@ Format: instances/{instance}/databases/{database}/changelogs/{changelog} </p></t
<tbody>
<tr>
- <td>parent</td>
+ <td>fillfactor</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p>Fill factor percentage (1-100) </p></td>
+ </tr>
+
+ <tr>
+ <td>buffering</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent of the changelogs.
-Format: instances/{instance}/databases/{database} </p></td>
+ <td><p>Buffering mode for PostgreSQL (auto, on, off) </p></td>
</tr>
<tr>
- <td>page_size</td>
+ <td>tablespace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Tablespace configuration for Oracle </p></td>
+ </tr>
+
+ <tr>
+ <td>work_tablespace</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>sdo_level</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The maximum number of changelogs to return. The service may return fewer
-than this value. If unspecified, at most 10 changelogs will be returned.
-The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>page_token</td>
+ <td>commit_interval</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>pad_index</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>SQL Server specific parameters </p></td>
+ </tr>
+
+ <tr>
+ <td>sort_in_tempdb</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A page token, received from the previous call.
-Provide this to retrieve the subsequent page.
-
-When paginating, all other parameters provided must match
-the call that provided the page token. </p></td>
+ <td><p>ON, OFF </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.ChangelogView">ChangelogView</a></td>
+ <td>drop_existing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>filter</td>
+ <td>online</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_row_locks</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>allow_page_locks</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>maxdop</td>
+ <td><a href="#int32">int32</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>data_compression</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>Filter is used to filter changelogs returned in the list.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Supported filter:
-- status: the changelog status, support &#34;==&#34; operation. check Changelog.Status for available values.
-- create_time: the changelog create time in &#34;2006-01-02T15:04:05Z07:00&#34; format, support &#34;&gt;=&#34; or &#34;&lt;=&#34; operator.
-
-Example:
-status == &#34;DONE&#34;
-status == &#34;FAILED&#34; &amp;&amp; type == &#34;SDL&#34;
-create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#34;2024-01-02T00:00:00Z&#34; </p></td>
+ <td><p>NONE, ROW, PAGE </p></td>
</tr>
</tbody>
@@ -23559,7 +23388,7 @@ create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#
- <h3 id="bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</h3>
+ <h3 id="bytebase.v1.StreamMetadata">StreamMetadata</h3>
<p></p>
@@ -23570,18 +23399,59 @@ create_time &gt;= &#34;2024-01-01T00:00:00Z&#34; &amp;&amp; create_time &lt;= &#
<tbody>
<tr>
- <td>changelogs</td>
- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
- <td>repeated</td>
- <td><p>The list of changelogs. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>table_name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment of the stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</a></td>
+ <td></td>
+ <td><p>The type of the stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>stale</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>
+ </tr>
+
+ <tr>
+ <td>mode</td>
+ <td><a href="#bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</a></td>
+ <td></td>
+ <td><p>The mode of the stream. </p></td>
</tr>
<tr>
- <td>next_page_token</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>A token, which can be sent as `page_token` to retrieve the next page.
-If this field is omitted, there are no subsequent pages. </p></td>
+ <td><p>The definition of the stream. </p></td>
</tr>
</tbody>
@@ -23591,153 +23461,40 @@ If this field is omitted, there are no subsequent pages. </p></td>
-
-
- <h3 id="bytebase.v1.Changelog.Status">Changelog.Status</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATUS_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>PENDING</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DONE</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>FAILED</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.v1.ChangelogView">ChangelogView</h3>
+ <h3 id="bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</h3>
<p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>CHANGELOG_VIEW_UNSPECIFIED</td>
- <td>0</td>
- <td><p>The default / unset value.
-The API will default to the BASIC view.</p></td>
- </tr>
-
- <tr>
- <td>CHANGELOG_VIEW_BASIC</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>CHANGELOG_VIEW_FULL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ChangelogService">ChangelogService</h3>
- <p>ChangelogService manages database migration history.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>ListChangelogs</td>
- <td><a href="#bytebase.v1.ListChangelogsRequest">ListChangelogsRequest</a></td>
- <td><a href="#bytebase.v1.ListChangelogsResponse">ListChangelogsResponse</a></td>
- <td><p>Lists migration history for a database.
-Permissions required: bb.changelogs.list</p></td>
- </tr>
-
- <tr>
- <td>GetChangelog</td>
- <td><a href="#bytebase.v1.GetChangelogRequest">GetChangelogRequest</a></td>
- <td><a href="#bytebase.v1.Changelog">Changelog</a></td>
- <td><p>Retrieves a specific changelog entry.
-Permissions required: bb.changelogs.get</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
+ <table class="field-table">
<thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>
-
-
-
- <tr>
- <td>ListChangelogs</td>
- <td>GET</td>
- <td>/v1/{parent=instances/*/databases/*}/changelogs</td>
- <td></td>
- </tr>
-
-
-
- <tr>
- <td>GetChangelog</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/changelogs/*}</td>
- <td></td>
- </tr>
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the database to sync.
+Format: instances/{instance}/databases/{database} </p></td>
+ </tr>
-
</tbody>
</table>
+
+
-
- <div class="file-heading">
- <h2 id="v1/database_catalog_service.proto">v1/database_catalog_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+ <h3 id="bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</h3>
+ <p></p>
+
+
+
- <h3 id="bytebase.v1.ColumnCatalog">ColumnCatalog</h3>
- <p>Column metadata within a table.</p>
+ <h3 id="bytebase.v1.TableMetadata">TableMetadata</h3>
+ <p>TableMetadata is the metadata for tables.</p>
<table class="field-table">
@@ -23750,98 +23507,149 @@ Permissions required: bb.changelogs.get</p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The column name. </p></td>
+ <td><p>The name is the name of a table. </p></td>
</tr>
<tr>
- <td>semantic_type</td>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The indexes is the list of indexes in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The semantic type describing the data purpose. </p></td>
+ <td><p>The engine is the engine of a table. </p></td>
</tr>
<tr>
- <td>labels</td>
- <td><a href="#bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>User-defined labels for this column. </p></td>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The collation is the collation of a table. </p></td>
</tr>
<tr>
- <td>classification</td>
+ <td>charset</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data classification level for this column. </p></td>
+ <td><p>The character set of table. </p></td>
</tr>
<tr>
- <td>object_schema</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
- <td>optional</td>
- <td><p>Object schema for complex column types like JSON. </p></td>
+ <td>row_count</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The row_count is the estimated number of rows of a table. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>data_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The data_size is the estimated data size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>index_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The index_size is the estimated index size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_free</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The data_free is the estimated free data size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_options</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The create_options is the create option of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>foreign_keys</td>
+ <td><a href="#bytebase.v1.ForeignKeyMetadata">ForeignKeyMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>partitions</td>
+ <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The partitions is the list of partitions in a table. </p></td>
+ </tr>
<tr>
- <td>key</td>
+ <td>check_constraints</td>
+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The check_constraints is the list of check constraints in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The owner of the table. </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>sorting_keys</td>
<td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td>repeated</td>
+ <td><p>The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.
+Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DatabaseCatalog">DatabaseCatalog</h3>
- <p>Catalog metadata for a database including schemas, tables, and columns.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>triggers</td>
+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The triggers is the list of triggers associated with the table. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this table during schema dump operations. </p></td>
+ </tr>
+
+ <tr>
+ <td>sharding_info</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database catalog.
-Format: instances/{instance}/databases/{database}/catalog </p></td>
+ <td><p>https://docs.pingcap.com/tidb/stable/information-schema-tables/ </p></td>
</tr>
<tr>
- <td>schemas</td>
- <td><a href="#bytebase.v1.SchemaCatalog">SchemaCatalog</a></td>
- <td>repeated</td>
- <td><p>The schemas in the database. </p></td>
+ <td>primary_key_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes
+CLUSTERED or NONCLUSTERED. </p></td>
</tr>
</tbody>
@@ -23851,8 +23659,8 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>
- <h3 id="bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</h3>
- <p>Request message for getting a database catalog.</p>
+ <h3 id="bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</h3>
+ <p>TablePartitionMetadata is the metadata for table partitions.</p>
<table class="field-table">
@@ -23865,101 +23673,75 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database catalog to retrieve.
-Format: instances/{instance}/databases/{database}/catalog </p></td>
+ <td><p>The name is the name of a table partition. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ObjectSchema">ObjectSchema</h3>
- <p>Schema definition for object-type columns.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
<td>type</td>
- <td><a href="#bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</a></td>
+ <td><a href="#bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>
<td></td>
- <td><p>The data type of this object. </p></td>
+ <td><p>The type of a table partition. </p></td>
</tr>
<tr>
- <td>struct_kind</td>
- <td><a href="#bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td>
+ <td>expression</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Struct schema. </p></td>
+ <td><p>The expression is the expression of a table partition.
+For PostgreSQL, the expression is the text of {FOR VALUES
+partition_bound_spec}, see
+https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,
+the expression is the `expr` or `column_list` of the following syntax.
+PARTITION BY
+ { [LINEAR] HASH(expr)
+ | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)
+ | RANGE{(expr) | COLUMNS(column_list)}
+ | LIST{(expr) | COLUMNS(column_list)} }. </p></td>
</tr>
<tr>
- <td>array_kind</td>
- <td><a href="#bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Array schema. </p></td>
+ <td><p>The value is the value of a table partition.
+For MySQL, the value is for RANGE and LIST partition types,
+- For a RANGE partition, it contains the value set in the partition&#39;s
+VALUES LESS THAN clause, which can be either an integer or MAXVALUE.
+- For a LIST partition, this column contains the values defined in the
+partition&#39;s VALUES IN clause, which is a list of comma-separated integer
+values.
+- For others, it&#39;s an empty string. </p></td>
</tr>
<tr>
- <td>semantic_type</td>
+ <td>use_default</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The semantic type of this object. </p></td>
+ <td><p>The use_default is whether the users use the default partition, it stores
+the different value for different database engines. For MySQL, it&#39;s [INT]
+type, 0 means not use default partition, otherwise, it&#39;s equals to number
+in syntax [SUB]PARTITION {number}. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>
- <p>Array type with element schema.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>kind</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
- <td></td>
- <td><p>The schema of array elements. </p></td>
+ <td>subpartitions</td>
+ <td><a href="#bytebase.v1.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>
- <p>Structure type with named properties.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.v1.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
<tr>
- <td>properties</td>
- <td><a href="#bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>
+ <td>check_constraints</td>
+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>
<td>repeated</td>
- <td><p>Properties of the struct. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -23969,7 +23751,7 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>
- <h3 id="bytebase.v1.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3>
+ <h3 id="bytebase.v1.TaskMetadata">TaskMetadata</h3>
<p></p>
@@ -23980,93 +23762,74 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name is the name of a task. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The id is the snowflake-generated id of a task.
+Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.SchemaCatalog">SchemaCatalog</h3>
- <p>Schema metadata within a database.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>owner</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The schema name. </p></td>
+ <td><p>The owner of the task. </p></td>
</tr>
<tr>
- <td>tables</td>
- <td><a href="#bytebase.v1.TableCatalog">TableCatalog</a></td>
- <td>repeated</td>
- <td><p>The tables in the schema. </p></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment of the task. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.TableCatalog">TableCatalog</h3>
- <p>Table metadata within a schema.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>warehouse</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The warehouse of the task. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>schedule</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The table name. </p></td>
+ <td><p>The schedule interval of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>predecessors</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The predecessor tasks of the task. </p></td>
</tr>
<tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</a></td>
+ <td>state</td>
+ <td><a href="#bytebase.v1.TaskMetadata.State">TaskMetadata.State</a></td>
<td></td>
- <td><p>Regular table columns. </p></td>
+ <td><p>The state of the task. </p></td>
</tr>
<tr>
- <td>object_schema</td>
- <td><a href="#bytebase.v1.ObjectSchema">ObjectSchema</a></td>
+ <td>condition</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>Object schema for JSON/XML columns. </p></td>
+ <td><p>The condition of the task. </p></td>
</tr>
<tr>
- <td>classification</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data classification level for this table. </p></td>
+ <td><p>The definition of the task. </p></td>
</tr>
</tbody>
@@ -24076,8 +23839,8 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>
- <h3 id="bytebase.v1.TableCatalog.Columns">TableCatalog.Columns</h3>
- <p>Column list for regular tables.</p>
+ <h3 id="bytebase.v1.TessellationConfig">TessellationConfig</h3>
+ <p>TessellationConfig defines tessellation parameters for spatial indexes.</p>
<table class="field-table">
@@ -24087,45 +23850,31 @@ Format: instances/{instance}/databases/{database}/catalog </p></td>
<tbody>
<tr>
- <td>columns</td>
- <td><a href="#bytebase.v1.ColumnCatalog">ColumnCatalog</a></td>
- <td>repeated</td>
- <td><p>The columns in the table. </p></td>
+ <td>scheme</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Tessellation scheme (e.g., &#34;GEOMETRY_GRID&#34;, &#34;GEOGRAPHY_GRID&#34;, &#34;GEOMETRY_AUTO_GRID&#34;) </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</h3>
- <p>Request message for updating a database catalog.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>grid_levels</td>
+ <td><a href="#bytebase.v1.GridLevel">GridLevel</a></td>
+ <td>repeated</td>
+ <td><p>Grid levels and densities for multi-level tessellation </p></td>
+ </tr>
<tr>
- <td>catalog</td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
+ <td>cells_per_object</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The database catalog to update.
-
-The catalog&#39;s `name` field is used to identify the database catalog to update.
-Format: instances/{instance}/databases/{database}/catalog </p></td>
+ <td><p>Number of cells per object (1-8192 for SQL Server) </p></td>
</tr>
<tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
+ <td>bounding_box</td>
+ <td><a href="#bytebase.v1.BoundingBox">BoundingBox</a></td>
<td></td>
- <td><p>If set to true, and the database catalog is not found, a new database catalog will be created.
-In this situation, `update_mask` is ignored. </p></td>
+ <td><p>Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY) </p></td>
</tr>
</tbody>
@@ -24135,135 +23884,8 @@ In this situation, `update_mask` is ignored. </p></td>
-
-
- <h3 id="bytebase.v1.ObjectSchema.Type">ObjectSchema.Type</h3>
- <p>Object schema data types.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p>Unspecified type.</p></td>
- </tr>
-
- <tr>
- <td>STRING</td>
- <td>1</td>
- <td><p>String type.</p></td>
- </tr>
-
- <tr>
- <td>NUMBER</td>
- <td>2</td>
- <td><p>Number type.</p></td>
- </tr>
-
- <tr>
- <td>BOOLEAN</td>
- <td>3</td>
- <td><p>Boolean type.</p></td>
- </tr>
-
- <tr>
- <td>OBJECT</td>
- <td>4</td>
- <td><p>Object/struct type.</p></td>
- </tr>
-
- <tr>
- <td>ARRAY</td>
- <td>5</td>
- <td><p>Array type.</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DatabaseCatalogService">DatabaseCatalogService</h3>
- <p>DatabaseCatalogService manages database schema metadata and classification.</p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>GetDatabaseCatalog</td>
- <td><a href="#bytebase.v1.GetDatabaseCatalogRequest">GetDatabaseCatalogRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td><p>Gets the catalog metadata for a database.
-Permissions required: bb.databaseCatalogs.get</p></td>
- </tr>
-
- <tr>
- <td>UpdateDatabaseCatalog</td>
- <td><a href="#bytebase.v1.UpdateDatabaseCatalogRequest">UpdateDatabaseCatalogRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseCatalog">DatabaseCatalog</a></td>
- <td><p>Updates catalog metadata such as classifications and labels.
-Permissions required: bb.databaseCatalogs.update</p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>GetDatabaseCatalog</td>
- <td>GET</td>
- <td>/v1/{name=instances/*/databases/*/catalog}</td>
- <td></td>
- </tr>
-
-
-
-
- <tr>
- <td>UpdateDatabaseCatalog</td>
- <td>PATCH</td>
- <td>/v1/{catalog.name=instances/*/databases/*/catalog}</td>
- <td>catalog</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
- <div class="file-heading">
- <h2 id="v1/database_group_service.proto">v1/database_group_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</h3>
- <p>Request message for creating a database group.</p>
+ <h3 id="bytebase.v1.TriggerMetadata">TriggerMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -24273,94 +23895,67 @@ Permissions required: bb.databaseCatalogs.update</p></td>
<tbody>
<tr>
- <td>parent</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent resource where this database group will be created.
-Format: projects/{project} </p></td>
+ <td><p>The name is the name of the trigger. </p></td>
</tr>
<tr>
- <td>database_group</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
+ <td>event</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The database group to create. </p></td>
+ <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,
+TRUNCATE. </p></td>
</tr>
<tr>
- <td>database_group_id</td>
+ <td>timing</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The ID to use for the database group, which will become the final component of
-the database group&#39;s resource name.
-
-This value should be 4-63 characters, and valid characters
-are /[a-z][0-9]-/. </p></td>
+ <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>
</tr>
<tr>
- <td>validate_only</td>
- <td><a href="#bool">bool</a></td>
+ <td>body</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>If set, validate the create request and preview the full database group response, but do not actually create it. </p></td>
+ <td><p>The body is the body of the trigger. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DatabaseGroup">DatabaseGroup</h3>
- <p>A group of databases matched by expressions.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>sql_mode</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The SQL mode setting for the trigger. </p></td>
+ </tr>
<tr>
- <td>name</td>
+ <td>character_set_client</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database group.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>The character set used by the client creating the trigger. </p></td>
</tr>
<tr>
- <td>title</td>
+ <td>collation_connection</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The short name used in actual databases specified by users. </p></td>
+ <td><p>The collation used for the connection when creating the trigger. </p></td>
</tr>
<tr>
- <td>database_expr</td>
- <td><a href="#google.type.Expr">google.type.Expr</a></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The condition that is associated with this database group.
-The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-
-Support variables:
-resource.environment_id: the environment resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34; operations.
-resource.instance_id: the instance resource id. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
-resource.database_name: the database name. Support &#34;==&#34;, &#34;!=&#34;, &#34;in [XX]&#34;, &#34;!(in [xx])&#34;, &#34;contains&#34;, &#34;matches&#34;, &#34;startsWith&#34;, &#34;endsWith&#34; operations.
-resource.database_labels: the database labels. Support map access operations.
-All variables should join with &#34;&amp;&amp;&#34; condition.
-
-For example:
-resource.environment_id == &#34;test&#34; &amp;&amp; resource.database_name.startsWith(&#34;sample_&#34;)
-resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
+ <td><p>The comment describing the trigger. </p></td>
</tr>
<tr>
- <td>matched_databases</td>
- <td><a href="#bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</a></td>
- <td>repeated</td>
- <td><p>The list of databases that match the database group condition. </p></td>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Whether to skip this trigger during schema dump operations. </p></td>
</tr>
</tbody>
@@ -24370,8 +23965,8 @@ resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
- <h3 id="bytebase.v1.DatabaseGroup.Database">DatabaseGroup.Database</h3>
- <p>A database within a database group.</p>
+ <h3 id="bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</h3>
+ <p></p>
<table class="field-table">
@@ -24381,36 +23976,28 @@ resource.database_labels[&#34;tenant&#34;] == &#34;tenant1&#34; </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>database</td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
<td></td>
- <td><p>The resource name of the database.
+ <td><p>The database to update.
+
+The database&#39;s `name` field is used to identify the database to update.
Format: instances/{instance}/databases/{database} </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</h3>
- <p>Request message for deleting a database group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
+ <tr>
+ <td>update_mask</td>
+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
+ <td></td>
+ <td><p>The list of fields to update. </p></td>
+ </tr>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>allow_missing</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The name of the database group to delete.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>If set to true, and the database is not found, a new database will be created.
+In this situation, `update_mask` is ignored. </p></td>
</tr>
</tbody>
@@ -24420,8 +24007,8 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
- <h3 id="bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</h3>
- <p>Request message for getting a database group.</p>
+ <h3 id="bytebase.v1.ViewMetadata">ViewMetadata</h3>
+ <p>ViewMetadata is the metadata for views.</p>
<table class="field-table">
@@ -24434,47 +24021,49 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the database group to retrieve.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
+ <td><p>The name is the name of a view. </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
+ <td><p>The definition is the definition of a view. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</h3>
- <p>Request message for listing database groups.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>parent</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The parent resource whose database groups are to be listed.
-Format: projects/{project} </p></td>
+ <td><p>The comment is the comment of a view. </p></td>
</tr>
<tr>
- <td>view</td>
- <td><a href="#bytebase.v1.DatabaseGroupView">DatabaseGroupView</a></td>
+ <td>dependency_columns</td>
+ <td><a href="#bytebase.v1.DependencyColumn">DependencyColumn</a></td>
+ <td>repeated</td>
+ <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>columns</td>
+ <td><a href="#bytebase.v1.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>triggers</td>
+ <td><a href="#bytebase.v1.TriggerMetadata">TriggerMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The triggers is the list of triggers in a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>skip_dump</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -24484,76 +24073,250 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</h3>
- <p>Response message for listing database groups.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>database_groups</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td>repeated</td>
- <td><p>The database groups from the specified request. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+
+
+ <h3 id="bytebase.v1.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>IDENTITY_GENERATION_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ALWAYS</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>BY_DEFAULT</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.GenerationMetadata.Type">GenerationMetadata.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>VIRTUAL</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STORED</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat">GetDatabaseSDLSchemaRequest.SDLFormat</h3>
+ <p>SDLFormat specifies the output format for SDL schema.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SDL_FORMAT_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified format. Defaults to SINGLE_FILE.</p></td>
+ </tr>
+
+ <tr>
+ <td>SINGLE_FILE</td>
+ <td>1</td>
+ <td><p>Single file format: returns the complete SDL schema as a single file.</p></td>
+ </tr>
+
+ <tr>
+ <td>MULTI_FILE</td>
+ <td>2</td>
+ <td><p>Multi-file format: returns the SDL schema as a ZIP archive containing
+multiple files organized by schema objects (tables, views, functions, etc.).</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>OBJECT_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DATABASE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SCHEMA</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>TABLE</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>VIEW</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MATERIALIZED_VIEW</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FUNCTION</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PROCEDURE</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SEQUENCE</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MODE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DEFAULT</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>APPEND_ONLY</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>INSERT_ONLY</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</h3>
- <p>Request message for updating a database group.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>database_group</td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td></td>
- <td><p>The database group to update.
-
-The database group&#39;s `name` field is used to identify the database group to update.
-Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
- </tr>
-
- <tr>
- <td>update_mask</td>
- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
- <td></td>
- <td><p>The list of fields to update. </p></td>
- </tr>
-
- <tr>
- <td>allow_missing</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, and the database group is not found, a new database group will be created.
-In this situation, `update_mask` is ignored. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
+ <h3 id="bytebase.v1.StreamMetadata.Type">StreamMetadata.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DELTA</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
+ <h3 id="bytebase.v1.SyncStatus">SyncStatus</h3>
+ <p>SyncStatus is the status of the database sync operation.</p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>SYNC_STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OK</td>
+ <td>1</td>
+ <td><p>The database was synced successfully.</p></td>
+ </tr>
+
+ <tr>
+ <td>FAILED</td>
+ <td>2</td>
+ <td><p>The database sync failed.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
- <h3 id="bytebase.v1.DatabaseGroupView">DatabaseGroupView</h3>
- <p>View options for database group responses.</p>
+ <h3 id="bytebase.v1.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>
+ <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -24561,22 +24324,86 @@ In this situation, `update_mask` is ignored. </p></td>
<tbody>
<tr>
- <td>DATABASE_GROUP_VIEW_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
- <td><p>The default / unset value.
-The API will default to the BASIC view.</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_GROUP_VIEW_BASIC</td>
+ <td>RANGE</td>
<td>1</td>
- <td><p>Include basic information about the database group, but exclude the list of matched databases and unmatched databases.</p></td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>RANGE_COLUMNS</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LIST</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LIST_COLUMNS</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>HASH</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LINEAR_HASH</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>KEY</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>LINEAR_KEY</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.v1.TaskMetadata.State">TaskMetadata.State</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STARTED</td>
+ <td>1</td>
+ <td><p></p></td>
</tr>
<tr>
- <td>DATABASE_GROUP_VIEW_FULL</td>
+ <td>SUSPENDED</td>
<td>2</td>
- <td><p>Include everything.</p></td>
+ <td><p></p></td>
</tr>
</tbody>
@@ -24586,8 +24413,8 @@ The API will default to the BASIC view.</p></td>
- <h3 id="bytebase.v1.DatabaseGroupService">DatabaseGroupService</h3>
- <p>DatabaseGroupService manages database groups for organizing databases by criteria.</p>
+ <h3 id="bytebase.v1.DatabaseService">DatabaseService</h3>
+ <p>DatabaseService manages databases and their schemas.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
@@ -24595,44 +24422,108 @@ The API will default to the BASIC view.</p></td>
<tbody>
<tr>
- <td>ListDatabaseGroups</td>
- <td><a href="#bytebase.v1.ListDatabaseGroupsRequest">ListDatabaseGroupsRequest</a></td>
- <td><a href="#bytebase.v1.ListDatabaseGroupsResponse">ListDatabaseGroupsResponse</a></td>
- <td><p>Lists database groups in a project.
-Permissions required: bb.databaseGroups.list</p></td>
+ <td>GetDatabase</td>
+ <td><a href="#bytebase.v1.GetDatabaseRequest">GetDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td><p>Retrieves a database by name.
+Permissions required: bb.databases.get</p></td>
</tr>
<tr>
- <td>GetDatabaseGroup</td>
- <td><a href="#bytebase.v1.GetDatabaseGroupRequest">GetDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Gets a database group by name.
-Permissions required: bb.databaseGroups.get</p></td>
+ <td>BatchGetDatabases</td>
+ <td><a href="#bytebase.v1.BatchGetDatabasesRequest">BatchGetDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchGetDatabasesResponse">BatchGetDatabasesResponse</a></td>
+ <td><p>Retrieves multiple databases by their names.
+Permissions required: bb.databases.get</p></td>
</tr>
<tr>
- <td>CreateDatabaseGroup</td>
- <td><a href="#bytebase.v1.CreateDatabaseGroupRequest">CreateDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Creates a new database group.
-Permissions required: bb.databaseGroups.create</p></td>
+ <td>ListDatabases</td>
+ <td><a href="#bytebase.v1.ListDatabasesRequest">ListDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.ListDatabasesResponse">ListDatabasesResponse</a></td>
+ <td><p>Lists databases in a project, instance, or workspace.
+Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)</p></td>
</tr>
<tr>
- <td>UpdateDatabaseGroup</td>
- <td><a href="#bytebase.v1.UpdateDatabaseGroupRequest">UpdateDatabaseGroupRequest</a></td>
- <td><a href="#bytebase.v1.DatabaseGroup">DatabaseGroup</a></td>
- <td><p>Updates a database group.
-Permissions required: bb.databaseGroups.update
-When allow_missing=true, also requires: bb.databaseGroups.create</p></td>
+ <td>UpdateDatabase</td>
+ <td><a href="#bytebase.v1.UpdateDatabaseRequest">UpdateDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.Database">Database</a></td>
+ <td><p>Updates database properties such as labels and project assignment.
+Permissions required: bb.databases.update</p></td>
</tr>
<tr>
- <td>DeleteDatabaseGroup</td>
- <td><a href="#bytebase.v1.DeleteDatabaseGroupRequest">DeleteDatabaseGroupRequest</a></td>
- <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>
- <td><p>Deletes a database group.
-Permissions required: bb.databaseGroups.delete</p></td>
+ <td>BatchUpdateDatabases</td>
+ <td><a href="#bytebase.v1.BatchUpdateDatabasesRequest">BatchUpdateDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchUpdateDatabasesResponse">BatchUpdateDatabasesResponse</a></td>
+ <td><p>Updates multiple databases in a single batch operation.
+Permissions required: bb.databases.update</p></td>
+ </tr>
+
+ <tr>
+ <td>SyncDatabase</td>
+ <td><a href="#bytebase.v1.SyncDatabaseRequest">SyncDatabaseRequest</a></td>
+ <td><a href="#bytebase.v1.SyncDatabaseResponse">SyncDatabaseResponse</a></td>
+ <td><p>Synchronizes database schema from the instance.
+Permissions required: bb.databases.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>BatchSyncDatabases</td>
+ <td><a href="#bytebase.v1.BatchSyncDatabasesRequest">BatchSyncDatabasesRequest</a></td>
+ <td><a href="#bytebase.v1.BatchSyncDatabasesResponse">BatchSyncDatabasesResponse</a></td>
+ <td><p>Synchronizes multiple databases in a single batch operation.
+Permissions required: bb.databases.sync</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseMetadata</td>
+ <td><a href="#bytebase.v1.GetDatabaseMetadataRequest">GetDatabaseMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td><p>Retrieves database metadata including tables, columns, and indexes.
+Permissions required: bb.databases.getSchema</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseSchema</td>
+ <td><a href="#bytebase.v1.GetDatabaseSchemaRequest">GetDatabaseSchemaRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseSchema">DatabaseSchema</a></td>
+ <td><p>Retrieves database schema as DDL statements.
+Permissions required: bb.databases.getSchema</p></td>
+ </tr>
+
+ <tr>
+ <td>GetDatabaseSDLSchema</td>
+ <td><a href="#bytebase.v1.GetDatabaseSDLSchemaRequest">GetDatabaseSDLSchemaRequest</a></td>
+ <td><a href="#bytebase.v1.DatabaseSDLSchema">DatabaseSDLSchema</a></td>
+ <td><p>Retrieves database schema in SDL (Schema Definition Language) format.
+Permissions required: bb.databases.getSchema</p></td>
+ </tr>
+
+ <tr>
+ <td>DiffSchema</td>
+ <td><a href="#bytebase.v1.DiffSchemaRequest">DiffSchemaRequest</a></td>
+ <td><a href="#bytebase.v1.DiffSchemaResponse">DiffSchemaResponse</a></td>
+ <td><p>Compares and generates migration statements between two schemas.
+Permissions required: bb.databases.get</p></td>
+ </tr>
+
+ <tr>
+ <td>DiffMetadata</td>
+ <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
+ <td><p>Generates migration statements from the database&#39;s current schema to the
+given target metadata.
+Permissions required: bb.databases.diffMetadata</p></td>
+ </tr>
+
+ <tr>
+ <td>GetSchemaString</td>
+ <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>
+ <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>
+ <td><p>Generates schema DDL for a database object.
+Permissions required: bb.databases.getSchema</p></td>
</tr>
</tbody>
@@ -24656,9 +24547,9 @@ Permissions required: bb.databaseGroups.delete</p></td>
<tr>
- <td>ListDatabaseGroups</td>
+ <td>GetDatabase</td>
<td>GET</td>
- <td>/v1/{parent=projects/*}/databaseGroups</td>
+ <td>/v1/{name=instances/*/databases/*}</td>
<td></td>
</tr>
@@ -24666,9 +24557,16 @@ Permissions required: bb.databaseGroups.delete</p></td>
<tr>
- <td>GetDatabaseGroup</td>
+ <td>BatchGetDatabases</td>
<td>GET</td>
- <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td>/v1/{parent=projects/*}/databases:batchGet</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>BatchGetDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/databases:batchGet</td>
<td></td>
</tr>
@@ -24676,29 +24574,130 @@ Permissions required: bb.databaseGroups.delete</p></td>
<tr>
- <td>CreateDatabaseGroup</td>
- <td>POST</td>
- <td>/v1/{parent=projects/*}/databaseGroups</td>
- <td>database_group</td>
+ <td>ListDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=projects/*}/databases</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>ListDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=instances/*}/databases</td>
+ <td></td>
+ </tr>
+
+ <tr>
+ <td>ListDatabases</td>
+ <td>GET</td>
+ <td>/v1/{parent=workspaces/*}/databases</td>
+ <td></td>
</tr>
<tr>
- <td>UpdateDatabaseGroup</td>
+ <td>UpdateDatabase</td>
<td>PATCH</td>
- <td>/v1/{database_group.name=projects/*/databaseGroups/*}</td>
- <td>database_group</td>
+ <td>/v1/{database.name=instances/*/databases/*}</td>
+ <td>database</td>
</tr>
<tr>
- <td>DeleteDatabaseGroup</td>
- <td>DELETE</td>
- <td>/v1/{name=projects/*/databaseGroups/*}</td>
+ <td>BatchUpdateDatabases</td>
+ <td>POST</td>
+ <td>/v1/{parent=instances/*}/databases:batchUpdate</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>SyncDatabase</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:sync</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>BatchSyncDatabases</td>
+ <td>POST</td>
+ <td>/v1/{parent=instances/*}/databases:batchSync</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetDatabaseMetadata</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/metadata}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetDatabaseSchema</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/schema}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetDatabaseSDLSchema</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/sdlSchema}</td>
+ <td></td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DiffSchema</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:diffSchema</td>
+ <td>*</td>
+ </tr>
+
+ <tr>
+ <td>DiffSchema</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*/changelogs/*}:diffSchema</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>DiffMetadata</td>
+ <td>POST</td>
+ <td>/v1/{name=instances/*/databases/*}:diffMetadata</td>
+ <td>*</td>
+ </tr>
+
+
+
+
+ <tr>
+ <td>GetSchemaString</td>
+ <td>GET</td>
+ <td>/v1/{name=instances/*/databases/*/schemaString}</td>
<td></td>
</tr>
diff --git a/proto/v1/v1/database_service.proto b/proto/v1/v1/database_service.proto
index 6dc369f55c..d6a6433282 100644
--- a/proto/v1/v1/database_service.proto
+++ b/proto/v1/v1/database_service.proto
@@ -139,6 +139,18 @@ service DatabaseService {
option (bytebase.v1.auth_method) = IAM;
}
+ // Generates migration statements from the database's current schema to the
+ // given target metadata.
+ // Permissions required: bb.databases.diffMetadata
+ rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
+ option (google.api.http) = {
+ post: "/v1/{name=instances/*/databases/*}:diffMetadata"
+ body: "*"
+ };
+ option (bytebase.v1.permission) = "bb.databases.diffMetadata";
+ option (bytebase.v1.auth_method) = IAM;
+ }
+
// Generates schema DDL for a database object.
// Permissions required: bb.databases.getSchema
rpc GetSchemaString(GetSchemaStringRequest) returns (GetSchemaStringResponse) {
@@ -404,6 +416,27 @@ message DiffSchemaResponse {
string diff = 1;
}
+message DiffMetadataRequest {
+ // The database whose current schema is the diff source.
+ // Format: instances/{instance}/databases/{database}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/Database"}
+ ];
+
+ // The metadata of the target schema. The source metadata and the engine are
+ // read from the database, so only the target travels in the request.
+ // Must describe the COMPLETE target schema: the diff runs against the full
+ // stored source, so any object omitted from the target (for example by a
+ // truncated metadata fetch) is treated as dropped.
+ DatabaseMetadata target_metadata = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message DiffMetadataResponse {
+ // The generated migration statements.
+ string diff = 1;
+}
+
message Database {
option (google.api.resource) = {
type: "bytebase.com/Database"
diff --git a/proto/v1/v1/sql_service.proto b/proto/v1/v1/sql_service.proto
index dd2b5e724b..7b9314b9a1 100644
--- a/proto/v1/v1/sql_service.proto
+++ b/proto/v1/v1/sql_service.proto
@@ -10,7 +10,6 @@ import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "v1/annotation.proto";
import "v1/common.proto";
-import "v1/database_service.proto";
import "v1/query_history_service.proto";
option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";
@@ -88,17 +87,6 @@ service SQLService {
option (bytebase.v1.audit) = true;
}
- // Computes schema differences between two database metadata.
- // Permissions required: None
- rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
- option (google.api.http) = {
- post: "/v1/schemaDesign:diffMetadata"
- body: "*"
- };
- option (bytebase.v1.allow_without_credential) = true;
- // This is a util method requiring no authentication thus no authorization.
- }
-
// Provides AI-powered SQL completion and generation.
// Permissions required: None (authenticated users only, requires AI to be enabled)
rpc AICompletion(AICompletionRequest) returns (AICompletionResponse) {
@@ -472,22 +460,6 @@ message ExportResponse {
string applied_access_grant = 2;
}
-message DiffMetadataRequest {
- // The metadata of the source schema.
- DatabaseMetadata source_metadata = 1 [(google.api.field_behavior) = REQUIRED];
-
- // The metadata of the target schema.
- DatabaseMetadata target_metadata = 2 [(google.api.field_behavior) = REQUIRED];
-
- // The database engine of the schema.
- Engine engine = 3;
-}
-
-message DiffMetadataResponse {
- // The diff of the metadata.
- string diff = 1;
-}
-
message AICompletionRequest {
message Message {
string role = 1;