zilencer: Add mechanism to update RemoteRealm when Realm is changed.

This requires a migration to allow RemoteRealmAuditLog.remote_id to be
NULL, and to add a RemoteRealmAuditLog.remote_realm.
This commit is contained in:
Mateusz Mandera
2023-11-08 20:02:10 +01:00
committed by Tim Abbott
parent 76e0511481
commit 1312c7ccd7
5 changed files with 144 additions and 13 deletions

View File

@@ -4795,6 +4795,11 @@ class AbstractRealmAuditLog(models.Model):
REMOTE_SERVER_PLAN_TYPE_CHANGED = 10204
REMOTE_SERVER_DEACTIVATED = 10201
# This value is for RemoteRealmAuditLog entries tracking changes to the
# RemoteRealm model resulting from modified realm information sent to us
# via send_analytics_to_push_bouncer.
REMOTE_REALM_VALUE_UPDATED = 20001
event_type = models.PositiveSmallIntegerField()
# event_types synced from on-prem installations to Zulip Cloud when