Insert text representation of hashtags into object["hashtags"]
[akkoma] / priv / repo / migrations / 20200731165800_add_hashtags_index_to_objects.exs
1 defmodule Pleroma.Repo.Migrations.AddHashtagsIndexToObjects do
2 use Ecto.Migration
3
4 def change do
5 drop_if_exists(index(:objects, ["(data->'tag')"], using: :gin, name: :objects_tags))
6
7 create_if_not_exists(
8 index(:objects, ["(data->'hashtags')"], using: :gin, name: :objects_hashtags)
9 )
10 end
11 end