Developer tools · ranking
10 Best Schema Migration Tools for Python of 2026
Statlyst data desk · updated November 11, 2026 · next review December 26, 2026
Alembic is the best database migration tool for Python teams on SQLAlchemy in 2026, because it autogenerates candidate migrations from your models, handles branches and SQLite batch mode, and was downloaded 179,098,136 times from PyPI in the past month; Django Migrations suits teams already on Django, where makemigrations and migrate ship with the framework; both cost nothing, and Atlas is the cheapest paid upgrade at $9 per developer per month.
Market data
- 225 millionGitHub reports that more than 225 million developers use its platform as of its 2026 Octoverse report.GitHub · 2026
- 1.7 millionSoftware developers held about 1.7 million jobs in the United States in 2025, according to the BLS.U.S. Bureau of Labor Statistics · 2025
- $135,980The median annual wage for US software developers was $135,980 in May 2025.U.S. Bureau of Labor Statistics · 2025
- 14%US software development job postings on Indeed were up 14% year over year as of April 30, 2026.Indeed Hiring Lab · 2026
- 73%73% of respondents to the 2026 Stack Overflow survey use coding assistants and agents daily.Stack Overflow · 2026
- 40%More than 40% of pull requests on GitHub started with an agent's first draft by September 2026, up from 17% in March.GitHub · 2026
| # | Product | Features (35%) | Adoption and reviews (35%) | Value (30%) | Overall | Users or customers | From |
|---|---|---|---|---|---|---|---|
| 1 | Alembic | 8.8 | 9.8 | 10.0 | 9.5 | 179,098,136 monthly downloads (2026) | Free |
| 2 | Django Migrations | 8.6 | 9.5 | 10.0 | 9.3 | 41,143,691 monthly downloads (2026) | Free |
| 3 | Atlas | 9.4 | 8.2 | 8.8 | 8.8 | 8.8k GitHub stars (2026) | $9 |
| 4 | Redgate Flyway | 8.4 | 8.8 | 7.6 | 8.3 | 10.2k GitHub stars (2026) | Free plan |
| 5 | Bytebase | 8.8 | 8.2 | 7.6 | 8.2 | 14.7k GitHub stars (2026) | $20 |
| 6 | yoyo-migrations | 7.2 | 7.6 | 10.0 | 8.2 | 810,620 monthly downloads (2026) | Free |
| 7 | dbmate | 7.3 | 7.2 | 10.0 | 8.1 | 7.5k GitHub stars (2026) | Free |
| 8 | Liquibase | 8.6 | 8.4 | 7.2 | 8.1 | millions of developers (2026) | Free plan |
| 9 | pgroll | 7.8 | 6.8 | 9.8 | 8.1 | 6.6k GitHub stars (2026) | Free |
| 10 | Sqitch | 7.4 | 6.4 | 10.0 | 7.8 | 3.2k GitHub stars (2026) | Free |
Adoption figures come from company filings, official releases or independent surveys, linked in each entry. We compared documented features and published prices; we did not run hands-on tests. Scoring method
This list is for Python teams that need to version database schema changes and apply them the same way in development, CI and production. It covers Python-native tools (Alembic, Django Migrations, yoyo-migrations), language-agnostic CLIs that Python projects often adopt (Flyway, Liquibase, dbmate, Sqitch, pgroll), and platforms that add review and governance on top (Atlas, Bytebase). Each tool is scored on documented features (35 percent), adoption backed by PyPI download counts, GitHub stars or vendor figures (35 percent), and value at published US prices (30 percent). Download and star counts were read on November 11, 2026 and move daily. We compared documented features and published prices and did not run test migrations.
AssessmentUse the tool your ORM already expects. Alembic leads for SQLAlchemy, FastAPI and Flask projects: it compares your models with the live schema, writes candidate migrations you review, and can emit SQL scripts offline for DBAs. Django projects should stay on Django Migrations, which is built into the framework and covers schema and data migrations. Atlas is the strongest add-on for either, since it reads SQLAlchemy or Django models and adds CI checks and drift detection from $9 per developer per month. Flyway and Liquibase fit organizations that run many languages against one database and want a shared SQL or changelog workflow, Bytebase adds approvals and audit logs, and yoyo, dbmate, Sqitch and pgroll are free choices for raw SQL, polyglot repos and zero-downtime PostgreSQL changes.
- 1

