modifyChangeSets

The modifyChangeSets tag lets you include SQL scripts in your Liquibase changelog while using an application's native executor—like PSQL, SQL Plus, or SQLCMD—instead of the JDBC default. You can use it to specify an overarching executor for all files in your project.

Uses

If you have many changesets that need to be run with a native executor, and you organize your changelogs in a "root" and "nested" format using the include and includeAll tags, you can use the runWith attribute to specify an executor that applies to every changeset in every file wrapped in the modifyChangeSets tag. Since your nested changelogs inherit the executor specified in modifyChangeSets, you don't have to specify it on each individual changeset you include.

If you want to make an exception for a particular changeset you're including, you can specify the default Liquibase JDBC executor for that changeset. All other changesets still run with the executor inherited from modifyChangeSets.

You can still include additional files in your root changelog outside of the modifyChangeSets tag. These files run with the Liquibase JDBC executor.

Syntax

Attributes

Attribute Value Notes
runWith jdbc Default value if none specified
psql Executor for PostgreSQL
sqlplus Executor for MSSQL Server
sqlcmd Executor for Oracle

Related links