aboutsummaryrefslogtreecommitdiffstats
path: root/db.py
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-03-18 15:26:22 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-03-18 15:26:22 +0100
commit7ecba24a3383d4e331c812b0dcd57bc7bf565713 (patch)
tree701940ca20e375cec087ca5dc6e5c450595ad1e0 /db.py
parent81c3cbf634e1e6929317d3ffcd87df6426808417 (diff)
downloadEgoMetrics-7ecba24a3383d4e331c812b0dcd57bc7bf565713.tar.gz
EgoMetrics-7ecba24a3383d4e331c812b0dcd57bc7bf565713.zip
Add body weight logging with diff tracking
Diffstat (limited to 'db.py')
-rw-r--r--db.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/db.py b/db.py
index a5f3250..a7be976 100644
--- a/db.py
+++ b/db.py
@@ -59,6 +59,16 @@ CREATE INDEX IF NOT EXISTS idx_workout_sessions_date
CREATE INDEX IF NOT EXISTS idx_workout_template_exercises_template
ON workout_template_exercises(template_id);
+
+CREATE TABLE IF NOT EXISTS weight_logs (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ date_time TEXT NOT NULL,
+ weight REAL NOT NULL,
+ note TEXT
+);
+
+CREATE INDEX IF NOT EXISTS idx_weight_logs_date
+ ON weight_logs(date_time);
"""