Skip to content

Added new Couchbase Driver#1374

Open
Ahbrown41 wants to merge 6 commits intogolang-migrate:masterfrom
Ahbrown41:feature/add-couchbase-driver
Open

Added new Couchbase Driver#1374
Ahbrown41 wants to merge 6 commits intogolang-migrate:masterfrom
Ahbrown41:feature/add-couchbase-driver

Conversation

@Ahbrown41
Copy link
Copy Markdown

@Ahbrown41 Ahbrown41 commented Mar 20, 2026

Add a new database driver for Couchbase Server supporting:

  • N1QL-based migrations via JSON migration files
  • Scope-level migrations with configurable collections
  • Advisory locking via document-based locks
  • Connection via URL or programmatic instance

Includes local fork of dktest with two fixes needed for
Docker-based integration tests:

Tested against couchbase:community-7.6.2 and community-8.0.0.

Copilot AI review requested due to automatic review settings March 20, 2026 16:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Couchbase database driver to migrate/v4, intended to support N1QL-based JSON migrations, scope/collection configuration, and advisory locking, plus CLI build-tag wiring and integration tests.

Changes:

  • Introduces database/couchbase driver implementation with URL parsing, migration execution, versioning, and locking.
  • Adds Couchbase docker-based integration tests and example JSON migration files.
  • Wires Couchbase into CLI build tags and Makefile, and updates go.mod/go.sum (including a local dktest replace).

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/cli/build_couchbase.go Adds build-tagged blank import to include Couchbase driver in CLI builds.
database/couchbase/couchbase.go New Couchbase driver implementation (Open/Run/Lock/Version/Drop/etc.).
database/couchbase/couchbase_test.go Adds docker-based integration tests for Couchbase 7.6.2 and 8.0.0.
database/couchbase/examples/migrations/*.json Adds example N1QL JSON migration files.
Makefile Adds couchbase to the DATABASE build tag list.
go.mod Updates Go version/deps and adds replace github.com/dhui/dktest => ./_dktest_local.
go.sum Adds checksums for newly introduced/upgraded dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 20, 2026

Coverage Status

coverage: 55.105% (+0.7%) from 54.432%
when pulling e2ee2e5 on Ahbrown41:feature/add-couchbase-driver
into 2bd822b on golang-migrate:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants