# Generated by Django 5.2.8 on 2026-01-06 16:19

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('adventures', '0070_collectionitineraryday'),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name='collectionitineraryitem',
            unique_together=set(),
        ),
        migrations.AddField(
            model_name='collectionitineraryitem',
            name='is_global',
            field=models.BooleanField(default=False, help_text='Applies to the whole trip (no specific date)'),
        ),
        migrations.AddConstraint(
            model_name='collectionitineraryitem',
            constraint=models.UniqueConstraint(condition=models.Q(('is_global', False), ('date__isnull', False)), fields=('collection', 'date', 'order'), name='unique_order_per_collection_day'),
        ),
        migrations.AddConstraint(
            model_name='collectionitineraryitem',
            constraint=models.UniqueConstraint(condition=models.Q(('is_global', True)), fields=('collection', 'order'), name='unique_order_per_collection_global'),
        ),
    ]
