Add migration to optimize activity structure in mongodb