1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.AddPollToNotificationsEnum do
8 @disable_ddl_transaction true
12 alter type notification_type add value 'poll'
18 alter table(:notifications) do
19 modify(:type, :string)
23 delete from notifications where type = 'poll'
28 drop type if exists notification_type
33 create type notification_type as enum (
38 'pleroma:emoji_reaction',
39 'pleroma:chat_mention',
48 alter table notifications
49 alter column type type notification_type using (type::notification_type)