Files
Curio/drizzle/migrations/0016_theme_map.sql
T
arnaudne 5bf6013460 feat: full feature buildout — streaming, i18n, mastery map, admin, jobs
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>
2026-07-08 22:08:14 +02:00

31 lines
1.7 KiB
SQL

-- Theme taxonomy table (fixed, seeded once)
CREATE TABLE "theme" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
"slug" text NOT NULL UNIQUE,
"label_en" text NOT NULL,
"label_fr" text NOT NULL,
"emoji" text NOT NULL
);
-- Seed fixed taxonomy
INSERT INTO "theme" ("slug", "label_en", "label_fr", "emoji") VALUES
('sciences-naturelles', 'Natural sciences', 'Sciences naturelles', '🔬'),
('mathematiques', 'Mathematics', 'Mathématiques', '∑'),
('histoire', 'History', 'Histoire', '📜'),
('geographie', 'Geography', 'Géographie', '🌍'),
('langues-litterature', 'Languages & literature', 'Langues & littérature', '📖'),
('arts-culture', 'Arts & culture', 'Arts & culture', '🎨'),
('technologie-informatique', 'Technology', 'Technologie', '💻'),
('philosophie-ethique', 'Philosophy & ethics', 'Philosophie & éthique', '💭'),
('economie-societe', 'Economics & society', 'Économie & société', '📊'),
('sante-medecine', 'Health & medicine', 'Santé & médecine', '🏥'),
('sport-activite', 'Sport & activity', 'Sport & activité', '⚡'),
('autre', 'Other', 'Autre', '✦');
-- Blueprint ↔ theme join
CREATE TABLE "blueprint_theme" (
"blueprint_id" uuid NOT NULL REFERENCES "blueprint"("id") ON DELETE CASCADE,
"theme_id" uuid NOT NULL REFERENCES "theme"("id") ON DELETE CASCADE,
PRIMARY KEY ("blueprint_id", "theme_id")
);