fix relations and make migrations