def METHOD_NAME(apps, schema_editor):
    Log = apps.get_model("documents", "Log")
    for log in Log.objects.all():
        if log.group is None:
            log.group = uuid.uuid4()
            log.save()