]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Fix duplicated constraints when using expressions
authorNicolas CANIART <nicolas.caniart@jobteaser.com>
Sun, 13 Mar 2022 16:39:40 +0000 (12:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 14 Mar 2022 19:12:47 +0000 (15:12 -0400)
commitce6144efc6648986733fb9bbb981e95a4a739f61
tree4caa38f234748b7e8398d10a618b1198cbd784bd
parent721b28ce889e63e49b8be1a1bd62b7d3bb3b7526
Fix duplicated constraints when using expressions

Fixed issue where using :meth:`.Operations.create_table` in conjunction
with a :class:`.CheckConstraint` that referred to table-bound
:class:`.Column` objects rather than string expressions would be added to
the parent table twice, resulting in an incorrect DDL sequence. Pull
request courtesy Nicolas CANIART.

Fixes: #1004
Closes: #1005
Pull-request: https://github.com/sqlalchemy/alembic/pull/1005
Pull-request-sha: 2fe5c5297bcde990096571a047039c451aa876f6

Change-Id: I2bf48701968fe59a6766f8f8879320b1bfd75774
alembic/operations/schemaobj.py
docs/build/unreleased/1004.rst [new file with mode: 0644]
tests/test_op.py