Scott
Scott

Reputation: 67

Alembic shows "empty message" when running upgrade

When I run an Alembic upgrade I see "empty message" next to the revision number instead of "users table". I am following this tutorial.

What should appear according to the author:

(venv) $ flask db upgrade
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> e517276bb1c2, users table

What appeared for me:

(venv) PS C:\Users\HP\microblog> flask db upgrade
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> 907246db53d3, empty message

Upvotes: 2

Views: 2491

Answers (1)

davidism
davidism

Reputation: 127180

You didn't provide a message when creating the revision, so it shows a default, "empty message". Provide a message with the -m option as shown in the tutorial.

(venv) $ flask db migrate -m "users table"

If you're using Flask-Alembic instead of Flask-Migrate, the message is a required argument so this doesn't happen.

(venv) $ flask db revision "users table"

Upvotes: 3

Related Questions