Recently I have faced a scenario where I needed to execute some sort of DDL and DML migration (I know these acronyms are not applicable for NoSQL, but anyway) on my CosmosDB database. These migration is planned to be automated and executed within CI/CD pipelines.
Apparently its is really hard to find any information online about the functionality I am trying to achieve. Here are some criteria:
- Store static data in source code repositories. Check. Possible to deploy to DB with some powershell
- Having javascript stored procedures in source code repos. Check. A bit of powershell again
- Modify some data to reflect application layer changes. E.g. adding some fields with default values or specific values collection-wide or on selected records. - not check. can't find acceptable solution as of now.
I am really frustrated about last point and trying to avoid creation of app that will apply DML changes using SDK. In .net world AFAIK EntityFramework does not support automated migrations in CosmosDB.
So question to a good community is: is there anything considered a good practice for automating Cosmos DB data modifications?
Does what I have stated above makes any sense or it is another attempt to deal with NoSQL DBMS as with RDBMS?