2021-03-16 19:57:23 +00:00
|
|
|
# Generated by Django 3.0.7 on 2021-03-16 19:50
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2021-03-16 19:59:25 +00:00
|
|
|
("bookwyrm", "0050_auto_20210313_0030"),
|
2021-03-16 19:57:23 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.RemoveConstraint(
|
2021-03-16 19:59:25 +00:00
|
|
|
model_name="notification",
|
|
|
|
name="notification_type_valid",
|
2021-03-16 19:57:23 +00:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2021-03-16 19:59:25 +00:00
|
|
|
model_name="notification",
|
|
|
|
name="related_report",
|
|
|
|
field=models.ForeignKey(
|
|
|
|
null=True,
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
to="bookwyrm.Report",
|
|
|
|
),
|
2021-03-16 19:57:23 +00:00
|
|
|
),
|
|
|
|
migrations.AlterField(
|
2021-03-16 19:59:25 +00:00
|
|
|
model_name="notification",
|
|
|
|
name="notification_type",
|
|
|
|
field=models.CharField(
|
|
|
|
choices=[
|
|
|
|
("FAVORITE", "Favorite"),
|
|
|
|
("REPLY", "Reply"),
|
|
|
|
("MENTION", "Mention"),
|
|
|
|
("TAG", "Tag"),
|
|
|
|
("FOLLOW", "Follow"),
|
|
|
|
("FOLLOW_REQUEST", "Follow Request"),
|
|
|
|
("BOOST", "Boost"),
|
|
|
|
("IMPORT", "Import"),
|
|
|
|
("ADD", "Add"),
|
|
|
|
("REPORT", "Report"),
|
|
|
|
],
|
|
|
|
max_length=255,
|
|
|
|
),
|
2021-03-16 19:57:23 +00:00
|
|
|
),
|
|
|
|
migrations.AddConstraint(
|
2021-03-16 19:59:25 +00:00
|
|
|
model_name="notification",
|
|
|
|
constraint=models.CheckConstraint(
|
|
|
|
check=models.Q(
|
|
|
|
notification_type__in=[
|
|
|
|
"FAVORITE",
|
|
|
|
"REPLY",
|
|
|
|
"MENTION",
|
|
|
|
"TAG",
|
|
|
|
"FOLLOW",
|
|
|
|
"FOLLOW_REQUEST",
|
|
|
|
"BOOST",
|
|
|
|
"IMPORT",
|
|
|
|
"ADD",
|
|
|
|
"REPORT",
|
|
|
|
]
|
|
|
|
),
|
|
|
|
name="notification_type_valid",
|
|
|
|
),
|
2021-03-16 19:57:23 +00:00
|
|
|
),
|
|
|
|
]
|