1 defmodule Pleroma.Repo.Migrations.AddUpdateToNotificationsEnum do
4 @disable_ddl_transaction true
8 alter type notification_type add value 'update'
13 # 20210717000000_add_poll_to_notifications_enum.exs
15 alter table(:notifications) do
16 modify(:type, :string)
20 delete from notifications where type = 'update'
25 drop type if exists notification_type
30 create type notification_type as enum (
35 'pleroma:emoji_reaction',
36 'pleroma:chat_mention',
46 alter table notifications
47 alter column type type notification_type using (type::notification_type)