class CreateTkhSearchResults
Public Class Methods
down()
click to toggle source
# 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()
click to toggle source
# 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.timestamps end add_index :tkh_search_results, :token end