# Generated by Django 3.2.8 on 2021-11-07 17:24

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0020_pdf_file_person_optional'),
        ('evalu', '0006_key_pair'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='doneevaluation',
            name='registration_group_evaluated_by_site_unique',
        ),
        migrations.RemoveField(
            model_name='doneevaluation',
            name='registration',
        ),
        migrations.RemoveField(
            model_name='evaluationresult',
            name='registration',
        ),
        migrations.AlterField(
            model_name='doneevaluation',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='done_evaluations', to='evalu.evaluationgroup', verbose_name='Evaluation group'),
        ),
        migrations.AlterField(
            model_name='evaluationgroup',
            name='registration',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='groups', to='evalu.evaluationregistration', verbose_name='Evaluated person'),
        ),
        migrations.AlterField(
            model_name='evaluationitem',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='evalu.evaluationpart', verbose_name='Evaluation part'),
        ),
        migrations.AlterField(
            model_name='evaluationregistration',
            name='person',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation_registrations', to='core.person', verbose_name='Evaluated person'),
        ),
        migrations.AlterField(
            model_name='evaluationresult',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='evalu.evaluationgroup', verbose_name='Evaluation group'),
        ),
        migrations.AddConstraint(
            model_name='doneevaluation',
            constraint=models.UniqueConstraint(fields=('group', 'evaluated_by'),
                                               name='group_evaluated_by_site_unique'),
        ),
    ]
