Skip to content

Commit

Permalink
missing begin statements
Browse files Browse the repository at this point in the history
  • Loading branch information
andyoneal committed Sep 13, 2023
1 parent 50c4725 commit 0c6f1e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions singer_sdk/connectors/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def create_schema(self, schema_name: str) -> None:
Args:
schema_name: The target schema to create.
"""
with self._connect() as conn:
with self._connect() as conn, conn.begin():
conn.execute(sqlalchemy.schema.CreateSchema(schema_name))

def create_empty_table(
Expand Down Expand Up @@ -830,7 +830,7 @@ def rename_column(self, full_table_name: str, old_name: str, new_name: str) -> N
column_name=old_name,
new_column_name=new_name,
)
with self._connect() as conn:
with self._connect() as conn, conn.begin():
conn.execute(column_rename_ddl)

def merge_sql_types(
Expand Down Expand Up @@ -1139,7 +1139,7 @@ def _adapt_column_type(
column_name=column_name,
column_type=compatible_sql_type,
)
with self._connect() as conn:
with self._connect() as conn, conn.begin():
conn.execute(alter_column_ddl)

def serialize_json(self, obj: object) -> str:
Expand Down

0 comments on commit 0c6f1e8

Please sign in to comment.