def METHOD_NAME(apps, schema_editor):
    Club = apps.get_model('club', 'Club')
    BDX = apps.get_model('club', 'BDX')
    GroupType = apps.get_model('group', 'GroupType')
    Group = apps.get_model('group', 'Group')
    Subscription = apps.get_model('notification', 'Subscription')
    Event = apps.get_model('event', 'Event')
    Post = apps.get_model('post', 'Post')
    parent = {}
    for group in Group.objects.filter(group_type__slug='club').order_by(F('parent').asc(nulls_first=True)):
        Model = BDX if not group.parent else Club
        c = Model.objects.create(
            name=group.name,
            alt_name=group.short_name,
            bdx_type=parent[group.parent.id] if group.parent else None,
            summary=group.summary,
            description=group.description,
            meeting_place=group.meeting_place,
            meeting_hour=group.meeting_hour,
            logo=group.icon,
            banniere=group.banner,
            video1=group.video1,
            video2=group.video2,
            slug=group.slug
        )
        if group.parent is None:
            parent[group.id] = c
        for m in group.membership_set.all():
            c.members.add(m.student, through_defaults={
                'admin': m.admin,
                'function': m.summary,
                'date_begin': m.begin_date,
                'date_end': m.end_date,
                'order': m.priority,
            })
        for student in group.subscribers.all():
            Subscription.objects.create(student=student, page=f"club--{c.slug}")
        for e in Event.objects.filter(group_slug=group.slug):
            e.group_slug=f"club--{c.slug}"
            e.save()
        for p in Post.objects.filter(group_slug=group.slug):
            p.group_slug=f"club--{c.slug}"
            p.save()
        for s in group.social_links.all():
            s.slug = f"club--{c.slug}"
            s.save()
    # delete all group objects
    GroupType.objects.filter(slug='club').delete()