kin: KIN-DOCS-004-backend_dev

This commit is contained in:
Gros Frumos 2026-03-19 20:30:50 +02:00
parent de52526659
commit ae2f0f1c81
8 changed files with 66 additions and 12 deletions

View file

@ -165,6 +165,7 @@ CREATE TABLE IF NOT EXISTS department_handoffs (
artifacts JSON,
decisions_made JSON,
blockers JSON,
context_packet JSON DEFAULT NULL,
status TEXT DEFAULT 'pending',
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
@ -703,6 +704,13 @@ def _migrate(conn: sqlite3.Connection):
""")
conn.commit()
# Add context_packet column to department_handoffs (KIN-DOCS-004)
if "department_handoffs" in existing_tables:
handoff_cols = {r[1] for r in conn.execute("PRAGMA table_info(department_handoffs)").fetchall()}
if "context_packet" not in handoff_cols:
conn.execute("ALTER TABLE department_handoffs ADD COLUMN context_packet JSON DEFAULT NULL")
conn.commit()
# Add test_command column to projects (KIN-ARCH-008); NULL = auto-detect (KIN-101)
projects_cols = {row["name"] for row in conn.execute("PRAGMA table_info(projects)")}
if "test_command" not in projects_cols: