in ddm-rrm-data-model-management/src/main/java/com/epam/digital/data/platform/management/mapper/SchemaCrawlerMapper.java [146:160]
public void mapIndex(@MappingTarget TableInfoDto tableInfoDto, Index index) {
if (index.getName().endsWith(DdmConstants.SUFFIX_M2M)) {
return;
}
if (index.getName().equals(index.getParent().getPrimaryKey().getName())) {
tableInfoDto.setPrimaryKey(toPrimaryKeyConstraint(index));
} else if (index.isUnique()) {
var constraint = toUniqueConstraint(index);
tableInfoDto.getUniqueConstraints().put(constraint.getName(), constraint);
} else {
var indexShortInfoDto = toIndexShortInfoDto(index);
tableInfoDto.getIndices().put(indexShortInfoDto.getName(), indexShortInfoDto);
}
}