projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
41630bace6b4a1c8b070435767c81a38e5e57040
[akkoma]
/
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(
6
index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"],
7
using: :gin,
8
name: :activities_fts
9
)
10
)
11
12
create_if_not_exists(
13
index(:objects, ["(to_tsvector('english', data->>'content'))"],
14
using: :gin,
15
name: :objects_fts
16
)
17
)
18
end
19
end