Data migration : is there a tool similar to Flyway or Liquibase for Couchbase?

java
n1ql

#1

We are at a state in our application development where we will want to update several documents at the same time when we deploy a new version of our application.

Example of typical migration, let’s imagine we have several customer documents:

{
  type: CUSTOMER
  name: Alfred Hitchcock
}

Now the new version of our application needs to know the first and last name of our customer, so we need to create those fields:

{
  type: CUSTOMER
  name: {
    firstName: Alfred,
    lastName: Hitchcock
  }
}

If we already have thousands of customers saved in our DB, that means that we need to decide on a migration strategy. What options are available for Couchbase? In the Java SQL world we’d use Flyway or Liquibase to keep track of migration scripts, is there something similar for Couchbase?


#2

There is no tool that I am aware of that allow similar functionalities as Liquibase or Flyway. You would have to come up with a migration strategy yourself, either as a N1QL query or application code.


#3

Looking for the same tool now. If someone has already had such tool, please share


#4

@vit, I’ve heard about but never used Couchmove.


#5

Tried it. It works fine.


#6

Sorry for revamping this thread, but we do have a tool for it now https://blog.couchbase.com/liquicouch-a-liquibase-like-framework-to-automate-schema-changes/