Alembic
The migration tool from the SQLAlchemy project, which writes and runs versioned Python migration scripts for SQLAlchemy databases.
9.5overallThe migration tool from the SQLAlchemy project, which writes and runs versioned Python migration scripts for SQLAlchemy databases.
Best forPython teams using SQLAlchemy, FastAPI, Flask or any stack built on SQLAlchemy models.
Adoption data
179,098,136 monthly downloadsThe alembic package was downloaded 179,098,136 times from PyPI in the month to November 11, 2026, according to PyPI Stats.
PyPI Stats, alembic download stats (2026): “Downloads last month: 179,098,136”
Alembic is the migration tool the SQLAlchemy project ships for its own toolkit, and it is the default for FastAPI, Flask and other SQLAlchemy-based Python services. Its autogenerate option compares the models in your application with the current database and writes candidate migrations, which the docs tell you to review and edit by hand. Beyond that core, it covers the cases that break simpler tools: batch mode rebuilds tables on SQLite, offline mode writes SQL scripts a DBA can run, and branch labels and merges let several teams add migrations in parallel. The alembic check command fits CI, failing when models have changes that no migration covers. Adoption is the clearest strength: PyPI Stats counted 179,098,136 downloads in the month to November 11, 2026. The limits are scope and governance. It only works with SQLAlchemy and offers no approval flow or drift monitoring. We compared documented features and published prices and did not run test migrations.
Strengths
- +Most downloaded migration package on PyPI among the tools here
- +Maintained by the SQLAlchemy project, so it tracks SQLAlchemy releases
- +Migrations are plain Python, so data fixes sit next to schema changes
Limitations
- −Autogenerate output needs manual review before it is applied
- −Tied to SQLAlchemy, so it does not help Django or ORM-free services
- −No hosted dashboard, approvals or audit log
SummaryPick Alembic for any Python project built on SQLAlchemy. Add a CI step that runs alembic check so missing migrations never reach production.
- 2

Django Migrations
The migration system built into Django, which turns model changes into versioned migration files and applies them with manage.py commands.
9.3overallThe migration system built into Django, which turns model changes into versioned migration files and applies them with manage.py commands.
Best forTeams building on Django that want migrations with no extra dependency.
Adoption data
41,143,691 monthly downloadsDjango, which includes the migrations framework, was downloaded 41,143,691 times from PyPI in the month to November 11, 2026, according to PyPI Stats.
PyPI Stats, django download stats (2026): “Downloads last month: 41,143,691”
Django Migrations is part of Django itself, and its docs describe it as a version control system for the database schema. makemigrations packages model changes into files that work like commits, migrate applies or reverses them, sqlmigrate prints the SQL, and showmigrations lists what has run. Each app keeps its own migrations folder, which makes reusable Django apps carry their schema with them, and data migrations and squashing cover long-lived projects. Adoption follows Django: PyPI Stats counted 41,143,691 Django downloads in the month to November 11, 2026, and every one of those installs includes the migration framework. The docs are candid about database limits. PostgreSQL has the best schema support, while MySQL lacks transactions around schema changes, so a failed migration needs manual cleanup. Outside Django it does not apply at all. We compared documented features and published prices and did not run test migrations.
Strengths
- +Ships with Django, so there is nothing extra to install or configure
- +Per-app migration folders keep reusable apps self-contained
- +Docs promise the same results in development, staging and production on the same dataset
Limitations
- −Only works for Django projects
- −On MySQL a failed migration must be unpicked by hand, as Django's docs note
- −Creates migrations even for model options that do not change the database
SummaryIf your project runs on Django, use its built-in migrations rather than adding another tool. Pair it with Atlas or Bytebase only when you need CI linting or approvals.
- 3

