Data migration — make group_by consistently a list