This is similar to issue #774 and #776.
In versions 5.3 and 6.0 of the CSV file definitions, the field/column VISIT_DETAIL_ID appears to refer to VISIT_DETAILS.VISIT_OCCURRENCE_ID and should therefore be a foreign key pointing to it. The field isForeignKey for that row in the CSV is set to No while it should be Yes, in particular since the fields fkTableName and fkFieldName have the values VISIT_DETAIL and VISIT_DETAIL_ID respectively.
This is similar to issue #774 and #776.
In versions 5.3 and 6.0 of the CSV file definitions, the field/column
VISIT_DETAIL_IDappears to refer toVISIT_DETAILS.VISIT_OCCURRENCE_IDand should therefore be a foreign key pointing to it. The fieldisForeignKeyfor that row in the CSV is set to No while it should be Yes, in particular since the fieldsfkTableNameandfkFieldNamehave the values VISIT_DETAIL and VISIT_DETAIL_ID respectively.