Add index on inReplyTo for objects

Fixes the performance of `get_existing_votes`
This commit is contained in:
rinpatch 2019-06-03 19:26:43 +03:00
parent 9789e000b0
commit be56801dda
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
defmodule Pleroma.Repo.Migrations.AddObjectInReplyToIndex do
use Ecto.Migration
def change do
create index(:objects, ["(data->>'inReplyTo')"], name: :objects_in_reply_to_index)
end
end