# Generated by Django 3.2.19 on 2024-04-29 16:44

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('db', '0041_piuparts_lookup'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='is_system',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='user',
            name='email',
            field=models.EmailField(
                blank=True, max_length=254, verbose_name='email address'
            ),
        ),
        migrations.AddConstraint(
            model_name='user',
            constraint=models.CheckConstraint(
                check=models.Q(
                    ('is_system', False), ('email', ''), _connector='OR'
                ),
                name='db_user_non_system_email',
            ),
        ),
        migrations.AddConstraint(
            model_name='user',
            constraint=models.UniqueConstraint(
                condition=models.Q(('is_system', False)),
                fields=('email',),
                name='db_user_unique_email',
            ),
        ),
    ]
