# Generated by Django 3.1.1 on 2020-12-03 23:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='action_page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CHOICE', models.TextField()),
                ('RESULT_PAGE', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='conversations',
            fields=[
                ('CONVERSATION', models.AutoField(default=None, primary_key=True, serialize=False)),
                ('QUESTION', models.TextField(default='default')),
                ('RESPONSE', models.TextField(default='default')),
            ],
        ),
        migrations.CreateModel(
            name='courses',
            fields=[
                ('COURSE', models.AutoField(default=None, primary_key=True, serialize=False)),
                ('NAME', models.CharField(max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='professors',
            fields=[
                ('PROFESSOR', models.IntegerField(primary_key=True, serialize=False)),
                ('NAME', models.CharField(max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='scenarios',
            fields=[
                ('SCENARIO', models.AutoField(editable=False, primary_key=True, serialize=False)),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('NAME', models.CharField(max_length=1000)),
                ('PUBLIC', models.BooleanField(default=False)),
                ('NUM_CONVERSATION', models.IntegerField(default=0)),
                ('IS_FINISHED', models.BooleanField(default=False)),
                ('DATE_CREATED', models.DateField(auto_now_add=True)),
                ('PROFESSOR', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='scenario_creator2', to='tables.professors')),
            ],
            options={
                'unique_together': {('SCENARIO', 'VERSION')},
            },
        ),
        migrations.CreateModel(
            name='students',
            fields=[
                ('STUDENT', models.IntegerField(primary_key=True, serialize=False)),
                ('NAME', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='demographics',
            fields=[
                ('STUDENT', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='demographics', serialize=False, to='tables.students')),
                ('AGE', models.SmallIntegerField()),
                ('GRADE', models.CharField(choices=[('FR', 'FRESHMAN'), ('SO', 'SOPHOMORE'), ('JK', 'JUNIOR'), ('SE', 'SENIOR'), ('SS', 'SUPER_SENIOR'), ('GR', 'GRADUATE'), ('OT', 'OTHER')], max_length=2)),
                ('GENDER', models.CharField(choices=[('M', 'MALE'), ('F', 'FEMALE'), ('OT', 'OTHER')], max_length=2)),
                ('RACE', models.CharField(max_length=50)),
                ('MAJOR', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='stakeholders',
            fields=[
                ('STAKEHOLDER', models.AutoField(editable=False, primary_key=True, serialize=False)),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('NAME', models.CharField(default='default', max_length=1000)),
                ('DESCRIPTION', models.TextField(default='default')),
                ('JOB', models.TextField(default='default')),
                ('INTRODUCTION', models.TextField(default='default')),
                ('SCENARIO', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='stakeholders2', to='tables.scenarios')),
            ],
            options={
                'unique_together': {('STAKEHOLDER', 'VERSION')},
            },
        ),
        migrations.CreateModel(
            name='responses',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('DATE_TAKEN', models.DateField(auto_now_add=True)),
                ('COURSE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='responses4', to='tables.courses')),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='responses2', to='tables.scenarios')),
                ('STUDENT', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='responses1', to='tables.students')),
            ],
        ),
        migrations.CreateModel(
            name='pages',
            fields=[
                ('PAGE', models.AutoField(editable=False, primary_key=True, serialize=False)),
                ('PAGE_TYPE', models.CharField(choices=[('I', 'INTRO'), ('G', 'GENERIC'), ('R', 'REFLECTION'), ('S', 'STAKEHOLDER'), ('A', 'ACTION')], max_length=2)),
                ('PAGE_TITLE', models.CharField(max_length=1000)),
                ('PAGE_BODY', models.TextField()),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('NEXT_PAGE', models.IntegerField(null=True)),
                ('X_COORDINATE', models.IntegerField()),
                ('Y_COORDINATE', models.IntegerField()),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pages1', to='tables.scenarios')),
            ],
            options={
                'unique_together': {('PAGE', 'SCENARIO')},
            },
        ),
        migrations.CreateModel(
            name='Issues',
            fields=[
                ('ISSUE', models.AutoField(default=None, editable=False, primary_key=True, serialize=False)),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('NAME', models.CharField(max_length=1000)),
                ('IMPORTANCE_SCORE', models.FloatField(validators=[django.core.validators.MinValueValidator(0.0)])),
                ('SCENARIO', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='scenario_id5', to='tables.scenarios')),
            ],
            options={
                'unique_together': {('SCENARIO', 'ISSUE', 'VERSION')},
            },
        ),
        migrations.CreateModel(
            name='conversations_had',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('SCORE', models.IntegerField()),
                ('CONVERSATION', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations_had7', to='tables.conversations')),
                ('COURSE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations_had2', to='tables.responses')),
                ('DATE_TAKEN', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations_had5', to='tables.responses')),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations_had3', to='tables.scenarios')),
                ('STAKEHOLDER', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations_had6', to='tables.stakeholders')),
                ('STUDENT', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations_had1', to='tables.students')),
            ],
        ),
        migrations.AddField(
            model_name='conversations',
            name='STAKEHOLDER',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='conversations1', to='tables.stakeholders'),
        ),
        migrations.CreateModel(
            name='actions_taken',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ACTION_PAGE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actions_taken2', to='tables.action_page')),
                ('RESPONSE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='actions_taken1', to='tables.responses')),
            ],
        ),
        migrations.AddField(
            model_name='action_page',
            name='PAGE',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='action_page1', to='tables.pages'),
        ),
        migrations.CreateModel(
            name='students_in',
            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, related_name='students_in2', to='tables.courses')),
                ('STUDENT', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='students_in1', to='tables.students')),
            ],
            options={
                'unique_together': {('STUDENT', 'COURSE')},
            },
        ),
        migrations.CreateModel(
            name='student_times',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('DATE_TAKEN', models.DateField(auto_now_add=True)),
                ('START_TIME', models.DateField(null=True)),
                ('END_TIME', models.DateField(null=True)),
                ('COURSE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_times4', to='tables.courses')),
                ('PAGE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_times5', to='tables.pages')),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_times2', to='tables.scenarios')),
                ('STUDENT', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_times1', to='tables.students')),
            ],
            options={
                'unique_together': {('STUDENT', 'SCENARIO', 'VERSION', 'COURSE', 'DATE_TAKEN', 'PAGE')},
            },
        ),
        migrations.CreateModel(
            name='stakeholder_page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('PAGE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stakeholder_page1', to='tables.pages')),
                ('STAKEHOLDER', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stakeholder_page2', to='tables.stakeholders')),
            ],
            options={
                'unique_together': {('PAGE', 'STAKEHOLDER')},
            },
        ),
        migrations.CreateModel(
            name='scenarios_for',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('COURSE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scenarios_for2', to='tables.courses')),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scenarios_for1', to='tables.scenarios')),
            ],
            options={
                'unique_together': {('SCENARIO', 'COURSE', 'VERSION')},
            },
        ),
        migrations.CreateModel(
            name='reflections_taken',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('REFLECTIONS', models.TextField()),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('COURSE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reflections_taken2', to='tables.responses')),
                ('DATE_TAKEN', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reflections_taken5', to='tables.responses')),
                ('REFLECTION_PAGE', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reflections_taken6', to='tables.pages')),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reflections_taken3', to='tables.scenarios')),
                ('STUDENT', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reflections_taken1', to='tables.students')),
            ],
            options={
                'unique_together': {('REFLECTIONS', 'STUDENT', 'COURSE', 'SCENARIO', 'VERSION', 'DATE_TAKEN')},
            },
        ),
        migrations.CreateModel(
            name='reflection_questions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('REFLECTION_QUESTION', models.TextField()),
                ('PAGE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reflection_questions1', to='tables.pages')),
            ],
            options={
                'unique_together': {('PAGE', 'REFLECTION_QUESTION')},
            },
        ),
        migrations.CreateModel(
            name='professors_teach',
            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, related_name='professors_teach2', to='tables.courses')),
                ('PROFESSOR', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='professors_teach1', to='tables.professors')),
            ],
            options={
                'unique_together': {('PROFESSOR', 'COURSE')},
            },
        ),
        migrations.CreateModel(
            name='generic_page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('BODY', models.TextField()),
                ('PAGE', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='generic_page1', to='tables.pages')),
            ],
            options={
                'unique_together': {('PAGE', 'BODY')},
            },
        ),
        migrations.CreateModel(
            name='coverage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('COVERAGE_SCORE', models.FloatField(validators=[django.core.validators.MinValueValidator(0.0)])),
                ('ISSUE', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='coverage1', to='tables.issues')),
                ('STAKEHOLDER', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='coverage2', to='tables.stakeholders')),
            ],
            options={
                'unique_together': {('STAKEHOLDER', 'ISSUE')},
            },
        ),
        migrations.AlterUniqueTogether(
            name='conversations',
            unique_together={('STAKEHOLDER', 'CONVERSATION')},
        ),
        migrations.CreateModel(
            name='assigned_to',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('VERSION', models.IntegerField(default=1, editable=False)),
                ('SCENARIO', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assigned_to2', to='tables.scenarios')),
                ('STUDENT', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assigned_to1', to='tables.students')),
            ],
            options={
                'unique_together': {('STUDENT', 'SCENARIO', 'VERSION')},
            },
        ),
        migrations.AlterUniqueTogether(
            name='action_page',
            unique_together={('PAGE', 'CHOICE')},
        ),
    ]
