Using Liquibase with Apache Derby

Apache Derby can be downloaded here:

To use Derby with Liquibase you will need the following information:

jars for the classpath:

  • derby.jar
  • derbyclient.jar

jdbc driver name:

  • org.apache.derby.jdbc.EmbeddedDriver

jdbc url:

  • jdbc:derby:DATABASENAME

Creating a database with Derby can be done with a tool called “ij” provided by Derby, as well as other ways.

ij> CONNECT 'jdbc:derby:exampledb;create=true';

A run of Liquibase with Derby, having both Derby jars and using the example db database folder in the current directory, could look like this:

java -jar liquibase.jar 
  --changeLogFile=db-changelog.xml migrate

For further arguments you can pass to Derby, please have a look at Derby’s documentation: