> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/database-devops/use-db-devops/deployment-pipeline-configuration/step-types/liquibase-command-step/add-liquibase-command-step.md).

# Add the Liquibase command step

When you create a pipeline in Harness Database DevOps, the Liquibase command step can help play a role in managing database changes. This step allows users to apply schema modifications and execute SQL scripts seamlessly within the pipeline.

Here is how you can add the Liquibase command step to your pipeline:

1. In Harness, go to the **Database DevOps** module and select your **Project**.
2. Under the **Pipeline** tab, select the pipeline that you want to add the Liquibase command step to.
3. Within the pipeline configuration, select **Add Step**.
4. Select the **Liquibase Command Step**.
5. Configure the Liquibase Command Step by either selecting:
   1. **Command**: Specify the command you want to execute (e.g.`diff-log`, `generate-changelog`)
   2. **Schema Name**: Enter the name of the database schema that the command will affect.
   3. **Instance Name**: Specify the database instance where the command will be executed.
   4. **Tag**: This is an optional step but you can create a tag that indicates the version or state you want to apply or rollback changes to.
6. At the next step after these configurations, review the configuration to ensure it is set how you would like.
7. Select **Save the pipeline**.
8. Run the pipeline and monitor the execution.

{% hint style="info" %}
To create a pipeline in Database DevOps, you can refer to the Harness documentation detailing how to [Create a pipeline](/database-devops/use-db-devops/deployment-pipeline-configuration/create-a-pipeline.md)
{% endhint %}

### Supported Liquibase Commands in Harness Database DevOps <a href="#supported-liquibase-commands-in-harness-database-devops" id="supported-liquibase-commands-in-harness-database-devops"></a>

Harness executes Liquibase commands natively within the pipeline execution framework, applying governance, secret management, and auditing automatically.

#### Run Liquibase command for diff-log <a href="#run-liquibase-command-for-diff-log" id="run-liquibase-command-for-diff-log"></a>

Generates a structured log of differences between two database states. In Harness, this is commonly used for:

* Validating alignment before deployment
* Feeding results into policy checks or PR workflows

#### Run Liquibase command for generate-changelog <a href="#run-liquibase-command-for-generate-changelog" id="run-liquibase-command-for-generate-changelog"></a>

Creates a new changelog based on the current structure of a target database. Learn how to use for [Creating Changelogs](/database-devops/setup-db-devops/get-started-with-changelogs.md) Harness surfaces the generated changelog as an artifact, supporting workflows such as:

* Bootstrapping new schemas into version control
* Reconstructing a missing or outdated changelog
* Preparing a starting point before onboarding to DB DevOps

#### Run Liquibase command for release-locks <a href="#run-liquibase-command-for-release-locks" id="run-liquibase-command-for-release-locks"></a>

Releases any locks held by Liquibase on the database, useful in scenarios where a previous operation was interrupted or failed. Harness provides visibility into lock status and facilitates recovery workflows by:

* Allowing automated recovery in CI/CD pipelines using failure strategies.
* Enabling manual intervention with clear logging and audit trails.

**Use cases:**

* Resolving locks after failed deployments.
* Ensuring database availability for subsequent operations.

### Next steps <a href="#next-steps" id="next-steps"></a>

* Go to [Create a pipeline in Database DevOps](/database-devops/use-db-devops/deployment-pipeline-configuration/create-a-pipeline.md) to build a pipeline that uses the Liquibase Command step.
* Go to [Rollback for database schemas](/database-devops/use-db-devops/deployment-pipeline-configuration/rollback-and-failure-strategies/rollback-for-database-schemas.md) to configure rollback strategies for Liquibase migrations.
