The AI Tutor will answer grounded in this lesson's cited source (jira_story: GOV-211) and key concepts — authority Informational. Not yet enabled.
Lesson 2 of 4 — Introduce Alembic across Invariant
Data Platform Hardening · Source: Jira Story GOV-211 (8 pts) · Authority: Informational (the Jira story is authoritative).
Purpose
Bring versioned migrations (Alembic) to the Invariant service.
Why it matters
Versioned migrations make schema change safe, repeatable, and reversible.
Where this lives
Runs in the Customer AI Governance platform (components: platform). Alembic manages versioned, repeatable migrations for Invariant. Learn teaches this read-only.
Workflow
- Given a schema change
- When it is applied
- Then a versioned migration applies cleanly
Worked example
A developer changes a table by hand in production with no migration. What does this story require instead?
A versioned Alembic migration that applies cleanly and is recorded.
Acceptance criteria (authoritative — GOV-211)
Given a schema change, when it is applied, then a versioned migration applies cleanly.
Common pitfalls
- Ad-hoc schema edits with no migration history.
Knowledge check
- Scenario: A developer changes a table by hand in production with no migration. What does this story require instead?
- Look for: A versioned Alembic migration that applies cleanly and is recorded.
Key concepts
- Alembic
- versioned migrations
- clean apply
For the AI Tutor
- Summary: Bring versioned migrations (Alembic) to the Invariant service.
- When to use: teaching or answering questions about "introduce alembic across invariant".
- When NOT to use: the initial table creation migration (that is GOV-101).
- Key concepts: Alembic, versioned migrations, clean apply.
Completion criteria
Learner passes the scenario knowledge check and can point to the system state that satisfies GOV-211's acceptance criterion.
Related
- Module: LEARN-MOD-007 (Data Platform Hardening)
- Provenance: LEARN-MAP-001 · Generation standard: LEARN-STD-002
- Next: LEARN-LSN-037