yoyo-migrations
Database migrations with SQL
What it is and what it does
Yoyo-migrations is a database schema migration tool that manages version-controlled changes to your database structure. You write migrations as either raw SQL files or Python scripts containing SQL statements, and yoyo provides command-line tools to apply them forward, roll them back, and manage dependencies between migration steps. It supports PostgreSQL, MySQL, and SQLite out of the box.
The tool is designed to integrate into your application's deployment workflow, letting you track schema changes alongside code changes. Migrations are simple to write—a Python migration is just a call to the step() function with forward and rollback SQL—and yoyo handles the bookkeeping of which migrations have been applied to which database. It has been marked Production/Stable since its first release in 2010, though it has not had a new release for 734 days.
Use it for:
- Manage schema changes in a PostgreSQL, MySQL, or SQLite application as part of your deployment pipeline.
- Write reversible database migrations in Python or SQL to evolve your schema safely across environments.
- Track and enforce migration dependencies so that schema changes are applied in the correct order.
- Rollback a migration if a deployment fails or a schema change needs to be undone.
- Version-control your database schema changes alongside your application code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Yoyo-migrations is a database schema migration tool that lets you write and manage migrations as SQL files or Python scripts, with command-line tools to apply, rollback, and track dependencies across PostgreSQL, MySQL, and SQLite databases.
Yes, if your project uses PostgreSQL, MySQL, or SQLite and you need a lightweight, straightforward migration tool. The low install friction and permissive license make it accessible. However, be aware that the package is dormant (no releases for 734 days), so consider whether you need active maintenance for compatibility with newer database versions or Python releases, or whether an actively maintained alternative better fits your risk tolerance.
Install
yoyo-migrations on PyPI
pip
pip install yoyo-migrationsuv
uv add yoyo-migrationspoetry
poetry add yoyo-migrationsInstalling yoyo-migrations
Before you install
Low install friction with only three runtime dependencies (sqlparse, tabulate, importlib-metadata). However, the package is dormant—no releases for 734 days as of the fact sheet date—which may signal reduced maintenance responsiveness for bug fixes or compatibility updates.
License in practice
Licensed under Apache (permissive), which allows commercial and private use with minimal restrictions, making it safe for most projects from a licensing standpoint.
Quickstart
pip install yoyo-migrations
from yoyo import step
step(
"CREATE TABLE foo (id INT, bar VARCHAR(20), PRIMARY KEY (id))",
"DROP TABLE foo",
)
Requires a supported database (PostgreSQL, MySQL, or SQLite) and appropriate database driver installed separately.
Verify before relying
- Whether the 734-day dormancy affects real-world compatibility with recent database versions or Python releases.
- Whether ODBC and Oracle backends mentioned as 'unsupported' are maintained or functional.
- Comparison of feature completeness and migration workflow against actively maintained alternatives like Alembic or South.
Package facts
| License | Apache (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — sqlparse, tabulate, importlib-metadata |
| Maintenance | dormant — 734 days since the last release |
| First released | |
| Downloads | 734,697/month — #5,197 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: yoyo_migrations-9.0.0-py3-none-any.whl
Keywords: migrations, migrate, database, alembic, south
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
peewee-migratePeewee Migrate provides a command-line and…
permissive · top 15,000 on PyPI
schemachangeschemachange is a Python tool that manages…
permissive · top 15,000 on PyPI
django-syzygyAutomates Django database migration deployment…
permissive · top 15,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
migramigra compares PostgreSQL database schemas and…
permissive · top 15,000 on PyPI
Flask-MigrateFlask-Migrate handles SQLAlchemy database…
permissive · top 5,000 on PyPI
django-pg-zero-downtime-migrationsProvides a Django database backend for…
permissive · top 15,000 on PyPI
mongodb-migrationsManages schema migrations for MongoDB databases…
copyleft · top 15,000 on PyPI
atlas-provider-sqlalchemyConnects SQLAlchemy models to Atlas to…
unclear · top 15,000 on PyPI
sqlalchemy-migrateProvides database schema migration management…
permissive · top 15,000 on PyPI