Get liquibase history in reverse order, or get recent history only

When we’re only interested in recent history, it would be great to get liquibase history in descending order (newest first) or to get only some recent history.
Apologies if there is already a way to do this - please fill me in!

Currently, liquibase history lists the changesets that have been applied, oldest first (ascending). There is no way of changing this.

Ascending order makes sense if you are manually running a command in a CLI, because you’re going to see the recent history at the end of the output. However, our use case involves some automation with Jenkins and AWS SSM. SSM generously shows us 48,000 characters from command output, but that’s not enough for a DB with a long history. SSM truncates the output, so we can’t see the recent changesets. Even without the character limit problem, the output would be easier to read in Jenkins if the recent history were at the top.

Also, we’re not really interested in the whole history from many years ago. We just want to see the recent changesets and when they were applied. Perhaps it would be nice to specify how many recent changesets you want to see, or to specify a date range that you’re interested in.


liquibase history --order=ASC
All history, oldest first.

liquibase history --order=DESC
All history, newest first.

liquibase history-count 3
List the most recent 3 update events.

liquibase history-to-date 2022-10-01
List the update events since 2022-10-01.

1 Like

Hello, @george.jacob, and welcome to the Liquibase Community! I think this is a great suggestion. I’m working on some back-end reorganizing of the forum, so don’t be surprised if this gets moved into another category in the coming weeks. In the meantime, I’ll pass your feedback up the line. Thanks for the suggestion!

1 Like