This commit is contained in:
@@ -153,9 +153,8 @@ def create_table_if_not_exists(
|
||||
logger.info(f"Created table: {model_cls.__tablename__}")
|
||||
finally:
|
||||
# Close connection only if we created it
|
||||
if should_close:
|
||||
if hasattr(connection, "close"):
|
||||
connection.close() # type: ignore[attr-defined]
|
||||
if should_close and hasattr(connection, "close"):
|
||||
connection.close() # type: ignore[attr-defined]
|
||||
|
||||
|
||||
def get_column_names_without_virtual(model_cls: Type[DeclarativeBase]) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user