class CreateTrackableSessions < ActiveRecord::Migration def self.up create_table :trackable_sessions do |t| t.string :kind t.string :ip_address t.string :site t.string :referrer t.string :session_id t.boolean :new_visit t.timestamps end add_index :trackable_sessions, :kind add_index :trackable_sessions, :ip_address add_index :trackable_sessions, :referrer add_index :trackable_sessions, :site add_index :trackable_sessions, :session_id add_index :trackable_sessions, :new_visit end def self.down drop_table :trackable_sessions end end