- Create migration 005 to add parent_id and level columns to todos tables
- Fix migration 003 to use correct table name (note_todos instead of todos)
- Update POST /api/notes/:id/todos to accept parent_id parameter
- Update POST /api/todos to accept parent_id for global todos
- Add automatic level calculation based on parent depth
- Update GET endpoints to return parent_id and level fields
- Add validation to ensure parent todo exists before creating subtask
- Support CASCADE DELETE for subtasks when parent is deleted
Prepared SQL migrations for adding due_date support to todos.
Migrations:
- 003_add_due_date_to_todos.sql - Adds due_date column to todos table
- 004_add_due_date_to_global_todos.sql - Adds due_date column to global_todos table
Features:
- TIMESTAMPTZ column for timezone-aware dates
- Indexes on due_date for query performance
- Composite indexes on (completed, due_date) for filtering
Note: Backend and frontend implementation pending.
These migrations are ready to be applied when the feature is completed.