1 defmodule Pleroma.Repo.Migrations.AddPleromaReportTypeToEnumForNotifications do
4 @disable_ddl_transaction true
8 alter type notification_type add value 'pleroma:report'
14 alter table(:notifications) do
15 modify(:type, :string)
19 delete from notifications where type = 'pleroma:report'
24 drop type if exists notification_type
29 create type notification_type as enum (
34 'pleroma:emoji_reaction',
35 'pleroma:chat_mention',
43 alter table notifications
44 alter column type type notification_type using (type::notification_type)