innercontext/backend/innercontext
Piotr Oleszczyk f72d5ba1b7 fix(models): add cascade delete-orphan to parent-child relationships
Without cascade, SQLAlchemy tried to NULL-out foreign keys on child rows
before deleting the parent, hitting NOT NULL constraints in PostgreSQL.

- Routine.steps: cascade="all, delete-orphan" (routine_steps.routine_id)
- MedicationEntry.usage_history: cascade="all, delete-orphan"
  (medication_usages.medication_record_id)

Product.inventory already had cascade set correctly.
No DB migration needed — ORM-level only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 00:59:10 +01:00
..
api refactor(llm): use response_schema with typed enums in all Gemini calls 2026-03-01 00:46:23 +01:00
models fix(models): add cascade delete-orphan to parent-child relationships 2026-03-01 00:59:10 +01:00
llm.py feat: AI photo analysis for skin snapshots 2026-02-28 12:47:51 +01:00
mcp_server.py feat(mcp): add FastMCP server with 14 tools for LLM agent access 2026-02-28 17:59:11 +01:00