User session tracking #93587

Merged
Oleg-Komarov merged 18 commits from user-session into main 2024-08-02 16:04:09 +02:00
Showing only changes of commit 1045f83da3 - Show all commits

View File

@ -17,19 +17,8 @@ class Migration(migrations.Migration):
name='UserSession', name='UserSession',
fields=[ fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)), ('id', models.BigAutoField(primary_key=True, serialize=False)),
('agent_is_trusted', models.BooleanField(default=False)),
('created_at', models.DateTimeField(auto_now_add=True)), ('created_at', models.DateTimeField(auto_now_add=True)),
('last_active_at', models.DateTimeField()), ('last_active_at', models.DateTimeField()),
('ip', models.GenericIPAddressField(blank=True, null=True)),
('user_agent', models.CharField(blank=True, max_length=255)),
(
'session',
models.OneToOneField(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
to='sessions.session',
),
),
( (
'user', 'user',
models.ForeignKey( models.ForeignKey(
@ -38,6 +27,17 @@ class Migration(migrations.Migration):
to=settings.AUTH_USER_MODEL, to=settings.AUTH_USER_MODEL,
), ),
), ),
('agent_is_trusted', models.BooleanField(default=False)),
('ip', models.GenericIPAddressField(blank=True, null=True)),
(
'session',
models.OneToOneField(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
to='sessions.session',
),
),
('user_agent', models.CharField(blank=True, max_length=255)),
], ],
), ),
] ]