# Generated by Django 2.1.3 on 2019-04-07 03:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Courses',
            fields=[
                ('Course_id', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('Course_Name', models.CharField(max_length=200)),
                ('Course_credits', models.IntegerField()),
                ('Lectures', models.IntegerField()),
                ('Lab', models.IntegerField()),
                ('Practicals', models.IntegerField()),
                ('Semester', models.IntegerField()),
                ('Course_Type', models.IntegerField()),
            ],
            options={
                'db_table': 'Courses',
            },
        ),
        migrations.CreateModel(
            name='Grades',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Grade', models.CharField(max_length=2)),
                ('Course_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='students.Courses')),
            ],
            options={
                'db_table': 'Grades',
            },
        ),
        migrations.CreateModel(
            name='Instructors',
            fields=[
                ('Instructor_id', models.IntegerField(primary_key=True, serialize=False)),
                ('Name', models.CharField(max_length=200)),
                ('Email', models.EmailField(max_length=200)),
            ],
            options={
                'db_table': 'Instructors',
            },
        ),
        migrations.CreateModel(
            name='Students',
            fields=[
                ('Student_id', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('Name', models.CharField(max_length=200)),
                ('Email', models.EmailField(max_length=200)),
                ('Batch', models.CharField(max_length=10)),
                ('Branch', models.CharField(default='nill', max_length=10)),
                ('CGPA', models.DecimalField(decimal_places=2, default=0.0, max_digits=4)),
                ('Semester', models.IntegerField(default=1)),
                ('courses', models.ManyToManyField(to='students.Courses')),
            ],
            options={
                'db_table': 'Students',
            },
        ),
        migrations.AddField(
            model_name='grades',
            name='Student_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='students.Students'),
        ),
        migrations.AddField(
            model_name='courses',
            name='Instructor_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='students.Instructors'),
        ),
    ]
