}
// All children must be in the same schema
for(Join childJoin : table.getChildJoins()) {
final TableName childName = childJoin.getChild().getName();
if(!childName.getSchemaName().equals(schemaName)) {
throw new ForeignConstraintDDLException(table.getName(), childName);
}
}
// All referencing foreign keys must be in the same schema
for(ForeignKey foreignKey : table.getReferencedForeignKeys()) {
final TableName referencingName = foreignKey.getReferencingTable().getName();