0

I have an existing process I'm using to track SQL changes - essentially it's just a lot of SQL changes that I track and move around to different environments. I'm wanting to start tracking these changes through Liquibase. Everything looks good from what I've seen, but I'm not seeing any way to generate ChangeSets from Java. I would think there's a way using the Liquibase jar that I could leverage to write out ChangeSets without handling the formatting myself. Essentially my first implementation is just going to be writing the raw SQL changes out into a Liquibase format - I have the raw SQL, and an initial ChangeLog file, but I'm not sure how to write this out without doing it manually.

Does anybody know if Liquibase has any existing logic that does this sort of thing? Or does anybody have any other options to help me do this without managing formatting myself? The format I'm going to be using is JSON.

1 Answer 1

1

Changessets can not be generated from java. But there are is a way to generate changesets from an existing database.

In our applications we are using hibernate to create the table structure. After the database is up to date we use the generateChangelog method of liquibase to generate the changesets. There is also a way to generate a change log by different two tables.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.