# Generated by Django 2.0 on 2018-02-14 13:24

from django.db import migrations


def forwards(apps, schema_editor):
    """
    Change Events with kind 'movie' to 'cinema'
    and Events with kind 'play' to 'theatre'.

    Purely for more consistency.
    """
    Event = apps.get_model("spectator_events", "Event")

    for ev in Event.objects.filter(kind="movie"):
        ev.kind = "cinema"
        ev.save()

    for ev in Event.objects.filter(kind="play"):
        ev.kind = "theatre"
        ev.save()


class Migration(migrations.Migration):

    dependencies = [
        ("spectator_events", "0034_auto_20180208_1618"),
    ]

    operations = [
        migrations.RunPython(forwards),
    ]
