Liquibase Hub Properties

Liquibase Hub has a list of properties to be set so that your local Liquibase activity is reported to a specific Liquibase Hub Project.

Required properties

liquibase.hub.apiKey

Specifying the Liquibase Hub API Keys is the required property to connect to Liquibase Hub along with a registered changelog file. The API key is unique for each Liquibase Hub user. Liquibase Hub will only be in sync with your actions if the API key is added.

Use the Liquibase Hub API key as follows:

  1. Sign in to your Liquibase Hub account and go to Me > My Account > API Keys at the upper-right corner of the page.
  2. Copy the API key or generate a new one to connect the information from your changelogs and other operations to the Liquibase Hub Projects.
  3. Specify your API key in one of the following ways:
  4. Tip: We recommend adding the API key to the Liquibase properties file or your build files instead of entering it manually every time.

    • In the Liquibase properties file:
    • liquibase.hub.apiKey: <yourapikey>
    • As an environment variable if you use Liquibase Pro:
    • LIQUIBASE_HUB_API_KEY=<yourapikey>
    • As a runtime argument with the commands you run in the CLI:
    • --hub-api-key=<yourapikey>

      Note: If you use Liquibase 4.3 and earlier version, the format is --hubApiKey=<yourapikey>.

    • In your JAVA_OPTS Environment Variable as -Dliquibase.hub.apiKey. Choose your operating system and enter the following commands:
      • Linux or MacOS: JAVA_OPTS="-Dliquibase.hub.apiKey=<yourapikey>"
      • Windows: set JAVA_OPTS="-Dliquibase.hub.apiKey=<yourapikey>"

    Note: You can also manually set JAVA_OPTS as an environment variable in your system.

Optional properties

liquibase.hub.url

The Liquibase Hub URL, which is https://hub.liquibase.com, is specified by default when you sign up for an account and connect to Liquibase Hub with the API Key.

To change the location property, select one of the following options:

  • Include the liquibase.hub.url value in the Liquibase properties file, as follows:
  • liquibase.hub.url: https://hub.liquibase.com
  • Specify LIQUIBASE_HUB_URL as an environment variable if you use Liquibase Pro:
  • LIQUIBASE_HUB_URL=https://hub.liquibase.com
  • Pass --hub-url as a runtime argument with the commands you run in the CLI:
  • --hub-url=https://hub.liquibase.com

    Note: If you use Liquibase 4.3 and earlier version, the format is --hubUrl.

  • Specify URL in your JAVA_OPTS Environment Variable as -DliquibaseHubUrl
    • On Linux or MacOS: JAVA_OPTS="-Dliquibase.hub.url=https://hub.liquibase.com"
    • On Windows: set JAVA_OPTS="-Dliquibase.hub.url=https://hub.liquibase.com"
  • Note: You can also manually set JAVA_OPTS as an environment variable in your system.

liquibase.hub.mode

Another optional property is liquibase.hub.mode, which represents the level of data you want to send to Liquibase Hub. The default value is: all.

liquibase.hub.mode:[all=default|meta|off]
Liquibase Hub mode Definition

all

Sends all data, including the changeset body, generated SQL, and logs (the default value)

meta

Does not send the changeset body, generated SQL, or operation-event and change-event logs. This mode sends the changeset name, author, id, timestamps, Liquibase version, and others.

off

Does not send any data to Liquibase Hub

To specify the level of data, select one of the following options:

  • Include liquibase.hub.mode value in the Liquibase properties file, as follows:
  • liquibase.hub.mode: <all|meta|off>
  • Specify LIQUIBASE_HUB_MODE as an environment variable if you use Liquibase Pro:
  • LIQUIBASE_HUB_MODE=<all|meta|off>
  • Pass --hub-mode as a runtime argument with the commands you run in the CLI:
  • --hub-mode=<all|meta|off>

    Note: If you use Liquibase 4.3 and earlier version, the format is --hubMode.

  • Specify the Liquibase Hub mode in your JAVA_OPTS Environment Variable as -DliquibaseHubMode
    • On Linux or MacOS: JAVA_OPTS="-Dliquibase.hub.mode=<all|meta|off>"
    • On Windows: set JAVA_OPTS="-Dliquibase.hub.mode=<all|meta|off>"

Note: You can also manually set JAVA_OPTS as an environment variable in your system.

Additionally, you can have different Liquibase Hub mode settings for different targets. For example, if sensitive DML updates are only made to the PROD target and not to lower-level targets, you can have PROD in the meta mode and all lower targets in the all mode.

Specify the liquibase.hub.mode in the Liquibase properties file, as a system property with -Dliquibase.hub.mode, as an environment variable LIQUIBASE_HUB_MODE, or store it in a liquibase.prod.properties file.

If you specify the Liquibase Hub mode only in one place, Liquibase will use it as the default. If you have the Liquibase Hub mode specified in multiple places, Liquibase will use the following order of precedence to determine which value to use:

  • liquibase.prod.properties
  • Liquibase properties file, such as liquibase.properties
  • LIQUIBASE_HUB_MODE environment variable, which overrides all the preceding locations

If you have policies and compliance requirements that prohibit sensitive information (PII or HIPAA) from leaving the controlled domain, use liquibase.hub.mode=meta. The meta mode is recommended if your scripts contain data that is regulated by government compliance standards, such as HIPAA, PCI, and others.

liquibaseHubConnectionid and liquibaseHubProjectId

  • liquibaseHubConnectionid identifies the specific target in which to record your data at Liquibase Hub. Starting from Liquibase 4.4, you can use the following format: liquibase.command.hubConnectionId.
  • liquibaseHubConnectionid: <your_target_id>

    Tip: To find the hubConnectionId, select Projects > View Details > Targets > View Status > Target ID.

  • liquibaseHubProjectId identifies the specific Project in which to record your data at Liquibase Hub. Starting from Liquibase 4.4, you can use the following format: liquibase.command.hubProjectId.
  • liquibaseHubProjectid: <your_project_id>

    Tip: To find the hubProjectId, select Projects > View Details for the required project > Operations or any other tab of the project.

Next up:

Liquibase Hub Users

Related Links