summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20170916090107_add_fts_index_to_activities.exs
blob: 717e254126f590fa26fe478be6992b052e9d0db6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
defmodule Pleroma.Repo.Migrations.AddFTSIndexToActivities do
  use Ecto.Migration
  @disable_ddl_transaction true

  def change do
    create(
      index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"],
        concurrently: true,
        using: :gin,
        name: :activities_fts
      )
    )
  end
end