summaryrefslogtreecommitdiff
path: root/test/sql/test_compiler.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2020-04-19 11:47:19 -0600
committerGord Thompson <gord@gordthompson.com>2020-05-29 08:10:38 -0600
commit668872fe0108c3885adcf6cb10b653b812dc258f (patch)
tree1b70ad2d164b1f9060b29a4535bc55bcf5a11350 /test/sql/test_compiler.py
parent5e1d11573350f8035ed607e9c97b9f8896ab3132 (diff)
downloadsqlalchemy-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 'test/sql/test_compiler.py')
-rw-r--r--test/sql/test_compiler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py
index 20f31ba1e..df52a62c0 100644
--- a/test/sql/test_compiler.py
+++ b/test/sql/test_compiler.py
@@ -4180,19 +4180,19 @@ class DDLTest(fixtures.TestBase, AssertsCompiledSQL):
self.assert_compile(
schema.CreateSequence(s1),
- "CREATE SEQUENCE [SCHEMA__none].s1",
+ "CREATE SEQUENCE [SCHEMA__none].s1 START WITH 1",
schema_translate_map=schema_translate_map,
)
self.assert_compile(
schema.CreateSequence(s2),
- "CREATE SEQUENCE [SCHEMA_foo].s2",
+ "CREATE SEQUENCE [SCHEMA_foo].s2 START WITH 1",
schema_translate_map=schema_translate_map,
)
self.assert_compile(
schema.CreateSequence(s3),
- "CREATE SEQUENCE [SCHEMA_bar].s3",
+ "CREATE SEQUENCE [SCHEMA_bar].s3 START WITH 1",
schema_translate_map=schema_translate_map,
)