# tortoise/aerich

A database migrations tool for TortoiseORM, ready to production.

Repository: https://github.com/tortoise/aerich
Canonical: https://ross.abutalabs.com/products/aerich
Homepage: https://github.com/tortoise/aerich
Language: Python
License: Apache-2.0
License Family: permissive
Topics: tortoise-orm, migration-tool, mysql, postgresql, database-migrations, orm
Last push: 2026-08-24T17:32:51+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 2306, "days_push": 9, "days_rel": 9, "gap_med": 47.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1084, forks 113 (observed 2026-08-28T04:03:31.406001+00:00)

## What it is
Aerich is a database migration tool for TortoiseORM, similar to Alembic for SQLAlchemy or Django's built-in migrations. It provides a CLI to generate, apply, and roll back schema migrations for MySQL, PostgreSQL, and SQLite databases.

## Use cases
- manage tortoise orm database migrations
- generate migration files from tortoise orm models
- upgrade and downgrade database schema versions
- introspect existing database tables into tortoise models
- initialize migration folders for a tortoise orm project

## When to choose
- you use TortoiseORM and need versioned schema migrations
- you want Alembic-like or Django-like migration workflows for an async Python ORM
- you need to roll back database schema changes safely

## When to avoid
- you use SQLAlchemy (use Alembic instead)
- you use TortoiseORM >= 1.0.0, which has built-in migration CLI support
- you need migrations for ORMs other than TortoiseORM

## Facets
- artifact type: cli-tool
- maturity: active
- function: database, orm, cli, developer-tools
- domain: databases, developer-tools, backend
- platform: python, cli, cross-platform
- tags: tortoise-orm, database-migrations, schema-migrations, mysql, postgresql, sqlite, async-orm

## Member repositories
- tortoise/aerich (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:31.406001+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-30T06:50:10.187066+00:00, confidence not recorded.
  - readme: https://github.com/tortoise/aerich (fetched 2026-08-28T04:03:31.406001+00:00, sha 6084f89a29b1)
  - homepage: https://github.com/tortoise/aerich (fetched 2026-08-29T12:53:15.691682+00:00, sha 7416374d6189)
  - registry_pypi: https://pypi.org/pypi/aerich/json (fetched 2026-08-29T12:53:15.700889+00:00, sha 021563aef210)
- Data as of 2026-08-30T08:39:29.467469+00:00.
