How to check if there are pending migrations when using SQLAlchemy/Alembic?
You can figure out if your project as at the latest migration with the current subcommand:
Example output when you are at the latest migration:
(venv) $ python app.py db current
f4b4aa1dedfd (head)

The key thing is the (head) that appears after the revision number. That tells you that this is the most recent migration.
Here is how things change after I add a new migration, but before I upgrade the database:
(venv) $ python app.py db current
f4b4aa1dedfd

And after I run db upgrade I get:
(venv) $ python app.py db current
f3cd9734f9a3 (head)

Hope this helps!
We're using SQLAlchemy and Alembic (along with Flask-SQLAlchemy and Flask-Migrate). How to check if there are pending migrations?
I tried to check both Alembic's and Flask-Migrate's documentation but failed to find the answer.