In our spring boot application I integrate liquibase for schema migration. Even it's possible to do data migration in a single database with liquibase as well, in some cases I need to change related data somewhere else (etc. storage), so I would need higher level abstraction.
Running scripts on on start will slow up-time, so was thinking to have separate main class in my spring boot which will run the migration code (The challenge here is to configure it to run with spring context and profiles)
Will it be good approach or anyone may suggest another option?
You can create a customChange
for this purpose: Java code changeset in liquibase
Or you call the Liquibase API from some of your custom code instead. It's not very hard to run the migrations manually.