# Generated by Django 2.0.4 on 2018-04-14 02:54

from django.db import migrations


departments = [
    (0, 'Ninguna'),
    (1, 'Ingeniería Ambiental'),
    (2, 'Ingeniería Mecatrónica'),
    (3, 'Ingeniería Bioquímica'),
    (4, 'Ingeniería en Gestión Empresarial'),
    (5, 'Ingeniería Electrónica'),
    (8, 'Ingeniería Industrial'),
    (10, 'Ingeniería Mecánica'),
    (12, 'Ingeniería Química'),
    (14, 'Ingeniería en Sistemas Computacionales'),
    (15, 'Ingeniería en Informática'),
    (16, 'Licenciatura en Administración'),
    (99, 'Neutral')
]

activity_types = ['Taller', 'Conferencia', 'Curso', 'Visita', 'Actividad']

activity_categories = ['Academia', 'Empresas', 'Arte y Cultura', 'Deportiva', 'Desarrollo Personal']


def forwards_func(apps, schema_editor):
    Department = apps.get_model('semana_lince', 'Department')
    ActivityType = apps.get_model('semana_lince', 'ActivityType')
    ActivityCategory = apps.get_model('semana_lince', 'ActivityCategory')
    Responsable = apps.get_model('semana_lince', 'Responsable')
    db_alias = schema_editor.connection.alias
    for row in departments:
        Department.objects.using(db_alias).create(
            pk=row[0],
            name=row[1]
        )
    for atype in activity_types:
        ActivityType.objects.using(db_alias).create(
            name=atype
        )
    for acat in activity_categories:
        ActivityCategory.objects.using(db_alias).create(
            name=acat
        )
    Responsable.objects.using(db_alias).create(
        name='No Asignado',
        pk=0
    )


def reverse_func(apps, schema_editor):
    pass


class Migration(migrations.Migration):

    dependencies = [
        ('semana_lince', '0001_initial'),
    ]

    operations = [
        migrations.RunPython(forwards_func, reverse_func)
    ]
