Using Commands in Liquibase Hub

When you use Liquibase commands that make changes to your database, the data is sent to Liquibase Hub. You can review the data in Liquibase Hub in Operation reports. For more information, see Liquibase Hub Operations.

Liquibase Hub tracks the following commands:

The commands specific to Liquibase Hub functionality:

  • init hub connects your local Liquibase activity to Liquibase Hub with an API key and sets up the Liquibase environment to use Liquibase Hub
  • register-changelog connects your local Liquibase activity to a specific Liquibase Hub Project
  • sync-hub synchronizes the local DATABASECHANGELOG table with Liquibase Hub
  • deactivate-changelog removes the changelogID from your changelog file so it stops sending reports to Liquibase Hub

Note: If you use Maven, refer to the Maven register-changelog , Maven sync-hub, and Maven deactivate-changelog documentation to configure the Maven pom.xml file and another required properties.

Each command automatically synchronizes the local DATABASECHANGELOG table with Liquibase Hub. If the Internet connection is lost or Liquibase Hub doesn’t respond, Liquibase will still execute the commands and will not be blocked by a lack of the Liquibase Hub communication.

Requirements

To run the commands, specify your connection information as environment variables or in the Liquibase properties file. For more information, see Liquibase Environment Variables and Specifying Properties in a Connection Profile. Otherwise, specify properties at the command prompt.

For the Liquibase CLI app and Liquibase Hub, you need the following:

  • The registered changelog file.
  • Note: For more information, see the register-changelog command.

    Tip: If you use source control, make sure to commit the changelog so all team changes are recorded in Liquibase Hub and the same changelog is not registered with Liquibase Hub multiple times.

  • The level of data to send to Liquibase Hub. If you set liquibase.hub.mode=off in the Liquibase properties file, you do not receive data in Liquibase Hub when running commands.

  • Note: For more information, see Liquibase Hub Properties.

After following requirements, run any command to see what changesets passed and what changesets failed in your update, rollback, changelog-sync, or drop-all operations. The operation reports are filtered by a specific project, database target, result, or date.

Next up:

Liquibase Hub Operations

Related Links