Get Started with Liquibase

After you Install Liquibase on your Windows, MacOS, or Linux/Unix system, you can get started with SQL, XML, YAML, and JSON changelogs.

Get Started Guides

Use these Get Started guides to try out some Liquibase operations on a sample database:

To learn more about high-level Liquibase concepts, see Introduction to Liquibase.

How to choose a changelog format

Liquibase uses two models for changelogs:

  • The SQL model (.sql files): Write SQL statements directly in changesets in your changelog, formatted with SQL comments.
  • The platform-agnostic model (.xml, .yaml, and .json files): Use Liquibase Change Types corresponding to SQL changes in each changeset. Liquibase then generates database-specific SQL for you. You can also insert raw SQL statements in your changesets using the sql Change Type or reference a SQL file with the sqlFile Change Type.

Note: You can use one or more different changelog formats with Liquibase simultaneously!

Here are some qualities to consider when choosing a changelog format for Liquibase:

  • Familiarity: If you already know the syntax for one of the formats, you can easily use it with Liquibase.
  • Tools: If your existing tools and processes are built around a particular format, such as SQL, you can easily integrate changelogs of that format.
  • Appearance: XML syntax is specific but verbose. If you want a less verbose format, try SQL, YAML, or JSON.
  • Specificity: Formatted SQL changelogs let you control exactly what SQL to run. In contrast, XML, YAML, and JSON also support raw SQL statements, but are primarily meant to describe what kind of change you want to make: Liquibase handles the underlying database logic for you. XML, YAML, and JSON changelogs can be useful if you're working with multiple databases and don't want to write database-specific SQL, or if you want Liquibase to generate automatic rollback statements for some changes.

You can see examples of each changelog syntax on the individual Getting Started pages linked previously.

Next steps

  1. Introduction to Liquibase – Dive into Liquibase concepts
  2. Design Your Liquibase Project – Create a new Liquibase project folder and organize your changelogs
  3. Liquibase Database Tutorials – Configure Liquibase to work with your own database
  4. How to Apply Your Liquibase Pro License Key – If you use Liquibase Pro, activate your license