]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Allow passoing ExcludeConstraint to DropConstraint.from_constraint
authord3 <david.hills@florincourt.com>
Tue, 29 Aug 2023 11:27:04 +0000 (07:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Aug 2023 13:24:32 +0000 (09:24 -0400)
commit733197e0e794ed6aec3e21542257d6cec5bb7d1f
treeb2a0bc319d8a6ba6b94d50a3a14b7e037af82266
parent0c1ad1e0fae1a459758ffa42710dbce21d66ef5a
Allow passoing ExcludeConstraint to DropConstraint.from_constraint

Added support for ``op.drop_constraint()`` to support PostrgreSQL
``ExcludeConstraint`` objects, as well as other constraint-like objects
that may be present in third party dialects, by resolving the ``type_``
parameter to be ``None`` for this case.   Autogenerate has also been
enhanced to exclude the ``type_`` parameter from rendering within this
command when  ``type_`` is ``None``.  Pull request courtesy David Hills.

Fixes: #1300
Closes: #1301
Pull-request: https://github.com/sqlalchemy/alembic/pull/1301
Pull-request-sha: b8643d19ab1930554e1137b64ffea8b8e2c74ec7

Change-Id: I25599d24a8bba455ab1d9b88843d8d84627a72d5
alembic/autogenerate/render.py
alembic/operations/ops.py
docs/build/unreleased/1300.rst [new file with mode: 0644]
tests/test_op.py
tests/test_postgresql.py