Reverting database changes with an update command and past changelog files

Wondering how I could rollback to a previous version of the database by deploying an earlier release of the application containing older db changelog files and using the Liquibase update command.

To put it in another way e.g. if two months ago I had an application release that contained certain db changelog files I want to be able to redeploy that Old application release so that 1. The application is essentially rolled back 2. The database Liquibase update command reads the application changelog files, finds that they are behind the current database and essentially rolls back the database to its past state. Is this possible with a Liquibase update command or do I need to explicitly use rollback?

I’m no expert in rollbacks, but it looks like the rollbackToDate (rollbackToDate command | Liquibase Docs) command may be what you need. I think automatic rollbacks can only be done with liquibase XML files. If you have SQL changelogs, then you would need to manually write the rollback SQL.