Merge develop
[akkoma] / priv / repo / migrations / 20190501125843_add_fts_index_to_objects.exs
1 defmodule Pleroma.Repo.Migrations.AddFTSIndexToObjects do
2 use Ecto.Migration
3
4 def change do
5 drop_if_exists index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"], using: :gin, name: :activities_fts)
6 create_if_not_exists index(:objects, ["(to_tsvector('english', data->>'content'))"], using: :gin, name: :objects_fts)
7 end
8 end