I have a file db_table.py that looks like:
db_table.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate ap
Some problem will can happen if you use DispatcherMiddleware (werkzeug.wsgi). Change return object from app_dispatch to app without app_dispatch for migrate time.
This is a rare case, I hope someone helps...