Maven deactivateChangeLog

The deactivateChangeLog goal removes the changelogID from your changelog file so it stops sending reports to Liquibase Hub.

Uses

The deactivateChangeLog goal is typically used when:

  • You start using Liquibase Hub to keep a history of all your activity, but you have registered the wrong changelog file and want to keep it from reporting the activity to Liquibase Hub.
  • You use a changelog file that is being secluded or refactored into other changelogs and do not want more than one source of changesets reporting to Liquibase Hub.

When you run the deactivateChangeLog goal, it modifies a specific changelog file by removing changelogID to prevent it from sending the data. The goal differs from the liquibase.hub.mode=off property, which is set in your defaults file (the liquibase.properties file) or passed as a JAVA property and prevents any changelog from sending data.

Note: The liquibase.hub.mode=off property will not report your activity to Liquibase Hub, regardless of a changelog file, and will not ask to report the changelog activity to Liquibase Hub when using a non-registered changelog.

Shared changelogs

A deactivated changelog acts like a changelog that has never been registered, except for the case when it is shared among team members:

  • When you deactivate your changelog file, you do it to your local copy. If your workflow includes source control, you should immediately commit that deactivated changelog to your source control repository so that your team has the most up-to-date copy. As a best practice for shared files, your teammates should pull in the latest changes before working. This way, they can get the deactivated version.
  • When your local copy is registered but teammates have deactivated their copy, Liquibase Hub will receive a notification about that new status. If you continue running operations on your local changelog copy and have not pulled the most recent deactivated changelog from the source control, Liquibase will still report your operations to Liquibase Hub:
    • It will inform you that the changelog has been deactivated.
    • It will remind you to pull the latest version from your source control, directly deactivate your local copy, or contact your Organization Admin to reactivate the changelog if the deactivation was a mistake (the reactivation feature is coming soon!).

Roles and permissions

Any user who has a registered changelog (a changelog with a changelogID attribute that reports its operations to a Liquibase Hub project) and a Liquibase Hub API key can deactivate it so that their local copy no longer sends any data to Liquibase Hub. Only an Organization Admin can reactivate the changelog that is deactivated (coming soon).

A deactivated changelog is visible in Liquibase Hub to provide the ability to examine the database’s schema change history. To remove a changelog from view, it needs to be Deleted by an Organization Admin. Liquibase Hub works on a shared resources model, in which team members can create and share resources such as projects, changelogs, and operation reports. However, since those resources are shared across your Organization or Project, only the Organization Admin can delete them.

Maven configuration

Liquibase Maven can be configured in multiple ways. One way is to define your Liquibase configuration properties in your pom.xml file. To configure your pom.xml file, refer to Configuring Liquibase Attributes in your Maven POM File.

Running the deactivateChangeLog Maven goal

Running the deactivateChangeLog goal requires a Maven project to be implemented. To run the deactivateChangeLog goal, you must include the changelog file for the deactivation in the pom.xml or the liquibase.properties file referenced by the pom.xml. You can specify the pom.xml property as liquibase.changeLogFile in the global properties section or changeLogFile in the Liquibase plugin configuration section.

Next, type the following in your goal prompt:

mvn liquibase:deactivateChangeLog

The changelog file specified in your liquibase.properties or pom.xml file will have its changelogID removed.

If the changelog file is in source control, commit the newly deactivated changelog.

deactivateChangeLog required Maven configuration attributes

Attribute

Definition

liquibase.changeLogFile

Specifies the changelog file for Liquibase to use.