String foreignKeyName = record.getValue(fkName);
String foreignKeyTableName = record.getValue(fkTable);
List<Integer> foreignKeyIndexes = decode(record.getValue(fkDescriptor, String.class));
String uniqueKeyName = record.getValue(ukName);
TableDefinition referencingTable = getTable(foreignKeySchema, foreignKeyTableName);
if (referencingTable != null) {
for (int i = 0; i < foreignKeyIndexes.size(); i++) {
ColumnDefinition column = referencingTable.getColumn(foreignKeyIndexes.get(i));
relations.addForeignKey(foreignKeyName, uniqueKeyName, column, uniqueKeySchema);
}
}
}