Describe the bug
Rendering ExecuteSQLOp does not respect the alembic_module_prefix setting.
This is due to op. being hard-coded in render.py.
Expected behavior
Rendering ExecuteSQLOp to respect alembic_module_prefix.
To Reproduce
The entire context is hard to do minimally due to ExecuteSQLOp not really being autogenerated by normal code. This is an approximation as the bug is quite direct in the code.
context.configure(alembic_module_prefix="test_op")
...
def process_revision_directives(context, revision, directives):
directive.ops = [ops.ExecuteSQLOp(sqltext="COMMIT")]
Error
Generated SQL is
Should be
test_op.execute('COMMIT')
Versions.
- OS: macOS
- Python: 3.10
- Alembic: 1.15.2
- SQLAlchemy: 2.0.40
- Database: PostgreSQL
- DBAPI:
Additional context
I have a fix ready to go, I think! Will fill a PR attached to this issue :)
Have a nice day!
Describe the bug
Rendering
ExecuteSQLOpdoes not respect thealembic_module_prefixsetting.This is due to
op.being hard-coded inrender.py.Expected behavior
Rendering
ExecuteSQLOpto respectalembic_module_prefix.To Reproduce
The entire context is hard to do minimally due to
ExecuteSQLOpnot really being autogenerated by normal code. This is an approximation as the bug is quite direct in the code.Error
Generated SQL is
Should be
Versions.
Additional context
I have a fix ready to go, I think! Will fill a PR attached to this issue :)
Have a nice day!