Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sergiy Matusevych <[email protected]>
  • Loading branch information
bpkroth and motus authored Jan 6, 2025
1 parent 4766f61 commit 33dd94c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mlos_bench/mlos_bench/storage/sql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def create(self) -> "DbSchema":
_LOG.info("Create the DB schema")
assert self._engine
self._meta.create_all(self._engine)
with self._engine.connect() as conn:
with self._engine.begin() as conn:
# If the trial table has the trial_runner_id column but no
# "alembic_version" table, then the schema is up to date as of initial
# create and we should mark it as such to avoid trying to run the
Expand All @@ -304,7 +304,6 @@ def create(self) -> "DbSchema":
alembic_cfg = self._get_alembic_cfg(conn)
command.stamp(alembic_cfg, "heads")
# command.current(alembic_cfg)
conn.commit()
return self

def update(self) -> "DbSchema":
Expand Down

0 comments on commit 33dd94c

Please sign in to comment.