# Generated by Django 4.2.16 on 2024-11-22 12:06

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("ansible", "0057_collectionversion_sha256_migrate"),
    ]

    operations = [
        # ---------------------------------------------------------------------
        # In the current timeline of migrations, this step seems superfluous.
        # But in version 0.23.0 we shipped a bad version of 0056.
        # This repairs it.
        migrations.AlterUniqueTogether(
            name="collectionversion",
            unique_together={("namespace", "name", "version")},
        ),
        # ---------------------------------------------------------------------
        migrations.AddConstraint(
            model_name="collectionversion",
            constraint=models.UniqueConstraint(
                condition=models.Q(("sha256__isnull", False)),
                fields=("sha256",),
                name="unique_sha256",
            ),
        ),
    ]
