class CreateAvailableProducts < ActiveRecord::Migration
  def change
  	drop_table :available_products if (table_exists? :available_products)
    create_table :available_products do |t|
      t.belongs_to :product, index: true
      t.belongs_to :pointsale, index: true
      t.decimal :stock_min, null: true
      t.decimal	:stock_max, null: true
      t.decimal	:stock, 	null: true

      t.timestamps null: false
    end
  end
end
