jos*_*van 2 yaml liquibase preconditions
在liquibase的前提文档中我们可以看到下面的例子:
<preConditions>
<dbms type="oracle" />
<dbms type="mysql" />
</preConditions>
Run Code Online (Sandbox Code Playgroud)
当尝试使用 yaml 重新创建相同的规则时,它不起作用。
preConditions:
dbms:
type: oracle
dbms:
type: mysql
Run Code Online (Sandbox Code Playgroud)
我也尝试过类似的事情:
preConditions:
- dbms:
dbms:
type: oracle
dbms:
type: mysql
Run Code Online (Sandbox Code Playgroud)
我知道可以使用:
dbms:
type: oracle, mysql
Run Code Online (Sandbox Code Playgroud)
我总是收到这样的错误:
expected <block end>, but found BlockEntry
in 'reader', line X, column Y:
- dbms:
^
Run Code Online (Sandbox Code Playgroud)
如何在前提条件中使用多个 dbms?
XML 共振峰添加了 YAML 没有的默认 <or> 块。所以对应的YAML格式为:
- preConditions:
- or:
- dbms:
type: oracle
- dbms:
type: mysql
Run Code Online (Sandbox Code Playgroud)