Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: sync and dump pg check (#16186)
rebeliced0761dceddb1
diff --git a/backend/plugin/db/pg/sync.go b/backend/plugin/db/pg/sync.goindex 2b718e2218..f393b2d06d 100644--- a/backend/plugin/db/pg/sync.go+++ b/backend/plugin/db/pg/sync.go@@ -117,13 +117,17 @@ func (d *Driver) SyncDBSchema(ctx context.Context) (*storepb.DatabaseSchemaMetadif err != nil {return nil, errors.Wrapf(err, "failed to get triggers from database %q", d.databaseName)}- tableMap, externalTableMap, tableOidMap, err := getTables(txn, isAtLeastPG10, columnMap, indexMap, triggerMap, extensionDepend)+ checksMap, err := getChecks(txn)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to get checks from database %q", d.databaseName)+ }+ tableMap, externalTableMap, tableOidMap, err := getTables(txn, isAtLeastPG10, columnMap, indexMap, triggerMap, checksMap, extensionDepend)if err != nil {return nil, errors.Wrapf(err, "failed to get tables from database %q", d.databaseName)}var tablePartitionMap map[db.TableKey][]*storepb.TablePartitionMetadataif isAtLeastPG10 {- tablePartitionMap, err = getTablePartitions(txn, indexMap)+ tablePartitionMap, err = getTablePartitions(txn, indexMap, checksMap)if err != nil {return nil, errors.Wrapf(err, "failed to get table partitions from database %q", d.databaseName)}@@ -230,6 +234,38 @@ func getExtensionDepend(txn *sql.Tx) (map[int]bool, error) {return extensionDepend, nil}+var listCheckQuery = `+SELECT nsp.nspname, rel.relname, con.conname, pg_get_constraintdef(con.oid, true)+ FROM pg_catalog.pg_constraint con+ INNER JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid+ INNER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = connamespace+ WHERE contype = 'c' and ` + fmt.Sprintf(`nsp.nspname NOT IN (%s)`, pgparser.SystemSchemaWhereClause)++func getChecks(txn *sql.Tx) (map[db.TableKey][]*storepb.CheckConstraintMetadata, error) {+ checksMap := make(map[db.TableKey][]*storepb.CheckConstraintMetadata)+ rows, err := txn.Query(listCheckQuery)+ if err != nil {+ return nil, err+ }+ defer rows.Close()++ for rows.Next() {+ var checkMetadata storepb.CheckConstraintMetadata+ var schemaName, tableName, checkDefinition string+ if err := rows.Scan(&schemaName, &tableName, &checkMetadata.Name, &checkDefinition); err != nil {+ return nil, err+ }+ checkMetadata.Expression = strings.TrimPrefix(checkDefinition, "CHECK ")++ key := db.TableKey{Schema: schemaName, Table: tableName}+ checksMap[key] = append(checksMap[key], &checkMetadata)+ }+ if err := rows.Err(); err != nil {+ return nil, err+ }+ return checksMap, nil+}+var listForeignKeyQuery = `SELECTn.nspname AS fk_schema,@@ -436,6 +472,7 @@ func getTables(columnMap map[db.TableKey][]*storepb.ColumnMetadata,indexMap map[db.TableKey][]*storepb.IndexMetadata,triggerMap map[db.TableKey][]*storepb.TriggerMetadata,+ checksMap map[db.TableKey][]*storepb.CheckConstraintMetadata,extensionDepend map[int]bool,) (map[string][]*storepb.TableMetadata, map[string][]*storepb.ExternalTableMetadata, map[int]*db.TableKeyWithColumns, error) {foreignKeysMap, err := getForeignKeys(txn)@@ -478,6 +515,7 @@ func getTables(table.Indexes = indexMap[key]table.ForeignKeys = foreignKeysMap[key]table.Triggers = triggerMap[key]+ table.CheckConstraints = checksMap[key]tableMap[schemaName] = append(tableMap[schemaName], table)tableOidMap[oid] = &db.TableKeyWithColumns{Schema: schemaName, Table: table.Name, Columns: table.Columns}@@ -550,7 +588,7 @@ WHEREAND n.nspname NOT IN (%s)ORDER BY c.oid;`, pgparser.SystemSchemaWhereClause)-func getTablePartitions(txn *sql.Tx, indexMap map[db.TableKey][]*storepb.IndexMetadata) (map[db.TableKey][]*storepb.TablePartitionMetadata, error) {+func getTablePartitions(txn *sql.Tx, indexMap map[db.TableKey][]*storepb.IndexMetadata, checksMap map[db.TableKey][]*storepb.CheckConstraintMetadata) (map[db.TableKey][]*storepb.TablePartitionMetadata, error) {result := make(map[db.TableKey][]*storepb.TablePartitionMetadata)rows, err := txn.Query(listTablePartitionQuery)if err != nil {@@ -569,10 +607,11 @@ func getTablePartitions(txn *sql.Tx, indexMap map[db.TableKey][]*storepb.IndexMekey := db.TableKey{Schema: schemaName, Table: tableName}inhKey := db.TableKey{Schema: inhSchemaName, Table: inhTableName}metadata := &storepb.TablePartitionMetadata{- Name: tableName,- Expression: partKeyDef,- Value: relPartBound,- Indexes: indexMap[key],+ Name: tableName,+ Expression: partKeyDef,+ Value: relPartBound,+ Indexes: indexMap[key],+ CheckConstraints: checksMap[key],}switch strings.ToLower(partitionType) {case "l":diff --git a/backend/plugin/schema/pg/get_database_definition.go b/backend/plugin/schema/pg/get_database_definition.goindex 00c22f3ab1..5b3edb3598 100644--- a/backend/plugin/schema/pg/get_database_definition.go+++ b/backend/plugin/schema/pg/get_database_definition.go@@ -1032,7 +1032,7 @@ func getObjectID(schema string, object string) string {return buf.String()}-func writeCreateTable(out io.Writer, schema string, tableName string, columns []*storepb.ColumnMetadata) error {+func writeCreateTable(out io.Writer, schema string, tableName string, columns []*storepb.ColumnMetadata, checks []*storepb.CheckConstraintMetadata) error {if _, err := io.WriteString(out, `CREATE TABLE "`); err != nil {return err}@@ -1098,6 +1098,14 @@ func writeCreateTable(out io.Writer, schema string, tableName string, columns []}}+ for _, check := range checks {+ _, _ = io.WriteString(out, ",\n ")+ _, _ = io.WriteString(out, `CONSTRAINT "`)+ _, _ = io.WriteString(out, check.Name)+ _, _ = io.WriteString(out, `" CHECK `)+ _, _ = io.WriteString(out, check.Expression)+ }+_, err := io.WriteString(out, "\n)")return err}@@ -1131,7 +1139,7 @@ func writeTable(out io.Writer, schema string, table *storepb.TableMetadata, sequ}}- if err := writeCreateTable(out, schema, table.Name, table.Columns); err != nil {+ if err := writeCreateTable(out, schema, table.Name, table.Columns, table.CheckConstraints); err != nil {return err}@@ -1790,7 +1798,7 @@ func writeAttachPartition(out io.Writer, schema string, tableName string, partit}func writePartitionTable(out io.Writer, schema string, columns []*storepb.ColumnMetadata, partition *storepb.TablePartitionMetadata) error {- if err := writeCreateTable(out, schema, partition.Name, columns); err != nil {+ if err := writeCreateTable(out, schema, partition.Name, columns, partition.CheckConstraints); err != nil {return err}diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.tsindex 92758ab5aa..19c6d9800f 100644--- a/frontend/src/types/proto/v1/database_service.ts+++ b/frontend/src/types/proto/v1/database_service.ts@@ -575,6 +575,7 @@ export interface TablePartitionMetadata {/** The subpartitions is the list of subpartitions in a table partition. */subpartitions: TablePartitionMetadata[];indexes: IndexMetadata[];+ checkConstraints: CheckConstraintMetadata[];}/**@@ -5135,6 +5136,7 @@ function createBaseTablePartitionMetadata(): TablePartitionMetadata {useDefault: "",subpartitions: [],indexes: [],+ checkConstraints: [],};}@@ -5161,6 +5163,9 @@ export const TablePartitionMetadata: MessageFns<TablePartitionMetadata> = {for (const v of message.indexes) {IndexMetadata.encode(v!, writer.uint32(58).fork()).join();}+ for (const v of message.checkConstraints) {+ CheckConstraintMetadata.encode(v!, writer.uint32(66).fork()).join();+ }return writer;},@@ -5227,6 +5232,14 @@ export const TablePartitionMetadata: MessageFns<TablePartitionMetadata> = {message.indexes.push(IndexMetadata.decode(reader, reader.uint32()));continue;}+ case 8: {+ if (tag !== 66) {+ break;+ }++ message.checkConstraints.push(CheckConstraintMetadata.decode(reader, reader.uint32()));+ continue;+ }}if ((tag & 7) === 4 || tag === 0) {break;@@ -5251,6 +5264,9 @@ export const TablePartitionMetadata: MessageFns<TablePartitionMetadata> = {indexes: globalThis.Array.isArray(object?.indexes)? object.indexes.map((e: any) => IndexMetadata.fromJSON(e)): [],+ checkConstraints: globalThis.Array.isArray(object?.checkConstraints)+ ? object.checkConstraints.map((e: any) => CheckConstraintMetadata.fromJSON(e))+ : [],};},@@ -5277,6 +5293,9 @@ export const TablePartitionMetadata: MessageFns<TablePartitionMetadata> = {if (message.indexes?.length) {obj.indexes = message.indexes.map((e) => IndexMetadata.toJSON(e));}+ if (message.checkConstraints?.length) {+ obj.checkConstraints = message.checkConstraints.map((e) => CheckConstraintMetadata.toJSON(e));+ }return obj;},@@ -5292,6 +5311,7 @@ export const TablePartitionMetadata: MessageFns<TablePartitionMetadata> = {message.useDefault = object.useDefault ?? "";message.subpartitions = object.subpartitions?.map((e) => TablePartitionMetadata.fromPartial(e)) || [];message.indexes = object.indexes?.map((e) => IndexMetadata.fromPartial(e)) || [];+ message.checkConstraints = object.checkConstraints?.map((e) => CheckConstraintMetadata.fromPartial(e)) || [];return message;},};diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex aff0b8ff3a..93652abcdd 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -13385,6 +13385,10 @@ components:type: arrayitems:$ref: '#/components/schemas/IndexMetadata'+ checkConstraints:+ type: array+ items:+ $ref: '#/components/schemas/CheckConstraintMetadata'description: TablePartitionMetadata is the metadata for table partitions.TagPolicy:type: objectdiff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex c3da203751..25e32e26b1 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -1713,6 +1713,7 @@ TablePartitionMetadata is the metadata for table partitions.| 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's [INT] type, 0 means not use default partition, otherwise, it's equals to number in syntax [SUB]PARTITION {number}. || subpartitions | [TablePartitionMetadata](#bytebase-store-TablePartitionMetadata) | repeated | The subpartitions is the list of subpartitions in a table partition. || indexes | [IndexMetadata](#bytebase-store-IndexMetadata) | repeated | |+| check_constraints | [CheckConstraintMetadata](#bytebase-store-CheckConstraintMetadata) | repeated | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 59d1e528a0..44567be269 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -5151,6 +5151,13 @@ in syntax [SUB]PARTITION {number}. </p></td><td><p> </p></td></tr>+ <tr>+ <td>check_constraints</td>+ <td><a href="#bytebase.store.CheckConstraintMetadata">CheckConstraintMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex b6e743c832..fdd48635ee 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -2990,6 +2990,7 @@ TablePartitionMetadata is the metadata for table partitions.| 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's [INT] type, 0 means not use default partition, otherwise, it'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 | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 4f9a04fc54..1cce618a28 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -9074,6 +9074,13 @@ in syntax [SUB]PARTITION {number}. </p></td><td><p> </p></td></tr>+ <tr>+ <td>check_constraints</td>+ <td><a href="#bytebase.v1.CheckConstraintMetadata">CheckConstraintMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>+</tbody></table>diff --git a/proto/generated-go/store/database.pb.go b/proto/generated-go/store/database.pb.goindex 43eb7f8aa2..93de4ae41b 100644--- a/proto/generated-go/store/database.pb.go+++ b/proto/generated-go/store/database.pb.go@@ -1884,10 +1884,11 @@ type TablePartitionMetadata struct {// in syntax [SUB]PARTITION {number}.UseDefault string `protobuf:"bytes,5,opt,name=use_default,json=useDefault,proto3" json:"use_default,omitempty"`// The subpartitions is the list of subpartitions in a table partition.- Subpartitions []*TablePartitionMetadata `protobuf:"bytes,6,rep,name=subpartitions,proto3" json:"subpartitions,omitempty"`- Indexes []*IndexMetadata `protobuf:"bytes,7,rep,name=indexes,proto3" json:"indexes,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ Subpartitions []*TablePartitionMetadata `protobuf:"bytes,6,rep,name=subpartitions,proto3" json:"subpartitions,omitempty"`+ Indexes []*IndexMetadata `protobuf:"bytes,7,rep,name=indexes,proto3" json:"indexes,omitempty"`+ CheckConstraints []*CheckConstraintMetadata `protobuf:"bytes,8,rep,name=check_constraints,json=checkConstraints,proto3" json:"check_constraints,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *TablePartitionMetadata) Reset() {@@ -1969,6 +1970,13 @@ func (x *TablePartitionMetadata) GetIndexes() []*IndexMetadata {return nil}+func (x *TablePartitionMetadata) GetCheckConstraints() []*CheckConstraintMetadata {+ if x != nil {+ return x.CheckConstraints+ }+ return nil+}+// ColumnMetadata is the metadata for columns.type ColumnMetadata struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -3972,7 +3980,7 @@ const file_store_database_proto_rawDesc = "" +"\x04name\x18\x01 \x01(\tR\x04name\x120\n" +"\x14external_server_name\x18\x02 \x01(\tR\x12externalServerName\x124\n" +"\x16external_database_name\x18\x03 \x01(\tR\x14externalDatabaseName\x128\n" +- "\acolumns\x18\x04 \x03(\v2\x1e.bytebase.store.ColumnMetadataR\acolumns\"\xd8\x03\n" ++ "\acolumns\x18\x04 \x03(\v2\x1e.bytebase.store.ColumnMetadataR\acolumns\"\xae\x04\n" +"\x16TablePartitionMetadata\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12?\n" +"\x04type\x18\x02 \x01(\x0e2+.bytebase.store.TablePartitionMetadata.TypeR\x04type\x12\x1e\n" +@@ -3983,7 +3991,8 @@ const file_store_database_proto_rawDesc = "" +"\vuse_default\x18\x05 \x01(\tR\n" +"useDefault\x12L\n" +"\rsubpartitions\x18\x06 \x03(\v2&.bytebase.store.TablePartitionMetadataR\rsubpartitions\x127\n" +- "\aindexes\x18\a \x03(\v2\x1d.bytebase.store.IndexMetadataR\aindexes\"\x8a\x01\n" ++ "\aindexes\x18\a \x03(\v2\x1d.bytebase.store.IndexMetadataR\aindexes\x12T\n" ++ "\x11check_constraints\x18\b \x03(\v2'.bytebase.store.CheckConstraintMetadataR\x10checkConstraints\"\x8a\x01\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n" +"\x05RANGE\x10\x01\x12\x11\n" +@@ -4284,35 +4293,36 @@ var file_store_database_proto_depIdxs = []int32{3, // 28: bytebase.store.TablePartitionMetadata.type:type_name -> bytebase.store.TablePartitionMetadata.Type20, // 29: bytebase.store.TablePartitionMetadata.subpartitions:type_name -> bytebase.store.TablePartitionMetadata30, // 30: bytebase.store.TablePartitionMetadata.indexes:type_name -> bytebase.store.IndexMetadata- 46, // 31: bytebase.store.ColumnMetadata.default:type_name -> google.protobuf.StringValue- 22, // 32: bytebase.store.ColumnMetadata.generation:type_name -> bytebase.store.GenerationMetadata- 4, // 33: bytebase.store.ColumnMetadata.identity_generation:type_name -> bytebase.store.ColumnMetadata.IdentityGeneration- 5, // 34: bytebase.store.GenerationMetadata.type:type_name -> bytebase.store.GenerationMetadata.Type- 24, // 35: bytebase.store.ViewMetadata.dependency_columns:type_name -> bytebase.store.DependencyColumn- 21, // 36: bytebase.store.ViewMetadata.columns:type_name -> bytebase.store.ColumnMetadata- 14, // 37: bytebase.store.ViewMetadata.triggers:type_name -> bytebase.store.TriggerMetadata- 24, // 38: bytebase.store.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.store.DependencyColumn- 14, // 39: bytebase.store.MaterializedViewMetadata.triggers:type_name -> bytebase.store.TriggerMetadata- 30, // 40: bytebase.store.MaterializedViewMetadata.indexes:type_name -> bytebase.store.IndexMetadata- 26, // 41: bytebase.store.FunctionMetadata.dependency_tables:type_name -> bytebase.store.DependencyTable- 36, // 42: bytebase.store.DatabaseConfig.schemas:type_name -> bytebase.store.SchemaCatalog- 37, // 43: bytebase.store.SchemaCatalog.tables:type_name -> bytebase.store.TableCatalog- 38, // 44: bytebase.store.TableCatalog.columns:type_name -> bytebase.store.ColumnCatalog- 39, // 45: bytebase.store.TableCatalog.object_schema:type_name -> bytebase.store.ObjectSchema- 41, // 46: bytebase.store.ColumnCatalog.labels:type_name -> bytebase.store.ColumnCatalog.LabelsEntry- 39, // 47: bytebase.store.ColumnCatalog.object_schema:type_name -> bytebase.store.ObjectSchema- 47, // 48: bytebase.store.ColumnCatalog.masking_level:type_name -> bytebase.store.MaskingLevel- 6, // 49: bytebase.store.ObjectSchema.type:type_name -> bytebase.store.ObjectSchema.Type- 42, // 50: bytebase.store.ObjectSchema.struct_kind:type_name -> bytebase.store.ObjectSchema.StructKind- 43, // 51: bytebase.store.ObjectSchema.array_kind:type_name -> bytebase.store.ObjectSchema.ArrayKind- 44, // 52: bytebase.store.ObjectSchema.StructKind.properties:type_name -> bytebase.store.ObjectSchema.StructKind.PropertiesEntry- 39, // 53: bytebase.store.ObjectSchema.ArrayKind.kind:type_name -> bytebase.store.ObjectSchema- 39, // 54: bytebase.store.ObjectSchema.StructKind.PropertiesEntry.value:type_name -> bytebase.store.ObjectSchema- 55, // [55:55] is the sub-list for method output_type- 55, // [55:55] is the sub-list for method input_type- 55, // [55:55] is the sub-list for extension type_name- 55, // [55:55] is the sub-list for extension extendee- 0, // [0:55] is the sub-list for field type_name+ 18, // 31: bytebase.store.TablePartitionMetadata.check_constraints:type_name -> bytebase.store.CheckConstraintMetadata+ 46, // 32: bytebase.store.ColumnMetadata.default:type_name -> google.protobuf.StringValue+ 22, // 33: bytebase.store.ColumnMetadata.generation:type_name -> bytebase.store.GenerationMetadata+ 4, // 34: bytebase.store.ColumnMetadata.identity_generation:type_name -> bytebase.store.ColumnMetadata.IdentityGeneration+ 5, // 35: bytebase.store.GenerationMetadata.type:type_name -> bytebase.store.GenerationMetadata.Type+ 24, // 36: bytebase.store.ViewMetadata.dependency_columns:type_name -> bytebase.store.DependencyColumn+ 21, // 37: bytebase.store.ViewMetadata.columns:type_name -> bytebase.store.ColumnMetadata+ 14, // 38: bytebase.store.ViewMetadata.triggers:type_name -> bytebase.store.TriggerMetadata+ 24, // 39: bytebase.store.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.store.DependencyColumn+ 14, // 40: bytebase.store.MaterializedViewMetadata.triggers:type_name -> bytebase.store.TriggerMetadata+ 30, // 41: bytebase.store.MaterializedViewMetadata.indexes:type_name -> bytebase.store.IndexMetadata+ 26, // 42: bytebase.store.FunctionMetadata.dependency_tables:type_name -> bytebase.store.DependencyTable+ 36, // 43: bytebase.store.DatabaseConfig.schemas:type_name -> bytebase.store.SchemaCatalog+ 37, // 44: bytebase.store.SchemaCatalog.tables:type_name -> bytebase.store.TableCatalog+ 38, // 45: bytebase.store.TableCatalog.columns:type_name -> bytebase.store.ColumnCatalog+ 39, // 46: bytebase.store.TableCatalog.object_schema:type_name -> bytebase.store.ObjectSchema+ 41, // 47: bytebase.store.ColumnCatalog.labels:type_name -> bytebase.store.ColumnCatalog.LabelsEntry+ 39, // 48: bytebase.store.ColumnCatalog.object_schema:type_name -> bytebase.store.ObjectSchema+ 47, // 49: bytebase.store.ColumnCatalog.masking_level:type_name -> bytebase.store.MaskingLevel+ 6, // 50: bytebase.store.ObjectSchema.type:type_name -> bytebase.store.ObjectSchema.Type+ 42, // 51: bytebase.store.ObjectSchema.struct_kind:type_name -> bytebase.store.ObjectSchema.StructKind+ 43, // 52: bytebase.store.ObjectSchema.array_kind:type_name -> bytebase.store.ObjectSchema.ArrayKind+ 44, // 53: bytebase.store.ObjectSchema.StructKind.properties:type_name -> bytebase.store.ObjectSchema.StructKind.PropertiesEntry+ 39, // 54: bytebase.store.ObjectSchema.ArrayKind.kind:type_name -> bytebase.store.ObjectSchema+ 39, // 55: bytebase.store.ObjectSchema.StructKind.PropertiesEntry.value:type_name -> bytebase.store.ObjectSchema+ 56, // [56:56] is the sub-list for method output_type+ 56, // [56:56] is the sub-list for method input_type+ 56, // [56:56] is the sub-list for extension type_name+ 56, // [56:56] is the sub-list for extension extendee+ 0, // [0:56] is the sub-list for field type_name}func init() { file_store_database_proto_init() }diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.goindex e3e6969964..bbda0c2fd8 100644--- a/proto/generated-go/v1/database_service.pb.go+++ b/proto/generated-go/v1/database_service.pb.go@@ -2722,10 +2722,11 @@ type TablePartitionMetadata struct {// in syntax [SUB]PARTITION {number}.UseDefault string `protobuf:"bytes,5,opt,name=use_default,json=useDefault,proto3" json:"use_default,omitempty"`// The subpartitions is the list of subpartitions in a table partition.- Subpartitions []*TablePartitionMetadata `protobuf:"bytes,6,rep,name=subpartitions,proto3" json:"subpartitions,omitempty"`- Indexes []*IndexMetadata `protobuf:"bytes,7,rep,name=indexes,proto3" json:"indexes,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ Subpartitions []*TablePartitionMetadata `protobuf:"bytes,6,rep,name=subpartitions,proto3" json:"subpartitions,omitempty"`+ Indexes []*IndexMetadata `protobuf:"bytes,7,rep,name=indexes,proto3" json:"indexes,omitempty"`+ CheckConstraints []*CheckConstraintMetadata `protobuf:"bytes,8,rep,name=check_constraints,json=checkConstraints,proto3" json:"check_constraints,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *TablePartitionMetadata) Reset() {@@ -2807,6 +2808,13 @@ func (x *TablePartitionMetadata) GetIndexes() []*IndexMetadata {return nil}+func (x *TablePartitionMetadata) GetCheckConstraints() []*CheckConstraintMetadata {+ if x != nil {+ return x.CheckConstraints+ }+ return nil+}+// ColumnMetadata is the metadata for columns.type ColumnMetadata struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -6210,7 +6218,7 @@ const file_v1_database_service_proto_rawDesc = "" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x1e\n" +"\n" +"expression\x18\x02 \x01(\tR\n" +- "expression\"\xcf\x03\n" ++ "expression\"\xa2\x04\n" +"\x16TablePartitionMetadata\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12<\n" +"\x04type\x18\x02 \x01(\x0e2(.bytebase.v1.TablePartitionMetadata.TypeR\x04type\x12\x1e\n" +@@ -6221,7 +6229,8 @@ const file_v1_database_service_proto_rawDesc = "" +"\vuse_default\x18\x05 \x01(\tR\n" +"useDefault\x12I\n" +"\rsubpartitions\x18\x06 \x03(\v2#.bytebase.v1.TablePartitionMetadataR\rsubpartitions\x124\n" +- "\aindexes\x18\a \x03(\v2\x1a.bytebase.v1.IndexMetadataR\aindexes\"\x8a\x01\n" ++ "\aindexes\x18\a \x03(\v2\x1a.bytebase.v1.IndexMetadataR\aindexes\x12Q\n" ++ "\x11check_constraints\x18\b \x03(\v2$.bytebase.v1.CheckConstraintMetadataR\x10checkConstraints\"\x8a\x01\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n" +"\x05RANGE\x10\x01\x12\x11\n" +@@ -6735,92 +6744,93 @@ var file_v1_database_service_proto_depIdxs = []int32{1, // 31: bytebase.v1.TablePartitionMetadata.type:type_name -> bytebase.v1.TablePartitionMetadata.Type36, // 32: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata48, // 33: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata- 38, // 34: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata- 2, // 35: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration- 3, // 36: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type- 40, // 37: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn- 37, // 38: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata- 32, // 39: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata- 40, // 40: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn- 32, // 41: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata- 48, // 42: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata- 42, // 43: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable- 4, // 44: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State- 5, // 45: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type- 6, // 46: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode- 56, // 47: bytebase.v1.ListSecretsResponse.secrets:type_name -> bytebase.v1.Secret- 56, // 48: bytebase.v1.UpdateSecretRequest.secret:type_name -> bytebase.v1.Secret- 77, // 49: bytebase.v1.UpdateSecretRequest.update_mask:type_name -> google.protobuf.FieldMask- 79, // 50: bytebase.v1.Secret.created_time:type_name -> google.protobuf.Timestamp- 79, // 51: bytebase.v1.Secret.updated_time:type_name -> google.protobuf.Timestamp- 58, // 52: bytebase.v1.ChangedResources.databases:type_name -> bytebase.v1.ChangedResourceDatabase- 59, // 53: bytebase.v1.ChangedResourceDatabase.schemas:type_name -> bytebase.v1.ChangedResourceSchema- 60, // 54: bytebase.v1.ChangedResourceSchema.tables:type_name -> bytebase.v1.ChangedResourceTable- 61, // 55: bytebase.v1.ChangedResourceSchema.views:type_name -> bytebase.v1.ChangedResourceView- 62, // 56: bytebase.v1.ChangedResourceSchema.functions:type_name -> bytebase.v1.ChangedResourceFunction- 63, // 57: bytebase.v1.ChangedResourceSchema.procedures:type_name -> bytebase.v1.ChangedResourceProcedure- 81, // 58: bytebase.v1.ChangedResourceTable.ranges:type_name -> bytebase.v1.Range- 81, // 59: bytebase.v1.ChangedResourceView.ranges:type_name -> bytebase.v1.Range- 81, // 60: bytebase.v1.ChangedResourceFunction.ranges:type_name -> bytebase.v1.Range- 81, // 61: bytebase.v1.ChangedResourceProcedure.ranges:type_name -> bytebase.v1.Range- 69, // 62: bytebase.v1.ListRevisionsResponse.revisions:type_name -> bytebase.v1.Revision- 69, // 63: bytebase.v1.CreateRevisionRequest.revision:type_name -> bytebase.v1.Revision- 79, // 64: bytebase.v1.Revision.create_time:type_name -> google.protobuf.Timestamp- 79, // 65: bytebase.v1.Revision.delete_time:type_name -> google.protobuf.Timestamp- 0, // 66: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView- 73, // 67: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog- 0, // 68: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView- 79, // 69: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp- 7, // 70: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status- 57, // 71: bytebase.v1.Changelog.changed_resources:type_name -> bytebase.v1.ChangedResources- 8, // 72: bytebase.v1.Changelog.type:type_name -> bytebase.v1.Changelog.Type- 9, // 73: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType- 27, // 74: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata- 10, // 75: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest- 11, // 76: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest- 13, // 77: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest- 15, // 78: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest- 16, // 79: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest- 20, // 80: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest- 18, // 81: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest- 22, // 82: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest- 23, // 83: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest- 24, // 84: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest- 52, // 85: bytebase.v1.DatabaseService.ListSecrets:input_type -> bytebase.v1.ListSecretsRequest- 54, // 86: bytebase.v1.DatabaseService.UpdateSecret:input_type -> bytebase.v1.UpdateSecretRequest- 55, // 87: bytebase.v1.DatabaseService.DeleteSecret:input_type -> bytebase.v1.DeleteSecretRequest- 64, // 88: bytebase.v1.DatabaseService.ListRevisions:input_type -> bytebase.v1.ListRevisionsRequest- 67, // 89: bytebase.v1.DatabaseService.GetRevision:input_type -> bytebase.v1.GetRevisionRequest- 66, // 90: bytebase.v1.DatabaseService.CreateRevision:input_type -> bytebase.v1.CreateRevisionRequest- 68, // 91: bytebase.v1.DatabaseService.DeleteRevision:input_type -> bytebase.v1.DeleteRevisionRequest- 70, // 92: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest- 72, // 93: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest- 74, // 94: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest- 26, // 95: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database- 12, // 96: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse- 14, // 97: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse- 26, // 98: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database- 17, // 99: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse- 21, // 100: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse- 19, // 101: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse- 27, // 102: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata- 51, // 103: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema- 25, // 104: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse- 53, // 105: bytebase.v1.DatabaseService.ListSecrets:output_type -> bytebase.v1.ListSecretsResponse- 56, // 106: bytebase.v1.DatabaseService.UpdateSecret:output_type -> bytebase.v1.Secret- 82, // 107: bytebase.v1.DatabaseService.DeleteSecret:output_type -> google.protobuf.Empty- 65, // 108: bytebase.v1.DatabaseService.ListRevisions:output_type -> bytebase.v1.ListRevisionsResponse- 69, // 109: bytebase.v1.DatabaseService.GetRevision:output_type -> bytebase.v1.Revision- 69, // 110: bytebase.v1.DatabaseService.CreateRevision:output_type -> bytebase.v1.Revision- 82, // 111: bytebase.v1.DatabaseService.DeleteRevision:output_type -> google.protobuf.Empty- 71, // 112: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse- 73, // 113: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog- 75, // 114: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse- 95, // [95:115] is the sub-list for method output_type- 75, // [75:95] is the sub-list for method input_type- 75, // [75:75] is the sub-list for extension type_name- 75, // [75:75] is the sub-list for extension extendee- 0, // [0:75] is the sub-list for field type_name+ 35, // 34: bytebase.v1.TablePartitionMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata+ 38, // 35: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata+ 2, // 36: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration+ 3, // 37: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type+ 40, // 38: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn+ 37, // 39: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata+ 32, // 40: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata+ 40, // 41: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn+ 32, // 42: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata+ 48, // 43: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata+ 42, // 44: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable+ 4, // 45: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State+ 5, // 46: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type+ 6, // 47: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode+ 56, // 48: bytebase.v1.ListSecretsResponse.secrets:type_name -> bytebase.v1.Secret+ 56, // 49: bytebase.v1.UpdateSecretRequest.secret:type_name -> bytebase.v1.Secret+ 77, // 50: bytebase.v1.UpdateSecretRequest.update_mask:type_name -> google.protobuf.FieldMask+ 79, // 51: bytebase.v1.Secret.created_time:type_name -> google.protobuf.Timestamp+ 79, // 52: bytebase.v1.Secret.updated_time:type_name -> google.protobuf.Timestamp+ 58, // 53: bytebase.v1.ChangedResources.databases:type_name -> bytebase.v1.ChangedResourceDatabase+ 59, // 54: bytebase.v1.ChangedResourceDatabase.schemas:type_name -> bytebase.v1.ChangedResourceSchema+ 60, // 55: bytebase.v1.ChangedResourceSchema.tables:type_name -> bytebase.v1.ChangedResourceTable+ 61, // 56: bytebase.v1.ChangedResourceSchema.views:type_name -> bytebase.v1.ChangedResourceView+ 62, // 57: bytebase.v1.ChangedResourceSchema.functions:type_name -> bytebase.v1.ChangedResourceFunction+ 63, // 58: bytebase.v1.ChangedResourceSchema.procedures:type_name -> bytebase.v1.ChangedResourceProcedure+ 81, // 59: bytebase.v1.ChangedResourceTable.ranges:type_name -> bytebase.v1.Range+ 81, // 60: bytebase.v1.ChangedResourceView.ranges:type_name -> bytebase.v1.Range+ 81, // 61: bytebase.v1.ChangedResourceFunction.ranges:type_name -> bytebase.v1.Range+ 81, // 62: bytebase.v1.ChangedResourceProcedure.ranges:type_name -> bytebase.v1.Range+ 69, // 63: bytebase.v1.ListRevisionsResponse.revisions:type_name -> bytebase.v1.Revision+ 69, // 64: bytebase.v1.CreateRevisionRequest.revision:type_name -> bytebase.v1.Revision+ 79, // 65: bytebase.v1.Revision.create_time:type_name -> google.protobuf.Timestamp+ 79, // 66: bytebase.v1.Revision.delete_time:type_name -> google.protobuf.Timestamp+ 0, // 67: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView+ 73, // 68: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog+ 0, // 69: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView+ 79, // 70: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp+ 7, // 71: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status+ 57, // 72: bytebase.v1.Changelog.changed_resources:type_name -> bytebase.v1.ChangedResources+ 8, // 73: bytebase.v1.Changelog.type:type_name -> bytebase.v1.Changelog.Type+ 9, // 74: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType+ 27, // 75: bytebase.v1.GetSchemaStringRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata+ 10, // 76: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest+ 11, // 77: bytebase.v1.DatabaseService.BatchGetDatabases:input_type -> bytebase.v1.BatchGetDatabasesRequest+ 13, // 78: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest+ 15, // 79: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest+ 16, // 80: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest+ 20, // 81: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest+ 18, // 82: bytebase.v1.DatabaseService.BatchSyncDatabases:input_type -> bytebase.v1.BatchSyncDatabasesRequest+ 22, // 83: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest+ 23, // 84: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest+ 24, // 85: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest+ 52, // 86: bytebase.v1.DatabaseService.ListSecrets:input_type -> bytebase.v1.ListSecretsRequest+ 54, // 87: bytebase.v1.DatabaseService.UpdateSecret:input_type -> bytebase.v1.UpdateSecretRequest+ 55, // 88: bytebase.v1.DatabaseService.DeleteSecret:input_type -> bytebase.v1.DeleteSecretRequest+ 64, // 89: bytebase.v1.DatabaseService.ListRevisions:input_type -> bytebase.v1.ListRevisionsRequest+ 67, // 90: bytebase.v1.DatabaseService.GetRevision:input_type -> bytebase.v1.GetRevisionRequest+ 66, // 91: bytebase.v1.DatabaseService.CreateRevision:input_type -> bytebase.v1.CreateRevisionRequest+ 68, // 92: bytebase.v1.DatabaseService.DeleteRevision:input_type -> bytebase.v1.DeleteRevisionRequest+ 70, // 93: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest+ 72, // 94: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest+ 74, // 95: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest+ 26, // 96: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database+ 12, // 97: bytebase.v1.DatabaseService.BatchGetDatabases:output_type -> bytebase.v1.BatchGetDatabasesResponse+ 14, // 98: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse+ 26, // 99: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database+ 17, // 100: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse+ 21, // 101: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse+ 19, // 102: bytebase.v1.DatabaseService.BatchSyncDatabases:output_type -> bytebase.v1.BatchSyncDatabasesResponse+ 27, // 103: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata+ 51, // 104: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema+ 25, // 105: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse+ 53, // 106: bytebase.v1.DatabaseService.ListSecrets:output_type -> bytebase.v1.ListSecretsResponse+ 56, // 107: bytebase.v1.DatabaseService.UpdateSecret:output_type -> bytebase.v1.Secret+ 82, // 108: bytebase.v1.DatabaseService.DeleteSecret:output_type -> google.protobuf.Empty+ 65, // 109: bytebase.v1.DatabaseService.ListRevisions:output_type -> bytebase.v1.ListRevisionsResponse+ 69, // 110: bytebase.v1.DatabaseService.GetRevision:output_type -> bytebase.v1.Revision+ 69, // 111: bytebase.v1.DatabaseService.CreateRevision:output_type -> bytebase.v1.Revision+ 82, // 112: bytebase.v1.DatabaseService.DeleteRevision:output_type -> google.protobuf.Empty+ 71, // 113: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse+ 73, // 114: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog+ 75, // 115: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse+ 96, // [96:116] is the sub-list for method output_type+ 76, // [76:96] is the sub-list for method input_type+ 76, // [76:76] is the sub-list for extension type_name+ 76, // [76:76] is the sub-list for extension extendee+ 0, // [0:76] is the sub-list for field type_name}func init() { file_v1_database_service_proto_init() }diff --git a/proto/store/store/database.proto b/proto/store/store/database.protoindex 1e60e774b1..b60abe52e5 100644--- a/proto/store/store/database.proto+++ b/proto/store/store/database.proto@@ -422,6 +422,8 @@ message TablePartitionMetadata {repeated TablePartitionMetadata subpartitions = 6;repeated IndexMetadata indexes = 7;++ repeated CheckConstraintMetadata check_constraints = 8;}// ColumnMetadata is the metadata for columns.diff --git a/proto/v1/v1/database_service.proto b/proto/v1/v1/database_service.protoindex 72197d37a0..6a588c1c91 100644--- a/proto/v1/v1/database_service.proto+++ b/proto/v1/v1/database_service.proto@@ -766,6 +766,8 @@ message TablePartitionMetadata {repeated TablePartitionMetadata subpartitions = 6;repeated IndexMetadata indexes = 7;++ repeated CheckConstraintMetadata check_constraints = 8;}// ColumnMetadata is the metadata for columns.