# Phase 2 Database Flow Summary

## Write Flow
- `projects` row created first.
- `project_modules` rows reference `project_id`.
- `tasks` rows reference `project_id`, `project_module_id`, `task_status_id`, `created_by`.
- `task_assignments` rows map tasks to users.
- `task_dependencies` rows map task-to-task dependency edges.
- `task_comments` rows store thread-like communication.
- `task_files` rows map uploaded files to tasks.

## Update Flow
- Kanban drag/drop updates `tasks.task_status_id`.
- Progress updates modify `tasks.progress_percent`.
- Filter/search read from `tasks` with related joins.

## Soft Delete Strategy
- All Phase 2 tables support soft delete for recovery and audit safety.
