register-changelog
The 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.
Uses
Use the 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 master changelog structure, register only the master changelog without registering the nested changelogs. For more information about the structure, see Best Practices.
Running the register-changelog
command
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 Specifying Properties in a Connection Profile, 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
Run the register-changelog
command:
liquibase register-changelog --changelog-file=exampleChangelog.sql
Note: Replace exampleChangelog.sql
above with your changelog file title before running the command.
Non-interactive register-changelog
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.
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
The Maven register-changelog
goal also runs in the non-interactive mode. For more information, see Maven register-changelog .
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
[1] Testing Project (Project ID:b8676aef-fae7-4e7c-8cb5-cd246c3e1229) 2022-05-06 16:09:27.994011
[2] awilliams@liquibase.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.