We are using Flask with SQLAlchemy and Flask migrate. This was working fine so far but lately it has stopped showing error messages on failures. It just silently fails. I believe this started happening when we upgraded flask-migrate but I'm not 100% sure.
The issue is not that it's failing, it only fails when there's a proper reason (multiple head versions, or invalid migration file), but it does not report the error on console.
> flask db upgrade
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
> echo $?
1
It works fine and applies migration when there's no failure:
> flask db upgrade
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 34f504777ec2 -> ed96adbb2dd6, empty message
> echo $?
0
Versions:
> flask --version
Python 3.9.15
Flask 1.1.2
Werkzeug 1.0.1
Flask-Migrate = "^2.5.3"
Not sure why the error messages are not showing up.