deactivate-changelog command removes the
changelogID from your changelog file so it stops sending reports to Liquibase Hub.
deactivate-changelog command 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
deactivate-changelog 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 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.
Before running the
deactivate-changelog command, specify the driver, classpath, and URL in the Liquibase properties file. For more information, see Specifying Properties in a Connection Profile. Otherwise, specify the properties at the command prompt.
The changelog file specified either in the Liquibase properties file or as CLI argument (
--changelog-file=mychangelog) will have its
If the changelog file is in source control, commit the newly deactivated changelog.
deactivate-changelog global attributes
||The root changelog||Required|
||The JDBC database connection URL||Required|
||The database username||Required|
||The database password||Required|
password attributes are not required for connections and systems which use alternate means of authentication.
Liquibase Version: 4.9.1 Liquibase Community 4.9.1 by Liquibase The changelog 'example-changelog.sql' was deactivated. Note: If this is a shared changelog, please check it into Source Control. Operation data sent to the now inactive changelogID will still be accepted at Hub. For more information visit https://docs.liquibase.com. Liquibase command 'deactivate-changelog' was executed successfully.