def update_permission_names(apps, schema_editor):
    """
    Updates the wording of our three custom gym permissions
    """
    Permission = apps.get_model('auth', 'Permission')
    for name in ['Trainer, can see the users for a gym',
        'Admin, can manage users for a gym',
        'Admin, can administrate the different gyms']:
        permissions = Permission.objects.filter(name=name)
        if permissions.exists():
            permissions[0].name = name.replace(',', ':')
            permissions[0].save()
