mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This fixes a missing unique constraint on the Reactions data model state when using multiple aliases for an emoji code. As with any missing unique constraints, we first need to apply a migration that eliminates violations of the rule; in this case, deleting the duplicates is correct. Added unique constraint for "user_profile", "message", "reaction_type", "emoji_code". Fixes #15347.
		
			
				
	
	
		
			22 lines
		
	
	
		
			666 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			666 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# Generated by Django 2.2.13 on 2020-06-19 08:16
 | 
						|
 | 
						|
from django.db import migrations
 | 
						|
 | 
						|
 | 
						|
class Migration(migrations.Migration):
 | 
						|
 | 
						|
    dependencies = [
 | 
						|
        ('zerver', '0287_clear_duplicate_reactions'),
 | 
						|
    ]
 | 
						|
 | 
						|
    operations = [
 | 
						|
        migrations.AlterUniqueTogether(
 | 
						|
            name='archivedreaction',
 | 
						|
            unique_together={('user_profile', 'message', 'emoji_name'), ('user_profile', 'message', 'reaction_type', 'emoji_code')},
 | 
						|
        ),
 | 
						|
        migrations.AlterUniqueTogether(
 | 
						|
            name='reaction',
 | 
						|
            unique_together={('user_profile', 'message', 'emoji_name'), ('user_profile', 'message', 'reaction_type', 'emoji_code')},
 | 
						|
        ),
 | 
						|
    ]
 |