diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-03 19:26:43 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-03 19:26:43 +0300 |
commit | be56801ddab84d9e21af75c7752e5898fe0dbecb (patch) | |
tree | 5739215582bd3863dcdd336f6e2821fb81c0a50a | |
parent | 9789e000b05621435dc0c03833f564481e0b80e6 (diff) | |
download | pleroma-be56801ddab84d9e21af75c7752e5898fe0dbecb.tar.gz |
Add index on inReplyTo for objects
Fixes the performance of `get_existing_votes`
-rw-r--r-- | priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs b/priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs new file mode 100644 index 000000000..df4ac7782 --- /dev/null +++ b/priv/repo/migrations/20190603162018_add_object_in_reply_to_index.exs @@ -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 |