Add missing tag index on objects

The previous activity index is useless because objects are not embedded
anymore and instead a joined object is queried.
This commit is contained in:
rinpatch 2019-06-03 20:42:08 +03:00
parent 9789e000b0
commit cfc3c62b2f

View File

@ -0,0 +1,8 @@
defmodule Pleroma.Repo.Migrations.AddTagIndexToObjects do
use Ecto.Migration
def change do
drop_if_exists index(:activities, ["(data #> '{\"object\",\"tag\"}')"], using: :gin, name: :activities_tags)
create index(:objects, ["(data->'tag')"], using: :gin, name: :objects_tags)
end
end