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
|
2017-11-16 00:44:00 +01:00
|
|
|
from django.db import migrations, models
|
2016-11-03 18:49:00 +01:00
|
|
|
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2016-11-03 18:49:00 +01:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
2021-02-12 08:20:45 +01:00
|
|
|
("zerver", "0043_realm_filter_validators"),
|
2016-11-03 18:49:00 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="Reaction",
|
2016-11-03 18:49:00 +01:00
|
|
|
fields=[
|
2021-02-12 08:19:30 +01:00
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"id",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.AutoField(
|
2021-02-12 08:20:45 +01:00
|
|
|
verbose_name="ID", serialize=False, auto_created=True, primary_key=True
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"user_profile",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2021-02-12 08:20:45 +01:00
|
|
|
"message",
|
2021-02-12 08:19:30 +01:00
|
|
|
models.ForeignKey(
|
2021-02-12 08:20:45 +01:00
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="zerver.Message"
|
2021-02-12 08:19:30 +01:00
|
|
|
),
|
|
|
|
),
|
2021-02-12 08:20:45 +01:00
|
|
|
("emoji_name", models.TextField()),
|
2016-11-03 18:49:00 +01:00
|
|
|
],
|
2018-05-16 04:11:22 +02:00
|
|
|
bases=(models.Model,),
|
2016-11-03 18:49:00 +01:00
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2021-02-12 08:20:45 +01:00
|
|
|
name="reaction",
|
|
|
|
unique_together={("user_profile", "message", "emoji_name")},
|
2016-11-03 18:49:00 +01:00
|
|
|
),
|
|
|
|
]
|