mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Add notes about StreamColor schema
(imported from commit 2ca71d63a208be1555866235a2dc631f21a0d181)
This commit is contained in:
@@ -760,6 +760,13 @@ class DefaultStream(models.Model):
|
||||
class Meta:
|
||||
unique_together = ("realm", "stream")
|
||||
|
||||
# FIXME: The foreign key relationship here is backwards.
|
||||
#
|
||||
# We can't easily get a list of streams and their associated colors (if any) in
|
||||
# a single query. See zephyr.views.gather_subscriptions for an example.
|
||||
#
|
||||
# We should change things around so that is possible. Probably this should
|
||||
# just be a column on Subscription.
|
||||
class StreamColor(models.Model):
|
||||
subscription = models.ForeignKey(Subscription)
|
||||
color = models.CharField(max_length=10)
|
||||
|
||||
Reference in New Issue
Block a user