# Generated by Django 2.2.4 on 2020-01-21 11:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('portal_users', '0051_auto_20200115_1436'),
        ('organizations', '0086_disciplinecredit'),
    ]

    operations = [
        # migrations.RemoveField(
        #     model_name='disciplinecredit',
        #     name='control_form',
        # ),
        migrations.AddField(
            model_name='disciplinecredit',
            name='chosen_control_forms',
            field=models.ManyToManyField(blank=True, to='organizations.ControlForm', verbose_name='Выбранные формы контроля'),
        ),
        migrations.AlterField(
            model_name='disciplinecredit',
            name='uuid1c',
            field=models.CharField(editable=False, max_length=100, unique=True, verbose_name='Уид 1С'),
        ),
        migrations.AlterField(
            model_name='postrequisite',
            name='uuid1c',
            field=models.CharField(default='', editable=False, max_length=100, unique=True, verbose_name='Уид 1С'),
        ),
        migrations.AlterField(
            model_name='prerequisite',
            name='uuid1c',
            field=models.CharField(default='', editable=False, max_length=100, unique=True, verbose_name='Уид 1С'),
        ),
        # migrations.AlterField(
        #     model_name='teacherdiscipline',
        #     name='uuid1c',
        #     field=models.CharField(default='', editable=False, max_length=100, unique=True, verbose_name='Уид 1С'),
        # ),
        migrations.AlterUniqueTogether(
            name='postrequisite',
            unique_together=set(),
        ),
        migrations.AlterUniqueTogether(
            name='prerequisite',
            unique_together=set(),
        ),
        # migrations.AlterUniqueTogether(
        #     name='studentdiscipline',
        #     unique_together={('student', 'uuid1c')},
        # ),
        # migrations.AlterUniqueTogether(
        #     name='teacherdiscipline',
        #     unique_together=set(),
        # ),
        migrations.CreateModel(
            name='DisciplineCreditControlForm',
            fields=[
                ('uid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True, verbose_name='Уникальный идентификатор')),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('deleted', models.DateTimeField(blank=True, null=True)),
                ('control_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.ControlForm', verbose_name='Форма контроля')),
                ('discipline_credit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.DisciplineCredit', verbose_name='Кредит дисциплины')),
            ],
            options={
                'verbose_name': 'Кредит дисциплины-Форма контроля',
                'verbose_name_plural': 'Кредит дисциплины-Форма контроля',
            },
        ),
    ]
