2

In precondition documentation of liquibase we can see the example below:

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

When try to recreate the same rule using yaml, it not works.

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

I also have tried something like:

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

I know that is possible to use:

dbms:
  type: oracle, mysql

I always get an error like:

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

How can I use multiple dbms in preConditions?

josivan
  • 1,963
  • 1
  • 15
  • 26

1 Answers1

6

The XML formant adds in a default <or> block that YAML doesn't. So the corresponding YAML format is:

  - preConditions:
    - or:
        - dbms:
            type: oracle
        - dbms:
            type: mysql
Nathan Voxland
  • 15,453
  • 2
  • 48
  • 64