From 6d9abe3a6d5f4aa5b33579e0d30ff49e2b5c5a5f Mon Sep 17 00:00:00 2001 From: lza_menace Date: Wed, 30 Dec 2020 01:00:04 -0800 Subject: [PATCH] add init command --- wowstash/factory.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wowstash/factory.py b/wowstash/factory.py index e1b2def..f51c5bf 100644 --- a/wowstash/factory.py +++ b/wowstash/factory.py @@ -77,6 +77,11 @@ def create_app(): user.clear_wallet_data() print(f'Wallet data cleared for user {user.id}') + @app.cli.command('init') + def init(): + import wowstash.models + db.create_all() + # Routes/blueprints from wowstash.blueprints.auth import auth_bp from wowstash.blueprints.wallet import wallet_bp