Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

Database Schema Migrations

Evolve a live PostgreSQL schema with versioned Alembic migrations, including data backfills and zero-downtime changes.

Intermediate1 roadmap

4 objectives 6 steps about 130 min

Learn it step by step

Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.

Start learning

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • Generate, review and correct Alembic migrations from model changes, and apply or roll them back across environments.
  • Write a data migration (backfill) that is idempotent and processes rows in batches.
  • Plan a zero-downtime schema change with the expand-migrate-contract pattern, avoiding long-held table locks.
  • Run migrations as a controlled deploy step and fail CI when models and migrations drift apart.

Lesson plan

6 steps, about 130 min · 5 of 5 lessons available so far

Practise it

Rename a heavily used column in your service through three Alembic revisions (expand, batched backfill, contract), keep the API working against every intermediate schema, and add a CI job that fails when models and migrations drift. Exercise the change with production-shaped data and an old app version; demonstrate restore in isolation and distinguish an application rollback from reverting a destructive data migration.

References

Hard prerequisites

Unlocks

On these roadmaps

Progress and evidence for this skill are shared across all of them.