Alembic

Database migration tool for SQLAlchemy — manages schema changes through versioned migration scripts, essential for any production SQLAlchemy project

Visit Alembic →
Web Development

Alembic generates and tracks versioned migration scripts for SQLAlchemy schema changes — add a column, run alembic revision --autogenerate, and it produces a script capturing the diff, which then gets applied (and can be rolled back) in order across environments.

Without a migration tool, “the production database schema matches what the code expects” becomes a manual, error-prone process the moment more than one person or environment is involved — Alembic is close to mandatory for any real SQLAlchemy project past a prototype. See What Is Alembic? for the full walkthrough.