What support does Liquibase have for Couchbase?

Couchbase is a distributed NoSQL document database that combines the capabilities of a key-value store and a document database. It provides high performance, scalability, and flexible data models using JSON documents.

Verified Database Versions

Couchbase Version

Description

Comments

8.0

Works

Well tested

7.1.3

Works

Well tested

7.0.3

Works

Stable

< 7.0

Unsupported

Incompatible

Minimum supported version is 7.0 As it uses the latest Couchbase SDK, this extension supports fully qualified keyspaces Bucket.Scope.Collection Which are incompatible with the < 7.0 Cluster version

Command Support

Update Commands

The following update commands are supported:

  • update

  • update-count

  • update-one-changeset

  • update-testing-rollback

  • update-to-tag

The following commands are not supported. These are SQL-specific and not intended for NoSQL databases like Couchbase.

  • update-count-sql

  • update-one-changeset-sql

  • update-sql

  • update-to-tag-sql

Note: The -sql variant commands fail because they generate SQL output, which is not applicable to Couchbase's NoSQL architecture.

Rollback Commands

Rollback functionality is supported only for selected changesets. Only specific changesets can be automatically rolled back due to the nature of Couchbase's data structures.

The following rollback commands are supported:

  • rollback

  • rollback-count

  • rollback-one-changeset

  • rollback-one-update

  • rollback-to-date

The following rollback commands are not supported. These are SQL-specific and not intended for NoSQL databases like Couchbase.

  • future-rollback-count-sql

  • future-rollback-from-tag-sql

  • future-rollback-sql

  • rollback-sql

  • rollback-count-sql

  • rollback-one-changeset-sql

  • rollback-one-update-sql

  • rollback-to-date-sql

Note: The -sql variant commands fail because they generate SQL output, which is not applicable to Couchbase's NoSQL architecture.

Database Inspection Commands

The following database inspection commands are not currently supported for Couchbase:

  • diff

  • diff-changelog

  • generate-changelog

  • snapshot

  • snapshot-reference

These commands fail because Couchbase uses a non-JDBC connection type that is incompatible with Liquibase's inspection framework.

Change Tracking Commands

Most change tracking commands are supported. For example:

  • connect

  • history

  • status

  • unexpected-changesets

Not supported:

dbcl-history - DATABASECHANGELOGHISTORY functions are not yet implemented for Couchbase

Utility Commands

The following utility commands are supported:

  • calculate-checksum

  • changelog-sync

  • changelog-sync-to-tag

  • clear-checksums

  • list-locks

  • mark-next-changeset-ran

  • release-locks

  • set-contexts

  • set-labels

  • tag

  • validate

The following utility commands are not supported:

  • changelog-sync-sql - Not intended for NoSQL databases; generates SQL output

  • changelog-sync-to-tag-sql - Not intended for NoSQL databases; generates SQL output

  • mark-next-changeset-ran-sql - Not intended for NoSQL databases; generates SQL output

  • db-doc - Fails with JDBC connection casting issue

  • drop-all - Fails with JDBC connection casting issue

  • execute-sql - Not supported for Couchbase

  • tag-exists - Reports incorrect tag state

Supported Change Types

Liquibase supports the following Couchbase-specific change types:

Bucket Operations

  • Create bucket

  • Update bucket

  • Drop bucket

Scope Operations

  • Create scope

  • Drop scope

Collection Operations

  • Create collection

  • Drop collection

Index Operations

  • Create index (primary and secondary)

  • Drop index

Document Operations

  • Insert document(s) (either plain JSON inside the XML or JSON files)

  • Upsert document(s) (either plain JSON inside the XML or JSON files)

  • Mutate document

  • Remove document(s)

Query Operations

  • Execute query

  • SQL file (non-reactive only)

Preconditions

Liquibase supports the following preconditions for Couchbase:

  • Bucket exists

  • Scope exists

  • Collection exists

  • Index exists (primary and secondary)

  • Document exists

  • SQL check

Features Support

Targeted Rollbacks

Targeted rollbacks are supported for Couchbase, but only specific changesets can be automatically rolled back. Review your changelog carefully to ensure rollback compatibility.

Liquibase Checks

  • Changelog checks: Fully supported

  • Database checks: Not supported - Database-scoped checks fail due to connection type incompatibility

Observability

Liquibase Secure observability features have the following support levels:

  • Update reports: Fully supported

  • Rollback reports: Fully supported

  • Drift reports: Not supported - Fails due to general diff command limitations

  • Checks run reports: Fully supported

  • Structured logging: Not supported

Flows

The flow command is fully supported for Couchbase workflows.

Credentials Vaults

Liquibase Secure supports the following credentials vault integrations with Couchbase:

  • AWS Secrets Manager: Supported, but commands execute more slowly when using S3 compared to local file access

  • AWS Systems Manager: Fully supported

  • HashiCorp Vault: Fully supported

Note: When using AWS S3 for credentials, you may experience longer execution times. This is a known behavior under investigation.

DATABASECHANGELOGHISTORY Table

The DATABASECHANGELOGHISTORY (DBCLH) table feature is not currently supported for Couchbase.

Known Limitations

  • JDBC-based commands: Commands that require JDBC connections (diff, snapshot, generate-changelog, db-doc, drop-all) are not supported because Couchbase uses a non-JDBC connection type.

  • Database inspection: Due to Couchbase's document-oriented architecture, traditional database inspection and comparison features are not available.

  • Performance with cloud storage: When using AWS S3 as a credentials vault, command execution may be significantly slower than with local file access or other vault options.