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