sync-hub command synchronizes the local DATABASECHANGELOG table with Liquibase Hub.
sync-hub command is typically used when you want to:
- Ensure that Liquibase Hub shows the latest results from your DATABASECHANGELOG table.
- Synchronize the DATABASECHANGELOG table of a new project that has pre-existing data in the DATABASECHANGELOG table.
- Synchronize your local data if
drop-allwere run while Liquibase Hub was offline.
When you run the
sync-hub command, you will not see any operations added to the Project associated with your changelog.
sync-hub cannot associate previous Liquibase operations. You will only see changesets added to the changesets tab in your Liquibase Hub project.
To run the
register-changelog command, specify the following parameters in the Liquibase properties file, environment variables, or the command prompt while running the command:
Tip: For more information about the options to store parameters, see Create and Configure a liquibase.properties File, Liquibase Environment Variables, and JAVA_OPTS Environment Variable. To find the format of the parameter, see Command Parameters.
- Driver, URL, and user authentication information such as username and password
- Liquibase Hub API key
- changelog file
Note: If you have not registered your changelog file, use the register-changelog command. The
register-changelog command connects your local Liquibase activity to a specific Liquibase Hub Project.
- Target ID specified by the
Note: If you have the
changelog-file parameter, there is no need to specify the
hub-connection-id parameter with the command. If you use
hub-connection-id, add it to the
sync-hub command at the command prompt.
Tip: To find the
hub-connection-id, select Projects > View Details for the required project > Targets > View Status > Target ID.
sync-hub command attributes
Tip: For best results, specify all commands and parameters in the
--kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.
Specifies the target (also called connection) needed for the
Liquibase Community 4.9.1 by Liquibase Liquibase command 'sync-hub' was executed successfully.