From 09e444344d38ec5ee7d31975033110ecf5c5892e Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Sun, 12 Jun 2022 20:53:03 +0100 Subject: [PATCH] Importing models to create database --- ref-test/app/install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ref-test/app/install.py b/ref-test/app/install.py index 1296787..1559571 100644 --- a/ref-test/app/install.py +++ b/ref-test/app/install.py @@ -21,6 +21,7 @@ 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.') + from .models import Entry, Test, User with app.app_context(): db.create_all() write('system.log', 'Creating database schema.') if not path.isfile(f'./{data}/.encryption.key'):