# Generated by Django 2.1.4 on 2018-12-08 11:36

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Asistencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('asistio', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Benefactor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('encargado', models.CharField(max_length=500)),
                ('activo', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Especialista',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('especialidad', models.CharField(max_length=500)),
                ('activo', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=200)),
                ('fecha', models.DateTimeField(blank=True, default=None, null=True)),
                ('lugar', models.CharField(max_length=400)),
            ],
        ),
        migrations.CreateModel(
            name='Institucion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=500)),
                ('direccion', models.CharField(max_length=500)),
                ('contacto', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Persona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombres', models.CharField(max_length=100)),
                ('apellidos', models.CharField(max_length=100)),
                ('telefono', models.CharField(max_length=50)),
                ('direccion', models.CharField(max_length=400)),
                ('fecha_nacimiento', models.DateField(blank=True, default=None, null=True)),
                ('id_institucion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Institucion')),
            ],
        ),
        migrations.CreateModel(
            name='Practicante',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('programa', models.CharField(max_length=500)),
                ('activo', models.BooleanField(default=True)),
                ('id_persona', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Persona')),
            ],
        ),
        migrations.CreateModel(
            name='Voluntario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_visita', models.DateTimeField(blank=True, default=None, null=True)),
                ('activo', models.BooleanField(default=True)),
                ('evento', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Evento')),
                ('id_persona', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Persona')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='institucion',
            unique_together={('nombre', 'direccion')},
        ),
        migrations.AlterUniqueTogether(
            name='evento',
            unique_together={('nombre', 'fecha', 'lugar')},
        ),
        migrations.AddField(
            model_name='especialista',
            name='id_persona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Persona'),
        ),
        migrations.AddField(
            model_name='benefactor',
            name='id_persona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Persona'),
        ),
        migrations.AddField(
            model_name='asistencia',
            name='id_evento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Evento'),
        ),
        migrations.AddField(
            model_name='asistencia',
            name='id_persona',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mylocalproject.Persona'),
        ),
        migrations.AlterUniqueTogether(
            name='persona',
            unique_together={('nombres', 'apellidos')},
        ),
        migrations.AlterUniqueTogether(
            name='asistencia',
            unique_together={('id_evento', 'id_persona')},
        ),
    ]
