# Generated by Django 2.1.2 on 2018-11-12 18:52

from django.db import migrations


def add_new_tags_ITT_LMO_LSO(apps, schema_editor):
    Tag = apps.get_model('workshops', 'Tag')
    new_tags = {
        'ITT': 'Instructor Trainer Training (Trainer Training)',
        'LMO': 'Lesson Maintainer Onboarding',
        'LSO': 'Lesson Specific Onboarding',
    }
    for name, details in new_tags.items():
        Tag.objects.create(name=name, details=details)


def remove_tags_ITT_LMO_LSO(apps, schema_editor):
    Tag = apps.get_model('workshops', 'Tag')
    tags = ('ITT', 'LMO', 'LSO')
    Tag.objects.filter(name__in=tags).delete()


class Migration(migrations.Migration):

    dependencies = [
        ('workshops', '0165_person_lesson_publication_consent'),
    ]

    operations = [
        migrations.RunPython(add_new_tags_ITT_LMO_LSO,  # forward
                             remove_tags_ITT_LMO_LSO),  # reverse
    ]
