# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-04-13 11:01
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='assign_section',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deadline', models.DateField()),
                ('section', models.CharField(max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=10)),
                ('time_uploaded', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('course_id', models.CharField(max_length=6, primary_key=True, serialize=False)),
                ('course_name', models.CharField(max_length=40)),
            ],
        ),
        migrations.CreateModel(
            name='Prof_course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('name', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('email', models.EmailField(max_length=254)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Stud_course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reg_time', models.DateField()),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Course')),
            ],
        ),
        migrations.CreateModel(
            name='stud_subm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subm_time', models.DateField()),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Assignment')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('branch', models.CharField(max_length=3)),
                ('email', models.EmailField(max_length=254)),
                ('section', models.CharField(max_length=1)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='stud_subm',
            name='stud',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Student'),
        ),
        migrations.AddField(
            model_name='stud_course',
            name='stud',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Student'),
        ),
        migrations.AddField(
            model_name='prof_course',
            name='prof',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Professor'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Course'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='prof',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Professor'),
        ),
        migrations.AddField(
            model_name='assign_section',
            name='assign',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Assignment'),
        ),
    ]
