df62d8f611f7715ba169c361c6fa75ebfddf133c
[anni] / priv / repo / migrations / 20170916090107_add_fts_index_to_activities.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo.Migrations.AddFTSIndexToActivities do
6   use Ecto.Migration
7   @disable_ddl_transaction true
8
9   def change do
10     create(
11       index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"],
12         concurrently: true,
13         using: :gin,
14         name: :activities_fts
15       )
16     )
17   end
18 end