Task description
As a dev, I want the core schema (users + role enum + apprentice/coach/trainer profiles, modules, grades, comments) migrated and seeded, so that the team can build every other Grade Manager story against a stable schema instead of guessing at it.
Acceptance criteria
- Given the migrations, when run on a fresh DB, then
users, apprentices, coaches, trainers, modules, grades, comments all exist clean with no errors.
- Given
users.role, when a user logs in, then auth()->user()->apprentice / ->coach / ->trainer resolves as a real hasOne relationship (not hand-waved).
- Given the seeded demo users (apprentice x2 tracks, coach x2, trainer, admin), when they log in, then each is redirected based on their role.
- Given
GradePolicy, ApprenticePolicy, CommentPolicy skeletons, when referenced by later stories, then they exist and compile (permissive rules are fine at this stage — enforcement lands in a later story).
Design considerations
No UI in this story — schema and auth wiring only. ER diagram is in plan-d/ARCHITECTURE.md ("Database schema").
Technical informations
Source: .scratch/GRADE_MANAGER/plan-d/spec.md (Data model, Workstream split — this is the Week 1 shared spike, not parallelizable), plan-d/ARCHITECTURE.md (Database schema, Authentication and roles).
Additional notes
Blocks every other Grade Manager story (grade upload, weighted average, coach dashboard, comments, notifications) — must land before any feature stream starts.
Task description
As a dev, I want the core schema (users + role enum + apprentice/coach/trainer profiles, modules, grades, comments) migrated and seeded, so that the team can build every other Grade Manager story against a stable schema instead of guessing at it.
Acceptance criteria
users,apprentices,coaches,trainers,modules,grades,commentsall exist clean with no errors.users.role, when a user logs in, thenauth()->user()->apprentice/->coach/->trainerresolves as a realhasOnerelationship (not hand-waved).GradePolicy,ApprenticePolicy,CommentPolicyskeletons, when referenced by later stories, then they exist and compile (permissive rules are fine at this stage — enforcement lands in a later story).Design considerations
No UI in this story — schema and auth wiring only. ER diagram is in
plan-d/ARCHITECTURE.md("Database schema").Technical informations
Source:
.scratch/GRADE_MANAGER/plan-d/spec.md(Data model, Workstream split — this is the Week 1 shared spike, not parallelizable),plan-d/ARCHITECTURE.md(Database schema, Authentication and roles).Additional notes
Blocks every other Grade Manager story (grade upload, weighted average, coach dashboard, comments, notifications) — must land before any feature stream starts.