Freedom251 › Database Migration Tools
yoyo-migrations

What yoyo-migrations is
yoyo-migrations is a free, open-source tool for changing database schemas as applications evolve. Developers can write migration steps as SQL files or Python scripts, then use the command line to apply, roll back, reapply, list, mark or unmark them. Migrations may declare dependencies, and yoyo orders them by dependency and then filename. Python migrations can use SQL queries or Python functions for applying and reversing changes, and the tool can also be called from Python code. Core backends support PostgreSQL, MySQL and SQLite; contributed backends include ODBC, Oracle, Snowflake and Redshift, although ODBC and Oracle are described as unsupported. Each migration runs in a separate transaction with savepoints. Some databases, including MySQL, cannot roll back DDL, so failed changes may need manual recovery. Installation is documented through PyPI and pip, under the Apache Software License.
Who it suits
It suits developers managing schema changes in self-hosted database projects, especially those using SQL or Python migrations. The command line and Python integration support both console and code-based workflows.
What it does well
- Free and open source
- Supports SQL and Python migration scripts
- Provides rollback and reapply commands
- Dependency-aware migration ordering
- Core PostgreSQL, MySQL and SQLite backends
What to know first
- ODBC and Oracle backends are unsupported
- Some DDL cannot be rolled back
- Failed migrations may require manual recovery
- Self-hosted deployment
Verdict
yoyo-migrations provides dependency-aware schema changes with command-line and Python control. Its transaction model and rollback commands are useful, but database-specific DDL limits can require manual recovery.
Facts from yoyo-migrations's own pages
- Apply and rollback
- Its command line can list, apply, roll back, reapply, and mark migrations. · ollycope.com, 11 Oct 2026
- Credential handling
- The prompt-password option prompts for a database password to help prevent it from appearing in process listings. · ollycope.com, 11 Oct 2026
- Custom backends
- Custom database backends can be added as Python packages and discovered through entry points. · ollycope.com, 11 Oct 2026
- Database backends
- Documented backends include PostgreSQL, MySQL, SQLite, ODBC, Oracle, Snowflake, and Redshift. · ollycope.com, 11 Oct 2026
- Database limitation
- Some databases, including MySQL, do not support rolling back DDL statements, so a failed migration may require manual database recovery. · ollycope.com, 11 Oct 2026
- Installation
- The documentation instructs users to install yoyo-migrations from PyPI with pip. · ollycope.com, 5 Oct 2026
- Intended audience
- PyPI classifies the package for developers and the console environment. · pypi.org, 11 Oct 2026
- License
- PyPI lists the license as Apache Software License (Apache). · pypi.org, 5 Oct 2026
- Migration controls
- The command line can apply, roll back, reapply, list, mark, and unmark migrations. · ollycope.com, 5 Oct 2026
- Migration dependencies
- Migrations can declare dependencies, and yoyo runs them in dependency then filename order. · ollycope.com, 5 Oct 2026
- Migration formats
- Migration scripts can be written as SQL files or Python scripts. · ollycope.com, 5 Oct 2026
- Migration ordering
- Migrations can declare dependencies and run in dependency then filename order. · ollycope.com, 11 Oct 2026
- Purpose
- Yoyo is a database schema migration tool whose migrations are SQL files or Python scripts. · ollycope.com, 11 Oct 2026
- Python integration
- Yoyo can also be called from Python code to read migrations and apply or roll them back through a database backend. · ollycope.com, 11 Oct 2026
- Python steps
- Python migrations can use SQL queries or Python functions for apply and rollback steps. · ollycope.com, 11 Oct 2026
- Python use
- Yoyo can be called from Python code to read migrations and apply or roll them back. · ollycope.com, 5 Oct 2026
- Security configuration
- The documentation shows SSL options for MySQL connections, including certificate and key settings. · ollycope.com, 11 Oct 2026
- Support
- The project documentation directs users to its issue tracker and mailing list for issues, questions, and suggestions. · ollycope.com, 11 Oct 2026
- Transaction limitation
- Some databases, such as MySQL, do not support rolling back DDL statements, so errors may require manually resetting database state. · ollycope.com, 5 Oct 2026
- Transactions
- Each migration runs in a separate transaction with savepoints isolating its steps, where supported by the database. · ollycope.com, 11 Oct 2026
- Unsupported backends
- The package listing says ODBC and Oracle backends are available but unsupported. · pypi.org, 5 Oct 2026
Where yoyo-migrations stands on Freedom251
- Database Migration Tools#32 of 32