# Generated by Django 2.1.2 on 2018-12-05 17:21

from django.db import migrations


def change_LC_curricula(apps, schema_editor):
    """Populate database with Curriculum objects."""
    Curriculum = apps.get_model('workshops', 'Curriculum')
    data = {
        'lc': dict(
            name='Library Carpentry (Intro to Data, Unix Shell, Git, and/or '
                 'OpenRefine)',
            active=True,
            unknown=False,
        ),
        'lc-other': dict(
            name='Library Carpentry (other)',
            active=True,
            unknown=False,
        ),
    }
    for slug, defaults in data.items():
        Curriculum.objects.update_or_create(
            slug=slug,
            defaults=defaults,
        )


class Migration(migrations.Migration):
    dependencies = [
        ('workshops', '0167_auto_20181116_1814'),
    ]

    operations = [
        migrations.RunPython(change_LC_curricula)
    ]
