fix: add device_name field to WebPushSubscription model
This commit is contained in:
parent
37376fecf4
commit
c8dd32ce8e
18
backend/notifications/migrations/0006_add_device_name.py
Normal file
18
backend/notifications/migrations/0006_add_device_name.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.4 on 2026-01-05 11:40
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('notifications', '0005_add_web_push_subscription'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='webpushsubscription',
|
||||
name='device_name',
|
||||
field=models.CharField(blank=True, default='', help_text='iOS Device, Windows (Chrome), macOS (Safari), и т.д.', max_length=255, verbose_name='Название устройства'),
|
||||
),
|
||||
]
|
||||
@ -466,6 +466,14 @@ class WebPushSubscription(models.Model):
|
||||
)
|
||||
|
||||
# Информация о браузере/устройстве
|
||||
device_name = models.CharField(
|
||||
max_length=255,
|
||||
blank=True,
|
||||
default='',
|
||||
verbose_name='Название устройства',
|
||||
help_text='iOS Device, Windows (Chrome), macOS (Safari), и т.д.'
|
||||
)
|
||||
|
||||
user_agent = models.TextField(
|
||||
blank=True,
|
||||
verbose_name='User Agent',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user