# Generated by Django 5.2.14 on 2026-06-20 02:40

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


class Migration(migrations.Migration):

    dependencies = [
        ("annotations", "0097_corpusreference_idx_corpusref_analysis_provis"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddConstraint(
            model_name="authoritykeyequivalence",
            constraint=models.CheckConstraint(
                condition=models.Q(("from_key", models.F("to_key")), _negated=True),
                name="authority_key_equiv_no_self_reference",
                violation_error_message="An authority key cannot be equivalent to itself (from_key must differ from to_key).",
            ),
        ),
    ]
