Liquibase helps millions of teams track, version, and deploy database schema changes. It will help you to:
- Control database schema changes for specific versions
- Eliminate errors and delays when releasing databases
- Automatically order scripts for deployment
- Easily rollback changes
- Collaborate with tools you already use
This repository contains the main source code for Liquibase. For more information about the product, see the main project website.
Liquibase Core works with the following databases: Apache Derby, CockroachDB, Firebird, H2, HSQL, Informix, InterBase, MariaDB, MSSQL, MySQL, Oracle, PostgreSQL, SQLite, Sybase Anywhere, Sybase Enterprise. The databases that require extensions are: Azure Cosmos DB, Cassandra, Cache, DB2i, Hibernate, Impala/Hive, MaxDB, MongoDB, Redshift, SAP HANA, SQLFire, Snowflake, Teradata, Vertica, VoltDB. See Liquibase Database Tutorials.
Liquibase can be integrated with Maven, Ant, Gradle, Spring Boot, and other CI/CD tools. You can use Liquibase GitHub Actions, Liquibase and Jenkins with Spinnaker, and many different workflows.
Try Liquibase Hub to get real-time information about your deployments, an overview of recent commands for the specific database you’re working on, and a place for your team collaboration.
Liquibase system requirements can be found on the Download Liquibase page.
- Download and run the appropriate installer.
- Make sure to add Liquibase to your PATH.
- Copy the included
examples
directory to the needed location. - Open your CLI and navigate to your
examples/sql
orexamples/xml
directory. - Start the included H2 database with the
liquibase init start-h2
command. - Run the
liquibase update
command. - Optionally, follow the prompt for your email to register for Liquibase Hub.
- Run the
liquibase history
command. - If you entered your email, check the report link and the output of the
history
command to see they match.
See also how to get started with Liquibase in minutes or refer to our Liquibase Installation documentation page for more details.
Visit the Liquibase Documentation website to find the information on how Liquibase works.
Learn all about Liquibase by taking our free online courses at Liquibase University.
run the mvn liquibase:update
command. Default profile is mysql profile.
run the mvn liquibase:update -P mysql
command for update in MySQL environment.
run the mvn liquibase:update -P dev
command for update in PostgreSQL Development environment.
run the mvn liquibase:update -P prod
command for update in PostgreSQL Production environment.
run the mvn liquibase:update -P mssql
command for update in SQL Server environment.
run the mvn liquibase:history
command.
run the mvn liquibase:rollback -Dliquibase.rollbackTag="<name tag>"
command.
run the mvn liquibase:rollback -Dliquibase.rollbackCount=<int>
command.