Skip to content

Commit

Permalink
feat: extend db scheme (Issues #15, #24 & #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
FAUSheppy committed Sep 24, 2022
1 parent e1a1d84 commit 56392ad
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions helper_scripts/sqlite3.init
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ create TABLE person(
"energyTarget" INTEGER
);

create TABLE curated_food(
"food_id" TEXT NOT NULL PRIMARY KEY
);

create TABLE food_preferences(
"food_id" TEXT NOT NULL PRIMARY KEY,
"value" INTEGER
);

create TABLE food_templates(
"template_name" TEXT PRIMARY KEY,
"template_description"
);

create TABLE foods_in_template(
"template_name" TEST,
"food_id" TEXT,
"amount" INTEGER
);

create TABLE foodlog(
"food_id" TEXT,
"date" INTEGER,
Expand All @@ -28,6 +48,11 @@ CREATE TABLE weightByDate(
CONSTRAINT weight_pk PRIMARY KEY (date)
);

CREATE TABLE calorieTargetByDate(
"date" TEXT NOT NULL PRIMARY KEY,
"target" INTEGER
);

.mode csv
.import food_filtered.csv food
.import food_portion.csv food_portion
Expand Down

0 comments on commit 56392ad

Please sign in to comment.