aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-06 13:08:45 +0200
committerlain <lain@soykaf.club>2020-06-06 13:08:45 +0200
commit9fa3f0b156f92ba575b58b191685fa068a83f4d2 (patch)
treeac32c15fc723f7be1be0dfbe3a806b33b8d05436 /lib
parentca0e6e702be3714bb40ff0fb48e9c08aaf322fff (diff)
downloadpleroma-9fa3f0b156f92ba575b58b191685fa068a83f4d2.tar.gz
Notification: Change type of `type` to an enum.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/notification.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
index 49e27c05a..5c8994e35 100644
--- a/lib/pleroma/notification.ex
+++ b/lib/pleroma/notification.ex
@@ -30,6 +30,9 @@ defmodule Pleroma.Notification do
schema "notifications" do
field(:seen, :boolean, default: false)
+ # This is an enum type in the database. If you add a new notification type,
+ # remembert to add a migration to add it to the `notifications_type` enum
+ # as well.
field(:type, :string)
belongs_to(:user, User, type: FlakeId.Ecto.CompatType)
belongs_to(:activity, Activity, type: FlakeId.Ecto.CompatType)