# Generated by Django 4.2.29 on 2026-03-22 17:02

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("videos", "0025_add_imdb_id_unique"),
    ]

    operations = [
        migrations.AlterField(
            model_name="video",
            name="imdb_id",
            field=models.CharField(blank=True, max_length=20, null=True),
        ),
        migrations.AddConstraint(
            model_name="video",
            constraint=models.UniqueConstraint(
                condition=models.Q(
                    models.Q(("imdb_id__isnull", True), _negated=True),
                    models.Q(("youtube_id__isnull", True), _negated=True),
                    _connector="OR",
                ),
                fields=("imdb_id", "youtube_id"),
                name="unique_imdb_or_youtube_id",
            ),
        ),
    ]
