def update_no_show(apps, schema_editor):
    """
    Detect entries that have been manually marked as no-shows in the notes and
    toggle their no_show status to true.
    """
    Entry = apps.get_model('diary', 'Entry')
    for entry in Entry.objects.filter(notes__contains='NO-SHOW'):
        entry.no_show = True
        entry.save()
