deactivateChangeLog command removes the
changelogID from your changelog file so it stops sending reports to Liquibase Hub.
deactivateChangeLog command 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 command, it modifies a specific changelog file by removing
changelogID to prevent it from sending the data. The command 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) 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.
Before running the
deactivateChangeLog command, you can specify your driver, classpath, and URL in your
liquibase.properties file. For more information, see Creating and configuring a liquibase.properties file. You can also specify these properties in your command line.
Next, run the
The changelog file specified in your
liquibase.properties file or as CLI argument (
--changelogFile=mychangelog) will have its
If the changelog file is in source control, commit the newly deactivated changelog.
deactivateChangeLog global attributes
||The root changelog||Required|
||The JDBC database connection URL||Required|
||The database username||Required|
||The database password||Required|
Starting Liquibase at 12:40:51 (version 4.3.2-DAT-6169-SNAPSHOT #9 built at 2021-03-12 16:27+0000) Changelog mychangelog.xml was deactivated Liquibase command 'deactivateChangeLog' was executed successfully.