From a0116ab0c7f2d7158ff295c294c579c7457269f2 Mon Sep 17 00:00:00 2001 From: Jose Salvatierra Date: Tue, 4 Oct 2022 11:49:41 +0100 Subject: [PATCH] bug(migrate): Remove db.create_all from app creation This is because we will use Flask-Migrate to create our tables, so we no longer need to do this when we start up the app. --- .../02_add_flask_migrate_to_app/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/README.md b/docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/README.md index 54f55750..3010fe57 100644 --- a/docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/README.md +++ b/docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/README.md @@ -36,3 +36,12 @@ api = Api(app) with app.app_context(): db.create_all() ``` + +Since we will be using Flask-Migrate to create our database, we no longer need to tell Flask-SQLAlchemy to do it when we create the app. + +Delete these two lines: + +```py +with app.app_context(): + db.create_all() +``` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy