alembic
Installation
SKILL.md
Alembic Database Migrations
Alembic is the migration tool for SQLAlchemy. It manages schema versioning through a directory of revision scripts linked by down_revision pointers, forming a linear (or branched) migration chain.
Environment Setup
Initialize the Migration Environment
# Generic single-database (most common)
alembic init alembic
# pyproject.toml-integrated (modern projects)
alembic init --template pyproject alembic
# Async DBAPI support
alembic init --template async alembic