# Generated by Django 2.0.7 on 2018-07-11 22:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cursos',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('anho', models.DateField(db_column='Anho')),
                ('horario', models.CharField(db_column='Horario', max_length=32)),
                ('nombre', models.CharField(db_column='Nombre', max_length=64)),
                ('codigo', models.CharField(max_length=10)),
                ('ud', models.CharField(db_column='UD', max_length=10)),
            ],
            options={
                'db_table': 'cursos',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Departamento',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(db_column='Nombre', max_length=64)),
                ('sitioweb', models.CharField(blank=True, max_length=45, null=True)),
                ('codigo', models.CharField(db_column='Codigo', max_length=10)),
            ],
            options={
                'db_table': 'departamento',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='RolUsuarioCurso',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('cursos', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.Cursos')),
            ],
            options={
                'db_table': 'rol_usuario_curso',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Semestres',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('nombre_semestre', models.CharField(db_column='Nombre_Semestre', max_length=45)),
            ],
            options={
                'db_table': 'semestres',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='TipoUsuario',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(db_column='Nombre', max_length=45)),
            ],
            options={
                'db_table': 'tipo_usuario',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Usuarios',
            fields=[
                ('id', models.IntegerField(db_column='id', primary_key=True, serialize=False)),
                ('nombre', models.CharField(db_column='Nombre', max_length=64)),
                ('apellido', models.CharField(db_column='Apellido', max_length=64)),
                ('direccion', models.CharField(db_column='Direccion', max_length=128)),
                ('rut', models.CharField(db_column='RUT', max_length=32)),
                ('puntaje_psu', models.IntegerField(db_column='Puntaje_PSU')),
                ('username', models.CharField(max_length=64)),
                ('password', models.CharField(max_length=64)),
                ('password2', models.CharField(max_length=64)),
                ('email', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'usuarios',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UsuarioTipoUsuario',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('tipo_usuario', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.TipoUsuario')),
                ('usuarios', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.Usuarios')),
            ],
            options={
                'db_table': 'usuario_tipo_usuario',
                'managed': True,
            },
        ),
        migrations.AddField(
            model_name='rolusuariocurso',
            name='tipo_usuario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.TipoUsuario'),
        ),
        migrations.AddField(
            model_name='rolusuariocurso',
            name='usuarios',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.Usuarios'),
        ),
        migrations.AddField(
            model_name='departamento',
            name='jefe_depto',
            field=models.ForeignKey(db_column='Jefe_depto_id', on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.Usuarios'),
        ),
        migrations.AddField(
            model_name='cursos',
            name='departamento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.Departamento'),
        ),
        migrations.AddField(
            model_name='cursos',
            name='semestres',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='Main_DDAF.Semestres'),
        ),
    ]
