Updated

db/migrate / 20170711153945_add_text_indexes_to_tags.rb

A
18 lines of codes
2 methods
2.0 complexity/method
1 churn
4.0 complexity
0 duplications
class AddTextIndexesToTags < ActiveRecord::Migration
  1. AddTextIndexesToTags has no descriptive comment
def up execute <<-SQL CREATE INDEX index_ft_tags_on_name ON tags USING gin(to_tsvector('english', name)); SQL execute <<-SQL CREATE INDEX index_ft_tags_on_description ON tags USING gin(to_tsvector('english', description)); SQL end def down execute "DROP INDEX index_ft_tags_on_name;" execute "DROP INDEX index_ft_tags_on_description;" end end