Files
zulip/zilencer/migrations/0033_remoterealm.py
Mateusz Mandera 76e0511481 zilencer: Add new model RemoteRealm and send the data to the bouncer.
Add the new model for recording basic information about Realms on remote
server, to go with the other analytics data. Also adds necessary changes
to the bouncer endpoint and the send_analytics_to_push_bouncer()
function to submit such Realm information.
2023-11-08 15:54:22 -08:00

39 lines
1.4 KiB
Python

# Generated by Django 4.2.6 on 2023-11-02 23:22
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zilencer", "0032_remotepushdevicetoken_backfill_ios_app_id"),
]
operations = [
migrations.CreateModel(
name="RemoteRealm",
fields=[
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
("uuid", models.UUIDField(unique=True)),
("uuid_owner_secret", models.TextField()),
("host", models.TextField()),
("last_updated", models.DateTimeField(auto_now=True, verbose_name="last updated")),
("registration_deactivated", models.BooleanField(default=False)),
("realm_deactivated", models.BooleanField(default=False)),
("realm_date_created", models.DateTimeField()),
("plan_type", models.PositiveSmallIntegerField(db_index=True, default=1)),
(
"server",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="zilencer.remotezulipserver"
),
),
],
),
]