check does not work with ExecuteSQLOp present #1334
-
Hi, we're using With these added, op = ops.ExecuteSQLOp(sqltext='CREATE OR REPLACE TRIGGER ...')
op.to_diff_tuple() # NotImplementedError This used to work in version Here's the stacktrace of INFO [alembic.runtime.migration] Context impl OracleImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.autogenerate.compare] Detected added table 'his_test'
Traceback (most recent call last):
File "/home/user/PycharmProjects/project/.venv/bin/alembic", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/config.py", line 630, in main
CommandLine(prog=prog).main(argv=argv)
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/config.py", line 624, in main
self.run_cmd(cfg, options)
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/config.py", line 601, in run_cmd
fn(
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/command.py", line 294, in check
diffs = migration_script.upgrade_ops.as_diffs()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/operations/ops.py", line 2556, in as_diffs
return list(OpContainer._ops_as_diffs(self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/operations/ops.py", line 2566, in _ops_as_diffs
yield op.to_diff_tuple()
^^^^^^^^^^^^^^^^^^
File "/home/user/PycharmProjects/project/.venv/lib/python3.11/site-packages/alembic/operations/ops.py", line 88, in to_diff_tuple
raise NotImplementedError
NotImplementedError I have no idea how this worked in 1.6.5 as already there, Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
so...you are using the process_revision_directives to add in ExecuteSQLOp to the model-side revision stream and... if that's included within the |
Beta Was this translation helpful? Give feedback.
we should add a method to ExecuteSQLOp to return something here, that's fine