Managing Liquibase Pipelines Post-Production Database Restore to Lower Environments

Hello everyone,

I’m looking for insights on a challenge I’m facing with Liquibase in a multi-environment pipeline setup.

Here’s the background: I have four environments—Dev, QA, UAT, and Prod—and I’ve built out a pipeline for each environment. Each pipeline performs several steps like validate, policy checks, updatesql, update-testing-rollback, etc. Each environment pipeline has its own proper approval workflows, and this setup is working smoothly.

However, my company occasionally performs a full database restore from Production to either Dev or QA environments to make those environments more closely mirror production. This is great for testing accuracy and reliability, but it disrupts my Liquibase logic. After the restore, the Liquibase history and checks in Dev or QA no longer align with my pipeline expectations, causing my processes to break.

Question: Does anyone have advice on how Liquibase can help maintain my pipeline integrity after a Production-to-Dev/QA restore? Is there a best practice for managing Liquibase states post-restore, or should I consider a different approach to handle schema tracking after a restore?

Any insights, strategies, or experiences would be greatly appreciated!

Thanks in advance!