From 6f8a6dfd842480ce987410d1a4c7958a4bbace55 Mon Sep 17 00:00:00 2001 From: Rishabh Srivastava Date: Fri, 12 Jan 2024 15:20:44 +0800 Subject: [PATCH] Update __init__.py --- defog/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defog/__init__.py b/defog/__init__.py index d15f074..917e03f 100644 --- a/defog/__init__.py +++ b/defog/__init__.py @@ -458,9 +458,9 @@ def generate_mysql_schema( if len(tables) == 0: # get all tables - table_schema = self.db_creds.get("database", "") + db_name = self.db_creds.get("database", "") cur.execute( - "SELECT table_name FROM information_schema.tables WHERE table_schema = '{table_schema}';" + f"SELECT table_name FROM information_schema.tables WHERE table_schema = '{db_name}';" ) tables = [row[0] for row in cur.fetchall()]