Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33095787
20190204200237_add_correct_dm_index.exs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
935 B
Referenced Files
None
Subscribers
None
20190204200237_add_correct_dm_index.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.AddCorrectDMIndex
do
use
Ecto.Migration
@disable_ddl_transaction
true
def
up
do
drop_if_exists
(
index
(
:activities
,
[
"activity_visibility(actor, recipients, data)"
],
name
:
:activities_visibility_index
)
)
create
(
index
(
:activities
,
[
"activity_visibility(actor, recipients, data)"
,
"id DESC NULLS LAST"
],
name
:
:activities_visibility_index
,
concurrently
:
true
,
where
:
"data->>'type' = 'Create'"
)
)
end
def
down
do
drop_if_exists
(
index
(
:activities
,
[
"activity_visibility(actor, recipients, data)"
,
"id DESC"
],
name
:
:activities_visibility_index
,
concurrently
:
true
,
where
:
"data->>'type' = 'Create'"
)
)
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 9:41 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
972882
Default Alt Text
20190204200237_add_correct_dm_index.exs (935 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment