# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-12 07:37
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Answers',
            fields=[
                ('id', models.BigIntegerField(db_column='Id', primary_key=True, serialize=False)),
                ('desc', models.CharField(db_column='Desc', max_length=1000)),
                ('iscorrect', models.IntegerField(db_column='IsCorrect')),
            ],
            options={
                'db_table': 'answers',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.BigIntegerField(db_column='Id', primary_key=True, serialize=False)),
                ('desc', models.CharField(db_column='Desc', max_length=1000)),
            ],
            options={
                'db_table': 'question',
            },
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.BigIntegerField(db_column='Id', primary_key=True, serialize=False)),
                ('start', models.DateTimeField(db_column='Start')),
                ('end', models.DateTimeField(db_column='End')),
            ],
            options={
                'db_table': 'session',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.BigIntegerField(db_column='Id', primary_key=True, serialize=False)),
                ('name', models.CharField(db_column='Name', max_length=50)),
                ('level', models.IntegerField(db_column='Level')),
            ],
            options={
                'db_table': 'student',
            },
        ),
        migrations.CreateModel(
            name='Replies',
            fields=[
                ('qnid', models.ForeignKey(db_column='Qnid', on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='webapps.Question')),
                ('repid', models.BigIntegerField(db_column='Repid')),
                ('desc', models.CharField(db_column='Desc', max_length=1000)),
            ],
            options={
                'db_table': 'replies',
            },
        ),
        migrations.CreateModel(
            name='Stdintxn',
            fields=[
                ('stdid', models.ForeignKey(db_column='Stdid', on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='webapps.Student')),
                ('attempt', models.IntegerField(db_column='Attempt')),
            ],
            options={
                'db_table': 'stdintxn',
            },
        ),
        migrations.AddField(
            model_name='answers',
            name='qnid',
            field=models.ForeignKey(db_column='Qnid', on_delete=django.db.models.deletion.DO_NOTHING, to='webapps.Question'),
        ),
        migrations.AddField(
            model_name='stdintxn',
            name='ansid',
            field=models.ForeignKey(db_column='Ansid', on_delete=django.db.models.deletion.DO_NOTHING, to='webapps.Answers'),
        ),
        migrations.AddField(
            model_name='stdintxn',
            name='qnid',
            field=models.ForeignKey(db_column='Qnid', on_delete=django.db.models.deletion.DO_NOTHING, to='webapps.Question'),
        ),
        migrations.AddField(
            model_name='stdintxn',
            name='sessid',
            field=models.ForeignKey(db_column='Sessid', on_delete=django.db.models.deletion.DO_NOTHING, to='webapps.Session'),
        ),
        migrations.AddField(
            model_name='replies',
            name='ansid',
            field=models.ForeignKey(db_column='Ansid', on_delete=django.db.models.deletion.DO_NOTHING, to='webapps.Answers'),
        ),
        migrations.AlterUniqueTogether(
            name='answers',
            unique_together=set([('id', 'qnid')]),
        ),
        migrations.AlterUniqueTogether(
            name='stdintxn',
            unique_together=set([('stdid', 'qnid', 'ansid', 'sessid')]),
        ),
        migrations.AlterUniqueTogether(
            name='replies',
            unique_together=set([('qnid', 'ansid', 'repid')]),
        ),
    ]
