Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / priv / repo / migrations / 20190603173419_add_tag_index_to_objects.exs
1 defmodule Pleroma.Repo.Migrations.AddTagIndexToObjects do
2 use Ecto.Migration
3
4 def change do
5 drop_if_exists index(:activities, ["(data #> '{\"object\",\"tag\"}')"], using: :gin, name: :activities_tags)
6 create_if_not_exists index(:objects, ["(data->'tag')"], using: :gin, name: :objects_tags)
7 end
8 end