# sqlalchemy/alembic

A database migrations tool for SQLAlchemy.

Repository: https://github.com/sqlalchemy/alembic
Canonical: https://ross.abutalabs.com/products/alembic
Language: Python
License: MIT
License Family: permissive
Topics: sqlalchemy, sql, python
Last push: 2026-08-14T07:40:29+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 96, longevity 100
- inputs: {"age_days": 2836, "days_push": 19, "days_rel": 25, "gap_med": 22.5, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4342, forks 365 (observed 2026-08-28T04:08:46.099763+00:00)

## What it is
Alembic is a database schema migration tool for SQLAlchemy, supporting versioned migration scripts with upgrade/downgrade steps. It can autogenerate migrations by diffing the database schema against SQLAlchemy models and supports transactional DDL and offline SQL script generation.

## Use cases
- manage database schema migrations for a SQLAlchemy project
- autogenerate migration scripts from changed ORM models
- upgrade and downgrade database schema versions
- generate SQL migration scripts for DBA review
- apply ALTER statements to evolve table structures

## When to choose
- your application uses SQLAlchemy and needs versioned schema migrations
- you want autogenerated migrations from Python model changes
- you need transactional DDL support on PostgreSQL or SQL Server

## When to avoid
- you use an ORM other than SQLAlchemy
- you need a database-agnostic migration tool without SQLAlchemy
- you only need simple schema setup without version tracking

## Facets
- artifact type: cli-tool
- maturity: stable
- function: database, cli, developer-tools
- domain: databases, developer-tools, backend
- platform: python, cli, cross-platform
- tags: sqlalchemy, database-migrations, schema-migration, ddl, autogenerate-migrations

## Member repositories
- sqlalchemy/alembic (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.099763+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:36.475172+00:00, confidence not recorded.
  - readme: https://github.com/sqlalchemy/alembic (fetched 2026-08-28T04:08:46.099763+00:00, sha fb2500a449e3)
  - registry_pypi: https://pypi.org/pypi/alembic/json (fetched 2026-08-29T09:10:40.530255+00:00, sha b07b1982fc7c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
