-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
epic:01-databaseEPIC-01: Database FoundationEPIC-01: Database Foundationpriority:p0Critical priority - MVP blockersCritical priority - MVP blockerstype:backendBackend/Database workBackend/Database work
Description
Epic: EPIC-01 Database Foundation
Story Points: 5
Priority: P0
User Story
As a content author, I want lesson draft/publish status tracking, so that I can work on lessons privately before publishing.
Acceptance Criteria
-
lessonstable hasstatuscolumn (draft|published|archived) -
lessonstable hasauthor_idcolumn (FK to auth.users) -
lessons.overviewis nullable (draft-first approach) - Indexes on
statusandauthor_idfor performance -
updated_attrigger updates timestamp on changes
Technical Tasks
File: supabase/migrations/YYYYMMDD_lesson_authoring_foundation.sql
- Add status column with CHECK constraint
- Add author_id column with FK
- Make overview nullable
- Create indexes (status, author_id)
- Add updated_at trigger
Tests
- Draft lesson can be created with minimal data
- Status transitions work (draft → published → archived)
- Author_id correctly references auth.users
Related Docs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epic:01-databaseEPIC-01: Database FoundationEPIC-01: Database Foundationpriority:p0Critical priority - MVP blockersCritical priority - MVP blockerstype:backendBackend/Database workBackend/Database work