Skip to content
Snippets Groups Projects
Commit ed636de3 authored by Arie Peterson's avatar Arie Peterson
Browse files

Load flask_migrate extension in dev/cli mode

parent 38ae75d6
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,11 @@ else: ...@@ -110,7 +110,11 @@ else:
logging.info("Running initialization code (dev mode).") logging.info("Running initialization code (dev mode).")
init_routines() init_routines()
else: else:
logging.info("Not running initialization code (dev mode).") logging.info("Not running initialization code (dev or cli mode).")
# This should not perform any actual migration, just load the
# flask_migrate extension so we can use `flask db` commands from the
# cli.
flask_migrate.Migrate(app, db)
app.register_blueprint(api_v1) app.register_blueprint(api_v1)
app.register_blueprint(web) app.register_blueprint(web)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment