# Generated by Django 4.2.11 on 2024-06-05 16:51

from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
    dependencies = [
        ("paperless_mail", "0023_remove_mailrule_filter_attachment_filename_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="mailrule",
            name="name",
            field=models.CharField(max_length=256, verbose_name="name"),
        ),
        migrations.AddConstraint(
            model_name="mailrule",
            constraint=models.UniqueConstraint(
                fields=("name", "owner"),
                name="paperless_mail_mailrule_unique_name_owner",
            ),
        ),
        migrations.AddConstraint(
            model_name="mailrule",
            constraint=models.UniqueConstraint(
                condition=models.Q(("owner__isnull", True)),
                fields=("name",),
                name="paperless_mail_mailrule_name_unique",
            ),
        ),
    ]
