]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
feat: add `drop constraint if exists` to compiler
authorMike Fiedler <miketheman@gmail.com>
Sun, 3 Jul 2022 21:56:07 +0000 (17:56 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Sun, 3 Jul 2022 21:56:07 +0000 (17:56 -0400)
commit41656f830c41734063a9460d2800c74123837de6
tree656364c281adcc9a3ac9907bc1cec99c9d1f09e2
parent4b3f204d07d53ae09b59ce8f33b534f26a605cd4
feat: add `drop constraint if exists` to compiler

### Description

Add `DROP CONSTRAINT ... IF EXISTS` behavior to the compiler.

Fixes https://github.com/sqlalchemy/sqlalchemy/issues/8141

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [x] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #8161
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8161
Pull-request-sha: 43276e29fa864fc66900c5a3fa0bf84df5f14271

Change-Id: I18bae3cf013159b6fffde4413fb59ce19ff83c16
doc/build/changelog/unreleased_20/8141.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/sql/test_constraints.py