We’ve been writing a few database migrations at the office lately, and have seen some issues regarding the syntax of HSQLDB used in development and test, and Postgres, used in production.
To solve some of these issues, we’ve resorted to using liquibase preconditions in some of our migrations.
In this post, I’ll give a brief rundown of the preconditions feature and how they look when used in combination with the database migration plugin and Grails.