Create Initial Database Schema for Tasks. (#1)

Create migration scripts for this and initial Task DB Model in rust along with unit tests.

Reviewed-on: #1
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-08-24 17:10:31 +00:00 committed by Drew
parent c2b7c12905
commit 82d524a62f
13 changed files with 1923 additions and 15 deletions

View file

@ -69,7 +69,7 @@ captains-log/
## Phase 2: Core Database Layer (Days 3-4)
### Task 2.0: Create Initial Database Migration
- [ ] **File**: `backend/migrations/001_create_tasks.sql`
- [x] **File**: `backend/migrations/001_create_tasks.sql`
- Create tasks table with all required fields
- Add proper indexes and constraints
- Include created_at, updated_at triggers if needed
@ -77,7 +77,7 @@ captains-log/
- **Expected outcome**: `sqlx migrate run` creates table successfully
### Task 2.1: Define Task Model
- [ ] **File**: `backend/src/database/models.rs`
- [x] **File**: `backend/src/database/models.rs`
- Create Task struct with SQLx derives
- Add TaskStatus and Priority enums
- Implement proper serialization/deserialization