couchbase view
Tue, 10/23/2012 - 03:42
hi,
i have this issue. We have group of developers where everybody has it's own bucket. What we need to keep synchronized are views. So my idea is to have one file with views defined under source control. This file shall then be somehow easily applicable to existing bucket so that views on this bucket would be updated.
does anybody has any idea how to approach it?
thanks Lubos
Just to make sure I understand what your asking let me re-phrase your question. It seems like you have a development cluster with a bucket assigned to each of your developers who are all working on the same project. You want to make sure the views on all of the developer buckets are the same and want to keep a file that contains all of the views in source control so that your developers can update the views on their buckets as they change.
One idea here would be to keep a script that contains a curl command for each view. When a developer wants to change a view they would just update this script. Since everything view related goes over http this should be easy to do. You can also have a parameter for the script that the takes a bucket name so that each developer would just run the script with the name of their bucket to update the views in their bucket.
Let me know if this works for you.
- Mike