From 518f21bb57b25754602a9fb91c9fe55621d853fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Tu=C5=A1ar?= Date: Sun, 14 Jan 2024 00:56:03 +0000 Subject: [PATCH] :bug: ensure index names do not collide with table names --- mysql_to_sqlite3/transporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql_to_sqlite3/transporter.py b/mysql_to_sqlite3/transporter.py index aea67fd..b651773 100644 --- a/mysql_to_sqlite3/transporter.py +++ b/mysql_to_sqlite3/transporter.py @@ -420,8 +420,8 @@ def _build_create_table_sql(self, table_name: str) -> str: self._mysql_cur_dict.execute( """ SELECT COUNT(*) AS `count` - FROM information_schema.TABLES - WHERE TABLE_SCHEMA = %s + FROM information_schema.TABLES + WHERE TABLE_SCHEMA = %s AND TABLE_NAME = %s """, (self._mysql_database, index_name),