ForeignKey newfk = table.addForeignKey();
newfk.setJoins(cols, tcols);
if (_fk != null) {
cols = _fk.getConstantColumns();
for (int i = 0; i < cols.length; i++)
newfk.joinConstant(cols[i], _fk.getConstant(cols[i]));
cols = _fk.getConstantPrimaryKeyColumns();
for (int i = 0; i < cols.length; i++)
newfk.joinConstant(_fk.getPrimaryKeyConstant(cols[i]),
getEquivalentColumn(cols[i].getIdentifier(), target, true));