Part of #285 (Group D — robustness).
Problem
SessionType rows exist only because the seed script inserts them. On a fresh/un-seeded database the type table is empty, which blocks session creation (the picker is empty and a type is required) and blocks evaluator assignment (which looks up a "Evaluation Appointment" type and 500s if absent).
Evidence
prisma/seed.ts — the only source of SessionType rows (~10 types). server/api/session/types.get.ts is a bare findMany; there is no runtime seeding and no UI to create types.
components/schedule/SessionDetailModal.vue requires a selected type to submit; an empty list makes creation impossible.
server/api/session/appointments/index.put.ts throws 500 ("seed it before assigning evaluators") when the "Evaluation Appointment" type is missing.
Impact
P1 (environment). A fresh deploy/dev DB without seeding can't create any session or assign any evaluator.
Proposed approach
- Guarantee the required
SessionType rows via an idempotent runtime ensure-seed on boot/migration, and/or an ADMIN UI to manage session types.
- At minimum, ensure the
"Evaluation Appointment" type always exists before evaluator assignment can be reached.
Acceptance criteria
Part of #285 (Group D — robustness).
Problem
SessionTyperows exist only because the seed script inserts them. On a fresh/un-seeded database the type table is empty, which blocks session creation (the picker is empty and a type is required) and blocks evaluator assignment (which looks up a"Evaluation Appointment"type and 500s if absent).Evidence
prisma/seed.ts— the only source ofSessionTyperows (~10 types).server/api/session/types.get.tsis a barefindMany; there is no runtime seeding and no UI to create types.components/schedule/SessionDetailModal.vuerequires a selected type to submit; an empty list makes creation impossible.server/api/session/appointments/index.put.tsthrows 500 ("seed it before assigning evaluators") when the"Evaluation Appointment"type is missing.Impact
P1 (environment). A fresh deploy/dev DB without seeding can't create any session or assign any evaluator.
Proposed approach
SessionTyperows via an idempotent runtime ensure-seed on boot/migration, and/or an ADMIN UI to manage session types."Evaluation Appointment"type always exists before evaluator assignment can be reached.Acceptance criteria