Added new Couchbase Driver - #1374
Conversation
There was a problem hiding this comment.
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/couchbasedriver 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 localdktestreplace).
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.
|
Hey @dhui let me know if I can help clarify anything with this PR or improve it. It is a great project, happy to help with some of the support to make it even better. I have some thoughts on testing etc that is worth a convo. |
|
@joschi happy to help here, let me know if anything is needed. I see you adjusted the contexts, oops I could have done that. Any idea if when this might see the light of day? |
Add a new database driver for Couchbase Server supporting:
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.