a human readable yet trackable form and checked into source control. ⬜ Liquibase allows you to: ⬜ Apply database changes systematically ⬜ Manage changes across environments/platforms ⬜ Rollback changes ⬜ Compare databases ⬜ Generate change documentation
and atomic – remove the previous version, install the new version ⬜ Database deployments are more tricky: ⬜ Can’t remove the schema and recreate it without wiping out data ⬜ Involves getting the database state from point in time A to point in time B ⬜ Order is important ⬜ Easy for environments to drift apart ⬜ Need to be able to determine the state of the database at any point in time
changes ⬜ The changelog can be stored in source control (and versioned) to bind a certain database version to a version of code ⬜ Changelogs are composed of “changesets” which are atomic groups of operations that applied and rolled back in increments
Groovy DSL ⬜ Allows a single build file with multiple database definitions as well as multiple changelog definitions ⬜ Allows mixing of Groovy and XML changelogs if desired
the target database and what changesets (if any) need to be applied ⬜ Validate – Validates the changelog checking for errors, etc ⬜ Update – Migrates the database to the current state of the changelog ⬜ UpdateSQL – Prints out the SQL that needs to be executed to migrate the database to the current state of the changelog
the database as a milestone for rollback ⬜ Rollback – Rolls back a database to a specified tag ⬜ RollbackCount – Rolls back a database by specified number of changesets ⬜ RollbackToDate – Rolls back a database to its state on a specified date
to be executed to rollback to the specified tag ⬜ UpdateTestingRollback – For each changeset, migrates the database to include the changeset, rolls it back and migrates again (tests rollback as part of the database migration) ⬜ GenerateChangeLog – Generates a change log from an existing database (does not include stored procedures)
what’s different based on the changelog. ⬜ Database contexts allow you to specify certain changesets which should only be applied when a given context is in effect.