class CreatePImportStockProductStocks < ActiveRecord::Migration
  def change
    create_table :p_import_stock_product_stocks do |t|
      t.boolean :ignored, :default => false
      t.references :p_import_stock, index: true, foreign_key: true
      t.references :p_product_stock, index: true, foreign_key: true
      t.decimal :stock, :precision => 12, :scale => 2
      t.decimal :stock_th, :precision => 12, :scale => 2
      t.decimal :past_stock, :precision => 12, :scale => 2
      t.decimal :past_stock_th, :precision => 12, :scale => 2
      t.text :csv_line

      t.timestamps null: false
    end
  end
end
