Class: CreateTkhSearchResults
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateTkhSearchResults
- Defined in:
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_results.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
14 15 16 17 |
# File 'lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_results.rb', line 14 def self.down remove_index :tkh_search_results, :token drop_table :tkh_search_results end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_results.rb', line 3 def self.up create_table :tkh_search_results do |t| t.string :token t.string :model_name t.integer :model_record_id t.integer :rating, default: 0 t. end add_index :tkh_search_results, :token end |