Added default quantities
This commit is contained in:
parent
a96cd717cf
commit
d74b721ee5
@ -31,6 +31,41 @@ class CreateUnits < ActiveRecord::Migration
|
||||
Unit.create project: nil, shortname: "%", name: "percent"
|
||||
Unit.create project: nil, shortname: "g", name: "gram"
|
||||
Unit.create project: nil, shortname: "kg", name: "kilogram"
|
||||
|
||||
Quantity.create project: nil, domain: :diet, parent: nil, name: "Proteins",
|
||||
description: "Total amount of proteins"
|
||||
|
||||
# https://www.fsai.ie/uploadedFiles/Consol_Reg1169_2011.pdf
|
||||
# https://www.fsai.ie/legislation/food_legislation/food_information_fic/nutrition_labelling.html
|
||||
f = Quantity.create project: nil, domain: :diet, parent: nil, name: "Fats",
|
||||
description: "Total lipids, including phospholipids"
|
||||
f1 = Quantity.create project: nil, domain: :diet, parent: f, name: "Fatty acids",
|
||||
description: ""
|
||||
f2 = Quantity.create project: nil, domain: :diet, parent: f1, name: "Saturated",
|
||||
description: "Fatty acids without double bond"
|
||||
f3 = Quantity.create project: nil, domain: :diet, parent: f1, name: "Unsaturated",
|
||||
description: ""
|
||||
f4 = Quantity.create project: nil, domain: :diet, parent: f3, name: "Monounsaturated",
|
||||
description: "Fatty acids with one cis double bond"
|
||||
f5 = Quantity.create project: nil, domain: :diet, parent: f3, name: "Polyunsaturated",
|
||||
description: "Fatty acids with two or more cis, cis-methylene interrupted" \
|
||||
" double bonds; PUFA"
|
||||
f6 = Quantity.create project: nil, domain: :diet, parent: f3, name: "Trans",
|
||||
description: "Fatty acids with at least one non-conjugated C-C double bond in the" \
|
||||
" trans configuration"
|
||||
f7 = Quantity.create project: nil, domain: :diet, parent: f5, name: "omega-3 (n-3)",
|
||||
description: ""
|
||||
f8 = Quantity.create project: nil, domain: :diet, parent: f5, name: "omega-6 (n-6)",
|
||||
description: ""
|
||||
f9 = Quantity.create project: nil, domain: :diet, parent: f7, name: "ALA 18:3(n-3)",
|
||||
description: "alpha-Linolenic acid"
|
||||
f10 = Quantity.create project: nil, domain: :diet, parent: f7, name: "EPA 20:5(n-3)",
|
||||
description: "eicosapentaenoic acid; icosapentaenoic acid"
|
||||
f11 = Quantity.create project: nil, domain: :diet, parent: f7, name: "DHA 22:6(n-3)",
|
||||
description: "Docosahexaenoic acid"
|
||||
|
||||
Quantity.create project: nil, domain: :diet, parent: nil, name: "Carbohydrates",
|
||||
description: "Total amount of carbohydrates"
|
||||
end
|
||||
dir.down do
|
||||
Unit.where(project: nil).delete_all
|
||||
|
Reference in New Issue
Block a user