Graph (1)

Liquibase Community Documentation

Liquibase Community is a community-supported tool to help manage database change.

Frequently Searched ARTICLES

Check out what everyone has been reading about

What is a changelog?

With Liquibase, you use a text-based changelog file to sequentially list all changes made to your database. This ledger helps Liquibase audit your database and execute any changes that are not yet applied. You can store and version your changelog in any source control tool.

What is a changeset?

A changeset is the basic unit of change in Liquibase. You store all your changesets in your Changelog. Your changesets contain Change Types that specify what each change does, like creating a new table or adding a column to an existing table.

What are preconditions?

Preconditions are tags you add to your changelog or individual changesets to control the execution of an update based on the state of the database. Preconditions let you specify security and standardization requirements for your changesets. If a precondition on a changeset fails, Liquibase does not deploy that changeset.

Introduction to Liquibase

Liquibase is a database schema change management solution that enables you to revise and release database changes faster and safer from development to production.

Get started with Liquibase

After you install Liquibase, get started with our tutorial and learn how Liquibase works.

What support does Liquibase have for Microsoft SQL Server?

Microsoft SQL Server (MSSQL) is a relational database management system. Microsoft SQL Server supports different editions and components that accommodate unique performance and depend on your specific requirements.

What is the Liquibase properties file?

You can use a defaults file called liquibase.properties to store information that Liquibase needs to connect to a particular database, along with other properties that rarely change. This lets you avoid entering properties through your command line, saving you time and reducing errors.

What are contexts?

Contexts are tags that control whether commands like update run certain changesets. You add contexts directly to changesets in your changelog and filter them at runtime using the --context-filter attribute in the CLI. You can specify a context name as any case-insensitive string. The context filter is a logical expression that you can use to specify one or more changeset contexts.

Frequently Asked Questions

If you want to create a schema that doesn't already exist, you can do this with Liquibase in two ways: using formatted SQL or an XML changelog with the SQL tag.

For detailed instructions on how to do this, visit our Creating a New Schema article in the Liquibase Knowlegebase.

When doing a deployment through Liquibase, all changes are stored in the DATABASECHANGELOG table. One value stored is the checksum, which is an MD5 sum of the changeset.

During deployment, each changeset in the changelog will have its checksum calculated. If the changeset has already been deployed, the calculated checksum value will be compared against what is in the DATABASECHANGELOG table for that changeset.

A checksum error will occur if the calculated checksum differs from what is stored in the DATABASECHANGELOG table and doesn't have an attribute (runOnChange or runAlways) to update the checksum.

If this is a problem that you're having, visit our How to resolve checksum errors article in the Liquibase Knowlegebase.

Liquibase will deploy changesets and store the Liquibase tracking tables (DATABASECHANGELOG and DATABASECHANGELOGLOCK tables) in the database's default schema. However, Liquibase has additional attributes to allow greater control over which schema changesets will be deployed and where to store and update the Liquibase tracking tables.

If this sounds like your issue, visit the article How to specify schema names for Postgres? in the Liquibase Knowledgebase.

When running Liquibase, the below error occurs. This error indicates that the Liquibase changeset is missing required syntax.

Error Message

ERROR: Exception Details ERROR: Exception Primary Class: ClassCastException ERROR: Exception Primary Reason: java.util.ArrayList cannot be cast to java.util.Map ERROR: Exception Primary Source: Microsoft SQL Server 15.00.4345 Unexpected error running Liquibase: Error parsing /file/path.yaml : Syntax error in file file/path/changeset.yaml: java.util.ArrayList cannot be cast to java.util.Map

If this is your issue, visit the Error parsing when running Liquibase article in the Liquibase Knowledgebase.

Liquibase University

Learn all about Liquibase

Learn Liquibase, level up your learning, and stand out as a subject matter expert with certifications and digital credentials. Free for all users!

liquibase changelog png

Manage Liquibase Changelogs

For users who wish to learn how to apply different tactics and strategies to manage their Liquibase changelogs. Includes how to use labels, contexts, preconditions, and grooming and modifying changelogs. You will also learn how to organize, exclude, and archive changelogs.