I am normally using Liquibase purely for database refactoring. However, now I have to write a complex data refactoring, which seems to be beyond Liquibase’s capabilities.
The database structure is changed with Liquibase, no problem there.
The data processing however is very complex and cannot be done with simple SQL statements. I don’t want to use stored procedures because I need to support several database engines.
Can I use some kind of scripting within Liquibase which could utilize the database connection I provide ?
If Liquibase has no internal solution, I am planning to:
- Do the initial structural refactoring with Liquibase
- Run some Groovy scripts, passing the database connection to them. These will do the complex data modifications with the Sql object of Groovy.
- Do the cleanup structural refactoring with Liquibase
Any comments is appreciated !!!