class CreateHoldings < ActiveRecord::Migration def self.up create_table "holdings", :force => true do |t| t.column "market_id", :integer t.column "user_id", :integer t.column "shares", :float t.column "cost", :float end add_index "holdings", ["user_id"], :name => "user_id" end def self.down drop_table :holdings end end