I am using SqlAlchemy and Flask-migrate for DB migration. I have successfully init the DB and upgrade once, but when I deleted one of my table colu
I do not know have you solved the problem. But I find a very concise solution: you can add this to the bottom of your init.py file. Afterwards, delete and rebuild your migrations:
with app.app_context():
if db.engine.url.drivername == 'sqlite':
migrate.init_app(app, db, render_as_batch=True)
else:
migrate.init_app(app, db)
hope to help you.