Drift explanation

Would like to know if this is possible - and what that looks like ideally in UI.

  1. DBA makes a manual change in PROD for emergency fix. Lets say adds an index … or alters a column.

  2. QA want to know no differences between QA and PROD which are both at version 1.3.2

Can the tool detect that drift - and what does it look like ?

thanks

Hi @johnfak, there are a couple of Liquibase commands that you can use to detect drift between databases:

The diff command can be used to simply report any differences between source and target databases. The output from this would just be observed in the environment where you ran the command, for example in a command or terminal window. Further information on this command can be found here: diff command | Liquibase Docs

The diffChangeLog command can be used to detect differences between source and target databases and create a Liquibase changelog that will replicate the changes that would need to be applied. Further information on this command can be found here: diffChangeLog command | Liquibase Docs

If, for some reason, its not possible to connect to both databases at the same time you can use the snapshot command (snapshot command | Liquibase Docs) to create a snapshot file of one of the databases to use in either the diff or diffChangeLog commands.

As well as the information in the links above on the commands, I’d also recommend trying to do the “Liquibase Commands for Troubleshooting” course on Liquibase University if you have the time available (it should take no more than a day to complete). The course has some good information on the commands that you can use for troubleshooting any issues that you have with database changes, including the diff and diffChangeLog commands and there are some activities to complete to try out these commands.

Hope that helps.

Dave

1 Like