def update_ldap_attr_mappings_member(apps, schema_editor):
    """
    update groupOfNames.member
    """
    LDAPOCMappings = apps.get_model('sql_backend', 'LDAPOCMappings')
    LDAPAttrMapping = apps.get_model('sql_backend', 'LDAPAttrMapping')
    groupOfNames = LDAPOCMappings.objects.get(name='groupOfNames')
    member = LDAPAttrMapping.objects.filter(name='member', oc_map=groupOfNames
        ).first()
    if member:
        member.delete()
    for name, sel_expr, from_tables, join_where, create_proc, delete_proc, param_order, expect_return in [
        ('member', 'member_entries.dn',
        'ldap_group, ldap_group_member, ldap_entries AS member_entries',
        'ldap_group_member.user_id=member_entries.keyval and ldap_group_member.owner_id =ldap_group.id and member_entries.oc_map_id = 4'
        , None, None, 3, 0)]:
        LDAPAttrMapping.objects.create(oc_map=groupOfNames, name=name,
            sel_expr=sel_expr, from_tbls=from_tables, join_where=join_where,
            create_proc=create_proc, delete_proc=delete_proc, param_order=
            param_order, expect_return=expect_return)
