]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
ExecuteSQLOp rendering respects alembic_module_prefix
authorAvery Fischer <avery@averyjfischer.com>
Tue, 13 May 2025 16:44:27 +0000 (12:44 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Tue, 13 May 2025 20:29:12 +0000 (22:29 +0200)
commit76791bbb42b4b2829dc79df5ea5234ac7dc226b0
tree0bb6db7dbff5dcb1b775141c380f42a765321716
parente9f0c07b34b2e157400e7d777c8e31f97381f9ad
ExecuteSQLOp rendering respects alembic_module_prefix

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description

Rendering ExecuteSQLOp did not respect the `alembic_module_prefix` setting due
to having `op.` hard-coded in its template.

This change updates the render logic to use the same
`_alembic_autogenerate_prefix()` as it seems the rest of the ops use.

### Checklist

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

Fixes #1656

Closes: #1657
Pull-request: https://github.com/sqlalchemy/alembic/pull/1657
Pull-request-sha: c67f4b7ce25c363d525cd2483370b0be024160d9

Change-Id: I6ca36642ed3755a2d96824498502ada6ae16f714
alembic/autogenerate/render.py
docs/build/unreleased/1656.rst [new file with mode: 0644]
tests/test_autogen_render.py