Atlas
A schema-as-code tool from Ariga that plans migrations from a desired schema, including SQLAlchemy and Django models, and checks them in CI.
8.8overallA schema-as-code tool from Ariga that plans migrations from a desired schema, including SQLAlchemy and Django models, and checks them in CI.
Best forPython teams that want declarative migrations, CI linting and drift detection on top of their ORM.
Adoption data
8.8k GitHub starsAtlas's open source repository on GitHub had 8.8k stars in November 2026.
GitHub, ariga/atlas repository on GitHub (2026): “Stars 8.8k stars”
Atlas treats the database schema as code and plans the migration needed to reach it, and its SQLAlchemy guide pitches it directly as an alternative to Alembic for teams that want more automation. You keep defining tables as SQLAlchemy models, or Django models through a separate integration, and Atlas loads them through a provider. Its main technical edge is coverage: Atlas says it recognizes views, functions, procedures, triggers, sequences and row-level security that SQLAlchemy and Alembic do not natively support. CI integrations for GitHub Actions, GitLab and CircleCI detect risky migrations before they merge, and a Kubernetes Operator and Terraform provider handle deployment. Pricing is clear but stacks up: the Starter plan is free, Pro seats cost $9 per developer per month, each CI/CD project adds $59 per month, and schema monitoring is $39 per database. The open source repository had 8.8k GitHub stars in November 2026. We compared documented features and published prices and did not run test migrations.
Strengths
- +Keeps SQLAlchemy or Django models as the source of truth
- +Covers database objects that ORM migration tools miss
- +Low per-seat entry price for the Pro plan
Limitations
- −CI/CD projects cost $59 per month each on Pro, on top of seats
- −Pro seats are capped at 50, per the pricing page
- −Adds a Go binary and its own config to a Python project
SummaryAtlas is the best upgrade path for Python teams that outgrow Alembic or Django Migrations and need CI checks and drift detection. Price seats and CI projects together before committing.
- 4

Redgate Flyway
A versioned SQL migration tool maintained by Redgate, with an open source CLI and a paid Enterprise edition.
8.3overallA versioned SQL migration tool maintained by Redgate, with an open source CLI and a paid Enterprise edition.
Best forOrganizations where Python, Java and other services share databases and want one SQL migration workflow.
Adoption data
10.2k GitHub starsFlyway's open source repository on GitHub had 10.2k stars in November 2026.
GitHub, flyway/flyway repository on GitHub (2026): “Stars 10.2k stars”
Flyway applies numbered SQL migration files in order and records each one in a history table, which makes it the common choice when Python services share a database with Java, Go or .NET code. The open source CLI supports more than 50 database systems, from PostgreSQL and MySQL to Snowflake, BigQuery and Redshift, and runs on Windows, macOS, Linux and Docker. Redgate maintains the project and sells Flyway Enterprise, which adds a GUI and governed change control, with a 28-day free trial. For Python developers the trade-off is clear: Flyway knows nothing about SQLAlchemy or Django models, so every change is hand-written SQL, and it adds a Java-based tool to the stack. The repository had 10.2k GitHub stars in November 2026. Enterprise prices were not shown on the pricing page as fetched, so cost needs a sales quote. We compared documented features and published prices and did not run test migrations.
Strengths
- +Language-agnostic, so every service can share one migration history
- +Broad database coverage in the open source CLI
- +Backed by Redgate's long database tooling history
Limitations
- −No Python model integration, so migrations are written by hand in SQL
- −Enterprise pricing is not published on the pricing page as fetched
- −The Community edition is positioned for individuals and education
SummaryChoose Flyway when several languages share one database and a plain SQL history is the common ground. Python-only teams get more from Alembic or Django Migrations.
- 5

Bytebase
A database change and access governance platform with review workflows, SQL review, approvals and audit logs.
8.2overallA database change and access governance platform with review workflows, SQL review, approvals and audit logs.
Best forTeams that need approvals, SQL review and audit trails around schema changes across many databases.
Adoption data
14.7k GitHub starsBytebase's repository on GitHub had 14.7k stars in November 2026, the most among the dedicated migration tools on this list.
GitHub, bytebase/bytebase repository on GitHub (2026): “Stars 14.7k stars”
Bytebase sits a level above migration libraries. It manages schema migrations and data fixes, but its focus is governance: SQL review rules, approval flows, policy enforcement and immutable audit logs, plus dynamic data masking and just-in-time access to production databases. It also offers an MCP server so AI agents can propose database changes under the same controls. For a Python team this means keeping Alembic or Django Migrations for authoring and using Bytebase to review and release changes, or writing SQL changes directly in Bytebase. The free Community plan covers up to 20 users and 10 database instances, and Pro costs $20 per user per month. Its repository had 14.7k GitHub stars in November 2026, the most among the dedicated migration tools here. The downsides are another service to host or subscribe to and no awareness of Python models. We compared documented features and published prices and did not run test migrations.
Strengths
- +Adds approvals and audit logs that code-only tools lack
- +Free Community plan covers up to 20 users and 10 database instances
- +Integrates with GitOps, identity providers and ITSM tools
Limitations
- −A separate platform to run, rather than a library in your Python project
- −Pro costs $20 per user per month, the highest published seat price here
- −Does not read SQLAlchemy or Django models
SummaryBytebase fits when compliance or many teams demand approvals and audit trails for every schema change. Small Python teams can skip it until review by pull request stops being enough.
- 6

