tags: add trigram index on tag names.
This commit is contained in:
9
db/migrate/20171127195124_add_trigram_index_to_tags.rb
Normal file
9
db/migrate/20171127195124_add_trigram_index_to_tags.rb
Normal 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
|
||||
Reference in New Issue
Block a user