]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The system by which a :class:`.Column` considers itself to be an
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 7 Oct 2015 14:02:45 +0000 (10:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 7 Oct 2015 14:02:45 +0000 (10:02 -0400)
commit414af7b61291b3fa77eb6da6a9b123399214089b
tree0d08a583f9ceae522307c725e4ea67fff261b82f
parent4578ab54a5b849fdb94a7032987f105b7ec117a4
- The system by which a :class:`.Column` considers itself to be an
"auto increment" column has been changed, such that autoincrement
is no longer implicitly enabled for a :class:`.Table` that has a
composite primary key.  In order to accommodate being able to enable
autoincrement for a composite PK member column while at the same time
maintaining SQLAlchemy's long standing behavior of enabling
implicit autoincrement for a single integer primary key, a third
state has been added to the :paramref:`.Column.autoincrement` parameter
``"auto"``, which is now the default. fixes #3216
- The MySQL dialect no longer generates an extra "KEY" directive when
generating CREATE TABLE DDL for a table using InnoDB with a
composite primary key with AUTO_INCREMENT on a column that isn't the
first column;  to overcome InnoDB's limitation here, the PRIMARY KEY
constraint is now generated with the AUTO_INCREMENT column placed
first in the list of columns.
22 files changed:
doc/build/changelog/changelog_11.rst
doc/build/changelog/migration_11.rst
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/crud.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/testing/schema.py
test/dialect/mysql/test_compiler.py
test/dialect/mysql/test_reflection.py
test/dialect/postgresql/test_query.py
test/dialect/test_sqlite.py
test/engine/test_reflection.py
test/ext/declarative/test_basic.py
test/orm/test_composites.py
test/orm/test_query.py
test/orm/test_relationships.py
test/orm/test_unitofwork.py
test/sql/test_compiler.py
test/sql/test_defaults.py
test/sql/test_insert.py
test/sql/test_metadata.py