mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 16:51:07 -05:00
54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
# Generated by Django 5.1.4 on 2025-02-10 01:10
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("contenttypes", "0002_remove_content_type_name"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="PageView",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("object_id", models.PositiveIntegerField()),
|
|
("timestamp", models.DateTimeField(auto_now_add=True, db_index=True)),
|
|
("ip_address", models.GenericIPAddressField()),
|
|
("user_agent", models.CharField(blank=True, max_length=512)),
|
|
(
|
|
"content_type",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="page_views",
|
|
to="contenttypes.contenttype",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["timestamp"], name="analytics_p_timesta_835321_idx"
|
|
),
|
|
models.Index(
|
|
fields=["content_type", "object_id"],
|
|
name="analytics_p_content_73920a_idx",
|
|
),
|
|
],
|
|
},
|
|
),
|
|
]
|