mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	Delete unused old StreamColor model.
This commit is contained in:
		
							
								
								
									
										21
									
								
								zerver/migrations/0010_delete_streamcolor.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								zerver/migrations/0010_delete_streamcolor.py
									
									
									
									
									
										Normal 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', | ||||
|         ), | ||||
|     ] | ||||
| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user