CREATE TABLE users (
    id         INTEGER PRIMARY KEY AUTOINCREMENT,
    name       TEXT NOT NULL CHECK(length(name) >= 1 AND length(name) <= 50),
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

-- Standardnutzer für bestehende Daten
INSERT INTO users (name) VALUES ('Standard');

ALTER TABLE exercises     ADD COLUMN user_id INTEGER NOT NULL DEFAULT 1;
ALTER TABLE training_sets ADD COLUMN user_id INTEGER NOT NULL DEFAULT 1;
ALTER TABLE sessions      ADD COLUMN user_id INTEGER NOT NULL DEFAULT 1;
