]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
allow control of constraint isolation w/ add/drop constraint
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Feb 2025 17:04:12 +0000 (12:04 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Feb 2025 19:48:09 +0000 (14:48 -0500)
commita4207e8a4a29854c506179dd6a83def42b35f6df
tree01e1667777aeaeba57db6904d78b5819234d9a61
parentbfc59da31080f4cc3f7ebab17136aa5f6246774d
allow control of constraint isolation w/ add/drop constraint

Added new parameters :paramref:`.AddConstraint.isolate_from_table` and
:paramref:`.DropConstraint.isolate_from_table`, defaulting to True, which
both document and allow to be controllable the long-standing behavior of
these two constructs blocking the given constraint from being included
inline within the "CREATE TABLE" sequence, under the assumption that
separate add/drop directives were to be used.

Fixes: #12382
Change-Id: I53c4170ccb5803f69945ba7aa3d3a143131508eb
(cherry picked from commit d6f11d9030b325d5afabf87869a6e3542edda54b)
doc/build/changelog/unreleased_20/12382.rst [new file with mode: 0644]
lib/sqlalchemy/sql/ddl.py
test/sql/test_constraints.py