diff --git a/Database.py b/Database.py index 1d07d49..f3b64a6 100644 --- a/Database.py +++ b/Database.py @@ -20,6 +20,17 @@ class Database: password = password, ) self.cursor = self.mydb.cursor() + self.cursor.execute("SHOW DATABASES"); + if (not "zeolak" in self.cursor): + self.cursor.execute("CREATE DATABASE zeolak") + self.mydb = mysql.connector.connect( + host = host, + port = port, + user = user, + password = password, + database = "zeolak" + ) + self.cursor = self.mydb.cursor() def _create_table(self, name: str, content: dict): command: str = f"CREATE TABLE {name} ("