class CreateProductsPrices < ActiveRecord::Migration

  def self.up
    create_table "products_prices", :force => true do |t|
      t.date     "target_date",               :comment => '仕入日'
      t.integer  "product_id",                :comment => '製品モデル'
      t.decimal  "price",                     :precision => 16, :scale => 3, :comment => '単価'
      t.datetime "created_at",                :comment => '作成日時'
      t.datetime "updated_at",                :comment => '更新日時'
    end
    add_index "products_prices", ["product_id"],      :name => "product_id"
    add_index "products_prices", ["target_date"],     :name => "target_date"
  end

  def self.down
    drop_table :products_prices
  end

end
