# Generated by Django 4.2.3 on 2023-07-07 00:16

import django.db.models.functions.text
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("users", "0008_user_at_least_one_login_method"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="user",
            name="unique_mastodon_username",
        ),
        migrations.RemoveConstraint(
            model_name="user",
            name="unique_mastodon_id",
        ),
        migrations.AddConstraint(
            model_name="user",
            constraint=models.UniqueConstraint(
                django.db.models.functions.text.Lower("email"), name="unique_email"
            ),
        ),
        migrations.AddConstraint(
            model_name="user",
            constraint=models.UniqueConstraint(
                django.db.models.functions.text.Lower("username"),
                name="unique_username",
            ),
        ),
        migrations.AddConstraint(
            model_name="user",
            constraint=models.UniqueConstraint(
                django.db.models.functions.text.Lower("mastodon_username"),
                django.db.models.functions.text.Lower("mastodon_site"),
                name="unique_mastodon_username",
            ),
        ),
        migrations.AddConstraint(
            model_name="user",
            constraint=models.UniqueConstraint(
                django.db.models.functions.text.Lower("mastodon_id"),
                django.db.models.functions.text.Lower("mastodon_site"),
                name="unique_mastodon_id",
            ),
        ),
    ]
