From 9bddc67a3fac593c7371f954fe287891a16f9c9c Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Thu, 20 Feb 2020 21:30:57 +0100 Subject: [PATCH] Added body composition quantities --- db/migrate/002_load_defaults.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/db/migrate/002_load_defaults.rb b/db/migrate/002_load_defaults.rb index 2de9ea2..9830e50 100644 --- a/db/migrate/002_load_defaults.rb +++ b/db/migrate/002_load_defaults.rb @@ -126,13 +126,19 @@ class LoadDefaults < ActiveRecord::Migration name: "Body composition", description: "" b2 = Quantity.create project: nil, domain: :measurement, parent: b1, name: "Weight", description: "Total weight" - b3 = Quantity.create project: nil, domain: :measurement, parent: b1, + b3 = Quantity.create project: nil, domain: :measurement, parent: b2, name: "Fat", description: "Fat weight" - b4 = Quantity.create project: nil, domain: :measurement, parent: b1, + b4 = Quantity.create project: nil, domain: :measurement, parent: b2, name: "Muscle", description: "Muscle weight" b5 = Quantity.create project: nil, domain: :measurement, parent: b1, + name: "Composition", description: "" + b6 = Quantity.create project: nil, domain: :measurement, parent: b5, + name: "% fat", description: "Fat as a % of total body weight" + b7 = Quantity.create project: nil, domain: :measurement, parent: b5, + name: "% muscle", description: "Muscle as a % of total body weight" + b8 = Quantity.create project: nil, domain: :measurement, parent: b1, name: "RM", description: "Resting metabolism" - b6 = Quantity.create project: nil, domain: :measurement, parent: b1, + b9 = Quantity.create project: nil, domain: :measurement, parent: b1, name: "VF", description: "Visceral fat" # Calculated quantities go at the and to make sure dependencies exist