tags: add trigram index on tag names.

This commit is contained in:
evazion
2017-11-27 13:52:48 -06:00
parent 44f4befa5a
commit dd8e3bbb94
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
class AddTrigramIndexToTags < ActiveRecord::Migration
def up
execute "create index index_tags_on_name_trgm on tags using gin (name gin_trgm_ops)"
end
def down
execute "drop index index_tags_on_name_trgm"
end
end