0

I started working on a Java project where the chosen database was the Azure Cosmos DB SQL API, so reading the SQL API Cosmos DB introduction I understood that that SQL, in this case, is only for query and not for data manipulation(insert, delete). The question is: Does it make sense to use a schema migration tool like Flyway/Liquibase for this kind of database?

2 Answers 2

3

CosmosDb does not have any support for schemas at the database level. It's schema free with an indexing mechanism that allows for efficient querying of arbitrary JSON data. As such, a SQL schema migration tool doesn't make sense in this context and wouldn't work anyways. It's up to your application code to ensure that data is normalized and migrated to new formats if necessary.

Sign up to request clarification or add additional context in comments.

1 Comment

It makes no sense in terms of db schema migration but it makes sense in terms of db, containers creation, definitions (partition keys, unique keys), stored procedures, versioning of the incremental changes on those components.
1

Little late to the party but I think this might help: https://github.com/liquibase/liquibase-cosmosdb. It's an extension for Liquibase for Cosmos DB. So, pretty much what you were looking for!

1 Comment

Can someone please share any examples to integrate liquibase-cosmos db to a Java spring boot application?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.