String foreignKeyTableName = record.getValue(CrossReferences.FKTABLE_NAME);
String foreignKeyColumn = record.getValue(CrossReferences.FKCOLUMN_NAME);
String foreignKey = record.getValue(CrossReferences.FK_NAME);
String uniqueKey = record.getValue(Constraints.CONSTRAINT_NAME);
TableDefinition foreignKeyTable = getTable(foreignKeySchema, foreignKeyTableName);
if (foreignKeyTable != null) {
ColumnDefinition referencingColumn = foreignKeyTable.getColumn(foreignKeyColumn);
relations.addForeignKey(foreignKey, uniqueKey, referencingColumn, uniqueKeySchema);
}
}
}