Liquibase's sqlFile command being ignored for SQL server

a 夏天 提交于 2021-01-28 06:41:53

问题


I am trying to use the sqlFile command of liquibase in my changelog. I have the following in my yaml file:

  - changeSet:
      id: 2
      author: marios
      changes:
          - sqlFile:
              dbms: sql server, h2
              encoding: utf8
              endDelimiter: \nGO
              path: script.sql
              relativeToChangelogFile: true
              splitStatements: true
              stripComments: true

What happens here is:

  • changeset number 1 (not shown above) includes create/insert liquibase statements and is being executed on both h2 and sql server

  • changeset 2 only attempts to execute the provided sql file.

  • changeset 2 is being executed on h2 but is being ignored in the case of the sql server

I can see the logs stating that the script successfully ran on H2 but in the case of the SQL Server I can see changeset 2 being execcuted in 2ms (which I understand as: I saw changeset 2 and I can't understand what to do so I'll ignore it)

The thing is that if I replace the words 'sql server' with something like 'whatever' I'd still get the same results, which makes me think that I'm not using the correct words to ask liquibase to run the script on the SQL Server.

I assumed that the correct wording would be 'sql server' as stated in the documentation but that doesn't seem to work.

Any ideas?


回答1:


Solved it. The correct syntax for MS SQL Server according to this is 'mssql'



来源:https://stackoverflow.com/questions/44019803/liquibases-sqlfile-command-being-ignored-for-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!