Updated docker file to run new script file
This commit is contained in:
@@ -6,13 +6,15 @@ def create_connection(db_file):
|
||||
""" create a database connection to a SQLite database """
|
||||
conn = None
|
||||
try:
|
||||
print("Opening Database file and ensuring table integrity")
|
||||
conn = sqlite3.connect(db_file)
|
||||
|
||||
# Execute creation scripts
|
||||
sql = open("scripts/create_tables.sql", "r");
|
||||
conn.executescript(sql.read())
|
||||
|
||||
print(sqlite3.version)
|
||||
|
||||
print("SQLite Version: " + sqlite3.version)
|
||||
print("Table creation complete")
|
||||
except Error as e:
|
||||
print(e)
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user