feat(db): add User.mentorOnboardingSentAt for one-shot onboarding email (§D)

Single nullable DateTime column. No backfill. Catalog-only ALTER TABLE —
sub-millisecond on PostgreSQL regardless of table size. The column is
unused until the bulk role-update flow wires it up as an idempotency
stamp for the mentor-onboarding email.

Plan: docs/superpowers/plans/2026-04-28-pr6-multi-role-and-workspace-previews.md
Spec: docs/superpowers/specs/2026-04-28-mentor-round-readiness-design.md §D
This commit is contained in:
Matt
2026-04-28 15:57:09 +02:00
parent 08829df54d
commit 75c8829c3f
2 changed files with 5 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "mentorOnboardingSentAt" TIMESTAMP(3);

View File

@@ -302,6 +302,9 @@ model User {
institution String? // User's institution/organization institution String? // User's institution/organization
metadataJson Json? @db.JsonB metadataJson Json? @db.JsonB
// Mentor onboarding email idempotency: stamped once when MENTOR role is first added.
mentorOnboardingSentAt DateTime?
// Profile // Profile
bio String? // User bio for matching with project descriptions bio String? // User bio for matching with project descriptions
profileImageKey String? // Storage key (e.g., "avatars/user123/1234567890.jpg") profileImageKey String? // Storage key (e.g., "avatars/user123/1234567890.jpg")