1 defmodule Pleroma.Repo.Migrations.DropUnusedIndexes do
4 @disable_ddl_transaction true
5 @disable_migration_lock true
9 index(:activities, ["(data->>'actor')", "inserted_at desc"], name: :activities_actor_index)
12 drop_if_exists(index(:activities, ["(data->'to')"], name: :activities_to_index))
14 drop_if_exists(index(:activities, ["(data->'cc')"], name: :activities_cc_index))
16 drop_if_exists(index(:activities, ["(split_part(actor, '/', 3))"], name: :activities_hosts))
19 index(:activities, ["(data->'object'->>'inReplyTo')"], name: :activities_in_reply_to)
23 index(:activities, ["((data #> '{\"object\",\"likes\"}'))"], name: :activities_likes)
29 index(:activities, ["(data->>'actor')", "inserted_at desc"],
30 name: :activities_actor_index,
36 index(:activities, ["(data->'to')"],
37 name: :activities_to_index,
44 index(:activities, ["(data->'cc')"],
45 name: :activities_cc_index,
52 index(:activities, ["(split_part(actor, '/', 3))"],
53 name: :activities_hosts,
59 index(:activities, ["(data->'object'->>'inReplyTo')"],
60 name: :activities_in_reply_to,
66 index(:activities, ["((data #> '{\"object\",\"likes\"}'))"],
67 name: :activities_likes,