Initial commit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-03-21 15:03:55 +01:00
commit dfd66e43c6
78 changed files with 6219 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
CREATE TABLE training_sets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL CHECK(length(name) >= 1 AND length(name) <= 100),
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at DATETIME
);
CREATE TABLE set_exercises (
set_id INTEGER NOT NULL REFERENCES training_sets(id) ON DELETE CASCADE,
exercise_id INTEGER NOT NULL REFERENCES exercises(id),
position INTEGER NOT NULL CHECK(position >= 0),
PRIMARY KEY (set_id, exercise_id)
);
CREATE INDEX idx_set_exercises_set_id ON set_exercises(set_id);