]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Make if_exists and if_not_exists flags on ddl statements match compiler
authorJesse Bakker <github@jessebakker.com>
Tue, 6 Sep 2022 20:00:10 +0000 (16:00 -0400)
committermike bayer <mike_mp@zzzcomputing.com>
Tue, 4 Oct 2022 02:40:20 +0000 (02:40 +0000)
commitb6eed88ef4ebb3fd7035b4e366bf6653ebb26d15
treee98e19d6fa7b236cf2fc7eed3ffc96c805b80667
parentd5905ccd7df000143194975f8f3d72fcef0672e3
Make if_exists and if_not_exists flags on ddl statements match compiler

Added ``if_exists`` and ``if_not_exists`` parameters for all "Create" /
"Drop" constructs including :class:`.CreateSequence`,
:class:`.DropSequence`, :class:`.CreateIndex`, :class:`.DropIndex`, etc.
allowing generic "IF EXISTS" / "IF NOT EXISTS" phrases to be rendered
within DDL. Pull request courtesy Jesse Bakker.

Fixes: #7354
Closes: #8492
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8492
Pull-request-sha: d107c6ce553bd430111607815f5b3938ffc4770c

Change-Id: I367e57b2d9216f5180bcc44e86ca6f3dc794e5ca
doc/build/changelog/unreleased_20/7354.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/ddl.py
test/sql/test_constraints.py
test/sql/test_metadata.py
test/sql/test_sequences.py