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> |
||
|---|---|---|
| .. | ||
| alembic | ||
| innercontext | ||
| tests | ||
| .env.example | ||
| .python-version | ||
| alembic.ini | ||
| db.py | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| skincare.yaml | ||
| uv.lock | ||
See the root README for setup and usage instructions.