First version of foreign keys checks in CheckRelationsCommand