FREEDOM251

Freedom251 › Database Migration Tools

Alembic

Free plan Self-hosted

Visit Alembic Alternatives Pricing

Alembic's own site

What Alembic is

Alembic is a free, self-hosted database migration tool for SQLAlchemy projects. It creates, manages, and runs relational database change scripts, with the project's migration environment kept alongside its source code. Its autogeneration compares a database schema with application metadata and drafts a migration for users to review and edit. Alembic can also produce SQL migration scripts without executing them against a database, including for workflows with restricted DDL access. Batch operations address SQLite's limited ALTER TABLE support by copying data into a newly structured table and replacing the existing one. Documentation describes dialect implementations for PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server. Alembic supports Python 3.10 and newer and requires SQLAlchemy 2.0.0 or newer; it can be installed with pip. Autogeneration does not reliably identify table or column renames, so candidate scripts need manual review. Offline SQL generation also cannot handle scripts that need client/server database access, such as retrieving rows with SELECT. The project is part of SQLAlchemy and is developed by Mike Bayer.

Who it suits

Alembic suits Python developers using SQLAlchemy who need to create and manage database schema migrations. It may be useful where migrations must be generated as SQL rather than run directly against a database.

What it does well

  • Free and self-hosted
  • Generates candidate migrations from schema metadata
  • Can produce offline SQL scripts
  • Batch operations support SQLite migrations
  • Documents several database dialects

What to know first

  • Rename detection is unreliable in autogeneration
  • Candidate migrations require manual review
  • Offline SQL cannot handle scripts needing database access
  • Requires Python 3.10+ and SQLAlchemy 2.0.0+

Plans

PlanBilled and limitsPrice
AlembicOpen-source software under the MIT licenseFree

As alembic.sqlalchemy.org lists them, read 3 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the Alembic website.
  2. Use Python 3.10 or newer and SQLAlchemy 2.0.0 or newer.
  3. Install Alembic with pip, commonly in a project-local Python virtual environment.
  4. Create the project’s migration environment and maintain it with the source code.

Verdict

Alembic provides migration scripting for SQLAlchemy projects, including schema comparison and offline SQL generation. Users need to review generated changes and account for the requirements and offline-mode limits.

Questions

How much does Alembic cost?

The Alembic plan is free. It is open-source software under the MIT license.

What does Alembic do?

It creates, manages, and invokes relational database change scripts for use with SQLAlchemy. Its autogeneration drafts candidate migrations from schema and application metadata for users to review and edit.

Which databases does it support?

Its documentation describes dialect implementations for PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server.

Can Alembic generate SQL without connecting to a database?

Yes. It can generate migration SQL without running it against a database, but scripts needing client/server access, such as retrieving rows with SELECT, will not work in that mode.

What does Alembic require?

It supports Python 3.10 and newer and requires SQLAlchemy 2.0.0 or newer. It can be installed with pip.

Who develops Alembic, and where can users get support?

Mike Bayer develops Alembic as part of the SQLAlchemy project. The project directs bug and feature discussions to GitHub Discussions and reports to its GitHub issue tracker.

Facts from Alembic's own pages

Autogenerate
Alembic compares database schema with application metadata to generate candidate migration scripts that users review and edit by hand. · alembic.sqlalchemy.org, 3 Oct 2026
Autogenerate limitation
Autogenerate does not reliably identify table or column renames and its candidate migrations must be manually reviewed and corrected. · alembic.sqlalchemy.org, 3 Oct 2026
Database ecosystem
Alembic uses SQLAlchemy and database drivers, and its documentation describes PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server dialect implementations. · alembic.sqlalchemy.org, 3 Oct 2026
Installation
Alembic can be installed with pip and is commonly installed in a project-local Python virtual environment. · alembic.sqlalchemy.org, 3 Oct 2026
License
The repository license grants permission to use, copy, modify, distribute, and sell the software, subject to its stated conditions. · github.com, 3 Oct 2026
Maintainer
Alembic is developed by Mike Bayer and is part of the SQLAlchemy project. · alembic.sqlalchemy.org, 3 Oct 2026
Migration scripts
A project's migration environment is created once and maintained with its source code. · alembic.sqlalchemy.org, 3 Oct 2026
Offline limitation
Migration scripts that need client/server database access, such as pulling rows with SELECT, will not work in offline SQL generation mode. · alembic.sqlalchemy.org, 3 Oct 2026
Offline SQL
Alembic can generate SQL scripts for migrations instead of running them against a database, including for workflows where DDL access is restricted. · alembic.sqlalchemy.org, 3 Oct 2026
Python support
Alembic supports Python 3.10 and newer and requires SQLAlchemy 2.0.0 or newer. · alembic.sqlalchemy.org, 3 Oct 2026
SQLite migrations
Batch operations support SQLite's limited ALTER TABLE capabilities by copying data into a newly structured table and replacing the old table. · alembic.sqlalchemy.org, 3 Oct 2026
Support
The project directs users to GitHub Discussions for bug and feature discussion and its GitHub issue tracker for bug reports and feature requests. · alembic.sqlalchemy.org, 3 Oct 2026
What it does
Alembic is a lightweight database migration tool for use with SQLAlchemy and provides tools to create, manage, and invoke relational database change scripts. · alembic.sqlalchemy.org, 3 Oct 2026

Where Alembic stands on Freedom251

Look at these too