# Generated by Django 5.2.11

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("agents", "0008_add_thread_message_triggers"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="agentconfiguration",
            name="agent_scope_corpus_consistency",
        ),
        migrations.AddConstraint(
            model_name="agentconfiguration",
            constraint=models.CheckConstraint(
                condition=(
                    models.Q(scope="GLOBAL", corpus__isnull=True)
                    | models.Q(scope="CORPUS", corpus__isnull=False)
                ),
                name="agent_scope_corpus_consistency",
            ),
        ),
    ]
