kin: KIN-126-frontend_dev

This commit is contained in:
Gros Frumos 2026-03-18 17:34:33 +02:00
parent 4f50c4eb73
commit e33a89c82c
6 changed files with 39 additions and 3 deletions

View file

@ -773,6 +773,12 @@ def _migrate(conn: sqlite3.Connection):
PRAGMA foreign_keys=ON;
""")
# KIN-126: Add completed_at to tasks — set when task transitions to 'done'
task_cols_final = {r[1] for r in conn.execute("PRAGMA table_info(tasks)").fetchall()}
if "completed_at" not in task_cols_final:
conn.execute("ALTER TABLE tasks ADD COLUMN completed_at DATETIME DEFAULT NULL")
conn.commit()
def _seed_default_hooks(conn: sqlite3.Connection):
"""Seed default hooks for the kin project (idempotent).