diff options
| author | Gord Thompson <gord@gordthompson.com> | 2020-04-19 11:47:19 -0600 |
|---|---|---|
| committer | Gord Thompson <gord@gordthompson.com> | 2020-05-29 08:10:38 -0600 |
| commit | 668872fe0108c3885adcf6cb10b653b812dc258f (patch) | |
| tree | 1b70ad2d164b1f9060b29a4535bc55bcf5a11350 /doc | |
| parent | 5e1d11573350f8035ed607e9c97b9f8896ab3132 (diff) | |
| download | sqlalchemy-668872fe0108c3885adcf6cb10b653b812dc258f.tar.gz | |
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
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/changelog/migration_14.rst | 29 | ||||
| -rw-r--r-- | doc/build/changelog/unreleased_14/4235.rst | 18 |
2 files changed, 46 insertions, 1 deletions
diff --git a/doc/build/changelog/migration_14.rst b/doc/build/changelog/migration_14.rst index 9c7d5fa55..6702f86f0 100644 --- a/doc/build/changelog/migration_14.rst +++ b/doc/build/changelog/migration_14.rst @@ -1599,4 +1599,31 @@ was not created. :ref:`defaults_sequences` -:ticket:`4976`
\ No newline at end of file +:ticket:`4976` + + +.. _change_4235: + +Added Sequence support distinct from IDENTITY to SQL Server +----------------------------------------------------------- + +The :class:`.Sequence` construct is now fully functional with Microsoft +SQL Server. When applied to a :class:`.Column`, the DDL for the table will +no longer include IDENTITY keywords and instead will rely upon "CREATE SEQUENCE" +to ensure a sequence is present which will then be used for INSERT statements +on the table. + +The :class:`.Sequence` prior to version 1.3 was used to control parameters for +the IDENTITY column in SQL Server; this usage emitted deprecation warnings +throughout 1.3 and is now removed in 1.4. For control of paramters for an +IDENTITY column, the ``mssql_identity_start`` and ``mssql_identity_increment`` +parameters should be used; see the MSSQL dialect documentation linked below. + + +.. seealso:: + + :ref:`mssql_identity` + +:ticket:`4235` + +:ticket:`4633` diff --git a/doc/build/changelog/unreleased_14/4235.rst b/doc/build/changelog/unreleased_14/4235.rst new file mode 100644 index 000000000..acd1ff1ce --- /dev/null +++ b/doc/build/changelog/unreleased_14/4235.rst @@ -0,0 +1,18 @@ +.. change:: + :tags: sql, mssql + :tickets: 4235, 4633 + + 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, BIGINT, and DECIMAL(n, 0). 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. + + .. seealso:: + + :ref:`change_4235`
\ No newline at end of file |
