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>
17 lines
874 B
SQL
17 lines
874 B
SQL
CREATE TABLE "blueprint_theme" (
|
|
"blueprint_id" uuid NOT NULL,
|
|
"theme_id" uuid NOT NULL,
|
|
CONSTRAINT "blueprint_theme_blueprint_id_theme_id_pk" PRIMARY KEY("blueprint_id","theme_id")
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "theme" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"slug" text NOT NULL,
|
|
"label_en" text NOT NULL,
|
|
"label_fr" text NOT NULL,
|
|
"emoji" text NOT NULL,
|
|
CONSTRAINT "theme_slug_unique" UNIQUE("slug")
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "blueprint_theme" ADD CONSTRAINT "blueprint_theme_blueprint_id_blueprint_id_fk" FOREIGN KEY ("blueprint_id") REFERENCES "public"."blueprint"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "blueprint_theme" ADD CONSTRAINT "blueprint_theme_theme_id_theme_id_fk" FOREIGN KEY ("theme_id") REFERENCES "public"."theme"("id") ON DELETE cascade ON UPDATE no action; |