class AddFieldsToIngredient < ActiveRecord::Migration[4.2]
  def change
    change_table :ingredients do |t|
      t.decimal :water, precision: 10, scale: 2
      t.decimal :protein, precision: 10, scale: 2
      t.decimal :lipids, precision: 10, scale: 2
      t.decimal :ash, precision: 10, scale: 2
      t.decimal :carbohydrates, precision: 10, scale: 2
      t.integer :kcal
      t.decimal :fiber, precision: 10, scale: 1
      t.decimal :sugar, precision: 10, scale: 2

    end
  end
end
