-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Engine.begin() instead of Engine.connect() to ensure DML/DDL stat…
…ements are committed in migration code (#1129) # 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 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 `Connection`s created by `Engine.begin()` instead ### Testing ```bash $ bazel run sematic/db/tests:test_migrate ``` + manual testing in a repo that's using Sematic as a dependency
- Loading branch information
1 parent
fc96e11
commit 9b13728
Showing
3 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters