From 9a225543c624ef1ccb4a0ad10f8d745b68ea97bd Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Sat, 11 Jun 2022 15:27:27 +0100 Subject: [PATCH] db create all the time --- ref-test/app/install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ref-test/app/install.py b/ref-test/app/install.py index 2157b83..2ea9759 100644 --- a/ref-test/app/install.py +++ b/ref-test/app/install.py @@ -22,8 +22,8 @@ def install_scripts(): if not database_exists(Config.SQLALCHEMY_DATABASE_URI): create_database(Config.SQLALCHEMY_DATABASE_URI) write('system.log', 'No database found. Creating a new database.') - with app.app_context(): db.create_all() - write('system.log', 'Creating database schema.') + with app.app_context(): db.create_all() + write('system.log', 'Creating database schema.') if not path.isfile(f'./{data}/.encryption.key'): write('system.log', 'No encryption key found. Generating new encryption key.') with open(f'./{data}/.encryption.key', 'wb') as key_file: