]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix named CHECK constraint name omitted on repeated creates
authorGord Thompson <gord@gordthompson.com>
Sat, 6 Mar 2021 19:19:13 +0000 (12:19 -0700)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 7 Mar 2021 03:54:14 +0000 (22:54 -0500)
commit48f7e04d9542e9038d1af0ec3073025f2fba930e
tree4c97d8c68a3c94068c476a55c0eec1e64f0d6990
parent90ca1b1be3b9014b2f1c7775ed128c2009dcf70a
Fix named CHECK constraint name omitted on repeated creates

Fixed issue where the CHECK constraint generated by :class:`_types.Boolean`
or :class:`_types.Enum` would fail to render the naming convention
correctly after the first compilation, due to an unintended change of state
within the name given to the constraint. This issue was first introduced in
0.9 in the fix for issue #3067, and the fix revises the approach taken at
that time which appears to have been more involved than what was needed.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #6007
Change-Id: I7ecff0a9d86191520f6841b3922a5af5a6971fba
(cherry picked from commit 506b88de5e428fd4ad2feff663ba53e2dbb28891)
doc/build/changelog/unreleased_13/6007.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/naming.py
lib/sqlalchemy/sql/sqltypes.py
test/sql/test_metadata.py