Liquibase® version 3.8.5 is now available! Get it for free.
News All Previous Posts >>

Subscribe for email updates

- and/or -

Achieving Continuous Delivery at Fidelity Investments with IBM UrbanCode and Datical

How Liquibase Works


In this tutorial, we will cover a few simple mechanisms Liquibase uses to track, version, and deploy changes to get an understanding of how Liquibase works.

Changelog Icon

Changelogs

Liquibase uses a changelog to explicitly list database changes in order. The changelog acts as a ledger of changes and contains a list of changeSets (units of change) that Liquibase can execute on a database.

View our Database changelog File and changeSet Tag topics for more information.

Tracking Tables

Liquibase tracks which changeSets have or have not been deployed in a tracking table called a DATABASECHANGELOG. If your database does not already contain a tracking table, Liquibase will create it for you.

Liquibase also prevents conflicts from different callers’ updates on a secondary table called DATABASECHANGELOGLOCK.

View our DATABASECHANGELOG Table and DATABASECHANGELOCK Table topics for more information.

Changelog Icon

changelogs and tracking tables allow Liquibase to:

  • Track and version database changes – Users know what changes have been deployed to the database and what changes have not yet been deployed.
  • Deploy changes – Liquibase compares the changelog against the tracking table, and only deploys changes that have not been deployed to the database.

Liquibase also has advanced features such as contexts, labels, and preconditions to precisely control when and where a changeSet is deployed.

Note: To assist with projects where you are not starting with a blank database, Liquibase has a feature to generate a changelog to represent the current state of the database schema.

Summary

In this tutorial we covered:

  • Basic Liquibase mechanisms: changelogs & tracking tables.
  • How these mechanisms work to track, version, and deploy changes.

Next Up: