# Generated by Django 5.2 on 2025-07-26 18:50

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("lamindb", "0116_remove_artifact_unique_artifact_storage_key_hash_and_more"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="artifact",
            name="unique_artifact_storage_key_hash",
        ),
        migrations.AddConstraint(
            model_name="artifact",
            constraint=models.UniqueConstraint(
                condition=models.Q(("key__isnull", False)),
                fields=("storage", "key", "hash"),
                name="unique_artifact_storage_key_hash_not_null",
            ),
        ),
        migrations.AddConstraint(
            model_name="artifact",
            constraint=models.UniqueConstraint(
                condition=models.Q(("key__isnull", True)),
                fields=("storage", "hash"),
                name="unique_artifact_storage_hash_null_key",
            ),
        ),
    ]
