mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 13:16:33 +00:00
add migration for updated notification types
This commit is contained in:
parent
bcbff4f002
commit
1d791d950f
1 changed files with 93 additions and 0 deletions
93
bookwyrm/migrations/0112_auto_20211022_0844.py
Normal file
93
bookwyrm/migrations/0112_auto_20211022_0844.py
Normal file
|
@ -0,0 +1,93 @@
|
|||
# Generated by Django 3.2.5 on 2021-10-22 08:44
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("bookwyrm", "0111_merge_0107_auto_20211016_0639_0110_auto_20211015_1734"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveConstraint(
|
||||
model_name="notification",
|
||||
name="notification_type_valid",
|
||||
),
|
||||
migrations.AlterField(
|
||||
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"),
|
||||
("INVITE", "Invite"),
|
||||
("ACCEPT", "Accept"),
|
||||
("JOIN", "Join"),
|
||||
("LEAVE", "Leave"),
|
||||
("REMOVE", "Remove"),
|
||||
("GROUP_PRIVACY", "Group Privacy"),
|
||||
("GROUP_NAME", "Group Name"),
|
||||
("GROUP_DESCRIPTION", "Group Description"),
|
||||
],
|
||||
max_length=255,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="user",
|
||||
name="preferred_language",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
choices=[
|
||||
("en-us", "English"),
|
||||
("de-de", "Deutsch (German)"),
|
||||
("es-es", "Español (Spanish)"),
|
||||
("fr-fr", "Français (French)"),
|
||||
("pt-br", "Português - Brasil (Brazilian Portuguese)"),
|
||||
("zh-hans", "简体中文 (Simplified Chinese)"),
|
||||
("zh-hant", "繁體中文 (Traditional Chinese)"),
|
||||
],
|
||||
max_length=255,
|
||||
null=True,
|
||||
),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name="notification",
|
||||
constraint=models.CheckConstraint(
|
||||
check=models.Q(
|
||||
(
|
||||
"notification_type__in",
|
||||
[
|
||||
"FAVORITE",
|
||||
"REPLY",
|
||||
"MENTION",
|
||||
"TAG",
|
||||
"FOLLOW",
|
||||
"FOLLOW_REQUEST",
|
||||
"BOOST",
|
||||
"IMPORT",
|
||||
"ADD",
|
||||
"REPORT",
|
||||
"INVITE",
|
||||
"ACCEPT",
|
||||
"JOIN",
|
||||
"LEAVE",
|
||||
"REMOVE",
|
||||
"GROUP_PRIVACY",
|
||||
"GROUP_NAME",
|
||||
"GROUP_DESCRIPTION",
|
||||
],
|
||||
)
|
||||
),
|
||||
name="notification_type_valid",
|
||||
),
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue