aerich
A database migrations tool for Tortoise ORM.
Decision gist · record as of 2026-08-14
Yes, if you are using TortoiseORM and need structured database migrations. The package is actively maintained, has no known vulnerabilities, and low install friction. However, check whether tortoise-orm>=1.0.0's built-in migration support meets your needs first, as the project itself recommends it as an alternative for newer versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10; tortoise-orm must be installed and configured with aerich.models included in the app config.
- Installation is straightforward with low friction—a pure-Python wheel with four runtime dependencies.
- The package is actively maintained with a recent release and no known vulnerabilities, though the warning in its own documentation notes that tortoise-orm>=1.0.0 includes built-in migration support as an alternative.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), which allows free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-08-05 (9 days) · last repo commit 2026-08-10 · 1,083 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 274,337 downloads/mo, #8,192 on PyPI
Alternatives
Verify before relying
pip install aerich
# In your project, add aerich.models to your Tortoise-ORM config:
TORTOISE_ORM = {
"connections": {"default": "sqlite://:memory:"},
"apps": {
"models": {
"models": ["myapp.models", "aerich.models"],
"default_connection": "default",
},
},
}
# Then initialize and run migrations:
# aerich init -t myapp.config.TORTOISE_ORM
# aerich init-db
# aerich migrate --name add_column
# aerich upgrade- Whether the built-in migration support in tortoise-orm>=1.0.0 fully replaces Aerich's functionality or if Aerich offers additional features.
- Support for databases beyond MySQL, PostgreSQL, and SQLite mentioned in the inspectdb command.
- Performance characteristics when handling large numbers of migration files.
What it is and what it does
Aerich is a migration tool designed specifically for TortoiseORM, an async Python ORM. It provides a command-line interface and programmatic API to generate, version, and apply database schema changes. The tool detects model changes, generates migration files with timestamped versions, and can upgrade or downgrade the database schema. It also includes an inspectdb command to reverse-engineer existing database tables into TortoiseORM model definitions.
The package depends on tortoise-orm (the ORM it targets), dictdiffer (for comparing model states), asyncclick (for CLI), and anyio (for async compatibility). It's actively maintained and supports modern Python versions (3.10 through 3.14). However, the project's own documentation warns that tortoise-orm>=1.0.0 includes built-in migration support as an alternative, so users should verify whether Aerich or the built-in solution better fits their needs.
Use it for
- Track and apply schema changes in TortoiseORM projects without manually writing SQL or managing version state.
- Reverse-engineer existing MySQL, PostgreSQL, or SQLite databases into TortoiseORM model definitions via inspectdb.
- Manage multiple database connections and per-app migration directories in complex projects.
- Programmatically run migrations within an application using the Command class instead of CLI.
- Roll back database changes to a previous version when a migration causes issues.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using TortoiseORM and need structured database migrations.
The package is actively maintained, has no known vulnerabilities, and low install friction. However, check whether tortoise-orm>=1.0.0's built-in migration support meets your needs first, as the project itself recommends it as an alternative for newer versions.
Install
aerich on PyPI
Before you install
Installation is straightforward with low friction—a pure-Python wheel with four runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities, though the warning in its own documentation notes that tortoise-orm>=1.0.0 includes built-in migration support as an alternative.
Requires Python >=3.10; tortoise-orm must be installed and configured with aerich.models included in the app config.
License in practice
Licensed under Apache-2.0 (permissive), which allows free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install aerich
# In your project, add aerich.models to your Tortoise-ORM config:
TORTOISE_ORM = {
"connections": {"default": "sqlite://:memory:"},
"apps": {
"models": {
"models": ["myapp.models", "aerich.models"],
"default_connection": "default",
},
},
}
# Then initialize and run migrations:
# aerich init -t myapp.config.TORTOISE_ORM
# aerich init-db
# aerich migrate --name add_column
# aerich upgrade
Verify before relying
- Whether the built-in migration support in tortoise-orm>=1.0.0 fully replaces Aerich's functionality or if Aerich offers additional features.
- Support for databases beyond MySQL, PostgreSQL, and SQLite mentioned in the inspectdb command.
- Performance characteristics when handling large numbers of migration files.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagestortoise-ormdictdifferasyncclickanyio |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 274,337 / month, #8,192 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PL/SQLProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: DatabaseTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: aerich-0.10.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “async orm database versioning”
- aerichAerich is a database migration tool for TortoiseORM that generates,…
- peewee-migratePeewee Migrate provides a command-line and programmatic interface for…
- piccoloPiccolo is an async-first ORM and query builder for Python that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also tortoise-orm · alembic · pypika-tortoise · peewee-migrate · Flask-Migrate · pytest-alembic · mongodb-migrations · sqlalchemy-migrate · yoyo-migrations · Flask-Alembic