Class: CreateTkhSearchEvents

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_events.rb

Class Method Summary collapse

Class Method Details

.downObject



12
13
14
15
# File 'lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_events.rb', line 12

def self.down
  remove_index :tkh_search_events, :tkh_search_query_id
  drop_table :tkh_search_events
end

.upObject



3
4
5
6
7
8
9
10
# File 'lib/generators/tkh_search/create_or_update_migrations/templates/create_tkh_search_events.rb', line 3

def self.up
  create_table :tkh_search_events do |t|
    t.integer :tkh_search_query_id
    t.string  :language
    t.timestamps
  end
  add_index :tkh_search_events, :tkh_search_query_id
end