Delete unused old StreamColor model.

This commit is contained in:
Tim Abbott
2016-04-08 13:06:04 -07:00
parent 877b4af24a
commit b61d73fc93
2 changed files with 21 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('zerver', '0009_add_missing_migrations'),
]
operations = [
migrations.RemoveField(
model_name='streamcolor',
name='subscription',
),
migrations.DeleteModel(
name='StreamColor',
),
]

View File

@@ -1293,19 +1293,6 @@ class DefaultStream(models.Model):
class Meta(object):
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 zerver.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):
DEFAULT_STREAM_COLOR = "#c2c2c2"
subscription = models.ForeignKey(Subscription)
color = models.CharField(max_length=10)
class Referral(models.Model):
user_profile = models.ForeignKey(UserProfile)
email = models.EmailField(blank=False, null=False)