mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +00:00
parent
1e3652d35e
commit
df2001418e
@ -32,7 +32,7 @@ import org.openmetadata.service.util.EntityUtil.Fields;
|
||||
import org.openmetadata.service.util.FullyQualifiedName;
|
||||
|
||||
public class DatabaseSchemaRepository extends EntityRepository<DatabaseSchema> {
|
||||
private static final String DATABASE_SCHEMA_UPDATE_FIELDS = "owner";
|
||||
private static final String DATABASE_SCHEMA_UPDATE_FIELDS = "owner,tags";
|
||||
private static final String DATABASE_SCHEMA_PATCH_FIELDS = DATABASE_SCHEMA_UPDATE_FIELDS;
|
||||
|
||||
public DatabaseSchemaRepository(CollectionDAO dao) {
|
||||
@ -77,6 +77,8 @@ public class DatabaseSchemaRepository extends EntityRepository<DatabaseSchema> {
|
||||
addRelationship(
|
||||
database.getId(), schema.getId(), database.getType(), Entity.DATABASE_SCHEMA, Relationship.CONTAINS);
|
||||
storeOwner(schema, schema.getOwner());
|
||||
// Add tag to databaseSchema relationship
|
||||
applyTags(schema);
|
||||
}
|
||||
|
||||
private List<EntityReference> getTables(DatabaseSchema schema) throws IOException {
|
||||
|
||||
@ -78,7 +78,7 @@ class DatabaseSchemaResourceTest extends EntityResourceTest<DatabaseSchema, Crea
|
||||
assertListNotNull(schema.getService(), schema.getServiceType(), schema.getDatabase());
|
||||
assertListNull(schema.getOwner(), schema.getTables());
|
||||
|
||||
fields = "owner,tables";
|
||||
fields = "owner,tags,tables";
|
||||
schema =
|
||||
byName
|
||||
? getEntityByName(schema.getFullyQualifiedName(), fields, ADMIN_AUTH_HEADERS)
|
||||
|
||||
@ -77,6 +77,14 @@
|
||||
"$ref": "../../type/usageDetails.json",
|
||||
"default": null
|
||||
},
|
||||
"tags": {
|
||||
"description": "Tags for this Database Schema Service.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "../../type/tagLabel.json"
|
||||
},
|
||||
"default": null
|
||||
},
|
||||
"changeDescription": {
|
||||
"description": "Change that lead to this version of the entity.",
|
||||
"$ref": "../../type/entityHistory.json#/definitions/changeDescription"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user