# Generated by Django 4.2.29 on 2026-03-21 19:34

import django.db.models.deletion
import django_extensions.db.fields
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("boardgames", "0013_boardgame_publishers"),
        ("locations", "0008_remove_geolocation_run_time_seconds_and_more"),
        ("podcasts", "0018_remove_podcastepisode_run_time_seconds_and_more"),
        ("music", "0029_remove_track_run_time_seconds_and_more"),
        ("videos", "0025_add_imdb_id_unique"),
        ("trails", "0006_remove_trail_run_time_seconds_and_more"),
        ("books", "0033_alter_book_issue_number_alter_book_volume_number"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("foods", "0005_food_nutrition_and_sources"),
    ]

    operations = [
        migrations.CreateModel(
            name="ChartRecord",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                ("year", models.IntegerField()),
                ("month", models.IntegerField(blank=True, null=True)),
                ("week", models.IntegerField(blank=True, null=True)),
                ("day", models.IntegerField(blank=True, null=True)),
                ("rank", models.IntegerField()),
                ("count", models.IntegerField(default=0)),
                (
                    "album",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="music.album",
                    ),
                ),
                (
                    "artist",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="music.artist",
                    ),
                ),
                (
                    "board_game",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="boardgames.boardgame",
                    ),
                ),
                (
                    "book",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="books.book",
                    ),
                ),
                (
                    "food",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="foods.food",
                    ),
                ),
                (
                    "geo_location",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="locations.geolocation",
                    ),
                ),
                (
                    "podcast",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="podcasts.podcast",
                    ),
                ),
                (
                    "podcast_episode",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="podcasts.podcastepisode",
                    ),
                ),
                (
                    "track",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="music.track",
                    ),
                ),
                (
                    "trail",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="trails.trail",
                    ),
                ),
                (
                    "tv_series",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="videos.series",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "video",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="videos.video",
                    ),
                ),
            ],
            options={
                "indexes": [
                    models.Index(
                        fields=["user", "year", "artist", "rank"],
                        name="charts_char_user_id_dc09e6_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "album", "rank"],
                        name="charts_char_user_id_218be5_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "track", "rank"],
                        name="charts_char_user_id_db95f8_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "tv_series", "rank"],
                        name="charts_char_user_id_2a16e9_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "video", "rank"],
                        name="charts_char_user_id_717866_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "podcast", "rank"],
                        name="charts_char_user_id_c79e3b_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "board_game", "rank"],
                        name="charts_char_user_id_73fbd2_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "trail", "rank"],
                        name="charts_char_user_id_ad3c30_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "geo_location", "rank"],
                        name="charts_char_user_id_245e01_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "food", "rank"],
                        name="charts_char_user_id_f9fe30_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "book", "rank"],
                        name="charts_char_user_id_e0321e_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "week", "artist", "rank"],
                        name="charts_char_user_id_18f06e_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "week", "tv_series", "rank"],
                        name="charts_char_user_id_8dcc60_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "month", "artist", "rank"],
                        name="charts_char_user_id_3ef8c3_idx",
                    ),
                    models.Index(
                        fields=["user", "year", "month", "tv_series", "rank"],
                        name="charts_char_user_id_dd54d7_idx",
                    ),
                ],
            },
        ),
    ]
