How would you handle incremental SQL patches using Gradle

I am currently working on a product that heavily relies on database logic/functions to realize certain business cases. After having a hard time with quarterly live releases we decided to integrate our projects in a CI environment and to setup a continuous delivery process as a final goal.

At the current moment the database related projects heavliy rely on shell scripts. These scripts are triggered on each release and take care of the incremental import of certain sql patches (e.g. projectX_v_4_0.sql, projectX_v_4_1.sql, ... projectX_v_4_n.sql).

Regretfully this approach is very error prone and also the script logic is not verified/tested at all. Since our experience with Gradle was very good in the past, we decided to evaluate Gradle as an alternative to the existing shell scripts.

My question now is: How would you handle the sequential import of the certain sql patches? Is there a certain framework that you could recommend or would you prefer to execute the psql command from inside Gradle as it was done by the shell scripts before?

Thanks for any hints/recommendations and general thoughts!


Have a look at Liquibase and Flyway. A Gradle plugin is available for both tools.

Need Your Help

Suggestion for template book for C++?

c++ templates resources

I am learning templates. Which book is worth buying for doing template programming?

Does it make sense to store a painter for a widget?

c++ qt

I have a custom Widget derived from QFrame. I will need to draw on it very frequently (basically, a picture is updated with every mouse move). I checked the Qt Basic drawing example: They override