user4975679
user4975679

Reputation: 1579

Liquibase: setting the dbms field in SQL format

From http://www.liquibase.org/documentation/changes/sql.html

<changeSet author="liquibase-docs" id="sql-example">
    <sql dbms="h2, oracle"
            endDelimiter="\nGO"
            splitStatements="true"
            stripComments="true">insert into person (name) values ('Bob')
        <comment>What about Bob?</comment>
    </sql>
</changeSet>

How do I write the dbms=h2 part in my Liquibase migrations file in SQL format?

I have code like this:

<sql dbms="h2"
        endDelimiter="\nGO"
        splitStatements="true"
        stripComments="true">insert into person (name) values ('Bob')
    <comment>What about Bob?</comment>
</sql>

<sql dbms="mysql"
        endDelimiter="\nGO"
        splitStatements="true"
        stripComments="true">insert into person (name) values ('Bob')
    <comment>What about Bob?</comment>
</sql>

Upvotes: 1

Views: 3423

Answers (1)

user4975679
user4975679

Reputation: 1579

Here is the Liquibase SQL format: --changeset liquibase-docs:1 dbms:h2

Source: http://www.liquibase.org/documentation/sql_format.html

Upvotes: 3

Related Questions