2

I accidentally forgot to put a message while executing flask db migrate. I want to know whether there is any way to add the message right now. It's not pleasant nor helpful to see "empty message". Here is what my environment looks like, hope the screenshot helps too.

Thank you!

flask-fb-migrate-error

Kutay Eroglu
  • 73
  • 1
  • 5

1 Answers1

3

Yes. You can edit the migration script and add the message there. Open the migration script in question in your text editor, and add the message that you want this migration to have in the first line, after the opening triple quotes.

Here is an example migration with a comment. Just make sure your script looks like this:

"""enter the migration comment you'd like here!

Revision ID: xxxxxxxxxx
Revises: yyyyyyyyyy
Create Date: yyyy-mm-dd hh:mm:ss

"""
from alembic import op
import sqlalchemy as sa

# ... more stuff here ...
Miguel Grinberg
  • 65,299
  • 14
  • 133
  • 152