Page MenuHomePhorge

20200606105430_change_type_to_enum_for_notifications.exs
No OneTemporary

Size
665 B
Referenced Files
None
Subscribers
None

20200606105430_change_type_to_enum_for_notifications.exs

defmodule Pleroma.Repo.Migrations.ChangeTypeToEnumForNotifications do
use Ecto.Migration
def up do
"""
create type notification_type as enum (
'follow',
'follow_request',
'mention',
'move',
'pleroma:emoji_reaction',
'pleroma:chat_mention',
'reblog',
'favourite'
)
"""
|> execute()
"""
alter table notifications
alter column type type notification_type using (type::notification_type)
"""
|> execute()
end
def down do
alter table(:notifications) do
modify(:type, :string)
end
"""
drop type notification_type
"""
|> execute()
end
end

File Metadata

Mime Type
text/x-ruby
Expires
Fri, Apr 3, 9:44 PM (19 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1270270
Default Alt Text
20200606105430_change_type_to_enum_for_notifications.exs (665 B)

Event Timeline