No such command 'db' #530
-
(venv) M:\PROJETS\Python\Projects\Rendermap_Server>flask db init Error: No such command 'db'. Hello, can you help me with this issue ? Package Version alembic 1.12.0 migration.py app = Flask(name) db.init_app(app) and i've set $env:FLASK_APP = "app.py" and if I downgrate Flask : (venv) M:\PROJETS\Python\Projects\Rendermap_Server>flask db init and by downgrading Flask-Migrate (venv) M:\PROJETS\Python\Projects\Rendermap_Server>flask db init |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
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 |
Beta Was this translation helpful? Give feedback.
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 theflask db
command is not registered.