Skip to content

No such command 'db' #530

Answered by miguelgrinberg
MaxB5 asked this question in Q&A
Oct 17, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Please do not write issues on this project when you are just asking for help fixing a bug in your own application. The issues board is for actual bugs in this package. The discussions board is for questions and requests for help. I have converted the issue to a discussion for you this time.

The issue is that you have two files, migration.py and app.py, and both duplicate the code that creates a Flask app. But you have added Flask-Migrate only to migration.py. When you use the flask db command, Flask uses app.py, which does not have Flask-Migrate, so the flask db command is not registered.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MaxB5
Comment options

@miguelgrinberg
Comment options

@MaxB5
Comment options

Answer selected by MaxB5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #529 on October 17, 2023 22:11.