2016-11-03 18:49:00 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
2017-06-01 10:44:16 +02:00
|
|
|
import django.db.models.deletion
|
2016-11-03 18:49:00 +01:00
|
|
|
from django.conf import settings
|
|
|
|
import zerver.lib.str_utils
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
('zerver', '0043_realm_filter_validators'),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Reaction',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
2017-06-01 10:44:16 +02:00
|
|
|
('user_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
|
|
('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Message')),
|
2016-11-03 18:49:00 +01:00
|
|
|
('emoji_name', models.TextField()),
|
|
|
|
],
|
|
|
|
bases=(zerver.lib.str_utils.ModelReprMixin, models.Model),
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='reaction',
|
|
|
|
unique_together=set([('user_profile', 'message', 'emoji_name')]),
|
|
|
|
),
|
|
|
|
]
|