Java EE 7 Database Migrations with Liquibase and WildFly

I have written about other database migration frameworks before but in this article I’d like to cover the Liquibase framework in combination with WildFly as Java EE 7 compatible application server. In the following tutorial, we’re going to write a full Java EE 7 book store application with a few steps and with Liquibase on board to create the database structure and insert example data into the database. Thanks to the WildFly Maven Plug-in we even do not need to download and configure the application server but let Maven and the plug-in do the work for us. ...

July 31, 2014 · 9 min · 1771 words · Micha Kops

Liquibase Snippets

Precondition: Postgres Schema exists Using this precondition should run a migration only if the schema my_schema exists. <preConditions onFail="CONTINUE"> <sqlCheck expectedResult="1"> SELECT COUNT(1) FROM information_schema.schemata WHERE schema_name = 'my_schema'; </sqlCheck> </preConditions> Resources: https://docs.liquibase.com/concepts/changelogs/preconditions.html

March 1, 2010 · 1 min · 33 words · Micha Kops