<gh_stars>0
# Generated by Django 3.0.8 on 2020-07-18 22:16

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0005_auto_20200718_2132'),
        ('admission', '0001_initial'),
        ('subjects', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='GroupSubjects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('semester', models.CharField(choices=[('1', '1st'), ('2', '2nd'), ('3', '3rd'), ('4', '4th'), ('5', '5th'), ('6', '6th'), ('7', '7th'), ('8', '8th')], max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('code', models.CharField(max_length=10)),
                ('avarageScore', models.IntegerField(default=0)),
                ('phone', models.CharField(max_length=15)),
                ('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StudyGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=10)),
                ('field', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admission.Field')),
                ('subjects', models.ManyToManyField(related_name='study_groups', through='student.GroupSubjects', to='subjects.Subject')),
            ],
        ),
        migrations.CreateModel(
            name='StudentSubjects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('semester', models.CharField(choices=[('1', '1st'), ('2', '2nd'), ('3', '3rd'), ('4', '4th'), ('5', '5th'), ('6', '6th'), ('7', '7th'), ('8', '8th')], max_length=1)),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_subjects', to='student.Student')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_subjects', to='subjects.Subject')),
            ],
        ),
        migrations.AddField(
            model_name='student',
            name='studyGroup',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.StudyGroup'),
        ),
        migrations.AddField(
            model_name='student',
            name='subjects',
            field=models.ManyToManyField(related_name='students', through='student.StudentSubjects', to='subjects.Subject'),
        ),
        migrations.AddField(
            model_name='groupsubjects',
            name='professor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.Student'),
        ),
        migrations.AddField(
            model_name='groupsubjects',
            name='study_group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_subjects', to='student.StudyGroup'),
        ),
        migrations.AddField(
            model_name='groupsubjects',
            name='subject',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_subjects', to='subjects.Subject'),
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.IntegerField()),
                ('studentSubject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.StudentSubjects')),
            ],
        ),
    ]

# Generated by Django 3.0.8 on 2020-07-18 22:16

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0005_auto_20200718_2132'),
        ('admission', '0001_initial'),
        ('subjects', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='GroupSubjects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('semester', models.CharField(choices=[('1', '1st'), ('2', '2nd'), ('3', '3rd'), ('4', '4th'), ('5', '5th'), ('6', '6th'), ('7', '7th'), ('8', '8th')], max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('code', models.CharField(max_length=10)),
                ('avarageScore', models.IntegerField(default=0)),
                ('phone', models.CharField(max_length=15)),
                ('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StudyGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=10)),
                ('field', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admission.Field')),
                ('subjects', models.ManyToManyField(related_name='study_groups', through='student.GroupSubjects', to='subjects.Subject')),
            ],
        ),
        migrations.CreateModel(
            name='StudentSubjects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('semester', models.CharField(choices=[('1', '1st'), ('2', '2nd'), ('3', '3rd'), ('4', '4th'), ('5', '5th'), ('6', '6th'), ('7', '7th'), ('8', '8th')], max_length=1)),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_subjects', to='student.Student')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_subjects', to='subjects.Subject')),
            ],
        ),
        migrations.AddField(
            model_name='student',
            name='studyGroup',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.StudyGroup'),
        ),
        migrations.AddField(
            model_name='student',
            name='subjects',
            field=models.ManyToManyField(related_name='students', through='student.StudentSubjects', to='subjects.Subject'),
        ),
        migrations.AddField(
            model_name='groupsubjects',
            name='professor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.Student'),
        ),
        migrations.AddField(
            model_name='groupsubjects',
            name='study_group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_subjects', to='student.StudyGroup'),
        ),
        migrations.AddField(
            model_name='groupsubjects',
            name='subject',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_subjects', to='subjects.Subject'),
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.IntegerField()),
                ('studentSubject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student.StudentSubjects')),
            ],
        ),
    ]
# Generated by Django 3.0.8 on 2020-07-18 22:16