]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add support for "real" sequences in mssql
authorGord Thompson <gord@gordthompson.com>
Sun, 19 Apr 2020 17:47:19 +0000 (11:47 -0600)
committerGord Thompson <gord@gordthompson.com>
Fri, 29 May 2020 14:10:38 +0000 (08:10 -0600)
commit668872fe0108c3885adcf6cb10b653b812dc258f
tree1b70ad2d164b1f9060b29a4535bc55bcf5a11350
parent5e1d11573350f8035ed607e9c97b9f8896ab3132
Add support for "real" sequences in mssql

Added support for "CREATE SEQUENCE" and full :class:`.Sequence` support for
Microsoft SQL Server.  This removes the deprecated feature of using
:class:`.Sequence` objects to manipulate IDENTITY characteristics which
should now be performed using ``mssql_identity_start`` and
``mssql_identity_increment`` as documented at :ref:`mssql_identity`. The
change includes a new parameter :paramref:`.Sequence.data_type` to
accommodate SQL Server's choice of datatype, which for that backend
includes INTEGER and BIGINT.   The default starting value for SQL Server's
version of :class:`.Sequence` has been set at 1; this default is now
emitted within the CREATE SEQUENCE DDL for all backends.

Fixes: #4235
Fixes: #4633
Change-Id: I6aa55c441e8146c2f002e2e201a7f645e667b916
25 files changed:
doc/build/changelog/migration_14.rst
doc/build/changelog/unreleased_14/4235.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mssql/information_schema.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/testing/plugin/plugin_base.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_insert.py
lib/sqlalchemy/testing/suite/test_sequence.py
test/dialect/mssql/test_compiler.py
test/dialect/mssql/test_query.py
test/dialect/mssql/test_sequence.py [new file with mode: 0644]
test/dialect/mssql/test_types.py
test/engine/test_execute.py
test/orm/test_session.py
test/requirements.py
test/sql/test_compiler.py
test/sql/test_defaults.py
test/sql/test_functions.py
test/sql/test_insert_exec.py
test/sql/test_returning.py
test/sql/test_sequences.py