Liquibase Hub Operations

Operations are the records of Liquibase commands that are reported to a Liquibase Hub Project by a registered changelog. These operations are the primary data from which Liquibase Hub receives values.

Note: To see the commands that Liquibase Hub tracks and uses, refer to Using Commands in Liquibase Hub .

An operation is an action taken by Liquibase CLI on a source database. Liquibase Hub allows you to track when the operation starts, what it intends to do, its progress, and when it finishes if everything goes as expected. The Liquibase Hub Project associated with the changelog is updated both with a failed or passed operations for each changeset.

Note: All operations are related to an Organization and are performed in the context of a Project. You cannot transfer Operations from one Organization or Project to another.

In most cases, operations relate to changes performed on the database:

  • update – new changes are added.
  • rollback – new changes are added, reversing previous changes.
  • changelog-sync – new changes are added but not deployed by Liquibase.
  • drop-all – new changes are added, dropping database objects owned by the user.

Tip: You can set the level of data that you want to send to Liquibase Hub with the liquibase.hub.mode parameter. For more information, see Liquibase Hub Properties.

Reports

Liquibase Hub provides reports based on your Liquibase activity. You can filter your operation reports by the operation type, result, database target, and date.

To see the initial information of every operation performed, select Projects > View Details on the needed project > Operations. The Operations tab includes the option to expand any operation for more details. You can also download the operation log as a .txt file.

The following reports are available:

The update operation report

The report based on the update operations tracks changesets that were deployed, their execution status, timing, and various client and runtime parameters.

Liquibase Hub functionality includes the following:

  • Operation summary, which shows:
    • Target information with the Liquibase Hub name of the target, URL, version of the database, and date created.
    • Client information with the Liquibase version, hostname, and interface, such as CLI or Maven.
    • Operation parameters such as a changelog file, labels, contexts, tracking table schema, tracking table catalog.
    • Runtime information with a start time, end time, and total time of the changeset deployment.
  • Changeset overview, which represents the changeset id, author, file path, comment associated with that changeset, and outcome.
  • Changeset details, which include a changeset title, author, changelog file path, and duration of running an individual changeset. Changeset details are available if hub.mode=all:
    • Changeset body – the actual data that was passed to Liquibase.
    • Generated SQL – the representation of the changeset that was run on the database. Liquibase Hub includes the generated SQL optionally.
    • Execution output – the log messages associated with the individual changesets.

The rollback operation report

The report based on the rollback operations presents the same details as the update operation report. However, it differs in the operation summary and changeset details.

The operation summary includes:

  • Operation parameters – the exact rollback command that was run—rollback-one-update, rollback-to-date, rollback-count, or rollback-one-changeset.
  • Command parameters – parameter added to the rollback commands.
  • Example: The update ID that you need to pass to Liquibase to run the rolbackOneUpdate command.

The changeset details show whether the rollback is automatically generated or with the user details provided. For example, if the rollback source is User Defined, the changeset can include the following rollback information:

<!-- Rename table on rollback to preserve data -->
    <rollback>
       <renameTable oldTableName="Favorites"
        newTableName="ROLLBACK_FAVORITES"/>
    </rollback>

The drop-all operation report

The report based on the drop-all operation shows if database objects were removed by a user. The report also provides the operation summary.

The changelog-sync operation report

The report based on the changelog-sync operation presents only the meta information. It does not include changelog details or the generated SQL because the changelog-sync command does not make any changes to the database.

The changelog-sync log output provides information about the changesets status.

Next up:

Liquibase Hub Organizations