Update repository->team relation + fix migrations