Liquibase的sqlFile命令被SQL Server忽略 [英] Liquibase's sqlFile command being ignored for SQL server

查看:192
本文介绍了Liquibase的sqlFile命令被SQL Server忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的变更日志中使用liquibase的sqlFile命令.我的yaml文件中包含以下内容:

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

这里发生的是:

  • 变更集1(上面未显示)包括创建/插入liquibase语句,并且正在h2和sql服务器上执行

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

变更集2仅尝试执行提供的sql文件.

changeset 2 only attempts to execute the provided sql file.

变更集2正在h2上执行,但在sql server的情况下将被忽略

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

我可以看到日志表明该脚本已成功在H2上运行,但是在SQL Server的情况下,我可以看到变更集2在2毫秒内执行(我理解为:我看到了变更集2,但我不明白什么为此,我将忽略它)

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)

问题是,如果我将"sql server"一词替换为"whatever"之类的东西,我仍然会得到相同的结果,这使我认为我没有使用正确的词来要求liquibase运行SQL Server上的脚本.

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.

我假设正确的措辞将是文档中所述的"sql server",但这似乎不起作用.

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

有什么想法吗?

推荐答案

已解决.根据,MS SQL Server的正确语法是'mssql'

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

这篇关于Liquibase的sqlFile命令被SQL Server忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