Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: impl update instance options sync_interval (#7896)
p0ny29d7e9129eb3
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.goindex 505daa7a86..7d00b48a12 100644--- a/backend/api/v1/instance_service.go+++ b/backend/api/v1/instance_service.go@@ -198,15 +198,23 @@ func (s *InstanceService) UpdateInstance(ctx context.Context, request *v1pb.Updacase "activation":patch.Activation = &request.Instance.Activationcase "options.schema_tenant_mode":- if patch.Options == nil {- patch.Options = &storepb.InstanceOptions{- SchemaTenantMode: request.Instance.Options.SchemaTenantMode,+ if patch.OptionsUpsert == nil {+ patch.OptionsUpsert = &storepb.InstanceOptions{+ SchemaTenantMode: request.Instance.Options.GetSchemaTenantMode(),}} else {- patch.Options.SchemaTenantMode = request.Instance.Options.SchemaTenantMode+ patch.OptionsUpsert.SchemaTenantMode = request.Instance.Options.GetSchemaTenantMode()+ }+ case "options.sync_interval":+ if patch.OptionsUpsert == nil {+ patch.OptionsUpsert = &storepb.InstanceOptions{+ SyncInterval: request.Instance.Options.GetSyncInterval(),+ }+ } else {+ patch.OptionsUpsert.SyncInterval = request.Instance.Options.GetSyncInterval()}default:- return nil, status.Errorf(codes.InvalidArgument, `unsupport update_mask "%s"`, path)+ return nil, status.Errorf(codes.InvalidArgument, `unsupported update_mask "%s"`, path)}}@@ -832,13 +840,6 @@ func convertToInstance(instance *store.InstanceMessage) *v1pb.Instance {ServiceName: ds.ServiceName,})}- var options *v1pb.InstanceOptions- if instance.Options != nil {- options = &v1pb.InstanceOptions{- SchemaTenantMode: instance.Options.SchemaTenantMode,- }- }-return &v1pb.Instance{Name: fmt.Sprintf("%s%s", common.InstanceNamePrefix, instance.ResourceID),Uid: fmt.Sprintf("%d", instance.UID),@@ -850,7 +851,7 @@ func convertToInstance(instance *store.InstanceMessage) *v1pb.Instance {State: convertDeletedToState(instance.Deleted),Environment: fmt.Sprintf("environments/%s", instance.EnvironmentID),Activation: instance.Activation,- Options: options,+ Options: convertToInstanceOptions(instance.Options),}}@@ -863,12 +864,6 @@ func (s *InstanceService) convertToInstanceMessage(instanceID string, instance *if err != nil {return nil, err}- var options *storepb.InstanceOptions- if instance.Options != nil {- options = &storepb.InstanceOptions{- SchemaTenantMode: instance.Options.SchemaTenantMode,- }- }return &store.InstanceMessage{ResourceID: instanceID,@@ -878,7 +873,7 @@ func (s *InstanceService) convertToInstanceMessage(instanceID string, instance *DataSources: datasources,EnvironmentID: environmentID,Activation: instance.Activation,- Options: options,+ Options: convertInstanceOptions(instance.Options),}, nil}@@ -950,3 +945,25 @@ func convertDataSourceTp(tp v1pb.DataSourceType) (api.DataSourceType, error) {}return dsType, nil}++func convertToInstanceOptions(options *storepb.InstanceOptions) *v1pb.InstanceOptions {+ if options == nil {+ return nil+ }++ return &v1pb.InstanceOptions{+ SchemaTenantMode: options.SchemaTenantMode,+ SyncInterval: options.SyncInterval,+ }+}++func convertInstanceOptions(options *v1pb.InstanceOptions) *storepb.InstanceOptions {+ if options == nil {+ return nil+ }++ return &storepb.InstanceOptions{+ SchemaTenantMode: options.SchemaTenantMode,+ SyncInterval: options.SyncInterval,+ }+}diff --git a/backend/store/instance.go b/backend/store/instance.goindex abb56388d1..d0ca166739 100644--- a/backend/store/instance.go+++ b/backend/store/instance.go@@ -114,7 +114,8 @@ type UpdateInstanceMessage struct {DataSources *[]*DataSourceMessageEngineVersion *stringActivation *bool- Options *storepb.InstanceOptions+ // OptionsUpsert upserts the top-level messages of the instance options.+ OptionsUpsert *storepb.InstanceOptionsMetadata *storepb.InstanceMetadata// Output only.@@ -333,13 +334,13 @@ func (s *Store) UpdateInstanceV2(ctx context.Context, patch *UpdateInstanceMessa}set, args = append(set, fmt.Sprintf(`"row_status" = $%d`, len(args)+1)), append(args, rowStatus)}- if v := patch.Options; v != nil {+ if v := patch.OptionsUpsert; v != nil {options, err := protojson.Marshal(v)if err != nil {return nil, err}- set, args = append(set, fmt.Sprintf("options = $%d", len(args)+1)), append(args, options)+ set, args = append(set, fmt.Sprintf("options = options || $%d", len(args)+1)), append(args, options)}if v := patch.Metadata; v != nil {metadata, err := protojson.Marshal(v)diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.tsindex 486d3c96e0..e2f5ab05e7 100644--- a/frontend/src/types/proto/v1/instance_service.ts+++ b/frontend/src/types/proto/v1/instance_service.ts@@ -1,6 +1,7 @@/* eslint-disable */import type { CallContext, CallOptions } from "nice-grpc-common";import * as _m0 from "protobufjs/minimal";+import { Duration } from "../google/protobuf/duration";import { Empty } from "../google/protobuf/empty";import { FieldMask } from "../google/protobuf/field_mask";import { Engine, engineFromJSON, engineToJSON, State, stateFromJSON, stateToJSON } from "./common";@@ -208,6 +209,8 @@ export interface InstanceOptions {* For Oracle schema tenant mode, the instance a Oracle database and the database is the Oracle schema.*/schemaTenantMode: boolean;+ /** How often the instance is synced. */+ syncInterval?: Duration | undefined;}export interface Instance {@@ -1191,7 +1194,7 @@ export const SyncSlowQueriesRequest = {};function createBaseInstanceOptions(): InstanceOptions {- return { schemaTenantMode: false };+ return { schemaTenantMode: false, syncInterval: undefined };}export const InstanceOptions = {@@ -1199,6 +1202,9 @@ export const InstanceOptions = {if (message.schemaTenantMode === true) {writer.uint32(8).bool(message.schemaTenantMode);}+ if (message.syncInterval !== undefined) {+ Duration.encode(message.syncInterval, writer.uint32(18).fork()).ldelim();+ }return writer;},@@ -1216,6 +1222,13 @@ export const InstanceOptions = {message.schemaTenantMode = reader.bool();continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.syncInterval = Duration.decode(reader, reader.uint32());+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -1226,12 +1239,17 @@ export const InstanceOptions = {},fromJSON(object: any): InstanceOptions {- return { schemaTenantMode: isSet(object.schemaTenantMode) ? Boolean(object.schemaTenantMode) : false };+ return {+ schemaTenantMode: isSet(object.schemaTenantMode) ? Boolean(object.schemaTenantMode) : false,+ syncInterval: isSet(object.syncInterval) ? Duration.fromJSON(object.syncInterval) : undefined,+ };},toJSON(message: InstanceOptions): unknown {const obj: any = {};message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);+ message.syncInterval !== undefined &&+ (obj.syncInterval = message.syncInterval ? Duration.toJSON(message.syncInterval) : undefined);return obj;},@@ -1242,6 +1260,9 @@ export const InstanceOptions = {fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {const message = createBaseInstanceOptions();message.schemaTenantMode = object.schemaTenantMode ?? false;+ message.syncInterval = (object.syncInterval !== undefined && object.syncInterval !== null)+ ? Duration.fromPartial(object.syncInterval)+ : undefined;return message;},};diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 5f298b279a..236ef7ea40 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -5050,6 +5050,7 @@ InstanceOptions is the option for instances.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || schema_tenant_mode | [bool](#bool) | | The schema tenant mode is used to determine whether the instance is in schema tenant mode. For Oracle schema tenant mode, the instance a Oracle database and the database is the Oracle schema. |+| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. |diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.goindex 670dc7162e..e10d50ec70 100644--- a/proto/generated-go/v1/instance_service.pb.go+++ b/proto/generated-go/v1/instance_service.pb.go@@ -10,6 +10,7 @@ import (_ "google.golang.org/genproto/googleapis/api/annotations"protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ durationpb "google.golang.org/protobuf/types/known/durationpb"emptypb "google.golang.org/protobuf/types/known/emptypb"fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"reflect "reflect"@@ -839,6 +840,8 @@ type InstanceOptions struct {// The schema tenant mode is used to determine whether the instance is in schema tenant mode.// For Oracle schema tenant mode, the instance a Oracle database and the database is the Oracle schema.SchemaTenantMode bool `protobuf:"varint,1,opt,name=schema_tenant_mode,json=schemaTenantMode,proto3" json:"schema_tenant_mode,omitempty"`+ // How often the instance is synced.+ SyncInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=sync_interval,json=syncInterval,proto3" json:"sync_interval,omitempty"`}func (x *InstanceOptions) Reset() {@@ -880,6 +883,13 @@ func (x *InstanceOptions) GetSchemaTenantMode() bool {return false}+func (x *InstanceOptions) GetSyncInterval() *durationpb.Duration {+ if x != nil {+ return x.SyncInterval+ }+ return nil+}+type Instance struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -1225,6 +1235,8 @@ var file_v1_instance_service_proto_rawDesc = []byte{0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c,0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,+ 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,+ 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67,0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66,@@ -1313,11 +1325,15 @@ var file_v1_instance_service_proto_rawDesc = []byte{0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65,0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65,0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70,- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x3f, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x7f, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65,0x6d, 0x61, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01,0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x65, 0x6e, 0x61,- 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xae, 0x03, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61,+ 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69,+ 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,+ 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6e,+ 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xae, 0x03, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61,0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x28,@@ -1515,9 +1531,10 @@ var file_v1_instance_service_proto_goTypes = []interface{}{(*Instance)(nil), // 15: bytebase.v1.Instance(*DataSource)(nil), // 16: bytebase.v1.DataSource(*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask- (State)(0), // 18: bytebase.v1.State- (Engine)(0), // 19: bytebase.v1.Engine- (*emptypb.Empty)(nil), // 20: google.protobuf.Empty+ (*durationpb.Duration)(nil), // 18: google.protobuf.Duration+ (State)(0), // 19: bytebase.v1.State+ (Engine)(0), // 20: bytebase.v1.Engine+ (*emptypb.Empty)(nil), // 21: google.protobuf.Empty}var file_v1_instance_service_proto_depIdxs = []int32{15, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance@@ -1528,38 +1545,39 @@ var file_v1_instance_service_proto_depIdxs = []int32{16, // 5: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource16, // 6: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource17, // 7: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask- 18, // 8: bytebase.v1.Instance.state:type_name -> bytebase.v1.State- 19, // 9: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine- 16, // 10: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource- 14, // 11: bytebase.v1.Instance.options:type_name -> bytebase.v1.InstanceOptions- 0, // 12: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType- 1, // 13: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest- 2, // 14: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest- 4, // 15: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest- 5, // 16: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest- 6, // 17: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest- 7, // 18: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest- 8, // 19: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest- 10, // 20: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest- 11, // 21: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest- 12, // 22: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest- 13, // 23: bytebase.v1.InstanceService.SyncSlowQueries:input_type -> bytebase.v1.SyncSlowQueriesRequest- 15, // 24: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance- 3, // 25: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse- 15, // 26: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance- 15, // 27: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance- 20, // 28: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty- 15, // 29: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance- 9, // 30: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse- 15, // 31: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance- 15, // 32: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance- 15, // 33: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance- 20, // 34: bytebase.v1.InstanceService.SyncSlowQueries:output_type -> google.protobuf.Empty- 24, // [24:35] is the sub-list for method output_type- 13, // [13:24] is the sub-list for method input_type- 13, // [13:13] is the sub-list for extension type_name- 13, // [13:13] is the sub-list for extension extendee- 0, // [0:13] is the sub-list for field type_name+ 18, // 8: bytebase.v1.InstanceOptions.sync_interval:type_name -> google.protobuf.Duration+ 19, // 9: bytebase.v1.Instance.state:type_name -> bytebase.v1.State+ 20, // 10: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine+ 16, // 11: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource+ 14, // 12: bytebase.v1.Instance.options:type_name -> bytebase.v1.InstanceOptions+ 0, // 13: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType+ 1, // 14: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest+ 2, // 15: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest+ 4, // 16: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest+ 5, // 17: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest+ 6, // 18: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest+ 7, // 19: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest+ 8, // 20: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest+ 10, // 21: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest+ 11, // 22: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest+ 12, // 23: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest+ 13, // 24: bytebase.v1.InstanceService.SyncSlowQueries:input_type -> bytebase.v1.SyncSlowQueriesRequest+ 15, // 25: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance+ 3, // 26: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse+ 15, // 27: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance+ 15, // 28: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance+ 21, // 29: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty+ 15, // 30: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance+ 9, // 31: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse+ 15, // 32: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance+ 15, // 33: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance+ 15, // 34: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance+ 21, // 35: bytebase.v1.InstanceService.SyncSlowQueries:output_type -> google.protobuf.Empty+ 25, // [25:36] is the sub-list for method output_type+ 14, // [14:25] is the sub-list for method input_type+ 14, // [14:14] is the sub-list for extension type_name+ 14, // [14:14] is the sub-list for extension extendee+ 0, // [0:14] is the sub-list for field type_name}func init() { file_v1_instance_service_proto_init() }diff --git a/proto/v1/instance_service.proto b/proto/v1/instance_service.protoindex 881a795c0f..e17fd1c0f2 100644--- a/proto/v1/instance_service.proto+++ b/proto/v1/instance_service.proto@@ -5,6 +5,7 @@ package bytebase.v1;import "google/api/annotations.proto";import "google/api/client.proto";import "google/api/field_behavior.proto";+import "google/protobuf/duration.proto";import "google/protobuf/empty.proto";import "google/protobuf/field_mask.proto";import "v1/common.proto";@@ -220,6 +221,9 @@ message InstanceOptions {// The schema tenant mode is used to determine whether the instance is in schema tenant mode.// For Oracle schema tenant mode, the instance a Oracle database and the database is the Oracle schema.bool schema_tenant_mode = 1;++ // How often the instance is synced.+ google.protobuf.Duration sync_interval = 2;}message Instance {