/config/migrations/017_create_fulltext_indexes.rb

https://bitbucket.org/thrabal/smartlib · Ruby · 12 lines · 10 code · 2 blank · 0 comment · 0 complexity · a4c92fabaeeba84b8c3c60300674fe19 MD5 · raw file

  1. Sequel.migration do
  2. up do
  3. add_index :books_search, :search_title, :type => :full_text
  4. add_index :authors_search, :search_name, :type => :full_text
  5. end
  6. down do
  7. drop_index :authors_search, :search_name
  8. drop_index :books_search, :search_title
  9. end
  10. end