# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-07-29 07:13
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='Class',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('branch', models.CharField(default='', max_length=5)),
                ('section', models.CharField(default='', max_length=1)),
                ('year', models.IntegerField(default=1)),
                ('no_of_students', models.IntegerField(default=60)),
            ],
        ),
        migrations.CreateModel(
            name='Faculty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('faculty_id', models.CharField(default='', max_length=10)),
                ('name', models.CharField(default='', max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='FacultyTimeTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Period',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('section', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='StudentManagement.Class')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('roll_no', models.CharField(default='', max_length=10)),
                ('name', models.CharField(default='', max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='StudentAttendenceTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject_id', models.CharField(default='', max_length=10)),
                ('subject_name', models.CharField(default='', max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='SubjectAttendenceTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attendencecount', models.IntegerField(default=0)),
                ('subject', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='StudentManagement.Subject')),
            ],
        ),
        migrations.AddField(
            model_name='studentattendencetable',
            name='subject1',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='subject1', to='StudentManagement.SubjectAttendenceTable'),
        ),
        migrations.AddField(
            model_name='studentattendencetable',
            name='subject2',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='subject2', to='StudentManagement.SubjectAttendenceTable'),
        ),
        migrations.AddField(
            model_name='studentattendencetable',
            name='subject3',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='subject3', to='StudentManagement.SubjectAttendenceTable'),
        ),
        migrations.AddField(
            model_name='studentattendencetable',
            name='subject4',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='subject4', to='StudentManagement.SubjectAttendenceTable'),
        ),
        migrations.AddField(
            model_name='studentattendencetable',
            name='subject5',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='subject5', to='StudentManagement.SubjectAttendenceTable'),
        ),
        migrations.AddField(
            model_name='studentattendencetable',
            name='subject6',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='subject6', to='StudentManagement.SubjectAttendenceTable'),
        ),
        migrations.AddField(
            model_name='student',
            name='attendence',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='StudentManagement.StudentAttendenceTable'),
        ),
        migrations.AddField(
            model_name='student',
            name='section',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='StudentManagement.Class'),
        ),
        migrations.AddField(
            model_name='period',
            name='subject',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='StudentManagement.Subject'),
        ),
        migrations.AddField(
            model_name='facultytimetable',
            name='period1',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='period1', to='StudentManagement.Period'),
        ),
        migrations.AddField(
            model_name='facultytimetable',
            name='period2',
            field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='period2', to='StudentManagement.Period'),
        ),
        migrations.AddField(
            model_name='facultytimetable',
            name='period3',
            field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='period3', to='StudentManagement.Period'),
        ),
        migrations.AddField(
            model_name='facultytimetable',
            name='period4',
            field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='period4', to='StudentManagement.Period'),
        ),
        migrations.AddField(
            model_name='facultytimetable',
            name='period5',
            field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='period5', to='StudentManagement.Period'),
        ),
        migrations.AddField(
            model_name='faculty',
            name='schedule',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='StudentManagement.FacultyTimeTable'),
        ),
        migrations.AddField(
            model_name='faculty',
            name='username',
            field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
