# Generated by Django 4.2.10 on 2024-03-06 07:58

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("documents", "0002_documentmodelrelationship_primary_and_more"),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name="documentmodelrelationship",
            unique_together=set(),
        ),
        migrations.AddConstraint(
            model_name="documentmodelrelationship",
            constraint=models.UniqueConstraint(
                condition=models.Q(("primary", True)),
                fields=("content_type", "object_id"),
                name="unique_primary_relationship",
            ),
        ),
        migrations.AddConstraint(
            model_name="documentmodelrelationship",
            constraint=models.UniqueConstraint(
                fields=("document", "content_type", "object_id"), name="unique_relationship"
            ),
        ),
    ]
