Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F56224908
20200606105430_change_type_to_enum_for_notifications.exs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
665 B
Referenced Files
None
Subscribers
None
20200606105430_change_type_to_enum_for_notifications.exs
View Options
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
Details
Attached
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)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment