Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORDER keyword for sequences is not supported by mssql #2528

Closed
jenhae opened this issue Feb 14, 2022 · 1 comment · Fixed by #2549
Closed

ORDER keyword for sequences is not supported by mssql #2528

jenhae opened this issue Feb 14, 2022 · 1 comment · Fixed by #2549

Comments

@jenhae
Copy link

jenhae commented Feb 14, 2022

Environment

Liquibase Version: 4.5.0

Liquibase Integration & Version: CLI

Liquibase Extension(s) & Version:

Database Vendor & Version: Microsoft SQL Server 2017 (RTM-CU12) (KB4464082) - 14.0.3045.24 (X64)

Operating System Type & Version: Windows 10

Description

The documentation states at https://docs.liquibase.com/change-types/create-sequence.html that
the ordered attribute of createSequence entitiy is supported for mssql. But when running the generated SQL or the changeSet against a MS SQL Server
I get an Error 'Incorrect syntax near the keyword 'ORDER'.', without ORDER the statemant works as expected.

Steps To Reproduce

List the steps to reproduce the behavior.

  • use createSequence entity with ordered="true" to generate a sequence as doen here:
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">

  <changeSet id="Test" author="Me">
    <createSequence sequenceName="MY_DUMMY_SEQUENCE" startValue="1" incrementBy="1" ordered="true" />
  </changeSet>
</databaseChangeLog>
  • run against MSSQL

Actual Behavior

Execution of createSequence fails.

Expected/Desired Behavior

Documentation is adjusted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment