Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33101752
20180813003722_create_filters.exs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
762 B
Referenced Files
None
Subscribers
None
20180813003722_create_filters.exs
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Repo.Migrations.CreateFilters
do
use
Ecto.Migration
def
change
do
create_if_not_exists
table
(
:filters
)
do
add
(
:user_id
,
references
(
:users
,
on_delete
:
:delete_all
))
add
(
:filter_id
,
:integer
)
add
(
:hide
,
:boolean
)
add
(
:phrase
,
:string
)
add
(
:context
,
{
:array
,
:string
})
add
(
:expires_at
,
:utc_datetime
)
add
(
:whole_word
,
:boolean
)
timestamps
()
end
create_if_not_exists
(
index
(
:filters
,
[
:user_id
]))
create_if_not_exists
(
index
(
:filters
,
[
:phrase
],
where
:
"hide = true"
,
name
:
:hided_phrases_index
)
)
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 12:59 PM (8 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
969083
Default Alt Text
20180813003722_create_filters.exs (762 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment