This commit is contained in:
danielwilczak101
2020-11-15 08:59:15 +00:00
parent 2cfb840198
commit 7d8045692f
2 changed files with 8 additions and 1 deletions

View File

@ -86,6 +86,12 @@ class Attributes:
fitness DOUBLE,
chromosome text
); """,
sql_create_config_structure = """CREATE TABLE IF NOT EXISTS config (
id integer PRIMARY KEY,
generation integer NOT NULL,
fitness DOUBLE,
chromosome text
); """,
Graph = matplotlib_graph.Matplotlib_Graph
):
@ -137,6 +143,7 @@ class Attributes:
self.database = Database()
self.database_name = deepcopy(database_name)
self.sql_create_data_structure = deepcopy(sql_create_data_structure)
self.sql_create_config_structure = deepcopy(sql_create_config_structure)
# Graphing variables
self.graph = Graph(self.database)

View File

@ -88,7 +88,7 @@ class SQL_Database:
if self.conn is not None:
# create projects table
self.create_table(ga.sql_create_data_structure)
self.create_table(ga.sql_create_config_structure)
else:
print("Error! cannot create the database connection.")