feat: timesheet row persistence backend

This commit is contained in:
Your Name
2026-02-20 15:15:50 +02:00
parent f504241fc9
commit ebadbbc2a6
3 changed files with 81 additions and 0 deletions

View File

@@ -326,6 +326,17 @@ pub fn init_db(conn: &Connection) -> Result<(), rusqlite::Error> {
[],
)?;
conn.execute(
"CREATE TABLE IF NOT EXISTS timesheet_rows (
id INTEGER PRIMARY KEY AUTOINCREMENT,
week_start TEXT NOT NULL,
project_id INTEGER NOT NULL REFERENCES projects(id),
task_id INTEGER REFERENCES tasks(id),
sort_order INTEGER NOT NULL DEFAULT 0
)",
[],
)?;
conn.execute(
"CREATE TABLE IF NOT EXISTS settings (
key TEXT PRIMARY KEY,