register-changelog command connects your local Liquibase activity to a specific Liquibase Hub Project. By registering your changelog, this activity will be visible only to one Project within one Organization in Liquibase Hub.
register-changelog command to connect an XML, SQL, JSON, or YAML changelog to your Liquibase Hub Project.
Note: JSON and YAML changelog formats are available in Liquibase 4.2.1 and later versions.
The command assigns the
changeLogId to the changelog file that you register. The
changeLogId is a unique identifier in your changelog, which is automatically added by the
register-changelog command to provide real-time monitoring and reports.
You can connect the needed changelog file with your existing project or create a new project.
Note: If you follow a root changelog structure, register only the root changelog without registering the nested changelogs. For more information about the structure, see Best Practices.
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
liquibase register-changelog --changelog-file=exampleChangelog.sql
exampleChangelog.sql above with your changelog file title before running the command.
To run the
register-changelog in the non-interactive mode, specify the
--hubProjectId, which is located in Projects > View Details for the required project > Operations or any other tab of the project.
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.
If you specify both changelog and
hubProjectId, the command will register the changelog to the specified project without showing the interactive prompt:
liquibase --changelog-file=mychangelog.xml register-changelog --hubProjectId=myProjectId
register-changelog goal also runs in the non-interactive mode. For more information, see Maven registerChangeLog.
Tip: Process and synchronize your source and target resources to ensure you use your newly registered changelog to report operations to Liquibase Hub.
When running the
register-changelog command, you will be prompted to select an existing project, create a new one, or not to register right now.
Liquibase Version: 4.9.1 Liquibase Community 4.9.1 by Liquibase Registering a changelog connects Liquibase operations to a Project for monitoring and reporting. Register changelog changelog.v4.sql to an existing Project, or create a new one. Please make a selection: [c] Create new Project  Testing Project (Project ID:b8676aef-fae7-4e7c-8cb5-cd246c3e1229) 2022-05-06 16:09:27.994011  email@example.com's Project (Project ID:c58e87aa-a328-4a12-83e2-0570ddc15c52) 2022-04-28 14:45:27.664302 [N] to not register this changelog right now. You can still run Liquibase commands, but no data will be saved in your Liquibase Hub account for monitoring or reports. Learn more at https://hub.liquibase.com. ? [N]:
If you select the existing project, enter its Project ID to the
?> in the current output or select
C to create a new project.
Liquibase Version: 4.9.1 Liquibase Community 4.9.1 by Liquibase * Changelog file 'changelog.h2.sql' with changelog ID 'df71ff49-cdc1-4689-8a3c-7f3910431f94' has been registered to Project Testing Project Liquibase command 'register-changelog' was executed successfully.