Trunk-based deployment offers speed and simplicity, feature-based allows isolation and ownership, and environment-based ensures safety and compliance. Choosing the right strategy depends on your team’s size, risk tolerance, and regulatory needs. Harness Database DevOps with Liquibase enables all three approaches with automation and rollback safeguards.
When it comes to database deployment, the strategy you choose to manage schema changes, migrations, and changelog files (like changelog.yaml in Liquibase OSS or Harness Database DevOps) plays a huge role in ensuring stability and speed. Unlike application code, database changes are harder to roll back, which makes choosing the right deployment model even more important.
In modern Database DevOps, three approaches stand out: trunk-based deployment, feature-based deployment, and environment-based deployment. Each comes with unique strengths and trade-offs when applied to database schema management with a single changelog file or multiple modular changelogs.
Database deployment means applying schema changes (tables, indexes, constraints, stored procedures, etc.) to your live database. In most workflows, changes are tracked in migration scripts or a changelog file (e.g., changelog.yaml in Liquibase OSS).
Think of changelog.yaml as your database’s “history book.” It records every schema change so you know exactly what was applied and when.
Trunk-based deployment means all developers commit their schema changes directly to the main changelog file (like changelog.yaml in the main branch). Database changes are integrated frequently and validated through CI/CD pipelines with Harness Database DevOps.
- changeSet:
id: create-users-table
author: dev1
changes:
- createTable:
tableName: users
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: name
type: varchar(255)
Developers create separate changelog files for each feature in its own branch. For example: changelog-login.yaml, changelog-payments.yaml. These feature branches are merged later into the main changelog.
- changeSet:
id: add-login-column
author: dev2
changes:
- addColumn:
tableName: users
columns:
- column:
name: last_login
type: timestamp
This approach focuses on progressive database deployments across environments (dev → staging → production). A single changelog file is promoted sequentially through environments using CI/CD pipelines in Harness Database DevOps.
In practice, many teams mix approaches. For example, feature branches that feed into a staged environment-based pipeline.
For database deployment, the choice isn’t just about speed, it’s about balancing schema safety, team collaboration, and compliance. Trunk-based keeps it simple and fast, feature-based allows isolation and flexibility, while environment-based ensures controlled progression. With Liquibase OSS for changelog management and Harness Database DevOps for automation, you can choose the strategy that aligns with your database culture, team size, and risk tolerance.
However, the real differentiator lies in automation and governance. Harness Database DevOps goes beyond just running migrations, it integrates with Liquibase OSS to provide automated rollbacks, audit trails, and CI/CD-native approvals. Whether you’re adopting trunk-based for agility, feature-based for collaboration, or environment-based for compliance, Harness enables you to scale safely and confidently.
Trunk-based and environment-based strategies both help reduce drift, whereas feature-based deployments can increase it, if branches live too long.
Break changes into modular changelog files and use Liquibase contexts or labels to organize them.
Environment-based deployment is safest since it validates changes across dev and staging before production.
Yes. Harness Database DevOps integrates with Liquibase OSS to support trunk-based (single changelog), feature-based (multiple changelogs/branches), and environment-based (sequential updates).
Liquibase OSS lets you define rollback logic in each changeset, but Harness Database DevOps takes it further by automating when and how rollbacks run. In practice, Harness can trigger rollbacks automatically on pipeline failures, allow selective rollbacks of specific changesets, and enforce rollback approvals in environment-based workflows (dev → staging → prod).
This means you don’t just have rollback scripts sitting in your changelog, you have a safety net where Harness executes them consistently, tracks the audit trail, and ensures failed changes are reverted before reaching production.
Stop struggling with tools—master modern CI/CD and turn deployment headaches into smooth, automated workflows.