Skip to content

Commit

Permalink
resolve drop_table sqlalchemy reflection error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
UmbertoFasci committed Dec 21, 2024
1 parent b5a60d9 commit be28090
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/tests/io/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ def drop_table(
table_name: str,
conn: sqlite3.Connection | sqlalchemy.engine.Engine | sqlalchemy.engine.Connection,
):
import sqlalchemy

if isinstance(conn, sqlite3.Connection):
conn.execute(f"DROP TABLE IF EXISTS {sql._get_valid_sqlite_name(table_name)}")
conn.commit()
Expand Down

0 comments on commit be28090

Please sign in to comment.