flask db stamp head code example
Example 1: alembic.util.exc.CommandError: Target database is not up to date.
$ flask db stamp head
$ flask db migrate
$ flask db upgrade
Example 2: flask migrate
$ flask db migrate -m "Initial migration."
$ flask db stamp head
$ flask db migrate
$ flask db upgrade
$ flask db migrate -m "Initial migration."