Liquibase® version 3.8.2 is now available! Get it for free.
News 5 Ways to Fix a Bad Database Change in Liquibase
04 Dec 2019

- and/or -

All Previous Posts >>
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 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 changeSets are 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: