From: Roger Braun Date: Tue, 20 Jun 2017 14:25:28 +0000 (+0200) Subject: Add correct index. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=07cee92cd4a28d4863dab6c8ccfd4cbfdd49b42a;p=akkoma Add correct index. --- 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