-
-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outdated cookbook suggestion to use branched connections #908
Comments
agree, the general idea is to just lose the "with connectable.connect()" part, it was trying to guess if the given "connection" were an Engine or Connection. no more guessing, it's a Connection. can accept a PR for this. |
Thanks for the rapid response! (p.s. just spent the last few hours watching your v2 YouTube tutorial; super helpful 🙏) |
yup something like that, because the recipe has "with connctoin.begin()" on the outside of the alembic command as it is, you're already inside a transactional context |
Describe the bug
In https://alembic.sqlalchemy.org/en/latest/cookbook.html#sharing-a-connection-with-a-series-of-migration-commands-and-environments,
it gives a recipe using a branched connection.
However, as per
Connection._branch
:Expected behavior
The section would provide a "v2 compliant" solution
Thanks!
The text was updated successfully, but these errors were encountered: