class ChangeColumnsFromProductsAndPointsales < ActiveRecord::Migration
  def change
  	if column_exists?(:products, :image)
  		remove_column :products, :image
  	end

  	if column_exists?(:pointsales, :image)
    	remove_column :pointsales, :image
  	end

    unless column_exists?(:products, :img_product)
  	 add_column :products, :img_product, :string
    end

    unless column_exists?(:pointsales, :img_pointsale)
  	 add_column :pointsales, :img_pointsale, :string
    end
  end
end
