class ChangeProductsNew < ActiveRecord::Migration

  def change
  	change_table :products do |t|
  		t.belongs_to :unit, index:true
  	end
  	change_column :products, :description, :text, null: false, default: ''
  	change_column :products, :name, :string, limit: 255, null: false, default: ''
  	change_column :products, :sku, :string, limit: 30, null: false, default: ''
  	change_column :products, :price_base, :decimal, precision: 10, scale:2
  	change_column :products, :price_sale, :decimal, precision: 10, scale:2
  	change_column :products, :presentation, :boolean, null: false,default: false
  	change_column :products, :inventory, :boolean, null: false, default: true
  	change_column :products, :status, :integer, null: false, default: 1
  	
  end
end