# Generated by Django 5.1.7 on 2025-03-16 19:12

import accrete.contrib.user.models
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('user', '0003_alter_user_email'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='login',
            field=models.CharField(max_length=254, null=True, unique=True, validators=[accrete.contrib.user.models.validate_member_login], verbose_name='Login'),
        ),
        migrations.AlterField(
            model_name='user',
            name='email',
            field=models.EmailField(max_length=254, null=True, unique=True, verbose_name='Email Address'),
        ),
        migrations.AddConstraint(
            model_name='user',
            constraint=models.CheckConstraint(condition=models.Q(('email__isnull', False), ('login__isnull', False), _connector='XOR'), name='email_or_login_set', violation_error_message='email or login must be set'),
        ),
    ]
