# Generated by Django 3.1.4 on 2020-12-23 18:42

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


class Migration(migrations.Migration):

    dependencies = [
        ("visitors", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="VisitorLog",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("session_key", models.CharField(blank=True, max_length=40)),
                ("http_method", models.CharField(max_length=10)),
                ("request_uri", models.URLField()),
                ("remote_addr", models.CharField(max_length=100)),
                ("query_string", models.TextField(blank=True)),
                ("http_user_agent", models.TextField()),
                ("http_referer", models.TextField()),
                ("timestamp", models.DateTimeField(default=django.utils.timezone.now)),
                (
                    "visitor",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="visits",
                        to="visitors.visitor",
                    ),
                ),
            ],
        ),
    ]
