deactivateChangeLog goal removes the
changelogID from your changelog file so it stops sending reports to Liquibase Hub.
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.
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.
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.
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.
deactivateChangeLog Maven goal
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:
The changelog file specified in your
pom.xml file will have its
If the changelog file is in source control, commit the newly deactivated changelog.
deactivateChangeLog required Maven configuration attributes
Specifies the changelog file for Liquibase to use.
Starting Liquibase at 09:00:30 (version 4.3.2-DAT-6169-SNAPSHOT #6 built at 2021-03-11 16:01+0000) [INFO] Executing on Database: jdbc:mariadb://localhost:3306/testdb1 [INFO] The changeLogId has been removed from changelog 'com/example/mariadb_lbpro_master_changelog.xml'. [INFO] The changelog 'com/example/mariadb_lbpro_master_changelog.xml' was deactivated. Note: If this is a shared changelog, please check it into Source Control. Operation data sent to the now inactive changelogID will be accepted at Hub, but is it unavailable for reports until an Organization Admin reactivates it at https://hub.liquibase.com. The changelog 'com/example/mariadb_lbpro_master_changelog.xml' was deactivated.