Flask-Migrate
SQLAlchemy database migrations for Flask applications using Alembic.
Decision gist · record as of 2026-08-14
Yes. Flask-Migrate is the standard, actively maintained tool for database migrations in Flask applications. It has low install friction, no security vulnerabilities, permissive licensing, and solves a core problem in Flask development. Install it if you are building a Flask app with SQLAlchemy and need to manage schema changes over time.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- FLASK_APP environment variable must be set for flask db commands to work, as documented in Flask.
- Low friction: pure Python wheel, only three runtime dependencies (Flask, Flask-SQLAlchemy, alembic).
- Actively maintained with recent releases and a stable repository.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute Flask-Migrate with minimal restrictions, including in commercial applications.
last release 2025-01-10 (581 days) · last repo commit 2026-05-14 · 2,404 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,687,736 downloads/mo, #2,052 on PyPI
Alternatives
Verify before relying
pip install Flask-Migrate
from flask_migrate import Migrate
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
# Then run: flask db init, flask db migrate, flask db upgrade- Whether Alembic's current detection limitations (e.g., inability to detect indexes) affect your specific schema changes.
What it is and what it does
Flask-Migrate is a Flask extension that wraps Alembic to manage SQLAlchemy database schema changes. It exposes migration operations through the `flask db` command-line interface, letting you initialize migrations, generate migration scripts from model changes, and apply those changes to your database. The package integrates directly with Flask and Flask-SQLAlchemy, so you initialize it by passing your app and database instance to the Migrate class.
The typical workflow is: run `flask db init` once to set up a migrations folder, then `flask db migrate` each time your models change (which generates a migration script you should review), and `flask db upgrade` to apply pending migrations to your database. Migration scripts are meant to be version-controlled alongside your source code. The package is actively maintained, has no known vulnerabilities, and depends only on Flask, Flask-SQLAlchemy, and alembic.
Use it for
- Track and version database schema changes alongside your Flask application code in Git.
- Automate deployment of schema changes across development, staging, and production environments.
- Collaborate on database changes in a team by sharing migration scripts through version control.
- Rollback or replay database changes by running specific migration scripts in sequence.
- Initialize a new Flask application with an empty database and a migrations folder ready for future changes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Flask-Migrate is the standard, actively maintained tool for database migrations in Flask applications. It has low install friction, no security vulnerabilities, permissive licensing, and solves a core problem in Flask development. Install it if you are building a Flask app with SQLAlchemy and need to manage schema changes over time.
Install
flask-migrate on PyPI
Before you install
Low friction: pure Python wheel, only three runtime dependencies (Flask, Flask-SQLAlchemy, alembic). Actively maintained with recent releases and a stable repository.
FLASK_APP environment variable must be set for flask db commands to work, as documented in Flask.
License in practice
MIT license is permissive; you can use, modify, and distribute Flask-Migrate with minimal restrictions, including in commercial applications.
Quickstart
pip install Flask-Migrate
from flask_migrate import Migrate
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
# Then run: flask db init, flask db migrate, flask db upgrade
Verify before relying
- Whether Alembic's current detection limitations (e.g., inability to detect indexes) affect your specific schema changes.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesFlaskFlask-SQLAlchemyalembic |
| Maintenance | Actively maintained 581 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,687,736 / month, #2,052 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: Flask_Migrate-4.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sqlalchemy alembic flask”
- Flask-MigrateFlask-Migrate handles SQLAlchemy database migrations for Flask…
- Flask-AlembicFlask-Alembic integrates Alembic database migrations into Flask…
- alembic_utilsExtends Alembic to autogenerate database migrations for PostgreSQL…
Give your agent the search over MCP, or paste the wish link into any chat.
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.
Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
See also Flask-Alembic · Flask-Script · sqlalchemy-migrate · Flask-SQLAlchemy · atlas-provider-sqlalchemy · peewee-migrate · sqlite-migrate · yoyo-migrations · alembic_utils