Liquibase works with more than 60 databases, including relational, NoSQL, and graph databases. In this implementation guide, we will connect Liquibase to a sample PostgreSQL database for demonstration purposes.
Follow the patterns in this section to set up your preferred database. For a complete list of supported databases, visit the Liquibase Supported Database page.
Before proceeding, the following should be completed:
Liquibase is installed and operational.
Java is installed. If the Liquibase installer method was used, the latest supported Java version is included automatically. Java 8 is the minimum required version, but it is recommended that LTS versions 11 or 17 be used.
The Liquibase Pro license key is installed.
In your liquibase.properties file, specify your connection parameters:
url: your JDBC URL should be in the format url: jdbc:postgresql://<host>:<port>/<dbname>.
username: the username to access the database.
password: the password to access the database.
For example:
url: jdbc:postgresql://localhost:5432/postgres
username: postgres
password: secret
In the command line, cd to your local repository, where you have your liquibase.properties file.
Run the liquibase connect command to check your database connection. This command will use database connection information from your liquibase.properties file to connect:
It is a best practice to store sensitive data in a secrets management tool.
Liquibase Pro provides extensions for Hashicorp Vault and AWS Secrets Manager to enable Liquibase to automatically retrieve database connection information or any other Liquibase properties.
Alternatively, your CI/CD tool’s vault and environment variables can be used.
The following pages review three additional secure setup methods that you can use to store sensitive data: environment variables, GitHub Actions Secrets, and Azure DevOps.