# Generated by Django 5.2.4 on 2025-09-17 22:45

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("core", "0028_emailinbox_group_alter_emailinbox_user"),
    ]

    operations = [
        migrations.RenameModel(
            old_name="ChatProfile",
            new_name="AssistantProfile",
        ),
        migrations.AlterModelOptions(
            name="assistantprofile",
            options={
                "verbose_name": "Assistant Profile",
                "verbose_name_plural": "Assistant Profiles",
            },
        ),
        migrations.RemoveConstraint(
            model_name="assistantprofile",
            name="chatprofile_requires_owner",
        ),
        migrations.AddConstraint(
            model_name="assistantprofile",
            constraint=models.CheckConstraint(
                condition=models.Q(
                    models.Q(("user__isnull", False), ("group__isnull", True)),
                    models.Q(("user__isnull", True), ("group__isnull", False)),
                    _connector="OR",
                ),
                name="assistantprofile_requires_owner",
            ),
        ),
        migrations.AlterModelTable(
            name="assistantprofile",
            table="workgroup_assistantprofile",
        ),
    ]
