Overview
Flask-Migrate 4.0, released on October 1, 2023, adds support for Flask 3.0 and SQLAlchemy 2.0 for Alembic migrations.
Main Features
This major release is compatible with the new declarative style of SQLAlchemy 2.0 and the import system of Flask 3.0.
python
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///app.db'
db = SQLAlchemy(app)
migrate = Migrate(app, db)
