# Generated by Django 5.1.3 on 2024-11-15 07:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('albums', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BlocklistIP',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.CharField(max_length=40, unique=True)),
            ],
            options={
                'verbose_name': 'Blocklisted IP',
                'verbose_name_plural': 'Blocklisted IPs',
                'db_table': 'hitcount_blocklist_ip',
            },
        ),
        migrations.CreateModel(
            name='BlocklistUserAgent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_agent', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'verbose_name': 'Blocklisted User Agent',
                'verbose_name_plural': 'Blocklisted User Agents',
                'db_table': 'hitcount_blocklist_user_agent',
            },
        ),
        migrations.CreateModel(
            name='FileHit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('ip', models.CharField(db_index=True, editable=False, max_length=40)),
                ('session', models.CharField(db_index=True, editable=False, max_length=40)),
                ('user_agent', models.CharField(editable=False, max_length=255)),
            ],
            options={
                'verbose_name': 'hit',
                'verbose_name_plural': 'hits',
                'ordering': ('-created',),
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TagHit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('ip', models.CharField(db_index=True, editable=False, max_length=40)),
                ('session', models.CharField(db_index=True, editable=False, max_length=40)),
                ('user_agent', models.CharField(editable=False, max_length=255)),
            ],
            options={
                'verbose_name': 'hit',
                'verbose_name_plural': 'hits',
                'ordering': ('-created',),
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AlbumHit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('ip', models.CharField(db_index=True, editable=False, max_length=40)),
                ('session', models.CharField(db_index=True, editable=False, max_length=40)),
                ('user_agent', models.CharField(editable=False, max_length=255)),
                ('content_object', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hits', to='albums.album')),
            ],
            options={
                'verbose_name': 'hit',
                'verbose_name_plural': 'hits',
                'ordering': ('-created',),
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
    ]
