Get your free Liquibase Fundamentals Certification!

Releases

Liquibase 3.10 Released

Liquibase 3.10 Released

Liquibase 3.10.0 is now available with SQL Plus integration, custom executor extensibility, and a new auto-complete Bash script. Here’s a closer look at what’s included in the latest release.

SQL Plus integration 

There are occasions when the Liquibase in-built JDBC connector has trouble processing highly-specialized or variable-rich SQL, and a more purpose-built tool, like SQL Plus or another executor, is required. 

New “runWith” attribute

For Liquibase Community and Pro users, we are introducing an optional changeset attribute called runWith="<executor>". This attribute allows you to specify an “executor” to run your SQL. 

This new capability works with changesets in formatted SQL, XML, JSON, or YAML changelogs that call inline SQL or sqlFile tagged changesets. 

There is also a new liquibase.<executor>.conf file, which lives alongside your liquibase.properties file, where you can optionally specify some useful key-value pairs for configuring your executor. 

How to use it

Liquibase Pro users can use the new SQL Plus integration by simply adding runWith="sqlplus" to a changeset and have SQL Plus in your PATH (or configure it in the accompanying liquibase.sqlplus.conf file). It’s now that easy to run your complex or specialized SQL changesets with SQL Plus. Try it with a free trial of Liquibase Pro.

Integrate your own executor

Equally exciting, and true to open-source and open-extensibility, Liquibase Community users can now write their own classes to integrate their own executor. 

For example, let’s say you need an encrypted JDBC tool. You want to call it as “ejdbc” from your changeset. We have included sample code in the Liquibase download files for you to follow to take advantage of this new feature, which shows how to: 

  • Write and configure the classes to call your tool. 
  • (Optional) Set up the related .conf file.
  • Add runWith="ejdbc" to select changesets to process them with your custom executor.

New auto-complete Bash script

In the Liquibase 3.10 release, you will also find a new bash script for MacOS / and Git Bash for Windows users called .liquibase-completion-mac.bash. This script adds some ease of use to the CLI, including auto-complete of commands and auto-rollout of parameters. This is a single bash script that will not affect any core Liquibase code and can live alongside the existing bash script which has and will continue to ship with Liquibase.

Examples of use:

  • When typing a command like: liquibase gener + [tab key]
    • The command: liquibase generateChangeLog will auto-complete.
  • When typing the command: liquibase rollback + [double tap tab key]
    • A list of rollback commands will appear.
  • When typing the command: liquibase –diffTyp + [tab key]
    • The full flag name will appear including the different possible object types.

Installation

Simply place the file anywhere in the file system, such as the install directory for Liquibase, and activate it using the ‘source’ command in your .bashrc file (for MacOS). 

Example

Open Terminal and enter:

echo “source /path/to/.liquibase-completion-mac.bash” >> .bashrc

Documentation

View documentation about the runWith attribute.

All Liquibase users should check out our continually improving documentation on our new site. Check it out

Get involved

We are always looking to fix bugs and improve documentation for everyone in the Liquibase community. Our community has built a lot. From extensions to integrations, you’ve helped make Liquibase the amazing open source project that it is today. You can help make it stronger. Here are some ways to contribute:

Article author
Nathan Voxland Project Founder