skillfed

yoyo-migrations

Database migrations with SQL

yoyo-migrations v9.0.0 734.7K downloads/30d#5,197 on PyPI
Permissive license Apache DORMANT released

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-migrations

uv

uv add yoyo-migrations

poetry

poetry add yoyo-migrations

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: DatabaseTopic :: Database :: Front-EndsTopic :: Software DevelopmentTopic :: Software Development :: Version Control

Tags

database schema migration toolsql migration managementdatabase version controlapply and rollback migrationspython database migrationsmigration dependency trackingsql script runner
schema-migrationdatabase-versioning

More Software Development packages