diff --git a/dsi/backends/sqlite.py b/dsi/backends/sqlite.py index b2608a5..f278c08 100644 --- a/dsi/backends/sqlite.py +++ b/dsi/backends/sqlite.py @@ -655,8 +655,8 @@ def tomlToSqlite(self, filenames, db_name, deleteSql=True): data_types = {float: "FLOAT", str: "VARCHAR", int: "INT"} if not os.path.isfile(db_name+".db") or os.path.getsize(db_name+".db") == 0: - createStmt = f"CREATE TABLE {tableName} ( " - createUnitStmt = f"CREATE TABLE {tableName}_units ( " + createStmt = f"CREATE TABLE IF NOT EXISTS {tableName} ( " + createUnitStmt = f"CREATE TABLE IF NOT EXISTS {tableName}_units ( " insertUnitStmt = f"INSERT INTO {tableName}_units VALUES( " for key, val in tableData.items():