]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Propertly ignore ``Identity`` in MySQL and MariaDb.
authorFederico Caselli <cfederico87@gmail.com>
Wed, 21 Apr 2021 20:49:09 +0000 (22:49 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 29 Apr 2021 00:03:27 +0000 (20:03 -0400)
commitd3c73ad8012e15bf47529b3fcb0bac1298fbdb90
tree31ae2c420b9d58d55e56a9191a34176c1deb7c16
parent1443945e61f1f113e46a5044315a91558d4d232a
Propertly ignore ``Identity`` in MySQL and MariaDb.

Ensure that the MySQL and MariaDB dialect ignore the
:class:`_sql.Identity` construct while rendering the
``AUTO_INCREMENT`` keyword in a create table.

The Oracle and PostgreSQL compiler was updated to not render
:class:`_sql.Identity` if the database version does not support it
(Oracle < 12 and PostgreSQL < 10). Previously it was rendered regardless
of the database version.

Fixes: #6338
Change-Id: I2ca0902fdd7b4be4fc1a563cf5585504cbea9360
12 files changed:
doc/build/changelog/unreleased_14/6338.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_select.py
test/dialect/oracle/test_compiler.py
test/dialect/postgresql/test_compiler.py
test/requirements.py
test/sql/test_identity_column.py