# Generated by Django 5.2.11

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


class Migration(migrations.Migration):

    dependencies = [
        ("conversations", "0015_add_compaction_fields"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="conversation",
            name="chat_type_mutual_exclusivity_constraint",
        ),
        migrations.AddConstraint(
            model_name="conversation",
            constraint=models.CheckConstraint(
                condition=(
                    django.db.models.Q(conversation_type="thread")
                    | (
                        django.db.models.Q(chat_with_corpus__isnull=True)
                        | django.db.models.Q(chat_with_document__isnull=True)
                    )
                ),
                name="chat_type_mutual_exclusivity_constraint",
            ),
        ),
    ]
