From 07cee92cd4a28d4863dab6c8ccfd4cbfdd49b42a Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 20 Jun 2017 16:25:28 +0200 Subject: [PATCH] Add correct index. --- .../20170620142420_add_object_activity_index_part_two.exs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 priv/repo/migrations/20170620142420_add_object_activity_index_part_two.exs diff --git a/priv/repo/migrations/20170620142420_add_object_activity_index_part_two.exs b/priv/repo/migrations/20170620142420_add_object_activity_index_part_two.exs new file mode 100644 index 000000000..705a05f82 --- /dev/null +++ b/priv/repo/migrations/20170620142420_add_object_activity_index_part_two.exs @@ -0,0 +1,8 @@ +defmodule Pleroma.Repo.Migrations.AddObjectActivityIndexPartTwo do + use Ecto.Migration + + def change do + drop index(:objects, ["(data->'object'->>'id')", "(data->>'type')"], name: :activities_create_objects_index) + create index(:activities, ["(data->'object'->>'id')", "(data->>'type')"], name: :activities_create_objects_index) + end +end -- 2.45.2