Try to insert foreignKeyConstraints attributes when the attribute already exists

Currently when a model already has a field definition foreignKeyConstraint attributes don't get inserted into the field. This PR fixes that.