L&D learning schema (Supabase)

Audience: Platform engineering
Status: Active (schema deployed 2026-04-13)
Linear: PLT-1284


Project

L&D catalog and progress tables live in the Internal AI Core Supabase project (not a separate brainforge-ld instance in the current org). Same project as team, client data, and related internal platform tables.

  • Project ref: kxzonslnqjsceiublxkf (us-east-2)

Use service role or authenticated policies per table when building Forge APIs.


Content hierarchy

Intended model: course → module → lesson (lessons are not yet a first-class table; curriculum content remains in vault markdown under knowledge/people/learning-development/programs/).

LayerTable / columnNotes
Courselearning_coursesCatalog row per course (seeded: foundation, accelerator).
Modulelearning_modulesExisting modules (M1–M5, A1–A2).
Module → courselearning_modules.parent_courseUUID FK → learning_courses.id, backfilled by track.

Progress tracking

Table: learning_progress (replaces module_progress, removed in the same migration).

Each row is either course-scoped or module-scoped:

  • course_id set, module_id null → course-level progress (e.g. “started Foundation”).
  • module_id set, course_id null → module-level progress (same semantics as legacy module_progress).

Constraints:

  • CHECK enforces exactly one of course_id / module_id non-null.
  • Partial unique indexes: (team_member_id, course_id) where course_id IS NOT NULL, and (team_member_id, module_id) where module_id IS NOT NULL.
  • statusnot_started, in_progress, completed, locked (same as before).

Columns mirror the old module progress row: started_at, completed_at, evidence_url, notes, timestamps.


Reporting view

team_learning_summary — rebuilt to join learning_progress only on module rows (module_id IS NOT NULL) so existing “foundation modules completed” and current_module behavior stays aligned with pre-migration logic. Course-only rows do not affect that view until we extend it.


  • certifications, certification_attempts — still reference learning_modules where applicable.
  • Vendor certification progress described in the L&D handoff is not implemented in these tables yet.

Migrations (Supabase)

Applied via Supabase migrations on Internal AI Core:

NamePurpose
learning_course_hierarchy_unified_progresslearning_courses, learning_modules.parent_course, seed courses, learning_progress, data copy from module_progress, drop module_progress, recreate team_learning_summary, RLS/grants/triggers.
fix_accelerator_course_prerequisiteSet accelerator course prerequisite_course_idfoundation course.

Application types

Forge TypeScript types live in:

  • apps/platform/src/lib/types/learning.tsLearningCourse, LearningProgress, parent_course on LearningModule; deprecated aliases ModuleProgress* map to the new names for incremental refactors.

L&D-facing summary

For program owners and non-SQL consumers, see:



Last updated: 2026-04-13