yoyo-migrations
A small Python schema migration tool where migrations are SQL files or Python scripts made of steps.
8.2overallA small Python schema migration tool where migrations are SQL files or Python scripts made of steps.
Best forPython projects without an ORM that want simple SQL or Python migrations with rollback.
Adoption data
810,620 monthly downloadsThe yoyo-migrations package was downloaded 810,620 times from PyPI in the month to November 11, 2026, according to PyPI Stats.
PyPI Stats, yoyo-migrations download stats (2026): “Downloads last month: 810,620”
yoyo-migrations is a deliberately small tool for Python projects that do not use an ORM. You run yoyo init with a database URL, create migrations with yoyo new, and write either plain SQL or a Python file that lists steps, each with an apply statement and an optional rollback. The CLI covers list, apply, rollback, reapply, mark and unmark, and the develop command is handy locally because it reapplies the latest migration when nothing is pending. Migrations can declare dependencies on each other. Core backends cover PostgreSQL through psycopg2 or psycopg3, MySQL through PyMySQL or mysqlclient, and SQLite. PyPI Stats counted 810,620 downloads in the month to November 11, 2026, a niche but steady user base. The trade-offs are no model diffing, a narrower set of databases and no company behind it. We compared documented features and published prices and did not run test migrations.
Strengths
- +Pure Python install from PyPI with no ORM required
- +Short learning curve: init, new, list and apply
- +Rollback steps live next to each change
Limitations
- −No autogenerate from models
- −Fewer core backends than Flyway or Liquibase
- −Single maintainer project with no commercial support
SummaryPick yoyo for scripts, data pipelines and services that talk to the database with raw SQL from Python. Teams on SQLAlchemy should prefer Alembic.
- 7

dbmate
A lightweight, framework-agnostic migration CLI that runs plain SQL migrations against MySQL, MariaDB, PostgreSQL, SQLite and ClickHouse.
8.1overallA lightweight, framework-agnostic migration CLI that runs plain SQL migrations against MySQL, MariaDB, PostgreSQL, SQLite and ClickHouse.
Best forPolyglot repos and Docker setups where Python is one of several languages touching the database.
Adoption data
7.5k GitHub starsdbmate's repository on GitHub had 7.5k stars in November 2026.
GitHub, amacneil/dbmate repository on GitHub (2026): “Stars 7.5k stars”
dbmate is a single CLI that applies plain SQL migrations and stays out of your application framework. Files are versioned by timestamp, which avoids the numbering clashes that happen when several developers add migrations at once, and each migration runs inside a transaction by default, with an option to turn that off for statements that cannot run in one. It can create and drop databases, which helps in Docker-based development and test setups, and it can write a schema.sql dump so reviewers see the resulting schema in every pull request. The connection comes from the DATABASE_URL environment variable. Supported databases are MySQL, MariaDB, PostgreSQL, SQLite and ClickHouse. The repository had 7.5k GitHub stars in November 2026. For a Python-only codebase it offers less than Alembic, because nothing is generated from models, but it shines in repos that mix Python with Go, Node or Rust. We compared documented features and published prices and did not run test migrations.
Strengths
- +Single binary that works the same for any language in the repo
- +schema.sql dump makes schema changes visible in code review
- +Connection set by the DATABASE_URL environment variable, which suits containers
Limitations
- −No model diffing, so every change is hand-written SQL
- −Smaller set of databases than Flyway
- −No hosted review or audit features
SummaryPick dbmate when one migration tool must serve several languages and you prefer plain SQL. Python-only teams with an ORM should stay with the ORM's tool.
- 8

