Files
zulip/zilencer/migrations/0002_remote_zulip_server.py
Tim Abbott cddee49e75 Add support infrastructure for push notification bouncer service.
This is an incomplete cleaned-up continuation of Lisa Neigut's push
notification bouncer work.  It supports registration and
deregistration of individual push tokens with a central push
notification bouncer server.

It still is missing a few things before we can complete this effort:
* A registration form for server admins to configure their server for
  this service, with tests.
* Code (and tests) for actually bouncing the notifications.
2017-04-18 23:03:06 -07:00

42 lines
1.6 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zilencer', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='RemotePushDeviceToken',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('user_id', models.BigIntegerField()),
('kind', models.PositiveSmallIntegerField(choices=[(1, 'apns'), (2, 'gcm')])),
('token', models.CharField(unique=True, max_length=4096)),
('last_updated', models.DateTimeField(auto_now=True)),
('ios_app_id', models.TextField(null=True)),
],
),
migrations.CreateModel(
name='RemoteZulipServer',
fields=[
('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)),
('uuid', models.CharField(unique=True, max_length=36)),
('api_key', models.CharField(max_length=64)),
('hostname', models.CharField(unique=True, max_length=128)),
('contact_email', models.EmailField(max_length=254, blank=True)),
('last_updated', models.DateTimeField(verbose_name='last updated')),
],
),
migrations.AddField(
model_name='remotepushdevicetoken',
name='server',
field=models.ForeignKey(to='zilencer.RemoteZulipServer'),
),
]