Closed sirsendu closed 6 years ago
The Groovy DSL is designed to work the same way as XML does. All the attributes from XML can be used in Groovy changelogs.
For example, if you had the following XML:
<changeSet author="steve" id="sql-example">
<sql dbms="oracle">insert into person (name, create_date) values ('Bob', sysdate);</sql>
<sql dbms="mysql">insert into person(name, create_date) values('Bob', now());</sql>
</changeSet>
You could do the same thing in groovy with:
changeSet(author: 'steve' id: 'sql-example' {
sql(dbms: 'oracle') { "insert into person (name, create_date) values ('Bob', sysdate);" }
sql(dbms: 'mysql') { "insert into person(name, create_date) values('Bob', now());" }
}
Do you have an example of the XML changelog you were using?
Closing for inactivity.
hi,
is it pissible to use to same changelog files for different database?
my application support multiple databases. on XML days, we used to use dbms type and conversion required.. Based on that single chngelog been applied to all databases and liquibase did all necessary convertions..
is the same be done with dsl? if yes, how?