# Generated by Django 5.2.9 on 2025-12-27 23:52

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


class Migration(migrations.Migration):

    dependencies = [
        ("pages", "0003_initial"),
        ("sites", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="viewhistory",
            name="kind",
            field=models.CharField(
                choices=[("site", "Site"), ("admin", "Admin")],
                db_index=True,
                default="site",
                max_length=20,
            ),
        ),
        migrations.AddField(
            model_name="viewhistory",
            name="site",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="view_history",
                to="sites.site",
            ),
        ),
        migrations.AddIndex(
            model_name="viewhistory",
            index=models.Index(
                fields=["kind", "visited_at"], name="pages_viewh_kind_8155b6_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="viewhistory",
            index=models.Index(
                fields=["site", "visited_at"], name="pages_viewh_site_id_ad75aa_idx"
            ),
        ),
    ]
