5bf6013460
Progressive lesson streaming via onSegment callback (fixes SSE for non-English users — locale was shadowed in lesson-reader useEffect). Adds: BullMQ workers, Redis stream buffer, token budget enforcement, Langfuse tracing, golden-eval runner, Playwright e2e scaffolding, lesson depth/locale/preferences schema, mastery map UI, admin panel (blueprints/users/reports/quality/misconceptions), image queries, source citations, view transitions, reading animations, i18n (next-intl), PDF export, surprise endpoint, and 402 passing unit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
555 B
SQL
13 lines
555 B
SQL
CREATE TABLE "invite" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"token" text NOT NULL,
|
|
"email" varchar(255),
|
|
"role" "user_role" DEFAULT 'learner' NOT NULL,
|
|
"invited_by" uuid NOT NULL,
|
|
"expires" timestamp NOT NULL,
|
|
"accepted_at" timestamp,
|
|
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
CONSTRAINT "invite_token_unique" UNIQUE("token")
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "invite" ADD CONSTRAINT "invite_invited_by_user_id_fk" FOREIGN KEY ("invited_by") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action; |