Skip to content

Commit f541dcf

Browse files
committed
this is after all the point of transactions
1 parent 72fdbea commit f541dcf

File tree

1 file changed

+2
-10
lines changed
  • robot-server/robot_server/persistence/_migrations

1 file changed

+2
-10
lines changed

robot-server/robot_server/persistence/_migrations/v9_to_v10.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,9 @@ def migrate(self, source_dir: Path, dest_dir: Path) -> None:
4343
schema_10.labware_offset_location_sequence_components_table.create(
4444
transaction
4545
)
46-
47-
# Then we upmigrate the data to the new tables
48-
with sql_engine_ctx(
49-
dest_dir / DB_FILE
50-
) as engine, engine.begin() as transaction:
46+
# Then we upmigrate the data to the new tables
5147
_upmigrate_stored_offsets(transaction)
52-
53-
# Then, we drop the table with we don't care about anymore
54-
with sql_engine_ctx(
55-
dest_dir / DB_FILE
56-
) as engine, engine.begin() as transaction:
48+
# Then, we drop the table with we don't care about anymore
5749
schema_9.labware_offset_table.drop(transaction)
5850

5951

0 commit comments

Comments
 (0)