Is there an API for checking if current DB contains changes that doesn't appear in the changelog?

Hi
I’m trying to integrate liquibase to our current java project, and I would like to check if a certain database contains changelogs beyond the current changesets.

I know there is the API liquibase.listUnrunChangeSets to check if there are unrun changes, and I wonder if there is something for the opposite side - to check if there are changes beyond what liquibase currently knows.

The reason I’m asking, is so that i can check if the database is NEWER then a certain version of the code (and then i want to present an error)

If any of you knows such API (or a different way to say if the database is newer than my current code) it would be of great help!

Thank you,
Adi

I found the answer -

this function works:
listUnexpectedChangeSets()

1 Like

Hi @adi,

Great you found it yourself! Thanks for sharing it, others struggling with the same issue would get the answer real quick.

Keep contributing!
Thanks,
Rakhi Agrawal