1

liquibase 的前置条件文档中,我们可以看到以下示例:

<preConditions>
    <dbms type="oracle" />
    <dbms type="mysql" />
</preConditions>

当尝试使用 yaml 重新创建相同的规则时,它不起作用。

preConditions:
  dbms:
    type: oracle
  dbms:
    type: mysql

我也尝试过类似的东西:

preConditions:
  - dbms:
      dbms:
        type: oracle
      dbms:
        type: mysql

我知道可以使用:

dbms:
  type: oracle, mysql

我总是收到如下错误:

expected <block end>, but found BlockEntry
in 'reader', line X, column Y:
           - dbms:
           ^

如何在前置条件中使用多个 dbms?

4

1 回答 1

4

XML 共振峰添加了 YAML 没有的默认 <or> 块。所以对应的 YAML 格式为:

  - preConditions:
    - or:
        - dbms:
            type: oracle
        - dbms:
            type: mysql
于 2015-03-09T21:53:31.633 回答