# Generated by Django 4.0.2 on 2022-03-12 02:51

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('events', '0006_event_unique_kennel_event'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='attend',
            name='attend_not_claimed_and_unclaimed',
        ),
        migrations.RemoveConstraint(
            model_name='attend',
            name='unique_claimed_attend',
        ),
        migrations.RemoveConstraint(
            model_name='attend',
            name='unique_unclaimed_attend',
        ),
        migrations.RenameField(
            model_name='attend',
            old_name='alt_name',
            new_name='unclaimed_name',
        ),
        migrations.AddConstraint(
            model_name='attend',
            constraint=models.CheckConstraint(check=models.Q(('unclaimed_name__isnull', True), ('user__isnull', False)), name='attend_not_claimed_and_unclaimed'),
        ),
        migrations.AddConstraint(
            model_name='attend',
            constraint=models.UniqueConstraint(condition=models.Q(('unclaimed_name__isnull', True)), fields=('event', 'user'), name='unique_claimed_attend'),
        ),
        migrations.AddConstraint(
            model_name='attend',
            constraint=models.UniqueConstraint(condition=models.Q(('user__isnull', True)), fields=('event', 'unclaimed_name'), name='unique_unclaimed_attend'),
        ),
    ]

# Generated by Django 4.0.2 on 2022-03-12 02:51

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('events', '0006_event_unique_kennel_event'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='attend',
            name='attend_not_claimed_and_unclaimed',
        ),
        migrations.RemoveConstraint(
            model_name='attend',
            name='unique_claimed_attend',
        ),
        migrations.RemoveConstraint(
            model_name='attend',
            name='unique_unclaimed_attend',
        ),
        migrations.RenameField(
            model_name='attend',
            old_name='alt_name',
            new_name='unclaimed_name',
        ),
        migrations.AddConstraint(
            model_name='attend',
            constraint=models.CheckConstraint(check=models.Q(('unclaimed_name__isnull', True), ('user__isnull', False)), name='attend_not_claimed_and_unclaimed'),
        ),
        migrations.AddConstraint(
            model_name='attend',
            constraint=models.UniqueConstraint(condition=models.Q(('unclaimed_name__isnull', True)), fields=('event', 'user'), name='unique_claimed_attend'),
        ),
        migrations.AddConstraint(
            model_name='attend',
            constraint=models.UniqueConstraint(condition=models.Q(('user__isnull', True)), fields=('event', 'unclaimed_name'), name='unique_unclaimed_attend'),
        ),
    ]

# Generated by Django 4.0.2 on 2022-03-12 02:51