# Generated by Django 4.2.29 on 2026-06-09 16:24

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


class Migration(migrations.Migration):

    dependencies = [
        ("scrobbles", "0093_remove_scrobble_share_token_and_more"),
    ]

    operations = [
        migrations.AddField(
            model_name="scrobble",
            name="share_view_count",
            field=models.PositiveIntegerField(default=0),
        ),
        migrations.AlterField(
            model_name="scrobble",
            name="visibility",
            field=models.CharField(
                choices=[
                    ("public", "Public"),
                    ("shared", "Shared"),
                    ("private", "Private"),
                ],
                db_index=True,
                default="private",
                max_length=10,
            ),
        ),
        migrations.CreateModel(
            name="ShareViewLog",
            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"
                    ),
                ),
                ("ip_address", models.GenericIPAddressField(blank=True, null=True)),
                ("user_agent", models.TextField(blank=True, null=True)),
                ("referrer", models.URLField(blank=True, max_length=2048, null=True)),
                (
                    "scrobble",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="share_views",
                        to="scrobbles.scrobble",
                    ),
                ),
            ],
            options={
                "get_latest_by": "modified",
                "abstract": False,
            },
        ),
    ]
