Add option to modify HTTP pool size
[akkoma] / priv / repo / migrations / 20190204200237_add_correct_dm_index.exs
1 defmodule Pleroma.Repo.Migrations.AddCorrectDMIndex do
2 use Ecto.Migration
3 @disable_ddl_transaction true
4
5 def up do
6 drop_if_exists(
7 index(:activities, ["activity_visibility(actor, recipients, data)"],
8 name: :activities_visibility_index
9 )
10 )
11
12 create(
13 index(:activities, ["activity_visibility(actor, recipients, data)", "id DESC NULLS LAST"],
14 name: :activities_visibility_index,
15 concurrently: true,
16 where: "data->>'type' = 'Create'"
17 )
18 )
19 end
20
21 def down do
22 drop_if_exists(
23 index(:activities, ["activity_visibility(actor, recipients, data)", "id DESC"],
24 name: :activities_visibility_index,
25 concurrently: true,
26 where: "data->>'type' = 'Create'"
27 )
28 )
29 end
30 end