Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

streams: Remove is_in_zephyr_realm field from database.

Anders Kaseorg1fdb81b6f80c
diff --git a/zerver/migrations/0752_remove_stream_is_in_zephyr_realm.py b/zerver/migrations/0752_remove_stream_is_in_zephyr_realm.py
new file mode 100644
index 00000000000..a8959bd806e
--- /dev/null
+++ b/zerver/migrations/0752_remove_stream_is_in_zephyr_realm.py
@@ -0,0 +1,16 @@
+# Generated by Django 5.2.6 on 2025-09-08 21:01
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("zerver", "0751_externalauthid_zerver_user_externalauth_uniq"),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name="stream",
+ name="is_in_zephyr_realm",
+ ),
+ ]
diff --git a/zerver/models/streams.py b/zerver/models/streams.py
index 28b3d7e905c..d7aa6802e2c 100644
--- a/zerver/models/streams.py
+++ b/zerver/models/streams.py
@@ -108,16 +108,6 @@ class Stream(models.Model):
SystemGroups.MODERATORS: STREAM_POST_POLICY_MODERATORS,
}
- # The unique thing about Zephyr public streams is that we never list their
- # users. We may try to generalize this concept later, but for now
- # we just use a concrete field. (Zephyr public streams aren't exactly like
- # invite-only streams--while both are private in terms of listing users,
- # for Zephyr we don't even list users to stream members, yet membership
- # is more public in the sense that you don't need a Zulip invite to join.
- # This field is populated directly from UserProfile.is_zephyr_mirror_realm,
- # and the reason for denormalizing field is performance.
- is_in_zephyr_realm = models.BooleanField(default=False)
-
# For old messages being automatically deleted.
# Value NULL means "use retention policy of the realm".
# Value -1 means "disable retention policy for this stream unconditionally".
@@ -263,7 +253,6 @@ class Stream(models.Model):
# Stream fields included whenever a Stream object is provided to
# Zulip clients via the API. A few details worth noting:
# * "id" is represented as "stream_id" in most API interfaces.
- # * is_in_zephyr_realm is a backend-only optimization.
# * "deactivated" streams are filtered from the API entirely.
# * "realm" and "recipient" are not exposed to clients via the API.
API_FIELDS = [