Get Started with Liquibase 4.33
This tutorial is intended for developers setting up Liquibase for the first time. It walks you through installing Liquibase and exploring its basic functionality using the built-in sandbox. The sandbox includes a packaged H2 database and pre-made changelog files so you can practice running Liquibase commands immediately.
Set up a Liquibase Project
Now that you have installed Liquibase, you can set up your Liquibase example project and run your h2 database.

Phase 2 of 4: Set up a Liquibase Project
Copy the Liquibase examples directory from the installation directory to another location on your machine.
Inside the folder where you installed Liquibase, you'll see a folder called examples
. Copy this folder and paste it into another location.
Start the h2 databse.
Liquibase packages an H2 database as a sandbox that you'll use to try out Liquibase. To run the database, you'll need to open a terminal at the location where you pasted your example folder and run:
liquibase init start-h2
The database console opens automatically in a browser on port 9090. The terminal includes the following output:
...
Opening Database Console in Browser...
Dev Web URL: http://192.168.56.1:8090/frame.jsp?jsessionid=d219f3d2012e078770943ef4c2cd0d11
Integration Web URL: http://192.168.56.1:8090/frame.jsp?jsessionid=d7ab638787c99dbfe9c8103883bee278
Run your changelog.
The examples folder you copied contains four additional folders inside: json, sql, xml, and yaml.
Choose one of these languages and open a terminal inside that folder. Then run:
liquibase update
Liquibase displays the following output:
Running Changeset: example-changelog::1::your.name
Running Changeset: example-changelog::2::your.name
Running Changeset: example-changelog::3::your.name
Liquibase command 'update' was executed successfully.
When you run liquibase update, Liquibase looks at the liquibase.properties
file in the examples folder to see where your changelog. If you open the liquibase.properties file, you'll see the line changeLogFile=example-changelog
.
The example-changelog file in the examples folder contains a changelog with 3 changesets run during execution.
Confirm that the PERSON and COMPANY tables were added.
Now that your changeset has ran, you can refresh your h2 database to see the changes applied. You'll need to navigate back to your browser window where your database is running and refresh the page.
