From 0cc00ef91112428ddc468f508ba22e45ff03b25f Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Sat, 20 Aug 2022 16:50:34 +0100 Subject: [PATCH] Updated install script to only create SQLite file --- ref-test/install.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ref-test/install.py b/ref-test/install.py index 05d140f..3b52dd2 100755 --- a/ref-test/install.py +++ b/ref-test/install.py @@ -27,7 +27,9 @@ with app.app_context(): with open(f'./{data}/.encryption.key', 'wb') as key_file: key = Fernet.generate_key() key_file.write(key) - if not database_exists(database_uri): - create_database(database_uri) - write('system.log', 'No database found. Creating a new database.') - db.create_all() \ No newline at end of file + + """Create File for SQLite Database""" + if database_uri[0:6].lower() == 'sqlite': + if not database_exists(database_uri): + create_database(database_uri) + write('system.log', 'No SQLite file found. Creating a new database.') \ No newline at end of file