One of the changes in SQLAlchemy from 1.4.X -> 2.X is that they've removed automatic commits for DDL/DML statements fed into Connections created from Engine.connect(). This leads to a few minor bugs in the DB migration code post 0.39.0 release (and the SQLAlchemy 2.X migration in #1127).
This PR
This PR fixes those bugs by using Connections created by Engine.begin() instead
Testing
$ bazel run sematic/db/tests:test_migrate
manual testing in a repo that's using Sematic as a dependency
Description
One of the changes in SQLAlchemy from 1.4.X -> 2.X is that they've removed automatic commits for DDL/DML statements fed into
Connection
s created fromEngine.connect()
. This leads to a few minor bugs in the DB migration code post0.39.0
release (and the SQLAlchemy 2.X migration in #1127).This PR
This PR fixes those bugs by using
Connection
s created byEngine.begin()
insteadTesting