X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20190603173419_add_tag_index_to_objects.exs;h=93d57a2494f0543b86c9de94480d9c3e6a7fd406;hb=90986667cedb20b316ae4e160729d78d692d0c0e;hp=c915a021304d908ce0cbce2f38a8d80904ad5740;hpb=cfc3c62b2ffde1a2fbc7764ad1cbc292e7f20f74;p=akkoma diff --git a/priv/repo/migrations/20190603173419_add_tag_index_to_objects.exs b/priv/repo/migrations/20190603173419_add_tag_index_to_objects.exs index c915a0213..93d57a249 100644 --- a/priv/repo/migrations/20190603173419_add_tag_index_to_objects.exs +++ b/priv/repo/migrations/20190603173419_add_tag_index_to_objects.exs @@ -3,6 +3,6 @@ defmodule Pleroma.Repo.Migrations.AddTagIndexToObjects do 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) + create_if_not_exists index(:objects, ["(data->'tag')"], using: :gin, name: :objects_tags) end end