When it comes to managing databases, there are two types of deployment approaches:
In a state-based database deployment, the ideal state of the database is defined and a tool is used to compare that ideal state against the current actual state of the database. Some tools, like Liquibase, can analyze the difference between the two and generates all the scripts to change the database.
In a migration-based database deployment, specific migrations for altering the state of a database are described by the user. It’s all about capturing individual change scripts during development. This approach helps teams more closely align with Agile and DevOps best practices:
This approach allows you to iteratively modify the structure of your database over time, just as you do with your application code.
Yes! While Liquibase does include comparative (diff) capabilities, Liquibase is primarily a migration-based tool. The diff capabilities are mostly intended to assist with onboarding new projects or ensuring that your database migrations are applied correctly.