<filename>src/diplomas/migrations/0006_DiplomaTemplateHomework.py
# Generated by Django 3.2.9 on 2021-11-26 21:26

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('diplomas', '0005_DroppedHomeworkFlagFromDiplomaTemplate'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='diplomatemplate',
            name='single diploma per course option',
        ),
        migrations.RemoveIndex(
            model_name='diplomatemplate',
            name='diplomas_di_course__b94934_idx',
        ),
        migrations.AddField(
            model_name='diplomatemplate',
            name='homework_accepted',
            field=models.BooleanField(default=False, verbose_name='This template is for students that have completed the homework'),
        ),
        migrations.AddIndex(
            model_name='diplomatemplate',
            index=models.Index(fields=['course', 'language', 'homework_accepted'], name='diplomas_di_course__02eb90_idx'),
        ),
        migrations.AddConstraint(
            model_name='diplomatemplate',
            constraint=models.UniqueConstraint(fields=('course', 'language', 'homework_accepted'), name='single diploma per course option'),
        ),
    ]

<filename>src/diplomas/migrations/0006_DiplomaTemplateHomework.py
# Generated by Django 3.2.9 on 2021-11-26 21:26

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('diplomas', '0005_DroppedHomeworkFlagFromDiplomaTemplate'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='diplomatemplate',
            name='single diploma per course option',
        ),
        migrations.RemoveIndex(
            model_name='diplomatemplate',
            name='diplomas_di_course__b94934_idx',
        ),
        migrations.AddField(
            model_name='diplomatemplate',
            name='homework_accepted',
            field=models.BooleanField(default=False, verbose_name='This template is for students that have completed the homework'),
        ),
        migrations.AddIndex(
            model_name='diplomatemplate',
            index=models.Index(fields=['course', 'language', 'homework_accepted'], name='diplomas_di_course__02eb90_idx'),
        ),
        migrations.AddConstraint(
            model_name='diplomatemplate',
            constraint=models.UniqueConstraint(fields=('course', 'language', 'homework_accepted'), name='single diploma per course option'),
        ),
    ]

# Generated by Django 3.2.9 on 2021-11-26 21:26