]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
MYSQL: added support for drop check/constraint
authorHannes Hansen <hannes.jakob.hansen@cern.ch>
Thu, 23 May 2019 20:27:21 +0000 (16:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 27 May 2019 20:58:02 +0000 (16:58 -0400)
commit41d547f780d5725bb1feae43f8149412fd349644
tree2e759fb09318ee51316f3f4516018a40b827fb5f
parent047056157cb9d9c4623d472feaa68ee8f44937c7
MYSQL: added support for drop check/constraint

Added support for DROP CHECK constraint which is required by MySQL 8.0.16
to drop a CHECK constraint; MariaDB supports plain DROP CONSTRAINT.  The
logic distinguishes between the two syntaxes by checking the server version
string for MariaDB presence.    Alembic migrations has already worked
around this issue by implementing its own DROP for MySQL / MariaDB CHECK
constraints, however this change implements it straight in Core so that its
available for general use.   Pull request courtesy Hannes Hansen.

Fixes: #4650
Closes: #4659
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4659
Pull-request-sha: 5b654a55e23c2ca498ca3b1cae4f53859e93e8f7

Change-Id: I967710f890722f11cf1f40406adbb17464d16194
(cherry picked from commit c55023641d390b2b09601b10dbc5663e4bd5a466)
doc/build/changelog/unreleased_13/4650.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py