Class: CreateTkhSearchInstances
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateTkhSearchInstances
- Defined in:
- lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_instances.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 19 |
# File 'lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_instances.rb', line 16 def self.down remove_index :tkh_search_instances, :tkh_search_term_id drop_table :tkh_search_instances end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_instances.rb', line 3 def self.up create_table :tkh_search_instances do |t| t.integer :tkh_search_term_id t.string :model_name t.integer :model_record_id t.integer :rating t.string :language t.boolean :published, default: false t. end add_index :tkh_search_instances, :tkh_search_term_id end |