Best way to keep track of records in databasechangelog


When a rollback is executed, records will be deleted from databasechangelog table.

I need to audit the records in databasechangelog table e.g. I need to be able to know if a rollback was executed.

As far as I know, that’s not the intended use of databasechangelog table as its intention is to know the current state of the database and not to keep a history of the different states of the database. Is that right?

I have been searching for people with the same issue and I found this stackoverflow post: oracle - when i do rollback on liquibase, where can i find the logs of this rollback? - Stack Overflow where it is suggested to use liquibase hub. This seems great but if I can’t run liquibase hub locally it is not an option due to network restrictions.

I also found this post >10y old post Retaining log records in DATABASECHANGELOG table during rollback where the same is asked. Did anything change since then?

Is there any other possibility?

Thanks for your help.


You are correct, when you use the liquibase rollback command to undo changes, Liquibase removes the original record from the DATABASECHANGELOG table.

The DATABASECHANGELOG table and the rows in it are used to keep track of which changesets in the changelog file are currently deployed to that database.

This page on the liquibase website is pretty good at explaining some of the concepts.

I definitely understand your desire to have a record of database all updates and rollbacks - like a transaction log. If this is still a need, please submit an issue to request this as a feature.