mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
This commit adds a `RemotePushDevice` model where each row corresponds to an account on an install of the app registered to receive mobile push notifications.
48 lines
1.7 KiB
Python
48 lines
1.7 KiB
Python
# Generated by Django 5.2.3 on 2025-06-24 07:49
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("zerver", "0725_realmuserdefault_web_left_sidebar_unreads_count_summary_and_more"),
|
|
("zilencer", "0001_squashed_0064_remotezulipserver_last_merge_base"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="RemotePushDevice",
|
|
fields=[
|
|
("device_id", models.BigAutoField(primary_key=True, serialize=False)),
|
|
("token", models.CharField(max_length=4096)),
|
|
("token_kind", models.PositiveSmallIntegerField(choices=[(1, "APNs"), (2, "FCM")])),
|
|
("push_account_id", models.BigIntegerField()),
|
|
("expired_time", models.DateTimeField(null=True)),
|
|
("ios_app_id", models.TextField(null=True)),
|
|
(
|
|
"realm",
|
|
models.ForeignKey(
|
|
null=True, on_delete=django.db.models.deletion.CASCADE, to="zerver.realm"
|
|
),
|
|
),
|
|
(
|
|
"remote_realm",
|
|
models.ForeignKey(
|
|
null=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
to="zilencer.remoterealm",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"constraints": [
|
|
models.UniqueConstraint(
|
|
fields=("push_account_id", "token"),
|
|
name="unique_remote_push_device_push_account_id_token",
|
|
)
|
|
],
|
|
},
|
|
),
|
|
]
|