From: rinpatch Date: Wed, 22 May 2019 08:56:53 +0000 (+0300) Subject: Add GIN index on object data->'name' X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=10ca1f91de12c3ff3a1adff2cf36e9ec47c659dd;p=akkoma Add GIN index on object data->'name' --- diff --git a/priv/repo/migrations/20190522084924_add_object_index_on_name.exs b/priv/repo/migrations/20190522084924_add_object_index_on_name.exs new file mode 100644 index 000000000..886e8499e --- /dev/null +++ b/priv/repo/migrations/20190522084924_add_object_index_on_name.exs @@ -0,0 +1,7 @@ +defmodule Pleroma.Repo.Migrations.AddObjectIndexOnName do + use Ecto.Migration + + def change do + create(index(:objects, ["(data->'name')"], name: :objects_name_index, using: :gin)) + end +end