Liquibase
A database change management tool that tracks changesets in a changelog, with a free Community edition and a paid Liquibase Secure edition.
8.1overallA database change management tool that tracks changesets in a changelog, with a free Community edition and a paid Liquibase Secure edition.
Best forEnterprises that standardize database change management across many applications and need rollback and governance.
Adoption data
millions of developersLiquibase says its tool helps millions of developers track, version and deploy database schema changes.
Liquibase, liquibase/liquibase repository on GitHub (2026): “Liquibase helps millions of developers track, version, and deploy database schema changes.”
Liquibase manages database changes as changesets in a changelog, orders them for deployment and supports rolling them back. It is the usual alternative to Flyway in large organizations, and Python teams meet it when a platform group has standardized on it for every application. Liquibase Community is now licensed under the Functional Source License, and the project publishes stable Community releases quarterly in February, May, August and November, with main branch builds in between. The paid Liquibase Secure edition adds change governance and role-based access control; its Starter plan is limited to companies under $1 billion in revenue, and every Secure plan requires a Professional Services package. Liquibase says it helps millions of developers, and the repository had 5.6k GitHub stars in November 2026. For Python developers, there is no model integration and pricing needs a quote. We compared documented features and published prices and did not run test migrations.
Strengths
- +Rollback support built into the changelog model
- +Secure plans add governance for large organizations
- +Predictable quarterly release schedule
Limitations
- −Liquibase Community uses the Functional Source License rather than a classic open source license
- −Secure plans are quoted, and each one requires a Professional Services package
- −No integration with Python ORMs
SummaryUse Liquibase when your company already standardizes on it or needs rollback and governance across many applications. Check the FSL terms and get a quote before planning paid use.
- 9

pgroll
An open source CLI from Xata for zero-downtime, reversible PostgreSQL schema migrations that serves old and new schema versions at once.
8.1overallAn open source CLI from Xata for zero-downtime, reversible PostgreSQL schema migrations that serves old and new schema versions at once.
Best forPython teams on PostgreSQL that cannot lock large tables during migrations.
Adoption data
6.6k GitHub starspgroll's repository on GitHub had 6.6k stars in November 2026.
GitHub, xataio/pgroll repository on GitHub (2026): “Stars 6.6k stars”
pgroll targets one problem: changing PostgreSQL schemas on busy tables without downtime. Its README describes migrations with no database locking and no breaking changes, achieved by keeping the old and new schema versions working at the same time, so the previous release of a Python app keeps running while the new one rolls out. It backfills columns automatically when a change needs it and can roll back instantly. Xata maintains it, and it is free under the Apache 2.0 license; the repository had 6.6k GitHub stars in November 2026. The trade-offs come from that focus. It only supports PostgreSQL, it does not read SQLAlchemy or Django models, and migrations are written in pgroll's own definitions rather than the files your ORM produces. Many teams will use it only for the few risky changes that justify it. We compared documented features and published prices and did not run test migrations.
Strengths
- +Solves table locking, the hardest part of migrating busy PostgreSQL tables
- +Lets old and new app versions run side by side during a deploy
- +Free under Apache 2.0
Limitations
- −PostgreSQL only
- −Migrations use pgroll's own format rather than Python or plain SQL files
- −Smallest adoption signal among the tools ranked above it
SummaryReach for pgroll when a PostgreSQL migration would lock a large table under live traffic. Keep Alembic or Django Migrations for routine changes.
- 10

