Debian Codegraph @

push_notifications/migrations/0006_webpushdevice.py

raw
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from django.db import migrations, models
5 from django.conf import settings
6
7
8 class Migration(migrations.Migration):
9
10 dependencies = [
11 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12 ('push_notifications', '0005_applicationid'),
13 ]
14
15 operations = [
16 migrations.CreateModel(
17 name='WebPushDevice',
18 fields=[
19 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
20 ('name', models.CharField(max_length=255, null=True, verbose_name='Name', blank=True)),
21 ('active', models.BooleanField(default=True, help_text='Inactive devices will not be sent notifications', verbose_name='Is active')),
22 ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Creation date', null=True)),
23 ('application_id', models.CharField(help_text='Opaque application identity, should be filled in for multiple key/certificate access', max_length=64, null=True, verbose_name='Application ID', blank=True)),
24 ('registration_id', models.TextField(verbose_name='Registration ID')),
25 ('p256dh', models.CharField(max_length=88, verbose_name='User public encryption key')),
26 ('auth', models.CharField(max_length=24, verbose_name='User auth secret')),
27 ('browser', models.CharField(default='CHROME', help_text='Currently only support to Chrome, Firefox and Opera browsers', max_length=10, verbose_name='Browser', choices=[('CHROME', 'Chrome'), ('FIREFOX', 'Firefox'), ('OPERA', 'Opera')])),
28 ('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE)),
29 ],
30 options={
31 'verbose_name': 'WebPush device',
32 },
33 ),
34 ]