# Generated by Django 4.2.29 on 2026-06-19 16:25

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("charts", "0002_chartrecord_charts_char_user_id_1adcde_idx_and_more"),
    ]

    operations = [
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("artist__isnull", False)),
                fields=("user", "year", "month", "week", "day", "artist"),
                name="unique_chart_artist_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("album__isnull", False)),
                fields=("user", "year", "month", "week", "day", "album"),
                name="unique_chart_album_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("track__isnull", False)),
                fields=("user", "year", "month", "week", "day", "track"),
                name="unique_chart_track_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("tv_series__isnull", False)),
                fields=("user", "year", "month", "week", "day", "tv_series"),
                name="unique_chart_tv_series_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("video__isnull", False)),
                fields=("user", "year", "month", "week", "day", "video"),
                name="unique_chart_video_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("podcast__isnull", False)),
                fields=("user", "year", "month", "week", "day", "podcast"),
                name="unique_chart_podcast_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("podcast_episode__isnull", False)),
                fields=("user", "year", "month", "week", "day", "podcast_episode"),
                name="unique_chart_podcast_episode_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("board_game__isnull", False)),
                fields=("user", "year", "month", "week", "day", "board_game"),
                name="unique_chart_board_game_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("trail__isnull", False)),
                fields=("user", "year", "month", "week", "day", "trail"),
                name="unique_chart_trail_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("geo_location__isnull", False)),
                fields=("user", "year", "month", "week", "day", "geo_location"),
                name="unique_chart_geo_location_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("food__isnull", False)),
                fields=("user", "year", "month", "week", "day", "food"),
                name="unique_chart_food_period",
            ),
        ),
        migrations.AddConstraint(
            model_name="chartrecord",
            constraint=models.UniqueConstraint(
                condition=models.Q(("book__isnull", False)),
                fields=("user", "year", "month", "week", "day", "book"),
                name="unique_chart_book_period",
            ),
        ),
    ]
