38 lines
1.6 KiB
Python
38 lines
1.6 KiB
Python
# Generated by Django 6.0 on 2026-01-03 20:40
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='AccessLog',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('username', models.CharField(max_length=150)),
|
|
('method', models.CharField(max_length=10)),
|
|
('path', models.CharField(max_length=2048)),
|
|
('timestamp', models.DateTimeField(auto_now_add=True)),
|
|
('ip_address', models.GenericIPAddressField(blank=True, null=True)),
|
|
('created_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
|
|
('updated_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Access Log',
|
|
'verbose_name_plural': 'Access Logs',
|
|
'ordering': ['-timestamp'],
|
|
},
|
|
),
|
|
]
|