Alembic

Alembic is a database schema migration tool commonly used with SQLAlchemy-based Python stacks.

Where it fits

It is the layer that turns relational schema changes into explicit, reviewable migration history instead of ad hoc database edits.

Repeated project patterns

  • Status Alganize uses Alembic as part of a standard FastAPI and SQLModel backend.
  • MaRESS uses migrations in a more complex backend that combines API, processing, and spatial data concerns.
  • Study Duel uses the same pattern for auth, profile, and gameplay-related relational schema changes.

Trade-offs

  • Migration tooling reduces drift, but teams still need to review data backfills, rollback assumptions, and production-safe sequencing.
  • Auto-generated migrations are useful starting points, not final truth.