]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support for `IF EXISTS` in SQL Server 2016 (13.x) and later versions
authorEdgar Ramírez Mondragón <edgarrm358@gmail.com>
Thu, 18 Dec 2025 19:58:59 +0000 (14:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 19 Dec 2025 19:43:30 +0000 (14:43 -0500)
commit40fc3c90e1fee3f7a19184ab57cca3cbcdfa6da1
tree20b957a167ddce0721749f310d8979d4055fb928
parentb7a8ea19f47bcfb41ead46303fa16a184106965c
Support for `IF EXISTS` in SQL Server 2016 (13.x) and later versions

Added support for the ``IF EXISTS`` clause when dropping indexes on SQL
Server 2016 (13.x) and later versions. The :paramref:`.DropIndex.if_exists`
parameter is now honored by the SQL Server dialect, allowing conditional
index drops that will not raise an error if the index does not exist.
Pull request courtesy Edgar Ramírez Mondragón.

Fixes: #13045
Closes: #13046
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13046
Pull-request-sha: 65dca2055cb403430730b5cf42f0c5f55b23bfb1

Change-Id: Iab95b1a46003b38709a791b8a7c4233dfda5e830
doc/build/changelog/unreleased_20/13045.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
test/dialect/mssql/test_compiler.py