Add migration and fix relationships.