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.AddPleromaReportTypeToEnumForNotifications do
8 @disable_ddl_transaction true
12 alter type notification_type add value 'pleroma:report'
18 alter table(:notifications) do
19 modify(:type, :string)
23 delete from notifications where type = 'pleroma:report'
28 drop type if exists notification_type
33 create type notification_type as enum (
38 'pleroma:emoji_reaction',
39 'pleroma:chat_mention',
47 alter table notifications
48 alter column type type notification_type using (type::notification_type)