Sqitch
A database-native change management tool that uses SQL scripts and a dependency-aware plan instead of numbered migrations.
7.8overallA database-native change management tool that uses SQL scripts and a dependency-aware plan instead of numbered migrations.
Best forTeams that write native SQL and want explicit dependencies between changes across many engines.
Adoption data
3.2k GitHub starsSqitch's repository on GitHub had 3.2k stars in November 2026.
GitHub, sqitchers/sqitch repository on GitHub (2026): “Stars 3.2k stars”
Sqitch calls itself database-native change management for framework-free development. Each change is a script written in the target engine's own SQL, and a plan file records the changes and their dependencies instead of relying on numeric prefixes, which makes the order of changes explicit when many people work on one schema. Its README lists support for PostgreSQL 8.4+, YugabyteDB, CockroachDB, SQLite, MySQL, MariaDB, Oracle and Firebird, and the project topics also cover Snowflake, Vertica, Exasol and ClickHouse. It has no opinions about your framework, so a Python service can use it as easily as any other. The cost of that neutrality is zero help from Python models and a workflow that takes time to learn. It is free under the MIT license, and the repository had 3.2k GitHub stars in November 2026, the lowest on this list. We compared documented features and published prices and did not run test migrations.
Strengths
- +Works with any application language, including Python
- +Wide engine coverage, including Oracle, Snowflake and Vertica
- +Free under the MIT license
Limitations
- −No model diffing or Python integration
- −Smallest GitHub following on this list
- −Plan-file workflow takes longer to learn than numbered files
SummarySqitch suits SQL-first teams that care about explicit dependencies and broad engine support. Most Python teams will find Alembic or Django Migrations faster to adopt.
Choosing a product
- Start from your ORM
- If your models live in SQLAlchemy, Alembic reads that metadata directly and is the default. If you use Django, its built-in makemigrations and migrate commands track every model change per app. Tools that ignore the ORM, such as yoyo, dbmate, Flyway and Sqitch, expect you to write SQL by hand, which suits teams without an ORM or with several services sharing one database.
- Review autogenerated migrations
- Alembic's docs describe autogenerate output as candidate migrations that you review and modify by hand. Renames, data moves and database objects such as views or triggers are where generated diffs go wrong. Atlas says it detects views, functions, triggers, sequences and row-level security that SQLAlchemy and Alembic do not handle natively.
- Check how each tool handles your database
- Django's docs note that MySQL lacks transactions around schema changes, so a failed migration must be unpicked by hand. Alembic offers batch mode for SQLite, which cannot alter most table structures in place. For large PostgreSQL tables that cannot be locked, pgroll keeps old and new schema versions working at the same time.
- Run migrations in CI before production
- Apply migrations to a fresh database in CI and fail the build when models and migrations drift. Alembic includes an alembic check command for this, Atlas ships GitHub Actions, GitLab and CircleCI integrations, and dbmate can save a schema.sql file so schema changes show up in code review.
- Pay only for governance
- Every tool on this list has a free edition. Paid tiers buy team controls: Atlas Pro starts at $9 per developer per month plus usage for CI projects, Bytebase Pro costs $20 per user per month, and Flyway Enterprise and Liquibase Secure are quoted by sales. Budget for them when audits, approvals or many databases make manual review too slow.
Frequently asked questions
What is the best database migration tool for Python?
Alembic ranks first on our weighted scores for SQLAlchemy-based projects, including FastAPI and Flask: it autogenerates candidate migrations from your models and was downloaded 179,098,136 times from PyPI in the month to November 11, 2026. Django projects should use Django's built-in migrations. Atlas is the best paid add-on for either, from $9 per developer per month.
Should I use Alembic or Django migrations?
Follow your ORM. Alembic works with SQLAlchemy models and Django Migrations works with Django models, and each reads the models it was built for. Mixing them in one project adds a second migration history with no benefit.
Is there a free schema migration tool for Python?
Yes. Alembic, Django Migrations, yoyo-migrations, dbmate, pgroll and Sqitch are free and open source. Atlas has a free Starter plan, Bytebase has a free Community plan for up to 20 users, Flyway has a Community edition for individuals and education, and Liquibase Community is free under the Functional Source License.
How do I migrate a PostgreSQL schema without downtime?
Avoid changes that lock large tables, and split breaking changes into expand and contract steps. pgroll automates this for PostgreSQL by serving old and new schema versions at once, with automatic backfills and instant rollback. Test the migration against a copy of production data first.
Can Python use Flyway or Liquibase?
Yes. Both are language-agnostic CLIs, so a Python service can run them in CI or at deploy time. They do not read SQLAlchemy or Django models, so you write changes in SQL or changelogs by hand. They fit best when several languages share one database.
Questions or corrections: editorial@statlyst.com · Disclosure
More rankings