# 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",
                    )
                ],
            },
        ),
    ]
